Package com.polarion.platform.shutdown
Interface IShutdownService
public interface IShutdownService
Shutdown service.
- Author:
- Stepan Roh, Polarion Software
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if shutdown is in progress and this shutdown was requested by user (so it is not due to an error).void
registerShutdownHook
(Runnable hook) Register shutdown hook.void
shutdown()
Shutdown current platform.void
Shutdown current platform.void
Unregister shutdown hook.
-
Method Details
-
registerShutdownHook
Register shutdown hook.Does nothing if hook was already registered.
- Parameters:
hook
- shutdown hook- Throws:
IllegalArgumentException
- ifhook
isnull
-
unregisterShutdownHook
Unregister shutdown hook.Does nothing if hook is not registered.
- Parameters:
hook
- shutdown hook- Throws:
IllegalArgumentException
- ifhook
isnull
-
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
-