Package org.apache.cassandra.concurrent
Class SingleThreadExecutorPlus.AtLeastOnce
java.lang.Object
java.util.concurrent.atomic.AtomicBoolean
org.apache.cassandra.concurrent.SingleThreadExecutorPlus.AtLeastOnce
- All Implemented Interfaces:
Serializable,Runnable,SequentialExecutorPlus.AtLeastOnceTrigger
- Enclosing class:
- SingleThreadExecutorPlus
public static class SingleThreadExecutorPlus.AtLeastOnce
extends AtomicBoolean
implements SequentialExecutorPlus.AtLeastOnceTrigger, Runnable
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrun()voidRun the provided task after all queued and executing jobs have completedvoidsync()Wait until all queued and executing jobs have completedtoString()booleantrigger()Ensure the job is run at least once in its entirety after this method is invoked (including any already queued)Methods inherited from class java.util.concurrent.atomic.AtomicBoolean
compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndSet, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
Field Details
-
executor
-
run
-
-
Constructor Details
-
AtLeastOnce
-
-
Method Details
-
trigger
public boolean trigger()Description copied from interface:SequentialExecutorPlus.AtLeastOnceTriggerEnsure the job is run at least once in its entirety after this method is invoked (including any already queued)- Specified by:
triggerin interfaceSequentialExecutorPlus.AtLeastOnceTrigger
-
runAfter
Description copied from interface:SequentialExecutorPlus.AtLeastOnceTriggerRun the provided task after all queued and executing jobs have completed- Specified by:
runAfterin interfaceSequentialExecutorPlus.AtLeastOnceTrigger
-
sync
public void sync()Description copied from interface:SequentialExecutorPlus.AtLeastOnceTriggerWait until all queued and executing jobs have completed- Specified by:
syncin interfaceSequentialExecutorPlus.AtLeastOnceTrigger
-
run
public void run() -
toString
- Overrides:
toStringin classAtomicBoolean
-