Class AgentTaskQueue
Holds an IAgentTask queue
Namespace: i5.VirtualAgents.ScheduleBasedExecution
Assembly: cs.temp.dll.dll
Syntax
public class AgentTaskQueue
Constructors
AgentTaskQueue()
Create an empty IAgentTask queue
Declaration
public AgentTaskQueue()
Methods
AddTask(IAgentTask, Int32)
Add a new task to the queue according to the FIFO principle but with priority categories
Declaration
public void AddTask(IAgentTask task, int priority = 0)
Parameters
Type | Name | Description |
---|---|---|
IAgentTask | task | Any task that implements the IAgentTask interface |
Int32 | priority | Priority of the task. Tasks with high importance should get a positive value, less important tasks a negative value. Default tasks have a priority of 0. |
PeekNextTask()
Peeks the next task in the queue
Declaration
public IAgentTask PeekNextTask()
Returns
Type | Description |
---|---|
IAgentTask | Returns the next upcoming task in the queue, null if no more tasks are queued |
RequestNextTask()
Request the next task from the queue
Declaration
public IAgentTask RequestNextTask()
Returns
Type | Description |
---|---|
IAgentTask | Next task from the queue or null if the queue is empty |