public virtual StoreGet Get() { var get = new StoreGet(Environment, TriggerPut); GetQueue.Enqueue(get); TriggerGet(); return(get); }
public virtual CraneScheduleStoreGet Get(ICraneAgent agent) { var get = new CraneScheduleStoreGet(Environment.Environment, agent); GetQueue.AddLast(get); TriggerGet(); return(get); }
public virtual FilterStoreGet Get(Func <object, bool> filter = null) { var get = new FilterStoreGet(Environment, TriggerPut, filter ?? TrueFunc); GetQueue.AddLast(get); TriggerGet(); return(get); }
public virtual FilterStoreGet Get(Func <object, bool> filter = null) { if (filter == null) { filter = _ => true; } var get = new FilterStoreGet(Environment, TriggerPut, filter); GetQueue.AddLast(get); TriggerGet(); return(get); }
public virtual ContainerGet Get(double amount) { if (amount > Capacity) { throw new ArgumentException("Cannot get more than capacity", "amount"); } var get = new ContainerGet(Environment, TriggerPut, amount); GetQueue.Enqueue(get); TriggerGet(); return(get); }
protected virtual void TriggerGet(Event @event = null) { while (GetQueue.Count > 0) { var get = GetQueue.Peek(); DoGet(get); if (get.IsTriggered) { GetQueue.Dequeue(); } else { break; } } }
protected virtual void TriggerGet(Event @event = null) { while (GetQueue.Count > 0) { var get = GetQueue.Peek(); DoGet(get); if (get.IsTriggered) { GetQueue.Dequeue(); TriggerWhenAtMost(); TriggerWhenChange(); } else { break; } } Fillrate?.UpdateTo(Level / Capacity); GetQueueLength?.UpdateTo(GetQueue.Count); }
protected virtual void TriggerGet(Event @event = null) { while (GetQueue.Count > 0) { var get = GetQueue.Peek(); DoGet(get); if (get.IsTriggered) { GetQueue.Dequeue(); TriggerWhenEmpty(); TriggerWhenChange(); } else { break; } } Utilization?.UpdateTo(Count / (double)Capacity); WIP?.UpdateTo(Count + PutQueue.Count + GetQueue.Count); GetQueueLength?.UpdateTo(GetQueue.Count); }
protected virtual void TriggerGet(Event @event = null) { var current = GetQueue.First; while (current != null) { var get = current.Value; DoGet(get); if (get.IsTriggered) { var next = current.Next; GetQueue.Remove(current); current = next; } else { current = current.Next; } if (Items.Count == 0) { break; } } }
public async Task <IActionResult> GetQueueAzure() { await GetQueue.RegisterOnMessageHandlerAndReceiveMessages(); return(Ok()); }
public virtual void CancelWaiting(CraneScheduleStoreGet order) { GetQueue.Remove(order); TriggerGet(); }