public class CacheRecordHashMap extends SampleableConcurrentHashMap<Data,CacheRecord> implements SampleableCacheRecordMap<Data,CacheRecord>
SampleableConcurrentHashMap.SamplingEntry<K,V>ConcurrentReferenceHashMap.Option, ConcurrentReferenceHashMap.ReferenceType, ConcurrentReferenceHashMap.SimpleEntry<K,V>, ConcurrentReferenceHashMap.WriteThroughEntryAbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description | 
|---|
| CacheRecordHashMap(SerializationService serializationService,
                  int initialCapacity,
                  CacheContext cacheContext) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | clear()Removes all of the mappings from this map. | 
| protected com.hazelcast.cache.impl.record.CacheRecordHashMap.CacheEvictableSamplingEntry | 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  EvictionStrategyto eventually evict, by the policy, selected
 candidates from the internal data structures. | 
| CacheKeyIteratorResult | fetchNext(int nextTableIndex,
         int size)Fetches keys in bulk as specified size at most. | 
| CacheRecord | put(Data key,
   CacheRecord value)Maps the specified key to the specified value in this table. | 
| CacheRecord | putIfAbsent(Data key,
           CacheRecord value) | 
| CacheRecord | remove(Object key)Removes the key (and its corresponding value) from this map. | 
| boolean | remove(Object key,
      Object value) | 
| Iterable<com.hazelcast.cache.impl.record.CacheRecordHashMap.CacheEvictableSamplingEntry> | sample(int sampleCount)The sample method is used to sample a number of entries (defined by the samples parameter) from
 the internal data structure. | 
| void | setEntryCounting(boolean enable)Sets the entry counting behaviour. | 
fetch, getRandomSamples, isValidForFetching, isValidForSamplingapplyIfAbsent, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, purgeStaleEntries, putAll, replace, replace, size, valuesclone, equals, hashCode, toStringpublic CacheRecordHashMap(SerializationService serializationService, int initialCapacity, CacheContext cacheContext)
public void setEntryCounting(boolean enable)
CacheRecordMapsetEntryCounting in interface CacheRecordMap<Data,CacheRecord>enable - enables the entry counting behaviour if it is true, otherwise disables.public CacheRecord put(Data key, CacheRecord value)
ConcurrentReferenceHashMap
The value can be retrieved by calling the get method with a key that is equal to the original key.
put in interface Map<Data,CacheRecord>put in class ConcurrentReferenceHashMap<Data,CacheRecord>key - key with which the specified value is to be associatedvalue - value to be associated with the specified keypublic CacheRecord putIfAbsent(Data key, CacheRecord value)
ConcurrentReferenceHashMapputIfAbsent in interface ConcurrentMap<Data,CacheRecord>putIfAbsent in class ConcurrentReferenceHashMap<Data,CacheRecord>public CacheRecord remove(Object key)
ConcurrentReferenceHashMapremove in interface Map<Data,CacheRecord>remove in class ConcurrentReferenceHashMap<Data,CacheRecord>key - the key that needs to be removedpublic boolean remove(Object key, Object value)
ConcurrentReferenceHashMapremove in interface ConcurrentMap<Data,CacheRecord>remove in class ConcurrentReferenceHashMap<Data,CacheRecord>public void clear()
ConcurrentReferenceHashMapclear in interface Map<Data,CacheRecord>clear in class ConcurrentReferenceHashMap<Data,CacheRecord>protected com.hazelcast.cache.impl.record.CacheRecordHashMap.CacheEvictableSamplingEntry createSamplingEntry(Data key, CacheRecord value)
createSamplingEntry in class SampleableConcurrentHashMap<Data,CacheRecord>public CacheKeyIteratorResult fetchNext(int nextTableIndex, int size)
CacheRecordMapfetchNext in interface CacheRecordMap<Data,CacheRecord>nextTableIndex - starting point for fetchingsize - maximum bulk size to fetch the keysCacheKeyIteratorResult instance contains fetched keyspublic <C extends EvictionCandidate<Data,CacheRecord>> int evict(Iterable<C> evictionCandidates, EvictionListener<Data,CacheRecord> evictionListener)
EvictableStoreEvictionStrategy 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<com.hazelcast.cache.impl.record.CacheRecordHashMap.CacheEvictableSamplingEntry> sample(int sampleCount)
SampleableEvictableStoresample in interface SampleableEvictableStore<Data,CacheRecord>sampleCount - Entry count to be sampledEvictionCandidate to be evictedCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.