public class RandomEviction extends AbstractEviction
correctedMaxSize, heapCache, MAXIMAL_CHUNK_SIZE, maxSize, MINIMAL_CHUNK_SIZE, MINIMUM_CAPACITY_FOR_CHUNKING| Constructor and Description |
|---|
RandomEviction(HeapCache _heapCache,
HeapCacheListener _listener,
long _maxSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkIntegrity(IntegrityState _integrityState) |
protected Entry |
findEvictionCandidate(Entry _previous)
Find a candidate for eviction.
|
String |
getExtraStatistics()
Fragment that the eviction wants to add to the
Cache.toString() output. |
long |
getHitCount()
Number of recorded hits.
|
long |
getSize()
Number of entries in the eviction data structure
|
protected void |
insertIntoReplacementList(Entry e) |
long |
removeAll()
Remove all entries from the eviction data structure.
|
protected void |
removeFromReplacementList(Entry e) |
close, drain, evictEventually, evictEventually, getEvictedCount, getEvictionRunningCount, getExpiredRemovedCount, getMaxSize, getMetrics, getNewEntryCount, getRemovedCount, getVirginRemovedCount, removeFromReplacementListOnEvict, runLocked, start, stop, submitWithoutEvictionpublic RandomEviction(HeapCache _heapCache, HeapCacheListener _listener, long _maxSize)
protected void removeFromReplacementList(Entry e)
removeFromReplacementList in class AbstractEvictionprotected void insertIntoReplacementList(Entry e)
insertIntoReplacementList in class AbstractEvictionprotected Entry findEvictionCandidate(Entry _previous)
AbstractEvictionfindEvictionCandidate in class AbstractEviction_previous - null or previous found eviction candidate returned by this method.
This is currently not used by the implemented eviction methods
but might be in the future.public void checkIntegrity(IntegrityState _integrityState)
public long removeAll()
Evictionpublic String getExtraStatistics()
EvictionMetricsCache.toString() output.getExtraStatistics in interface EvictionMetricsgetExtraStatistics in class AbstractEvictionpublic long getHitCount()
EvictionMetricspublic long getSize()
EvictionMetricscache2k API documentation. Copyright © 2000–2019 headissue GmbH, Munich.