public interface EvictionPolicy
Modifier and Type | Method and Description |
---|---|
boolean |
accessOrder()
Defines if element access can alter the ordering of elements in the
underlying cache.
|
ConcurrentLinkedHashMapPro.Entry<?,?> |
evictElement(ConcurrentLinkedHashMapPro.Entry<?,?> head)
This method will be invoked by the underlying cache implementation when a
entry insertion is generated.
|
boolean |
insertionOrder()
Defines if element insertion can alter the ordering of elements in
the underlying cache.
|
ConcurrentLinkedHashMapPro.Entry<?,?> |
recordAccess(ConcurrentLinkedHashMapPro.Entry<?,?> head,
ConcurrentLinkedHashMapPro.Entry<?,?> accessedEntry)
This method will be invoked by the underlying cache implementation when a
entry access is generated.
|
ConcurrentLinkedHashMapPro.Entry<?,?> |
recordInsertion(ConcurrentLinkedHashMapPro.Entry<?,?> head,
ConcurrentLinkedHashMapPro.Entry<?,?> insertedEntry)
This method will be invoked by the underlying cache implementation when a
entry insertion is generated.
|
boolean accessOrder()
Invoking the get cache method results in an access to the corresponding entry (assuming it exists after the invocation completes). No other methods generate entry accesses. In particular, operations on collection-views do not affect the order of iteration of the backing cache.
boolean insertionOrder()
Invoking the put cache method results in an insertion of the corresponding entry. The putAll method generates one entry insertion for each mapping in the specified map, in the order that key-value mappings are provided by the specified map's entry set iterator. No other methods generate entry insertions.
ConcurrentLinkedHashMapPro.Entry<?,?> evictElement(ConcurrentLinkedHashMapPro.Entry<?,?> head)
head
- the head of the double linked list of all elements in cacheConcurrentLinkedHashMapPro.Entry<?,?> recordInsertion(ConcurrentLinkedHashMapPro.Entry<?,?> head, ConcurrentLinkedHashMapPro.Entry<?,?> insertedEntry)
This method has no effect if insertionOrder()
method is implemented
to return false, whereas the newly inserted element will be placed at the end
(just before the head) of the cache's double linked element list.
head
- the head of the double linked list of all elements in cacheinsertedEntry
- the cache entry that is insertedConcurrentLinkedHashMapPro.Entry<?,?> recordAccess(ConcurrentLinkedHashMapPro.Entry<?,?> head, ConcurrentLinkedHashMapPro.Entry<?,?> accessedEntry)
This method has no effect if accessOrder()
method is implemented
to return false.
head
- the head of the double linked list of all elements in cacheaccessEntry
- the cache entry that is accessedCopyright © 2015 Lucee