public class ShutdownSystem extends AbstractResinSubSystem
Modifier and Type | Field and Description |
---|---|
static long |
shutdownWaitMax |
static int |
START_PRIORITY |
START_PRIORITY_CACHE_SERVICE, START_PRIORITY_CLASSLOADER, START_PRIORITY_CLUSTER_SERVICE, START_PRIORITY_DATABASE_SYSTEM, START_PRIORITY_DEFAULT, START_PRIORITY_ENV_SYSTEM, START_PRIORITY_NETWORK_CLUSTER, STOP_PRIORITY_CLASSLOADER
Modifier and Type | Method and Description |
---|---|
void |
addMemoryFreeTask(java.lang.Runnable task) |
static ShutdownSystem |
createAndAddService() |
static ShutdownSystem |
createAndAddService(boolean isEmbedded) |
void |
destroy()
Destroys the service.
|
void |
dumpThreads()
Dump threads for debugging
|
static ShutdownSystem |
getCurrent() |
ExitCode |
getExitCode() |
LifecycleState |
getLifecycleState()
Returns the current lifecycle state.
|
long |
getShutdownWaitMax() |
int |
getStartPriority()
Returns the start priority of the service, used to determine which
services to start first.
|
boolean |
isShutdownOnOutOfMemory() |
void |
setShutdownOnOutOfMemory(boolean isShutdown) |
void |
setShutdownWaitTime(long shutdownTime) |
void |
shutdown(ExitCode exitCode,
java.lang.String msg)
Start the server shutdown
|
static void |
shutdownActive(ExitCode exitCode,
java.lang.String msg)
Start the server shutdown
|
static void |
shutdownOutOfMemory(java.lang.String msg)
Start the server shutdown
|
void |
start()
Starts the server.
|
static void |
startFailsafe(java.lang.String msg) |
void |
startFailSafeShutdown(java.lang.String msg) |
void |
startFailSafeShutdown(java.lang.String msg,
long period) |
void |
stop()
Starts the server.
|
java.lang.String |
toString() |
getStopPriority, isActive, preCreate
public static final int START_PRIORITY
public static final long shutdownWaitMax
public static ShutdownSystem createAndAddService()
public static ShutdownSystem createAndAddService(boolean isEmbedded)
public static ShutdownSystem getCurrent()
public long getShutdownWaitMax()
public void setShutdownWaitTime(long shutdownTime)
public void setShutdownOnOutOfMemory(boolean isShutdown)
public boolean isShutdownOnOutOfMemory()
public LifecycleState getLifecycleState()
public ExitCode getExitCode()
public void addMemoryFreeTask(java.lang.Runnable task)
public static void shutdownOutOfMemory(java.lang.String msg)
public static void startFailsafe(java.lang.String msg)
public static void shutdownActive(ExitCode exitCode, java.lang.String msg)
public void shutdown(ExitCode exitCode, java.lang.String msg)
public void startFailSafeShutdown(java.lang.String msg)
public void startFailSafeShutdown(java.lang.String msg, long period)
public void dumpThreads()
public int getStartPriority()
ResinSubSystem
getStartPriority
in interface ResinSubSystem
getStartPriority
in class AbstractResinSubSystem
public void start()
start
in interface ResinSubSystem
start
in class AbstractResinSubSystem
public void stop()
stop
in interface ResinSubSystem
stop
in class AbstractResinSubSystem
public void destroy()
ResinSubSystem
destroy
in interface ResinSubSystem
destroy
in class AbstractResinSubSystem
public java.lang.String toString()
toString
in class AbstractResinSubSystem