public interface PriorityTask extends Comparable<PriorityTask>
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.
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.CommandPriorityCalculator,
QueryPriorityCalculator| Modifier and Type | Method and Description |
|---|---|
default int |
compareTo(PriorityTask that) |
long |
priority()
Returns the priority of this task.
|
long |
sequence()
Returns the sequence of this task.
|
long priority()
long sequence()
default int compareTo(PriorityTask that)
compareTo in interface Comparable<PriorityTask>Copyright © 2010–2023. All rights reserved.