Class VitroBackgroundThread
- java.lang.Object
-
- java.lang.Thread
-
- edu.cornell.mannlib.vitro.webapp.utils.threads.VitroBackgroundThread
-
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
VClassGroupCache.RebuildGroupCacheThread
public class VitroBackgroundThread extends Thread
A simple base class that will allow us to find the background threads and check their current status.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVitroBackgroundThread.FactoryA factory class, for use in Executors, that creates threads with successive names.static classVitroBackgroundThread.WorkLevelstatic classVitroBackgroundThread.WorkLevelStampAn immutable object that holds both the current work level and the time that it was set.-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description VitroBackgroundThread(Runnable target, String name)VitroBackgroundThread(String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<VitroBackgroundThread>getLivingThreads()Get a list of all VitroBackgroundThreads that have not died.static List<VitroBackgroundThread>getThreads()Get a list of all VitroBackgroundThreads that have not been garbage-collected.VitroBackgroundThread.WorkLevelStampgetWorkLevel()voidsetWorkLevel(VitroBackgroundThread.WorkLevel level, String... flags)voidstart()-
Methods inherited from class java.lang.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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, suspend, toString, yield
-
-
-
-
Method Detail
-
getThreads
public static List<VitroBackgroundThread> getThreads()
Get a list of all VitroBackgroundThreads that have not been garbage-collected.
-
getLivingThreads
public static List<VitroBackgroundThread> getLivingThreads()
Get a list of all VitroBackgroundThreads that have not died.
-
setWorkLevel
public void setWorkLevel(VitroBackgroundThread.WorkLevel level, String... flags)
-
getWorkLevel
public VitroBackgroundThread.WorkLevelStamp getWorkLevel()
-
-