public class StopThreadsCleanUp extends Object implements ClassLoaderPreMortemCleanUp
ClassLoader, or otherwise referencing it,
and either warn or stop those threads depending on settings.| Modifier and Type | Class and Description |
|---|---|
protected class |
StopThreadsCleanUp.JURTKiller
Inner class with the sole task of killing JURT finalizer thread after it is done processing jobs.
|
| Modifier and Type | Field and Description |
|---|---|
protected static String |
JURT_ASYNCHRONOUS_FINALIZER |
protected boolean |
stopThreads |
protected boolean |
stopTimerThreads
Should Timer threads tied to the protected ClassLoader classloader be forced to stop at application shutdown?
|
protected int |
threadWaitMs
No of milliseconds to wait for threads to finish execution, before stopping them.
|
| Constructor and Description |
|---|
StopThreadsCleanUp()
Default constructor with
stopThreads = true and stopTimerThreads = true |
StopThreadsCleanUp(boolean stopThreads,
boolean stopTimerThreads) |
| 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 |
forceStartOpenOfficeJurtCleanup(ClassLoaderLeakPreventor preventor)
The bug detailed at https://issues.apache.org/ooo/show_bug.cgi?
|
void |
setStopThreads(boolean stopThreads) |
void |
setStopTimerThreads(boolean stopTimerThreads) |
void |
setThreadWaitMs(int threadWaitMs) |
protected void |
stopThreads(ClassLoaderLeakPreventor preventor)
Partially inspired by org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads()
|
protected void |
stopTimerThread(ClassLoaderLeakPreventor preventor,
Thread thread) |
protected static final String JURT_ASYNCHRONOUS_FINALIZER
protected boolean stopThreads
protected int threadWaitMs
protected boolean stopTimerThreads
public StopThreadsCleanUp()
stopThreads = true and stopTimerThreads = truepublic StopThreadsCleanUp(boolean stopThreads,
boolean stopTimerThreads)
public void setStopThreads(boolean stopThreads)
public void setStopTimerThreads(boolean stopTimerThreads)
public void setThreadWaitMs(int threadWaitMs)
public void cleanUp(ClassLoaderLeakPreventor preventor)
ClassLoaderPreMortemCleanUpClassLoaderLeakPreventor.classLoader
ready for garbage collection.cleanUp in interface ClassLoaderPreMortemCleanUpprotected void forceStartOpenOfficeJurtCleanup(ClassLoaderLeakPreventor preventor)
protected void stopThreads(ClassLoaderLeakPreventor preventor)
protected void stopTimerThread(ClassLoaderLeakPreventor preventor, Thread thread)
Copyright © 2019. All rights reserved.