public class InfiniteLoopExecutor extends java.lang.Object implements Interruptible
Modifier and Type | Class and Description |
---|---|
static class |
InfiniteLoopExecutor.Daemon |
static class |
InfiniteLoopExecutor.InternalState |
static class |
InfiniteLoopExecutor.Interrupts |
static class |
InfiniteLoopExecutor.SimulatorSafe |
Interruptible.SimpleTask, Interruptible.State, Interruptible.Task, Interruptible.TerminateException
Constructor and Description |
---|
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) |
InfiniteLoopExecutor(java.lang.String name,
Interruptible.Task task,
InfiniteLoopExecutor.Daemon daemon) |
Modifier and Type | Method and 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.
|
public InfiniteLoopExecutor(java.lang.String name, Interruptible.Task task, InfiniteLoopExecutor.Daemon daemon)
public InfiniteLoopExecutor(ExecutorFactory factory, java.lang.String name, Interruptible.Task task, InfiniteLoopExecutor.Daemon daemon)
public InfiniteLoopExecutor(ExecutorFactory factory, java.lang.String name, Interruptible.Task task, InfiniteLoopExecutor.Daemon daemon, InfiniteLoopExecutor.Interrupts interrupts)
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)
public void interrupt()
interrupt
in interface Interruptible
public void shutdown()
Shutdownable
shutdown
in interface Shutdownable
public java.lang.Object shutdownNow()
Shutdownable
shutdownNow
in interface Shutdownable
public boolean isTerminated()
isTerminated
in interface Shutdownable
public boolean awaitTermination(long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
Shutdownable
awaitTermination
in interface Shutdownable
java.lang.InterruptedException
public boolean isAlive()
Copyright © 2009- The Apache Software Foundation