public abstract class AbstractMaxSizeExpungeStrategy extends Object implements ExpungeStrategy
ExpungeStrategy that selects all expired entries and entries according to the
implementation so that after those entries have been expunged the cache size is not larger that
the given max size.| Modifier and Type | Field and Description |
|---|---|
protected int |
maxSize |
| Constructor and Description |
|---|
AbstractMaxSizeExpungeStrategy(int maxSize)
Constructs a new
AbstractMaxSizeExpungeStrategy with the given max size. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract <K,M extends MetaData> |
getComparator() |
int |
getMaxSize()
Get the current max size of this strategy.
|
<K,M extends MetaData> |
getToExpungeMetaData(Set<Map.Entry<K,M>> entrySet)
Returns a collection of entries that should be expunged according to this strategy.
|
void |
setMaxSize(int maxSize)
Set the max size of this strategy.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittriggerspublic AbstractMaxSizeExpungeStrategy(int maxSize)
AbstractMaxSizeExpungeStrategy with the given max size.public int getMaxSize()
public <K,M extends MetaData> Collection<Map.Entry<K,M>> getToExpungeMetaData(Set<Map.Entry<K,M>> entrySet)
ExpungeStrategygetToExpungeMetaData in interface ExpungeStrategypublic void setMaxSize(int maxSize)
protected abstract <K,M extends MetaData> Comparator<Map.Entry<K,M>> getComparator()
Copyright © 2013 dontdrinkandroot. All Rights Reserved.