org.codehaus.wadi.core.eviction
Class AbstractBestEffortEvicter
java.lang.Object
org.codehaus.wadi.core.eviction.AbstractEvicter
org.codehaus.wadi.core.eviction.AbstractBestEffortEvicter
- All Implemented Interfaces:
- Evicter
- Direct Known Subclasses:
- AbsoluteEvicter, AlwaysEvicter, TimeToLiveEvicter
public abstract class AbstractBestEffortEvicter
- extends AbstractEvicter
- Version:
- $Revision: 2375 $
- Author:
- Jules Gosnell
Field Summary |
protected org.apache.commons.logging.Log |
log
|
protected boolean |
strictOrdering
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected final org.apache.commons.logging.Log log
strictOrdering
protected final boolean strictOrdering
AbstractBestEffortEvicter
public AbstractBestEffortEvicter(int sweepInterval,
boolean strictOrdering)
evict
public void evict(ConcurrentMotableMap idToEvictable,
EvictionStrategy evictionStrategy)
identifyDemotionsAndExpirations
protected void identifyDemotionsAndExpirations(ConcurrentMotableMap idToEvictable,
java.util.List toExpire,
java.util.List toDemote)
isReadyToExpire
protected boolean isReadyToExpire(Motable motable,
long time)
isReadyToDemote
protected boolean isReadyToDemote(Motable motable,
long time)
sortCandidates
protected void sortCandidates(Motable[] toExpire,
Motable[] toDemote)
demote
protected void demote(Motable[] toDemote,
EvictionStrategy evictionStrategy)
expire
protected void expire(Motable[] toExpire,
EvictionStrategy evictionStrategy)
getComparator
protected java.util.Comparator getComparator(long time)
Copyright © 2011. All Rights Reserved.