public class SegmentedEviction extends Object implements Eviction, EvictionMetrics
| Constructor and Description |
|---|
SegmentedEviction(Eviction[] _segments) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkIntegrity(IntegrityState _integrityState) |
void |
close()
Free resources, for example thread pool or queue.
|
boolean |
drain()
Drain eviction queue and do updates in the eviction data structures.
|
void |
evictEventually()
Evict if needed, checks all segments.
|
void |
evictEventually(int hc)
Evict if needed, focused on the segment addressed by the hash code.
|
long |
getEvictedCount()
Number of entries evicted
|
int |
getEvictionRunningCount()
Number of eviction currently going on
|
long |
getExpiredRemovedCount()
Removed entries, because expired
|
String |
getExtraStatistics()
Fragment that the eviction wants to add to the
Cache.toString() output. |
long |
getHitCount()
Number of recorded hits.
|
long |
getMaxSize()
Size limit after eviction kicks in
|
EvictionMetrics |
getMetrics() |
long |
getNewEntryCount() |
long |
getRemovedCount() |
long |
getSize()
Number of entries in the eviction data structure
|
long |
getVirginRemovedCount()
Removal of an entry that was never used
|
long |
removeAll()
Remove all entries from the eviction data structure.
|
<T> T |
runLocked(Job<T> j)
Runs job making sure concurrent evictions operations pause.
|
void |
start()
Start concurrent eviction threads.
|
void |
stop()
Stop concurrent threads that may access the eviction data structures.
|
boolean |
submitWithoutEviction(Entry e)
Submit to eviction for inserting or removing from the replacement list.
|
public SegmentedEviction(Eviction[] _segments)
public boolean submitWithoutEviction(Entry e)
EvictionsubmitWithoutEviction in interface Evictionpublic void evictEventually(int hc)
EvictionevictEventually in interface Evictionpublic void evictEventually()
EvictionevictEventually in interface Evictionpublic long removeAll()
Evictionpublic void start()
Evictionpublic void stop()
Evictionpublic void close()
Evictionpublic boolean drain()
Evictionpublic <T> T runLocked(Job<T> j)
Evictionpublic void checkIntegrity(IntegrityState _integrityState)
checkIntegrity in interface Evictionpublic EvictionMetrics getMetrics()
getMetrics in interface Evictionpublic String getExtraStatistics()
EvictionMetricsCache.toString() output.getExtraStatistics in interface EvictionMetricspublic long getHitCount()
EvictionMetricsgetHitCount in interface EvictionMetricspublic long getNewEntryCount()
getNewEntryCount in interface EvictionMetricsInternalCacheInfo.getNewEntryCount()public long getRemovedCount()
getRemovedCount in interface EvictionMetricsInternalCacheInfo.getRemoveCount()public long getExpiredRemovedCount()
EvictionMetricsgetExpiredRemovedCount in interface EvictionMetricsInternalCacheInfo.getExpiredCount()public long getVirginRemovedCount()
EvictionMetricsgetVirginRemovedCount in interface EvictionMetricspublic long getEvictedCount()
EvictionMetricsgetEvictedCount in interface EvictionMetricsInternalCacheInfo.getEvictedCount()public long getSize()
EvictionMetricsgetSize in interface EvictionMetricspublic long getMaxSize()
EvictionMetricsgetMaxSize in interface EvictionMetricspublic int getEvictionRunningCount()
EvictionMetricsgetEvictionRunningCount in interface EvictionMetricscache2k API documentation. Copyright © 2000–2019 headissue GmbH, Munich.