public class StopThreadsCleanUp
extends java.lang.Object
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 java.lang.String |
JURT_ASYNCHRONOUS_FINALIZER |
protected static java.lang.String |
JURT_KILLER_THREAD_NAME |
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) |
StopThreadsCleanUp(boolean stopThreads,
boolean stopTimerThreads) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp(CleanupTools cleanupTools) |
protected void |
forceStartOpenOfficeJurtCleanup(CleanupTools cleanupTools)
The bug detailed at https://issues.apache.org/ooo/show_bug.cgi?id=122517 is quite tricky.
|
void |
setStopThreads(boolean stopThreads) |
void |
setStopTimerThreads(boolean stopTimerThreads) |
void |
setThreadWaitMs(int threadWaitMs) |
protected void |
stopThreads(CleanupTools cleanupTools)
Partially inspired by org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads()
|
protected void |
stopTimerThread(CleanupTools cleanupTools,
java.lang.Thread thread) |
protected static final java.lang.String JURT_ASYNCHRONOUS_FINALIZER
protected static final java.lang.String JURT_KILLER_THREAD_NAME
protected boolean stopThreads
protected int threadWaitMs
protected boolean stopTimerThreads
public StopThreadsCleanUp()
stopThreads
= true and stopTimerThreads
= truepublic StopThreadsCleanUp(boolean stopThreads)
public StopThreadsCleanUp(boolean stopThreads, boolean stopTimerThreads)
public void setStopThreads(boolean stopThreads)
public void setStopTimerThreads(boolean stopTimerThreads)
public void setThreadWaitMs(int threadWaitMs)
public void cleanUp(CleanupTools cleanupTools)
protected void forceStartOpenOfficeJurtCleanup(CleanupTools cleanupTools)
protected void stopThreads(CleanupTools cleanupTools)
protected void stopTimerThread(CleanupTools cleanupTools, java.lang.Thread thread)