Package com.tangosol.net.cache
Class CompactSerializationCache.InternalEvictionPolicy.EvictionVisitor
- java.lang.Object
-
- com.tangosol.net.cache.CompactSerializationCache.InternalEvictionPolicy.EvictionVisitor
-
- All Implemented Interfaces:
BinaryLongMap.EntryVisitor
,MultiBinaryLongMap.SafeEntryVisitor
- Enclosing class:
- CompactSerializationCache.InternalEvictionPolicy
protected class CompactSerializationCache.InternalEvictionPolicy.EvictionVisitor extends Object implements MultiBinaryLongMap.SafeEntryVisitor
SafeEntryVisitor implementation that calculates the set of eviction candidates.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).
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor 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
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visit(BinaryLongMap.Entry entry)
Visit the specified entry.
-
-
-
Field Detail
-
f_setEvicting
protected final SortedSet<CompactSerializationCache.InternalEvictionPolicy.EvictionCandidate> f_setEvicting
The Map containing the keys which are candidates for eviction, mapped to their size in units.
-
f_cUnitsToEvict
protected final long f_cUnitsToEvict
The minimum number of units to evict.
-
m_cUnitsEvicting
protected long m_cUnitsEvicting
The number of units occupied by the entries in the eviction set. Used during the iteration (evict-set calculation) only.
-
m_lKeepThreshold
protected long m_lKeepThreshold
The weight of the lightest entry that we have decided to keep. All of the entries to evict will be lighter than this threshold.
-
-
Method Detail
-
visit
public void visit(BinaryLongMap.Entry entry)
Visit the specified entry.- Specified by:
visit
in interfaceBinaryLongMap.EntryVisitor
- Parameters:
entry
- the entry
-
-