private static class OrderedShutdownHooks.ShutdownHook
extends java.lang.Object
Runnable action that defines the task to be performed during shutdown.| Modifier and Type | Field and Description |
|---|---|
(package private) java.lang.Runnable |
action
The action to be executed during shutdown
|
(package private) int |
priority
The priority level of the shutdown hook
|
| Constructor and Description |
|---|
ShutdownHook(int priority,
java.lang.Runnable action)
Constructs a new ShutdownHook with the specified priority level and action.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Compare two instances.
|
int |
hashCode()
Calculate hash code
|
int priority
java.lang.Runnable action
ShutdownHook(int priority,
java.lang.Runnable action)
priority - The priority level of the shutdown hook.action - The action to be executed during shutdown.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - An object to compare with.true if the two are identical.public int hashCode()
hashCode in class java.lang.Object