Modifier and Type | Class and Description |
---|---|
static class |
WaarpShutdownHook.ShutdownConfiguration
Class for argument of creation of WaarpShutdownHook
|
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
static WaarpShutdownHook |
shutdownHook
Thread for ShutdownHook
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
WaarpShutdownHook(WaarpShutdownHook.ShutdownConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
static void |
addShutdownHook()
For Server part
|
protected abstract void |
exit()
Real exit function
|
static boolean |
isInShutdown()
Says if the Process is currently in shutdown
|
static boolean |
isRestart() |
static boolean |
isShutdownStarting() |
void |
launchFinalExit()
Extra call to ensure exit after long delay
|
static void |
registerMain(Class<?> main,
String[] args)
Called to setup main class and args to enable restart
|
static void |
removeShutdownHook()
For Server part
|
void |
run() |
static void |
setRestart(boolean toRestart)
Set the way software should shutdown: with (true) or without restart (false)
|
static void |
shutdownWillStart()
To specify that shutdown will soon start
|
static void |
terminate(boolean immediateSet)
This function is the top function to be called when the process is to be shutdown.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static WaarpShutdownHook shutdownHook
public WaarpShutdownHook(WaarpShutdownHook.ShutdownConfiguration configuration)
public static void addShutdownHook()
public static void removeShutdownHook()
public static boolean isInShutdown()
public static boolean isShutdownStarting()
public static void shutdownWillStart()
public static void terminate(boolean immediateSet)
immediateSet
- public void launchFinalExit()
protected abstract void exit()
public static void registerMain(Class<?> main, String[] args)
main
- args
- public static void setRestart(boolean toRestart)
toRestart
- public static boolean isRestart()
Copyright © 2009–2019 Waarp. All rights reserved.