protected virtual void DoPut(StorePut put) { if (Items.Count < Capacity) { Items.Add(put.Value); put.Succeed(); } }
protected virtual void DoPut(StorePut put) { if (Items.Count < Capacity) { var pi = (PriorityItem)put.Value; Items.Enqueue(pi.Item, pi.Priority); put.Succeed(); } }
protected virtual void DoPut(StorePut put) { if (Items.Count < Capacity) { PutWaitingTime?.Add(Environment.ToDouble(Environment.Now - put.Time)); Items.Add(new StoreItem() { AdmissionDate = Environment.Now, Item = put.Value }); put.Succeed(); } }
protected virtual void DoPut(StorePut put) { if (Items.Count < Capacity) { var pi = (PriorityItem)put.Value; PutWaitingTime?.Add(Environment.ToDouble(Environment.Now - put.Time)); Items.Enqueue(new StoreItem() { AdmissionDate = Environment.Now, Item = pi.Item }, pi.Priority); put.Succeed(); } }
protected virtual void DoPut(StorePut put) { if (Items.Count < Capacity) { Items.Add(put.Value); put.Succeed(); } }