Interface ManagementChannelShutdownHandle
- All Known Implementing Classes:
AbstractMessageHandler,ManagementChannelHandler
public interface ManagementChannelShutdownHandle
A 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
Modifier and TypeMethodDescriptionbooleanawaitCompletion(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.voidThis will attempt to cancel all active operations, without waiting for their completion.
-
Method Details
-
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
Await 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
-