Interface Shutdownable
-
- All Known Subinterfaces:
Router,ShutdownableExecutorService,ShutdownableResource,ShutdownableScheduledExecutorService
- All Known Implementing Classes:
AbstractShutdownableResource,AsyncPoolImpl,AsyncQOSPoolImpl,Router4Impl,ShutdownableChannelGroup,ShutdownableEventLoopGroup,ShutdownableExecutorServiceImpl,ShutdownableHashedWheelTimer,ShutdownableNioEventLoopGroup,ShutdownableScheduledExecutorServiceImpl,SyncResourceRegistry,SyncShutdownableAdapter
public interface Shutdownable
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidshutdown()Starts the shutdown process.static booleanshutdownNow(java.lang.Object object)voidwaitForShutdown()Waits for shutdown to completevoidwaitForShutdown(long timeoutInMs)Waits for shutdown to complete with a timeout
-
-
-
Method Detail
-
shutdown
void shutdown()
Starts the shutdown process. It is recommended to perform the actual shutdown activity in a separate thread from the thread that calls shutdown
-
waitForShutdown
void waitForShutdown() throws java.lang.InterruptedException, java.lang.IllegalStateExceptionWaits for shutdown to complete- Throws:
java.lang.InterruptedException- when the wait is interruptedjava.lang.IllegalStateException- when the method is invoked when the shutdown has yet to be started
-
waitForShutdown
void waitForShutdown(long timeoutInMs) throws java.lang.InterruptedException, java.lang.IllegalStateException, java.util.concurrent.TimeoutExceptionWaits for shutdown to complete with a timeout- Parameters:
timeoutInMs- number of milliseconds to wait before throwing TimeoutException- Throws:
java.lang.InterruptedException- when the wait is interruptedjava.lang.IllegalStateException- when the method is invoked when the shutdown has yet to be startedjava.util.concurrent.TimeoutException- when the operation times out
-
shutdownNow
static boolean shutdownNow(java.lang.Object object)
-
-