Class AbstractAuxiliaryCacheMonitor
java.lang.Object
java.lang.Thread
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheMonitor
- All Implemented Interfaces:
- Runnable
- Direct Known Subclasses:
- LateralCacheMonitor,- RemoteCacheFailoverRunner,- RemoteCacheMonitor,- RemoteHttpCacheMonitor
Used to monitor and repair any failed connection for the lateral cache service. By default the
 monitor operates in a failure driven mode. That is, it goes into a wait state until there is an
 error. Upon the notification of a connection error, the monitor changes to operate in a time
 driven mode. That is, it attempts to recover the connections on a periodic basis. When all failed
 connections are restored, it changes back to the failure driven mode.
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.ThreadThread.State, Thread.UncaughtExceptionHandler
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected AtomicBooleanMust make sure AbstractAuxiliaryCacheMonitor is started before any error can be detected!protected static longHow long to wait between runsprotected final LogThe loggerFields inherited from class java.lang.ThreadMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract voiddispose()Clean up all resources before shutdownprotected abstract voiddoWork()do actual workvoidNotifies the cache monitor that an error occurred, and kicks off the error recovery process.voidNotifies the cache monitor that the service shall shut downvoidrun()Main processing method for the AbstractAuxiliaryCacheMonitor objectstatic voidsetIdlePeriod(long idlePeriod) Configures the idle period between repairs.Methods inherited from class java.lang.ThreadactiveCount, 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
- 
Field Details- 
logThe logger
- 
idlePeriodHow long to wait between runs
- 
allrightMust make sure AbstractAuxiliaryCacheMonitor is started before any error can be detected!
 
- 
- 
Constructor Details- 
AbstractAuxiliaryCacheMonitorConstructor- Parameters:
- name- the thread name
 
 
- 
- 
Method Details- 
setIdlePeriodConfigures the idle period between repairs.- Parameters:
- idlePeriod- The new idlePeriod value
 
- 
notifyErrorNotifies the cache monitor that an error occurred, and kicks off the error recovery process.
- 
notifyShutdownNotifies the cache monitor that the service shall shut down
- 
disposeClean up all resources before shutdown
- 
doWorkdo actual work
- 
runMain processing method for the AbstractAuxiliaryCacheMonitor object
 
-