Package org.teiid.common.buffer.impl
Class LrfuEvictionQueue<V extends BaseCacheEntry>
- java.lang.Object
-
- org.teiid.common.buffer.impl.LrfuEvictionQueue<V>
-
- Type Parameters:
V
-
public class LrfuEvictionQueue<V extends BaseCacheEntry> extends Object
A Concurrent LRFU eviction queue. Has assumptions that match buffermanager usage. Null values are not allowed.
-
-
Field Summary
Fields Modifier and Type Field Description protected AtomicLong
clock
protected ConcurrentSkipListMap<CacheKey,V>
evictionQueue
protected long
halfLife
protected long
maxInterval
-
Constructor Summary
Constructors Constructor Description LrfuEvictionQueue(AtomicLong clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(V value)
V
firstEntry(boolean poll)
Collection<V>
getEvictionQueue()
int
getSize()
boolean
remove(V value)
void
setHalfLife(long halfLife)
String
toString()
void
touch(V value)
-
-
-
Field Detail
-
evictionQueue
protected ConcurrentSkipListMap<CacheKey,V extends BaseCacheEntry> evictionQueue
-
clock
protected AtomicLong clock
-
maxInterval
protected long maxInterval
-
halfLife
protected long halfLife
-
-
Constructor Detail
-
LrfuEvictionQueue
public LrfuEvictionQueue(AtomicLong clock)
-
-
Method Detail
-
remove
public boolean remove(V value)
-
add
public boolean add(V value)
-
touch
public void touch(V value)
-
getEvictionQueue
public Collection<V> getEvictionQueue()
-
firstEntry
public V firstEntry(boolean poll)
-
setHalfLife
public void setHalfLife(long halfLife)
-
getSize
public int getSize()
-
-