net.dontdrinkandroot.cache.expungestrategy
Interface ExpungeStrategy

All Known Implementing Classes:
AbstractMaxSizeExpungeStrategy, AbstractOneOverMaxSizeExpungeStrategy, AbstractRecyclingExpungeStrategy, ExpiredOnlyExpungeStrategy, LfuExpungeStrategy, LfuRecyclingExpungeStrategy, LruExpungeStrategy, LruRecyclingExpungeStrategy, NoopExpungeStrategy

public interface ExpungeStrategy

An ExpungeStrategy is called by caches to select the entries to evict.

Author:
Philip W. Sorst

Method Summary
<K,M extends MetaData>
Collection<Map.Entry<K,M>>
getToExpungeMetaData(Set<Map.Entry<K,M>> entrySet)
          Returns a collection of entries that should be expunged according to this strategy.
 boolean triggers(CacheStatistics statistics)
          Checks if the strategy triggers based on the given statistics.
 

Method Detail

triggers

boolean triggers(CacheStatistics statistics)
Checks if the strategy triggers based on the given statistics.


getToExpungeMetaData

<K,M extends MetaData> Collection<Map.Entry<K,M>> getToExpungeMetaData(Set<Map.Entry<K,M>> entrySet)
Returns a collection of entries that should be expunged according to this strategy.



Copyright © 2013 dontdrinkandroot. All Rights Reserved.