public class LRUCache<K,V> extends Object
To reduce contention, entry allocation and eviction execute in a sampling fashion (entry hits modulo N). Eviction follows an LRU approach (oldest sampled entries are removed first) when the cache is out of capacity.
This cache can also be configured to run in FIFO mode, rather than LRU.
Modifier and Type | Class and Description |
---|---|
static class | LRUCache.CacheEntry<K,V> |
Constructor and Description |
---|
LRUCache(int maxEntries, int maxAge) |
LRUCache(int maxEntries, int maxAge, boolean fifo) |
Copyright © 2017 JBoss by Red Hat. All rights reserved.