Package com.polarion.platform.shutdown
Interface IShutdownService
public interface IShutdownService
Shutdown service.
- Author:
- Stepan Roh, Polarion Software
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if shutdown is in progress and this shutdown was requested by user (so it is not due to an error).voidregisterShutdownHook(Runnable hook) Register shutdown hook.voidshutdown()Shutdown current platform.voidShutdown current platform.voidUnregister shutdown hook.
-
Method Details
-
registerShutdownHook
Register shutdown hook.Does nothing if hook was already registered.
- Parameters:
hook- shutdown hook- Throws:
IllegalArgumentException- ifhookisnull
-
unregisterShutdownHook
Unregister shutdown hook.Does nothing if hook is not registered.
- Parameters:
hook- shutdown hook- Throws:
IllegalArgumentException- ifhookisnull
-
shutdown
void shutdown()Shutdown current platform.Whether this method returns or not depends on implementation and configuration, however it is ensured that either shutdown was initiated, is already running or was already performed.
-
shutdown
Shutdown current platform. Status String is setted to StatusFile.Whether this method returns or not depends on implementation and configuration, however it is ensured that either shutdown was initiated, is already running or was already performed.
-
isPlannedShutdown
boolean isPlannedShutdown()Returns true if shutdown is in progress and this shutdown was requested by user (so it is not due to an error).- Since:
- 3.8.0
-