com.hazelcast.cache.impl.record
Class CacheRecordHashMap
java.lang.Object
java.util.AbstractMap<K,V>
com.hazelcast.util.ConcurrentReferenceHashMap<K,V>
com.hazelcast.util.SampleableConcurrentHashMap<Data,CacheRecord>
com.hazelcast.cache.impl.record.CacheRecordHashMap
- All Implemented Interfaces:
- EvictableStore<Data,CacheRecord>, SampleableEvictableStore<Data,CacheRecord>, CacheRecordMap<Data,CacheRecord>, SampleableCacheRecordMap<Data,CacheRecord>, Serializable, ConcurrentMap<Data,CacheRecord>, Map<Data,CacheRecord>
public class CacheRecordHashMap
- extends SampleableConcurrentHashMap<Data,CacheRecord>
- implements SampleableCacheRecordMap<Data,CacheRecord>
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Methods inherited from class com.hazelcast.util.ConcurrentReferenceHashMap |
clear, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, purgeStaleEntries, put, putAll, putIfAbsent, remove, remove, replace, replace, size, values |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
CacheRecordHashMap
public CacheRecordHashMap(int initialCapacity)
CacheRecordHashMap
public CacheRecordHashMap(int initialCapacity,
float loadFactor,
int concurrencyLevel,
ConcurrentReferenceHashMap.ReferenceType keyType,
ConcurrentReferenceHashMap.ReferenceType valueType,
EnumSet<ConcurrentReferenceHashMap.Option> options)
createSamplingEntry
protected CacheRecordHashMap.EvictableSamplingEntry createSamplingEntry(Data key,
CacheRecord value)
- Overrides:
createSamplingEntry
in class SampleableConcurrentHashMap<Data,CacheRecord>
fetchNext
public CacheKeyIteratorResult fetchNext(int nextTableIndex,
int size)
- Specified by:
fetchNext
in interface CacheRecordMap<Data,CacheRecord>
evict
public <C extends EvictionCandidate<Data,CacheRecord>> int evict(Iterable<C> evictionCandidates)
- Description copied from interface:
EvictableStore
- The evict method is called by the
EvictionStrategy
to eventually evict, by the policy, selected
candidates from the internal data structures.
- Specified by:
evict
in interface EvictableStore<Data,CacheRecord>
- Parameters:
evictionCandidates
- Multiple EvictionCandidate
to be evicted
- Returns:
- evicted entry count
sample
public Iterable<CacheRecordHashMap.EvictableSamplingEntry> sample(int sampleCount)
- Description copied from interface:
SampleableEvictableStore
- The sample method is used to sample a number of entries (defined by the samples parameter) from
the internal data structure. This method should be executed in a constant time to deliver predictable
timing results of the eviction system.
- Specified by:
sample
in interface SampleableEvictableStore<Data,CacheRecord>
- Parameters:
sampleCount
- Entry count to be sampled
- Returns:
- Multiple
EvictionCandidate
to be evicted
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.