net.dontdrinkandroot.cache.expungestrategy.impl
Class AbstractOneOverMaxSizeExpungeStrategy

java.lang.Object
  extended by net.dontdrinkandroot.cache.expungestrategy.impl.AbstractMaxSizeExpungeStrategy
      extended by net.dontdrinkandroot.cache.expungestrategy.impl.AbstractOneOverMaxSizeExpungeStrategy
All Implemented Interfaces:
ExpungeStrategy
Direct Known Subclasses:
LfuExpungeStrategy, LruExpungeStrategy

public abstract class AbstractOneOverMaxSizeExpungeStrategy
extends AbstractMaxSizeExpungeStrategy

An AbstractMaxSizeExpungeStrategy that triggers if the cache size is larger than the max size and selects the entries to evict by the given comparator.

Author:
Philip W. Sorst

Field Summary
 
Fields inherited from class net.dontdrinkandroot.cache.expungestrategy.impl.AbstractMaxSizeExpungeStrategy
maxSize
 
Constructor Summary
AbstractOneOverMaxSizeExpungeStrategy(int maxSize)
          Constructs a new AbstractOneOverMaxSizeExpungeStrategy with the given max size and MetaDataComparator.
 
Method Summary
 boolean triggers(CacheStatistics statistics)
          Checks if the strategy triggers based on the given statistics.
 
Methods inherited from class net.dontdrinkandroot.cache.expungestrategy.impl.AbstractMaxSizeExpungeStrategy
getComparator, getMaxSize, getToExpungeMetaData, setMaxSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractOneOverMaxSizeExpungeStrategy

public AbstractOneOverMaxSizeExpungeStrategy(int maxSize)
Constructs a new AbstractOneOverMaxSizeExpungeStrategy with the given max size and MetaDataComparator.

Method Detail

triggers

public boolean triggers(CacheStatistics statistics)
Description copied from interface: ExpungeStrategy
Checks if the strategy triggers based on the given statistics.



Copyright © 2013 dontdrinkandroot. All Rights Reserved.