org.codehaus.wadi.impl
Class TimeToLiveEvicter

java.lang.Object
  extended byorg.codehaus.wadi.impl.AbstractEvicter
      extended byorg.codehaus.wadi.impl.AbstractBestEffortEvicter
          extended byorg.codehaus.wadi.impl.TimeToLiveEvicter
All Implemented Interfaces:
Evicter, Lifecycle

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: 1139 $
Author:
Jules Gosnell

Field Summary
protected  long _ttl
           
 
Fields inherited from class org.codehaus.wadi.impl.AbstractBestEffortEvicter
_config, _lockLog, _log, _strictOrdering, _sweepInterval, _task
 
Constructor Summary
TimeToLiveEvicter(int sweepInterval, boolean strictOrdering, int ttl)
           
 
Method Summary
 boolean test(Evictable evictable, long time, long ttl)
           
 
Methods inherited from class org.codehaus.wadi.impl.AbstractBestEffortEvicter
destroy, evict, getComparator, init, insert, remove, setLastAccessedTime, setMaxInactiveInterval, start, stop
 
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

test

public boolean test(Evictable evictable,
                    long time,
                    long ttl)


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