Package org.eclipse.net4j.util.cache
Class CacheMonitor
- java.lang.Object
-
- org.eclipse.net4j.util.event.Notifier
-
- org.eclipse.net4j.util.lifecycle.Lifecycle
-
- org.eclipse.net4j.util.concurrent.Worker
-
- org.eclipse.net4j.util.cache.CacheMonitor
-
- All Implemented Interfaces:
ICacheMonitor,INotifier,INotifier.INotifier2,IDeactivateable,ILifecycle,ILifecycle.DeferrableActivation
public class CacheMonitor extends Worker implements ICacheMonitor
- Author:
- Eike Stepper
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.net4j.util.concurrent.Worker
Worker.WorkContext
-
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.cache.ICacheMonitor
ICacheMonitor.Condition, ICacheMonitor.ConditionPolicy
-
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivation
-
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2
-
-
Field Summary
-
Fields inherited from class org.eclipse.net4j.util.concurrent.Worker
DEFAULT_ERROR_HANDLER, DEFAULT_TIMEOUT
-
-
Constructor Summary
Constructors Constructor Description CacheMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidderegisterCache(ICache cache)protected voiddoBeforeActivate()protected voiddoDeactivate()ICacheMonitor.ConditiongetCondition()ICacheMonitor.ConditionPolicygetConditionPolicy()longgetPauseGREEN()longgetPauseRED()longgetPauseYELLOW()ICacheRegistration[]getRegistrations()protected voidhandleConditionRED()ICacheRegistrationregisterCache(ICache cache)protected voidsetCondition(ICacheMonitor.Condition newCondition)voidsetConditionPolicy(ICacheMonitor.ConditionPolicy conditionPolicy)voidsetPauseGREEN(long pauseGREEN)voidsetPauseRED(long pauseRED)voidsetPauseYELLOW(long pauseYELLOW)protected voidwork(Worker.WorkContext context)-
Methods inherited from class org.eclipse.net4j.util.concurrent.Worker
doActivate, getActivationTimeout, getDeactivationTimeout, getGlobalErrorHandler, getThreadName, getWorkerThread, handleError, isDaemon, setActivationTimeout, setDaemon, setDeactivationTimeout, setGlobalErrorHandler
-
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
-
Methods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
-
-
-
Method Detail
-
getPauseGREEN
public long getPauseGREEN()
-
setPauseGREEN
public void setPauseGREEN(long pauseGREEN)
-
getPauseYELLOW
public long getPauseYELLOW()
-
setPauseYELLOW
public void setPauseYELLOW(long pauseYELLOW)
-
getPauseRED
public long getPauseRED()
-
setPauseRED
public void setPauseRED(long pauseRED)
-
getConditionPolicy
public ICacheMonitor.ConditionPolicy getConditionPolicy()
- Specified by:
getConditionPolicyin interfaceICacheMonitor
-
setConditionPolicy
public void setConditionPolicy(ICacheMonitor.ConditionPolicy conditionPolicy)
-
getCondition
public ICacheMonitor.Condition getCondition()
- Specified by:
getConditionin interfaceICacheMonitor
-
getRegistrations
public ICacheRegistration[] getRegistrations()
-
registerCache
public ICacheRegistration registerCache(ICache cache)
- Specified by:
registerCachein interfaceICacheMonitor
-
deregisterCache
public void deregisterCache(ICache cache)
- Specified by:
deregisterCachein interfaceICacheMonitor
-
doBeforeActivate
protected void doBeforeActivate() throws java.lang.Exception- Overrides:
doBeforeActivatein classLifecycle- Throws:
java.lang.Exception
-
doDeactivate
protected void doDeactivate() throws java.lang.Exception- Overrides:
doDeactivatein classWorker- Throws:
java.lang.Exception
-
work
protected void work(Worker.WorkContext context) throws java.lang.Exception
-
setCondition
protected void setCondition(ICacheMonitor.Condition newCondition)
-
handleConditionRED
protected void handleConditionRED()
-
-