Package org.apache.cassandra.concurrent
Class InfiniteLoopExecutor
- java.lang.Object
-
- org.apache.cassandra.concurrent.InfiniteLoopExecutor
-
- All Implemented Interfaces:
Interruptible
,Shutdownable
public class InfiniteLoopExecutor extends java.lang.Object implements Interruptible
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InfiniteLoopExecutor.Daemon
static class
InfiniteLoopExecutor.InternalState
static class
InfiniteLoopExecutor.Interrupts
static class
InfiniteLoopExecutor.SimulatorSafe
-
Nested classes/interfaces inherited from interface org.apache.cassandra.concurrent.Interruptible
Interruptible.SimpleTask, Interruptible.State, Interruptible.Task, Interruptible.TerminateException
-
-
Constructor Summary
Constructors Constructor Description InfiniteLoopExecutor(java.lang.String name, Interruptible.Task task, InfiniteLoopExecutor.Daemon daemon)
InfiniteLoopExecutor(java.util.function.BiFunction<java.lang.String,java.lang.Runnable,java.lang.Thread> threadStarter, java.lang.String name, Interruptible.Task task, InfiniteLoopExecutor.Interrupts interrupts)
InfiniteLoopExecutor(ExecutorFactory factory, java.lang.String name, Interruptible.Task task, InfiniteLoopExecutor.Daemon daemon)
InfiniteLoopExecutor(ExecutorFactory factory, java.lang.String name, Interruptible.Task task, InfiniteLoopExecutor.Daemon daemon, InfiniteLoopExecutor.Interrupts interrupts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitTermination(long time, java.util.concurrent.TimeUnit unit)
Await termination of this object, i.e.void
interrupt()
boolean
isAlive()
boolean
isTerminated()
void
shutdown()
Shutdown once any remaining work has completed (however this is defined for the implementation).java.lang.Object
shutdownNow()
Shutdown immediately, possibly interrupting ongoing work, and cancelling work that is queued.
-
-
-
Constructor Detail
-
InfiniteLoopExecutor
public InfiniteLoopExecutor(java.lang.String name, Interruptible.Task task, InfiniteLoopExecutor.Daemon daemon)
-
InfiniteLoopExecutor
public InfiniteLoopExecutor(ExecutorFactory factory, java.lang.String name, Interruptible.Task task, InfiniteLoopExecutor.Daemon daemon)
-
InfiniteLoopExecutor
public InfiniteLoopExecutor(ExecutorFactory factory, java.lang.String name, Interruptible.Task task, InfiniteLoopExecutor.Daemon daemon, InfiniteLoopExecutor.Interrupts interrupts)
-
InfiniteLoopExecutor
public InfiniteLoopExecutor(java.util.function.BiFunction<java.lang.String,java.lang.Runnable,java.lang.Thread> threadStarter, java.lang.String name, Interruptible.Task task, InfiniteLoopExecutor.Interrupts interrupts)
-
-
Method Detail
-
interrupt
public void interrupt()
- Specified by:
interrupt
in interfaceInterruptible
-
shutdown
public void shutdown()
Description copied from interface:Shutdownable
Shutdown once any remaining work has completed (however this is defined for the implementation).- Specified by:
shutdown
in interfaceShutdownable
-
shutdownNow
public java.lang.Object shutdownNow()
Description copied from interface:Shutdownable
Shutdown immediately, possibly interrupting ongoing work, and cancelling work that is queued.- Specified by:
shutdownNow
in interfaceShutdownable
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfaceShutdownable
-
awaitTermination
public boolean awaitTermination(long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
Description copied from interface:Shutdownable
Await termination of this object, i.e. the cessation of all current and future work.- Specified by:
awaitTermination
in interfaceShutdownable
- Throws:
java.lang.InterruptedException
-
isAlive
public boolean isAlive()
-
-