public class HeapNearCacheRecordMap<K,V extends NearCacheRecord> extends SampleableConcurrentHashMap<K,V> implements SampleableNearCacheRecordMap<K,V>
Modifier and Type | Class and Description |
---|---|
class |
HeapNearCacheRecordMap.EvictableSamplingEntry |
SampleableConcurrentHashMap.SamplingEntry
ConcurrentReferenceHashMap.Option, ConcurrentReferenceHashMap.ReferenceType, ConcurrentReferenceHashMap.SimpleEntry<K,V>, ConcurrentReferenceHashMap.WriteThroughEntry
AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
HeapNearCacheRecordMap(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
protected <E extends SampleableConcurrentHashMap.SamplingEntry> |
createSamplingEntry(K key,
V value) |
<C extends EvictionCandidate<K,V>> |
evict(Iterable<C> evictionCandidates,
EvictionListener<K,V> evictionListener)
The evict method is called by the
EvictionStrategy to eventually evict, by the policy, selected
candidates from the internal data structures. |
Iterable<HeapNearCacheRecordMap.EvictableSamplingEntry> |
sample(int sampleCount)
The sample method is used to sample a number of entries (defined by the samples parameter) from
the internal data structure.
|
fetch, getRandomSamples, isValidForFetching, isValidForSampling
applyIfAbsent, clear, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, purgeStaleEntries, put, putAll, putIfAbsent, remove, remove, replace, replace, size, values
clone, equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
putIfAbsent, remove, replace, replace
protected <E extends SampleableConcurrentHashMap.SamplingEntry> E createSamplingEntry(K key, V value)
createSamplingEntry
in class SampleableConcurrentHashMap<K,V extends NearCacheRecord>
public <C extends EvictionCandidate<K,V>> int evict(Iterable<C> evictionCandidates, EvictionListener<K,V> evictionListener)
EvictableStore
EvictionStrategy
to eventually evict, by the policy, selected
candidates from the internal data structures.evict
in interface EvictableStore<K,V extends NearCacheRecord>
evictionCandidates
- Multiple EvictionCandidate
to be evictedevictionListener
- EvictionListener
to listen evicted entriespublic Iterable<HeapNearCacheRecordMap.EvictableSamplingEntry> sample(int sampleCount)
SampleableEvictableStore
sample
in interface SampleableEvictableStore<K,V extends NearCacheRecord>
sampleCount
- Entry count to be sampledEvictionCandidate
to be evictedCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.