com.hazelcast.cache.impl.record
public class CacheRecordHashMap extends SampleableConcurrentHashMap<Data,CacheRecord> implements SampleableCacheRecordMap<Data,CacheRecord>
Modifier and Type | Class and Description |
---|---|
class |
CacheRecordHashMap.EvictableSamplingEntry |
SampleableConcurrentHashMap.IterableSamplingEntry, SampleableConcurrentHashMap.SamplingEntry
ConcurrentReferenceHashMap.Option, ConcurrentReferenceHashMap.ReferenceType, ConcurrentReferenceHashMap.SimpleEntry<K,V>, ConcurrentReferenceHashMap.WriteThroughEntry
AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
CacheRecordHashMap(int initialCapacity) |
CacheRecordHashMap(int initialCapacity,
float loadFactor,
int concurrencyLevel,
ConcurrentReferenceHashMap.ReferenceType keyType,
ConcurrentReferenceHashMap.ReferenceType valueType,
EnumSet<ConcurrentReferenceHashMap.Option> options) |
Modifier and Type | Method and Description |
---|---|
protected CacheRecordHashMap.EvictableSamplingEntry |
createSamplingEntry(Data key,
CacheRecord value) |
<C extends EvictionCandidate<Data,CacheRecord>> |
evict(Iterable<C> evictionCandidates,
EvictionListener<Data,CacheRecord> evictionListener)
The evict method is called by the
EvictionStrategy to eventually evict, by the policy, selected
candidates from the internal data structures. |
CacheKeyIteratorResult |
fetchNext(int nextTableIndex,
int size) |
Iterable<CacheRecordHashMap.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
clear, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, purgeStaleEntries, put, putAll, putIfAbsent, remove, remove, replace, replace, size, values
clone, equals, hashCode, toString
public CacheRecordHashMap(int initialCapacity)
public CacheRecordHashMap(int initialCapacity, float loadFactor, int concurrencyLevel, ConcurrentReferenceHashMap.ReferenceType keyType, ConcurrentReferenceHashMap.ReferenceType valueType, EnumSet<ConcurrentReferenceHashMap.Option> options)
protected CacheRecordHashMap.EvictableSamplingEntry createSamplingEntry(Data key, CacheRecord value)
createSamplingEntry
in class SampleableConcurrentHashMap<Data,CacheRecord>
public CacheKeyIteratorResult fetchNext(int nextTableIndex, int size)
fetchNext
in interface CacheRecordMap<Data,CacheRecord>
public <C extends EvictionCandidate<Data,CacheRecord>> int evict(Iterable<C> evictionCandidates, EvictionListener<Data,CacheRecord> evictionListener)
EvictableStore
EvictionStrategy
to eventually evict, by the policy, selected
candidates from the internal data structures.evict
in interface EvictableStore<Data,CacheRecord>
evictionCandidates
- Multiple EvictionCandidate
to be evictedevictionListener
- EvictionListener
to listen evicted entriespublic Iterable<CacheRecordHashMap.EvictableSamplingEntry> sample(int sampleCount)
SampleableEvictableStore
sample
in interface SampleableEvictableStore<Data,CacheRecord>
sampleCount
- Entry count to be sampledEvictionCandidate
to be evictedCopyright © 2015 Hazelcast, Inc.. All Rights Reserved.