org.eclipse.net4j.util.cache
Class Cache<E>

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.Cache<E>
All Implemented Interfaces:
ICache, INotifier, ILifecycle, ILifecycle.DeferrableActivation

public abstract class Cache<E>
extends Worker
implements ICache


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.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
Cache()
           
 
Method Summary
protected  void doActivate()
           
protected  void doBeforeActivate()
           
protected  void doDeactivate()
           
 ICacheMonitor getCacheMonitor()
           
protected  ICacheProbe getCacheProbe()
           
protected  ReferenceQueue<E> getReferenceQueue()
           
 void setCacheMonitor(ICacheMonitor cacheMonitor)
           
protected  void unreachableElement(E element)
           
protected  void unreachableElement(Reference<? extends E> reference)
           
protected  void work(Worker.WorkContext context)
           
 
Methods inherited from class org.eclipse.net4j.util.concurrent.Worker
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.cache.ICache
evictElements
 
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
 

Constructor Detail

Cache

public Cache()
Method Detail

getCacheMonitor

public ICacheMonitor getCacheMonitor()
Specified by:
getCacheMonitor in interface ICache

setCacheMonitor

public void setCacheMonitor(ICacheMonitor cacheMonitor)

getCacheProbe

protected ICacheProbe getCacheProbe()

getReferenceQueue

protected ReferenceQueue<E> getReferenceQueue()

doBeforeActivate

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

doActivate

protected void doActivate()
                   throws Exception
Overrides:
doActivate in class Worker
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

unreachableElement

protected void unreachableElement(Reference<? extends E> reference)

unreachableElement

protected void unreachableElement(E element)


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