public class HeapNearCacheRecordMap<K,V extends NearCacheRecord> extends SampleableConcurrentHashMap<K,V> implements SampleableNearCacheRecordMap<K,V>
Modifier and Type | Class and Description |
---|---|
class |
HeapNearCacheRecordMap.NearCacheEvictableSamplingEntry |
SampleableConcurrentHashMap.SamplingEntry<K,V>
ConcurrentReferenceHashMap.Option, ConcurrentReferenceHashMap.ReferenceType, ConcurrentReferenceHashMap.SimpleEntry<K,V>, ConcurrentReferenceHashMap.WriteThroughEntry
AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
HeapNearCacheRecordMap(SerializationService serializationService,
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.NearCacheEvictableSamplingEntry> |
sample(int sampleCount)
The sample method is used to sample a number of entries (defined by the samples parameter) from
the internal data structure.
|
fetchEntries, fetchKeys, getRandomSamples, isValidForFetching, isValidForSampling
applyIfAbsent, applyIfPresent, 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
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public HeapNearCacheRecordMap(SerializationService serializationService, int initialCapacity)
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.NearCacheEvictableSamplingEntry> sample(int sampleCount)
SampleableEvictableStore
sample
in interface SampleableEvictableStore<K,V extends NearCacheRecord>
sampleCount
- Entry count to be sampledEvictionCandidate
to be evictedCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.