public interface Eviction
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 _hashCode)
Evict if needed, focused on the segment addressed by the hash code.
|
EvictionMetrics |
getMetrics() |
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.
|
void |
submit(Entry e)
Submit to eviction for inserting or removing from the replacement list.
|
boolean |
submitWithoutEviction(Entry e)
Submit to eviction for inserting or removing from the replacement list.
|
void submit(Entry e)
Whether the entry is inserted or removed is detected via the entry
state Entry.isNotYetInsertedInReplacementList()
.
boolean submitWithoutEviction(Entry e)
void evictEventually(int _hashCode)
void evictEventually()
long removeAll()
boolean drain()
void start()
void stop()
void close()
<T> T runLocked(Job<T> j)
void checkIntegrity(IntegrityState _integrityState)
EvictionMetrics getMetrics()
cache2k API documentation. Copyright © 2000–2018 headissue GmbH, Munich.