Class AbstractAsyncHandlerProvider.ClosedProviderAsyncHandler
java.lang.Object
com.gigaspaces.internal.utils.concurrent.AbstractAsyncHandlerProvider.ClosedProviderAsyncHandler
- All Implemented Interfaces:
IAsyncHandler
- Enclosing class:
- AbstractAsyncHandlerProvider
public static class AbstractAsyncHandlerProvider.ClosedProviderAsyncHandler
extends Object
implements IAsyncHandler
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()booleanSpecifies whether this async handler is terminated and will not run againvoidresume()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 withvoidResume the life cycle of the handler if it is in suspended mode, the next execution will start immediately.voidStop the execution of this async handler.voidwakeUp()Wakes up the handler if in idle state and execute a cycle of the runnablebooleanwakeUpAndWait(long timeout, TimeUnit units) Wakes up the handler if in idle or suspended state and wait for it complete one cycle.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ClosedProviderAsyncHandler
public ClosedProviderAsyncHandler()
-
-
Method Details
-
wakeUp
public void wakeUp()Description copied from interface:IAsyncHandlerWakes up the handler if in idle state and execute a cycle of the runnable- Specified by:
wakeUpin interfaceIAsyncHandler
-
wakeUpAndWait
Description copied from interface:IAsyncHandlerWakes up the handler if in idle or suspended state and wait for it complete one cycle. Will wait for the specified timeout until one cycle is completed and returns true if the cycle was completed during that timeout, otherwise false.- Specified by:
wakeUpAndWaitin interfaceIAsyncHandler
-
stop
Description copied from interface:IAsyncHandlerStop the execution of this async handler. Will wait for the specified timeout until the handler is stopped which guarantees no following execution of the wrapped runnable. If the timeout elapsed this method returns but there might be an ongoing execution which was not stopped yet. However that will be no new execution after this method returns- Specified by:
stopin interfaceIAsyncHandler
-
resume
public void resume()Description copied from interface:IAsyncHandlerResume 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- Specified by:
resumein interfaceIAsyncHandler
-
resumeNow
public void resumeNow()Description copied from interface:IAsyncHandlerResume the life cycle of the handler if it is in suspended mode, the next execution will start immediately.- Specified by:
resumeNowin interfaceIAsyncHandler
-
isTerminated
public boolean isTerminated()Description copied from interface:IAsyncHandlerSpecifies whether this async handler is terminated and will not run again- Specified by:
isTerminatedin interfaceIAsyncHandler
-
getName
- Specified by:
getNamein interfaceIAsyncHandler
-