org.codehaus.wadi.impl
Class AbstractBestEffortEvicter

java.lang.Object
  extended byorg.codehaus.wadi.impl.AbstractEvicter
      extended byorg.codehaus.wadi.impl.AbstractBestEffortEvicter
All Implemented Interfaces:
Evicter, Lifecycle
Direct Known Subclasses:
AbsoluteEvicter, AlwaysEvicter, CapacityEvicter, NeverEvicter, TimeToLiveEvicter

public abstract class AbstractBestEffortEvicter
extends AbstractEvicter


Field Summary
protected  EvicterConfig _config
           
protected  Log _lockLog
           
protected  Log _log
           
protected  boolean _strictOrdering
           
protected  int _sweepInterval
           
protected  TimerTask _task
           
 
Constructor Summary
AbstractBestEffortEvicter(int sweepInterval, boolean strictOrdering)
           
 
Method Summary
 void destroy()
           
 void evict()
           
 Comparator getComparator(long time)
           
 void init(EvicterConfig config)
           
 void insert(Evictable evictable)
           
 void remove(Evictable evictable)
           
 void setLastAccessedTime(Evictable evictable, long oldTime, long newTime)
           
 void setMaxInactiveInterval(Evictable evictable, int oldInterval, int newInterval)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.wadi.Evicter
test
 

Field Detail

_lockLog

protected final Log _lockLog

_log

protected final Log _log

_sweepInterval

protected final int _sweepInterval

_strictOrdering

protected final boolean _strictOrdering

_task

protected TimerTask _task

_config

protected EvicterConfig _config
Constructor Detail

AbstractBestEffortEvicter

public AbstractBestEffortEvicter(int sweepInterval,
                                 boolean strictOrdering)
Method Detail

getComparator

public Comparator getComparator(long time)

init

public void init(EvicterConfig config)
Specified by:
init in interface Evicter
Overrides:
init in class AbstractEvicter

start

public void start()
           throws Exception
Specified by:
start in interface Lifecycle
Overrides:
start in class AbstractEvicter
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface Lifecycle
Overrides:
stop in class AbstractEvicter
Throws:
Exception

destroy

public void destroy()
Specified by:
destroy in interface Evicter
Overrides:
destroy in class AbstractEvicter

evict

public void evict()

insert

public void insert(Evictable evictable)

remove

public void remove(Evictable evictable)

setLastAccessedTime

public void setLastAccessedTime(Evictable evictable,
                                long oldTime,
                                long newTime)

setMaxInactiveInterval

public void setMaxInactiveInterval(Evictable evictable,
                                   int oldInterval,
                                   int newInterval)


Copyright © 2004-2008 Core Developers Network Ltd.. All Rights Reserved.