public abstract class AbstractAuxiliaryCacheMonitor extends Thread
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected AtomicBoolean |
allright
Must make sure AbstractAuxiliaryCacheMonitor is started before any error can be detected!
|
protected static long |
idlePeriod
How long to wait between runs
|
protected org.apache.commons.logging.Log |
log
The logger
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
AbstractAuxiliaryCacheMonitor(String name)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
dispose()
Clean up all resources before shutdown
|
protected abstract void |
doWork()
do actual work
|
void |
notifyError()
Notifies the cache monitor that an error occurred, and kicks off the error recovery process.
|
void |
notifyShutdown()
Notifies the cache monitor that the service shall shut down
|
void |
run()
Main processing method for the AbstractAuxiliaryCacheMonitor object
|
static void |
setIdlePeriod(long idlePeriod)
Configures the idle period between repairs.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected final org.apache.commons.logging.Log log
protected static long idlePeriod
protected AtomicBoolean allright
public AbstractAuxiliaryCacheMonitor(String name)
name
- the thread namepublic static void setIdlePeriod(long idlePeriod)
idlePeriod
- The new idlePeriod valuepublic void notifyError()
public void notifyShutdown()
protected abstract void dispose()
protected abstract void doWork()
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.