org.codehaus.wadi.core.eviction
Class TimeToLiveEvicter

java.lang.Object
  extended by org.codehaus.wadi.core.eviction.AbstractEvicter
      extended by org.codehaus.wadi.core.eviction.AbstractBestEffortEvicter
          extended by org.codehaus.wadi.core.eviction.TimeToLiveEvicter
All Implemented Interfaces:
Evicter

public class TimeToLiveEvicter
extends AbstractBestEffortEvicter

An Evicter which also evicts Evictables with less than a certain time to live remaining. For example, using this Evicter, you could evict sessions with less than 30 minutes of time left.

Version:
$Revision: 2267 $
Author:
Jules Gosnell

Field Summary
protected  long _ttl
           
 
Fields inherited from class org.codehaus.wadi.core.eviction.AbstractBestEffortEvicter
strictOrdering
 
Constructor Summary
TimeToLiveEvicter(int sweepInterval, boolean strictOrdering, int ttl)
           
 
Method Summary
 boolean testForDemotion(Motable motable, long time, long ttl)
           
 
Methods inherited from class org.codehaus.wadi.core.eviction.AbstractBestEffortEvicter
demote, evict, getComparator, identifyDemotions, isReadyToDemote, sortCandidates
 
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
 

Field Detail

_ttl

protected final long _ttl
Constructor Detail

TimeToLiveEvicter

public TimeToLiveEvicter(int sweepInterval,
                         boolean strictOrdering,
                         int ttl)
Method Detail

testForDemotion

public boolean testForDemotion(Motable motable,
                               long time,
                               long ttl)


Copyright © 2010. All Rights Reserved.