protected class CompactSerializationCache.InternalEvictionPolicy.EvictionVisitor extends Object implements MultiBinaryLongMap.SafeEntryVisitor
The EvictionVisitor is to be applied to Entries of a BinaryLongMap that associates cache keys to their size in units (as determined by the configured unit-calculator).
| Modifier and Type | Field and Description | 
|---|---|
protected long | 
f_cUnitsToEvict
The minimum number of units to evict. 
 | 
protected SortedSet<CompactSerializationCache.InternalEvictionPolicy.EvictionCandidate> | 
f_setEvicting
The Map containing the keys which are candidates for eviction,
 mapped to their size in units. 
 | 
protected long | 
m_cUnitsEvicting
The number of units occupied by the entries in the eviction set. 
 | 
protected long | 
m_lKeepThreshold
The weight of the lightest entry that we have decided to keep. 
 | 
| Constructor and Description | 
|---|
EvictionVisitor(long cLowUnits)
Construct an EvictionVisitor to identify the set of keys to evict
 from the cache in order to prune the cache down to the specified
 low-units threshold 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
visit(BinaryLongMap.Entry entry)
Visit the specified entry. 
 | 
protected final SortedSet<CompactSerializationCache.InternalEvictionPolicy.EvictionCandidate> f_setEvicting
protected final long f_cUnitsToEvict
protected long m_cUnitsEvicting
protected long m_lKeepThreshold
public EvictionVisitor(long cLowUnits)
cLowUnits - the low-units threshold to prune the cache topublic void visit(BinaryLongMap.Entry entry)
visit in interface BinaryLongMap.EntryVisitorentry - the entry