public abstract class AsyncRunnableBase extends java.lang.Object implements AsyncRunnable
AsyncRunnable.State| Constructor and Description |
|---|
AsyncRunnableBase() |
| Modifier and Type | Method and Description |
|---|---|
AsyncRunnableBase |
await()
Wait while the state is STARTED
|
boolean |
await(long timeout,
java.util.concurrent.TimeUnit timeUnit) |
void |
close() |
protected void |
doClose() |
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
boolean |
isClosed() |
boolean |
isInitial() |
boolean |
isShutdown() |
boolean |
isStarted() |
boolean |
isStopped() |
AsyncRunnableBase |
shutdown()
Notify to stop to enqueue incoming requests.
|
AsyncRunnableBase |
start()
Start/resume the execution
|
AsyncRunnable.State |
state() |
AsyncRunnableBase |
stop()
Stop (with further resumption capability)
|
public final AsyncRunnable.State state()
state in interface AsyncRunnablepublic boolean isInitial()
isInitial in interface AsyncRunnablepublic boolean isStarted()
isStarted in interface AsyncRunnablepublic boolean isShutdown()
isShutdown in interface AsyncRunnablepublic boolean isStopped()
isStopped in interface AsyncRunnablepublic boolean isClosed()
isClosed in interface AsyncRunnablepublic final AsyncRunnableBase start()
AsyncRunnablestart in interface AsyncRunnablepublic final AsyncRunnableBase shutdown()
AsyncRunnableshutdown in interface AsyncRunnablepublic final AsyncRunnableBase stop()
AsyncRunnablestop in interface AsyncRunnablepublic final AsyncRunnableBase await() throws java.lang.InterruptedException
AsyncRunnableawait in interface AsyncRunnablejava.lang.InterruptedExceptionpublic boolean await(long timeout,
java.util.concurrent.TimeUnit timeUnit)
throws java.lang.InterruptedException
await in interface AsyncRunnablejava.lang.InterruptedExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionprotected void doStart()
protected void doShutdown()
protected void doStop()
protected void doClose()
throws java.io.IOException
java.io.IOException