Class PriorityCallable<T>
java.lang.Object
org.axonframework.axonserver.connector.PriorityCallable<T>
- All Implemented Interfaces:
Comparable<PriorityTask>,Callable<T>,PriorityTask
A wrapper class of
Callables that adheres to a priority by implementing PriorityTask. Uses a
combination of priority and index to compare between this and other priority task instances.
A calculator (e.g. CommandPriorityCalculator) defines the
priority of the task. This task uses the index to differentiate between tasks with the same priority,
ensuring the insert order is leading in those scenarios.- Since:
- 4.6.0
- Author:
- Stefan Dragisic, Milan Savic, Allard Buijze, Steven van Beelen, Mitchell Herrijgers
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPriorityCallable(Callable<T> task, long priority, long sequence) Construct a priority task. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.axonframework.axonserver.connector.PriorityTask
compareTo
-
Constructor Details
-
Method Details
-
call
-
priority
public long priority()Description copied from interface:PriorityTaskReturns the priority of this task.- Specified by:
priorityin interfacePriorityTask- Returns:
- The priority of this task.
-
sequence
public long sequence()Description copied from interface:PriorityTaskReturns the sequence of this task.- Specified by:
sequencein interfacePriorityTask- Returns:
- The sequence of this task.
-
equals
-
hashCode
public int hashCode() -
toString
-