Package org.apache.cassandra.concurrent
Interface SequentialExecutorPlus
-
- All Superinterfaces:
java.util.concurrent.Executor
,ExecutorPlus
,java.util.concurrent.ExecutorService
,ResizableThreadPool
- All Known Subinterfaces:
LocalAwareSequentialExecutorPlus
- All Known Implementing Classes:
LocalAwareSingleThreadExecutorPlus
,SingleThreadExecutorPlus
public interface SequentialExecutorPlus extends ExecutorPlus
AnExecutorPlus
that guarantees the order of execution matches the order of task submission, and provides a simple mechanism for the recurring pattern of ensuring a job is executed at least once after some point in time (i.e. ensures that at most one copy of the task is queued, with up to one copy running as well)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SequentialExecutorPlus.AtLeastOnceTrigger
-
Nested classes/interfaces inherited from interface org.apache.cassandra.concurrent.ExecutorPlus
ExecutorPlus.MaximumPoolSizeListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SequentialExecutorPlus.AtLeastOnceTrigger
atLeastOnceTrigger(java.lang.Runnable runnable)
Return an object for orchestrating the execution of this task at least once (in its entirety) after the trigger is invoked, i.e.-
Methods inherited from interface org.apache.cassandra.concurrent.ExecutorPlus
execute, inExecutor, invokeAll, invokeAll, invokeAny, invokeAny, maybeExecuteImmediately, submit, submit, submit, submit, submit, submit
-
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, isShutdown, isTerminated, shutdown, shutdownNow
-
Methods inherited from interface org.apache.cassandra.concurrent.ResizableThreadPool
getActiveTaskCount, getCompletedTaskCount, getCorePoolSize, getMaximumPoolSize, getMaxTasksQueued, getPendingTaskCount, oldestTaskQueueTime, setCorePoolSize, setMaximumPoolSize
-
-
-
-
Method Detail
-
atLeastOnceTrigger
SequentialExecutorPlus.AtLeastOnceTrigger atLeastOnceTrigger(java.lang.Runnable runnable)
Return an object for orchestrating the execution of this task at least once (in its entirety) after the trigger is invoked, i.e. saturating the number of pending tasks at 1 (2 including any possibly executing at the time of invocation)
-
-