org.codehaus.wadi.impl
Class CapacityEvicter
java.lang.Object
org.codehaus.wadi.impl.AbstractEvicter
org.codehaus.wadi.impl.AbstractBestEffortEvicter
org.codehaus.wadi.impl.CapacityEvicter
- All Implemented Interfaces:
- Evicter, Lifecycle
- public class CapacityEvicter
- extends AbstractBestEffortEvicter
Evict based on an intended capacity. In other words, if the number of sessions grows over
a parameterised limit, reduce it until it falls within it. Since strictOrdering is forced,
and a Comparattor is supplied, sessions will be evicted according to their lastAccessedTime.
Those that have been inactive for the most time will be evicted first.
- Version:
- $Revision: 1139 $
- Author:
- Jules Gosnell
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_comparator
protected final Comparator _comparator
_capacity
protected final int _capacity
CapacityEvicter
public CapacityEvicter(int sweepInterval,
int capacity)
getComparator
public Comparator getComparator(long time)
- Overrides:
getComparator
in class AbstractBestEffortEvicter
test
public boolean test(Evictable evictable,
long time,
long ttl)
Copyright © 2004-2008 Core Developers Network Ltd.. All Rights Reserved.