Class OrderedExecutorFactory

java.lang.Object
org.apache.activemq.artemis.utils.actors.OrderedExecutorFactory
All Implemented Interfaces:
ExecutorFactory

public final class OrderedExecutorFactory extends Object implements ExecutorFactory
A factory for producing executors that run all tasks in order, which delegate to a single common executor instance.
  • Constructor Details

    • OrderedExecutorFactory

      public OrderedExecutorFactory(Executor parent)
      Construct a new instance delegating to the given parent executor.
      Parameters:
      parent - the parent executor
  • Method Details

    • flushExecutor

      public static boolean flushExecutor(Executor executor)
    • flushExecutor

      public static boolean flushExecutor(Executor executor, long timeout, TimeUnit unit)
    • getExecutor

      public ArtemisExecutor getExecutor()
      Get an executor that always executes tasks in order.
      Specified by:
      getExecutor in interface ExecutorFactory
      Returns:
      an ordered executor
    • getParent

      public Executor getParent()
      I couldn't figure out how to make a new method to return a generic Actor with a given type
    • isFair

      public boolean isFair()
    • setFair

      public OrderedExecutorFactory setFair(boolean fair)