org.eclipse.net4j.util.cache
Class CacheMonitor

java.lang.Object
  extended by org.eclipse.net4j.util.event.Notifier
      extended by org.eclipse.net4j.util.lifecycle.Lifecycle
          extended by org.eclipse.net4j.util.concurrent.Worker
              extended by org.eclipse.net4j.util.cache.CacheMonitor
All Implemented Interfaces:
ICacheMonitor, INotifier, ILifecycle, ILifecycle.DeferrableActivation

public class CacheMonitor
extends Worker
implements ICacheMonitor


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
 
Field Summary
 
Fields inherited from class org.eclipse.net4j.util.concurrent.Worker
DEFAULT_ERROR_HANDLER, DEFAULT_TIMEOUT
 
Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
USE_LABEL
 
Constructor Summary
CacheMonitor()
           
 
Method Summary
 void deregisterCache(ICache cache)
           
protected  void doBeforeActivate()
           
protected  void doDeactivate()
           
 ICacheMonitor.Condition getCondition()
           
 ICacheMonitor.ConditionPolicy getConditionPolicy()
           
 long getPauseGREEN()
           
 long getPauseRED()
           
 long getPauseYELLOW()
           
 ICacheRegistration[] getRegistrations()
           
protected  void handleConditionRED()
           
 ICacheRegistration registerCache(ICache cache)
           
protected  void setCondition(ICacheMonitor.Condition newCondition)
           
 void setConditionPolicy(ICacheMonitor.ConditionPolicy conditionPolicy)
           
 void setPauseGREEN(long pauseGREEN)
           
 void setPauseRED(long pauseRED)
           
 void setPauseYELLOW(long pauseYELLOW)
           
protected  void work(Worker.WorkContext context)
           
 
Methods inherited from class org.eclipse.net4j.util.concurrent.Worker
doActivate, getActivationTimeout, getDeactivationTimeout, getGlobalErrorHandler, getThreadName, 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, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, 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
 

Constructor Detail

CacheMonitor

public CacheMonitor()
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:
getConditionPolicy in interface ICacheMonitor

setConditionPolicy

public void setConditionPolicy(ICacheMonitor.ConditionPolicy conditionPolicy)

getCondition

public ICacheMonitor.Condition getCondition()
Specified by:
getCondition in interface ICacheMonitor

getRegistrations

public ICacheRegistration[] getRegistrations()

registerCache

public ICacheRegistration registerCache(ICache cache)
Specified by:
registerCache in interface ICacheMonitor

deregisterCache

public void deregisterCache(ICache cache)
Specified by:
deregisterCache in interface ICacheMonitor

doBeforeActivate

protected void doBeforeActivate()
                         throws Exception
Overrides:
doBeforeActivate in class Lifecycle
Throws:
Exception

doDeactivate

protected void doDeactivate()
                     throws Exception
Overrides:
doDeactivate in class Worker
Throws:
Exception

work

protected void work(Worker.WorkContext context)
             throws Exception
Specified by:
work in class Worker
Throws:
Exception

setCondition

protected void setCondition(ICacheMonitor.Condition newCondition)

handleConditionRED

protected void handleConditionRED()


Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.