Class PriorityCallable<T>

java.lang.Object
org.axonframework.axonserver.connector.PriorityCallable<T>
All Implemented Interfaces:
Comparable<PriorityTask>, Callable<T>, PriorityTask

public class PriorityCallable<T> extends Object implements 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 Details

    • PriorityCallable

      public PriorityCallable(Callable<T> task, long priority, long sequence)
      Construct a priority task.
      Parameters:
      task - The Callable<T> that should be executed with a priority.
      priority - The priority of the task to execute, dedicating the order among tasks.
      sequence - The sequence of the task to execute, dedicating the order among equal priority tasks.
  • Method Details