Package org.axonframework.common.util
Interface PriorityTask
- All Superinterfaces:
Comparable<PriorityTask>
- All Known Implementing Classes:
PriorityCallable,PriorityRunnable
Represents a task such as
) defines the priority of the task. This task
uses the
Runnable or Comparable that adheres to a priority by implementing
Comparable. Uses a combination of priority and index to compare between this and
other PriorityTask 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
-
Method Summary
Modifier and TypeMethodDescriptiondefault intcompareTo(PriorityTask that) longpriority()Returns the priority of this task.longsequence()Returns the sequence of this task.
-
Method Details
-
priority
long priority()Returns the priority of this task.- Returns:
- The priority of this task.
-
sequence
long sequence()Returns the sequence of this task.- Returns:
- The sequence of this task.
-
compareTo
- Specified by:
compareToin interfaceComparable<PriorityTask>
-