Package org.geotools.util
Class WeakCollectionCleaner
- All Implemented Interfaces:
Runnable
A thread invoking
Reference.clear()
on each enqueded reference. This is usefull only if Reference
subclasses has overridden their clear()
method in order to perform some cleaning. This thread is used by
WeakHashSet
and WeakValueHashMap
, which remove their entry from the collection when
Reference.clear()
is invoked.- Since:
- 2.0
- Author:
- Martin Desruisseaux (IRD)
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
FieldsFields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Method Summary
Methods inherited from class Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Field Details
-
DEFAULT
The default thread.
-
-
Method Details
-
getReferenceQueue
-
run
public void run()Loop to be run during the virtual machine lifetime. -
exit
public void exit()Stops the cleaner thread. Calling this method is recommended in all long running applications with custom class loaders (e.g., web applications).
-