org.codehaus.wadi.core.eviction
Class AbstractBestEffortEvicter

java.lang.Object
  extended by org.codehaus.wadi.core.eviction.AbstractEvicter
      extended by org.codehaus.wadi.core.eviction.AbstractBestEffortEvicter
All Implemented Interfaces:
Evicter
Direct Known Subclasses:
AbsoluteEvicter, AlwaysEvicter, TimeToLiveEvicter

public abstract class AbstractBestEffortEvicter
extends AbstractEvicter

Version:
$Revision: 2482 $
Author:
Jules Gosnell

Field Summary
protected  boolean strictOrdering
           
 
Constructor Summary
AbstractBestEffortEvicter(int sweepInterval, boolean strictOrdering)
           
 
Method Summary
protected  void demote(Motable[] toDemote, EvictionStrategy evictionStrategy)
           
 void evict(ConcurrentMotableMap idToEvictable, EvictionStrategy evictionStrategy)
           
protected  java.util.Comparator<Evictable> getComparator(long time)
           
protected  void identifyDemotions(ConcurrentMotableMap idToEvictable, java.util.List<Motable> toDemote)
           
protected  boolean isReadyToDemote(Motable motable, long time)
           
protected  void sortCandidates(Motable[] toDemote)
           
 
Methods inherited from class org.codehaus.wadi.core.eviction.AbstractEvicter
cancel, schedule
 
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.core.eviction.Evicter
testForDemotion
 

Field Detail

strictOrdering

protected final boolean strictOrdering
Constructor Detail

AbstractBestEffortEvicter

public AbstractBestEffortEvicter(int sweepInterval,
                                 boolean strictOrdering)
Method Detail

evict

public void evict(ConcurrentMotableMap idToEvictable,
                  EvictionStrategy evictionStrategy)

identifyDemotions

protected void identifyDemotions(ConcurrentMotableMap idToEvictable,
                                 java.util.List<Motable> toDemote)

isReadyToDemote

protected boolean isReadyToDemote(Motable motable,
                                  long time)

sortCandidates

protected void sortCandidates(Motable[] toDemote)

demote

protected void demote(Motable[] toDemote,
                      EvictionStrategy evictionStrategy)

getComparator

protected java.util.Comparator<Evictable> getComparator(long time)


Copyright © 2011. All Rights Reserved.