public class ShutdownHookCleanUp extends Object implements ClassLoaderPreMortemCleanUp
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
executeShutdownHooks
Should shutdown hooks registered from the application be executed at application shutdown?
|
static int |
SHUTDOWN_HOOK_WAIT_MS_DEFAULT
Default no of milliseconds to wait for shutdown hook to finish execution
|
protected int |
shutdownHookWaitMs
No of milliseconds to wait for shutdown hooks to finish execution, before stopping them.
|
| Constructor and Description |
|---|
ShutdownHookCleanUp()
Constructor for test case
|
ShutdownHookCleanUp(boolean executeShutdownHooks,
int shutdownHookWaitMs) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp(ClassLoaderLeakPreventor preventor)
Perform cleanup actions needed to make provided
ClassLoaderLeakPreventor.classLoader
ready for garbage collection. |
protected void |
removeShutdownHook(ClassLoaderLeakPreventor preventor,
Thread shutdownHook)
Deregister shutdown hook and execute it immediately
|
void |
setExecuteShutdownHooks(boolean executeShutdownHooks) |
void |
setShutdownHookWaitMs(int shutdownHookWaitMs) |
public static final int SHUTDOWN_HOOK_WAIT_MS_DEFAULT
protected boolean executeShutdownHooks
protected int shutdownHookWaitMs
public ShutdownHookCleanUp()
public ShutdownHookCleanUp(boolean executeShutdownHooks,
int shutdownHookWaitMs)
public void setExecuteShutdownHooks(boolean executeShutdownHooks)
public void setShutdownHookWaitMs(int shutdownHookWaitMs)
public void cleanUp(ClassLoaderLeakPreventor preventor)
ClassLoaderPreMortemCleanUpClassLoaderLeakPreventor.classLoader
ready for garbage collection.cleanUp in interface ClassLoaderPreMortemCleanUpprotected void removeShutdownHook(ClassLoaderLeakPreventor preventor, Thread shutdownHook)
Copyright © 2019. All rights reserved.