Class OrderedExecutor
java.lang.Object
org.apache.activemq.artemis.utils.actors.HandlerBase
org.apache.activemq.artemis.utils.actors.ProcessorBase<Runnable>
org.apache.activemq.artemis.utils.actors.OrderedExecutor
- All Implemented Interfaces:
Executor,ArtemisExecutor
An executor that always runs all tasks in order, using a delegate executor to run the tasks.
More specifically, any call B to the execute(Runnable) method that happens-after another call A to the
same method, will result in B's task running after A's.
-
Field Summary
Fields inherited from class org.apache.activemq.artemis.utils.actors.ProcessorBase
requestedShutdown, STATE_FORCED_SHUTDOWN, STATE_NOT_RUNNING, STATE_RUNNING, tasks -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.activemq.artemis.utils.actors.ProcessorBase
flush, flush, isFlushed, remaining, shutdown, shutdown, shutdownNow, status, task, yieldMethods inherited from class org.apache.activemq.artemis.utils.actors.HandlerBase
enter, inHandler, leaveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.activemq.artemis.utils.actors.ArtemisExecutor
flush, inHandler, isFlushed, shutdown, shutdownNow, shutdownNow, yield
-
Constructor Details
-
OrderedExecutor
-
-
Method Details
-
isFair
public boolean isFair()- Specified by:
isFairin interfaceArtemisExecutor
-
setFair
If this OrderedExecutor is fair, it will yield for another executors after each task ran- Specified by:
setFairin interfaceArtemisExecutor
-
doTask
- Specified by:
doTaskin classProcessorBase<Runnable>
-
execute
-
toString
-