K
- the type of keys maintained by the mapV
- the type of mapped valuespublic interface EvictionQueue<K,V>
AbstractQueueEvictionScheduler
to store entries that should be
evicted automatically in the order in which they should be evicted. It
provides methods for adding and removing entries, as well as evicting expired
entries.Modifier and Type | Method and Description |
---|---|
boolean |
evictEntries()
Evicts all entries that have expired from their maps and removes them
from the queue.
|
long |
getNextEvictionTime()
Returns the next eviction time of all entries contained in the queue, or
0 if the queue is empty.
|
boolean |
hasEntries()
Returns true if this queue contains any entries.
|
void |
putEntry(EvictibleEntry<K,V> e)
Puts the specified evictible entry into the queue.
|
void |
removeEntry(EvictibleEntry<K,V> e)
Removes the specified evictible entry from the queue.
|
boolean hasEntries()
long getNextEvictionTime()
void putEntry(EvictibleEntry<K,V> e)
e
- the entry to be put into the queue.NullPointerException
- if the entry is null
void removeEntry(EvictibleEntry<K,V> e)
e
- the entry to be removed from the queue.NullPointerException
- if the entry is null
boolean evictEntries()
Copyright © 2012–2016. All rights reserved.