|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.util.ShutdownHookManager
public class ShutdownHookManager
The ShutdownHookManager
enables running shutdownHook
in a deterministic order, higher priority first.
Method Summary | |
---|---|
void |
addShutdownHook(Runnable shutdownHook,
int priority)
Adds a shutdownHook with a priority, the higher the priority the earlier will run. |
static ShutdownHookManager |
get()
Return ShutdownHookManager singleton. |
boolean |
hasShutdownHook(Runnable shutdownHook)
Indicates if a shutdownHook is registered or not. |
boolean |
isShutdownInProgress()
Indicates if shutdown is in progress or not. |
boolean |
removeShutdownHook(Runnable shutdownHook)
Removes a shutdownHook. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ShutdownHookManager get()
ShutdownHookManager
singleton.
ShutdownHookManager
singleton.public void addShutdownHook(Runnable shutdownHook, int priority)
shutdownHook
- shutdownHook Runnable
priority
- priority of the shutdownHook.public boolean removeShutdownHook(Runnable shutdownHook)
shutdownHook
- shutdownHook to remove.
public boolean hasShutdownHook(Runnable shutdownHook)
shutdownHook
- shutdownHook to check if registered.
public boolean isShutdownInProgress()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |