Class OrderedExecutor
- java.lang.Object
-
- org.apache.activemq.artemis.utils.actors.HandlerBase
-
- org.apache.activemq.artemis.utils.actors.ProcessorBase<java.lang.Runnable>
-
- org.apache.activemq.artemis.utils.actors.OrderedExecutor
-
- All Implemented Interfaces:
java.util.concurrent.Executor,ArtemisExecutor
public class OrderedExecutor extends ProcessorBase<java.lang.Runnable> implements ArtemisExecutor
An executor that always runs all tasks in order, using a delegate executor to run the tasks.
More specifically, any call B to theexecute(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
STATE_FORCED_SHUTDOWN, STATE_NOT_RUNNING, STATE_RUNNING, tasks
-
-
Constructor Summary
Constructors Constructor Description OrderedExecutor(java.util.concurrent.Executor delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoTask(java.lang.Runnable task)voidexecute(java.lang.Runnable run)java.lang.StringtoString()-
Methods inherited from class org.apache.activemq.artemis.utils.actors.ProcessorBase
flush, isFlushed, remaining, shutdown, shutdown, shutdownNow, status, task
-
Methods inherited from class org.apache.activemq.artemis.utils.actors.HandlerBase
enter, inHandler, leave
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.utils.actors.ArtemisExecutor
flush, isFlushed, shutdown, shutdownNow, shutdownNow
-
-
-
-
Method Detail
-
doTask
protected final void doTask(java.lang.Runnable task)
- Specified by:
doTaskin classProcessorBase<java.lang.Runnable>
-
execute
public final void execute(java.lang.Runnable run)
- Specified by:
executein interfacejava.util.concurrent.Executor
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-