Package org.axonframework.common.util
Class PriorityCallable<T>
java.lang.Object
org.axonframework.common.util.PriorityCallable<T>
- Type Parameters:
T- The type of the result returned by theCallable.call()method.
- All Implemented Interfaces:
Comparable<PriorityTask>,Callable<T>,PriorityTask
A wrapper class of
) defines the
priority of the task. This task uses the
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.
invalid reference
org.axonframework.commandhandling.CommandPriorityCalculator
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
-
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.common.util.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
-