public static class ThreadAsyncHandlerProvider.AsyncRunnableWrapper extends Object implements Runnable, IAsyncHandler
| Constructor and Description |
|---|
AsyncRunnableWrapper(ThreadAsyncHandlerProvider provider,
Callable<IAsyncHandlerProvider.CycleResult> runnable,
long idleDelayMilis,
boolean waitIdleDelayBeforeStart) |
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
boolean |
isTerminated()
Specifies whether this async handler is terminated and will not run again
|
void |
resume()
Resume the life cycle of the handler if it is in suspended mode, the next execution will be
scheduled according to the idle delay timeout the handler was created with
|
void |
resumeNow()
Resume the life cycle of the handler if it is in suspended mode, the next execution will
start immediately.
|
void |
run() |
void |
setThread(Thread thread) |
void |
stop(long timeout,
TimeUnit units)
Stop the execution of this async handler.
|
void |
wakeUp()
Wakes up the handler if in idle state and execute a cycle of the runnable
|
boolean |
wakeUpAndWait(long timeout,
TimeUnit units)
Wakes up the handler if in idle or suspended state and wait for it complete one cycle.
|
public AsyncRunnableWrapper(ThreadAsyncHandlerProvider provider, Callable<IAsyncHandlerProvider.CycleResult> runnable, long idleDelayMilis, boolean waitIdleDelayBeforeStart)
public void setThread(Thread thread)
public void wakeUp()
IAsyncHandlerwakeUp in interface IAsyncHandlerpublic boolean wakeUpAndWait(long timeout,
TimeUnit units)
IAsyncHandlerwakeUpAndWait in interface IAsyncHandlerpublic void stop(long timeout,
TimeUnit units)
IAsyncHandlerstop in interface IAsyncHandlerpublic void resume()
IAsyncHandlerresume in interface IAsyncHandlerpublic void resumeNow()
IAsyncHandlerresumeNow in interface IAsyncHandlerpublic boolean isTerminated()
IAsyncHandlerisTerminated in interface IAsyncHandlerpublic String getName()
getName in interface IAsyncHandlerCopyright © GigaSpaces.