예제 #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="elem">Object to be queued</param>
 /// <param name="btime">Time it will take to finish it's buissines</param>
 /// <param name="term">Term created for calendar callback</param>
 public QueueElement(IQueueable elem, uint btime, uint timecame, Flow.Calendar.Term term, DESF.Flow.Event.Event ev)
 {
     _element      = elem;
     _blockingTime = btime;
     _timeCame     = timecame;
     _term         = term;
     _event        = ev;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="elem">Object to be queued</param>
 /// <param name="btime">Time it will take to finish it's buissines</param>
 /// <param name="term">Term created for calendar callback</param>
 public QueueElement(IQueueable elem, uint btime, uint timecame, Flow.Calendar.Term term, DESF.Flow.Event.Event ev)
 {
     _element = elem;
     _blockingTime = btime;
     _timeCame = timecame;
     _term = term;
     _event = ev;
 }
예제 #3
0
 /// <summary>
 /// Add a new entitity to the queue
 /// </summary>
 /// <param name="elem">The queueing entity</param>
 /// <param name="bloctime">Time the entity will block others</param>
 public void Add(IQueueable elem, uint bloctime, DESF.Flow.Event.Event ev)
 {
     Flow.Calendar.Term term = new Flow.Calendar.Term(_context.Calendar.Time + _length + bloctime, this, "ElementEjected", null);
     _elements.Add(new QueueElement(elem, bloctime, _context.Calendar.Time, term, ev));
     _context.Calendar.AddTerm(term);
     _length += bloctime;
     _context.Logger.Log(this, String.Format("Added new element. Bloctime: {0}, new length: {1}, elements: {2}", bloctime, _length, MembersCount), 9);
 }