Interface ManagementChannelShutdownHandle
-
- All Known Implementing Classes:
AbstractMessageHandler,ManagementChannelHandler
public interface ManagementChannelShutdownHandleA handle to a processor of management requests which can be used to coordinate a controlled shutdown of a processor that allows active operations to complete before shutting down. TODO this should be redone to use callbacks to signal when all operations are completed- Author:
- Emanuel Muckenhuber
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanawaitCompletion(long timeout, TimeUnit unit)Await the completion of all currently active operations.voidshutdown()Don't allow new operations, but still allow requests for existing ones.voidshutdownNow()This will attempt to cancel all active operations, without waiting for their completion.
-
-
-
Method Detail
-
shutdown
void shutdown()
Don't allow new operations, but still allow requests for existing ones.This method does not wait for previously submitted operations to be completed. Use
awaitCompletionto do that.
-
shutdownNow
void shutdownNow()
This will attempt to cancel all active operations, without waiting for their completion.
-
awaitCompletion
boolean awaitCompletion(long timeout, TimeUnit unit) throws InterruptedExceptionAwait the completion of all currently active operations.- Parameters:
timeout- the timeoutunit- the time unit- Returns:
falseif the timeout was reached and there were still active operations- Throws:
InterruptedException
-
-