Package jadex.commons.concurrent
Class LoadManagingExecutionService.Task
- java.lang.Object
-
- jadex.commons.concurrent.LoadManagingExecutionService.Task
-
- All Implemented Interfaces:
java.lang.Comparable,java.lang.Runnable
- Enclosing class:
- LoadManagingExecutionService
public class LoadManagingExecutionService.Task extends java.lang.Object implements java.lang.Runnable, java.lang.ComparableA task info holds a task and meta information.
-
-
Field Summary
Fields Modifier and Type Field Description protected IExecutableexecutableThe task.protected doublepriorityThe priority.protected intseqnrThe sequence number.
-
Constructor Summary
Constructors Constructor Description Task(IExecutable task, double priority)Create a new task info for a given task.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object obj)Return a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.voidrun()Perform the task once and notify the manager.java.lang.StringtoString()Create a string representation of the task info.
-
-
-
Field Detail
-
executable
protected IExecutable executable
The task.
-
priority
protected double priority
The priority.
-
seqnr
protected int seqnr
The sequence number.
-
-
Constructor Detail
-
Task
public Task(IExecutable task, double priority)
Create a new task info for a given task.
-
-
Method Detail
-
run
public void run()
Perform the task once and notify the manager.- Specified by:
runin interfacejava.lang.Runnable
-
compareTo
public int compareTo(java.lang.Object obj)
Return a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.- Specified by:
compareToin interfacejava.lang.Comparable
-
toString
public java.lang.String toString()
Create a string representation of the task info.- Overrides:
toStringin classjava.lang.Object
-
-