public final class ShutdownManager extends Object
Makes sure all the resources are shutdown properly and in order.
| Modifier and Type | Method and Description |
|---|---|
protected static void |
deregisterShutdownHook()
Deregister the Shutdown hook.
|
static boolean |
isStopping()
Return true if the system is in the process of stopping.
|
static void |
registerEbeanServer(SpiEbeanServer server)
Register an ebeanServer to be shutdown when the JVM is shutdown.
|
static void |
registerServerFactory(BootupEbeanManager factory) |
protected static void |
registerShutdownHook()
Register the shutdown hook with the Runtime.
|
static void |
shutdown()
Shutdown gracefully cleaning up any resources as required.
|
static void |
touch()
Make sure the ShutdownManager is activated.
|
static void |
unregisterEbeanServer(SpiEbeanServer server)
Deregister an ebeanServer.
|
public static void registerServerFactory(BootupEbeanManager factory)
public static void touch()
public static boolean isStopping()
protected static void deregisterShutdownHook()
For running in a Servlet Container a redeploy will cause a shutdown, and for that case we need to make sure the shutdown hook is deregistered.
protected static void registerShutdownHook()
public static void shutdown()
This is typically invoked via JVM shutdown hook.
public static void registerEbeanServer(SpiEbeanServer server)
public static void unregisterEbeanServer(SpiEbeanServer server)
This is done when the ebeanServer is shutdown manually.
Copyright © 2014. All Rights Reserved.