public class ShutdownOperations extends java.lang.Object
Operations that should be executed on shutdown.
Modifiers | Name | Description |
---|---|---|
static java.lang.Runnable |
DEFAULT_SHUTDOWN_OPERATION |
|
private static org.apache.commons.logging.Log |
LOG |
|
private static java.util.Collection<java.lang.Runnable> |
preservedShutdownOperations |
|
private static java.util.Collection<java.lang.Runnable> |
shutdownOperations |
Type Params | Return Type | Name and description |
---|---|---|
|
public static void |
addOperation(java.lang.Runnable runnable) Adds a shutdown operation which will be run once for the next shutdown |
|
public static void |
addOperation(java.lang.Runnable runnable, boolean preserveForNextShutdown) Adds a shutdown operation |
|
public static void |
resetOperations() Clears all shutdown operations without running them. |
|
public static void |
runOperations() Runs the shutdown operations |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Adds a shutdown operation which will be run once for the next shutdown
runnable
- The runnable operationAdds a shutdown operation
runnable
- The runnable operationpreserveForNextShutdown
- should preserve the operation for subsequent shutdowns, useful in testsClears all shutdown operations without running them. Also clears operations that are kept after running operations.
Runs the shutdown operations