public class QueryCacheRecordHashMap extends SampleableConcurrentHashMap<Data,QueryCacheRecord> implements SampleableEvictableStore<Data,QueryCacheRecord>
SampleableConcurrentHashMap.SamplingEntry<K,V>ConcurrentReferenceHashMap.Option, ConcurrentReferenceHashMap.ReferenceType, ConcurrentReferenceHashMap.SimpleEntry<K,V>, ConcurrentReferenceHashMap.WriteThroughEntryAbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
QueryCacheRecordHashMap(SerializationService serializationService,
int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
protected com.hazelcast.map.impl.querycache.subscriber.QueryCacheRecordHashMap.QueryCacheEvictableSamplingEntry |
createSamplingEntry(Data key,
QueryCacheRecord value) |
Iterable<com.hazelcast.map.impl.querycache.subscriber.QueryCacheRecordHashMap.QueryCacheEvictableSamplingEntry> |
sample(int sampleCount)
The sample method is used to sample a number of entries (defined by the samples parameter) from
the internal data structure.
|
<C extends EvictionCandidate<Data,QueryCacheRecord>> |
tryEvict(C evictionCandidate,
EvictionListener<Data,QueryCacheRecord> evictionListener)
The evict method is called by the
EvictionStrategy to eventually evict, by the policy, selected
candidate from the internal data structures. |
fetchEntries, fetchKeys, getRandomSamples, isValidForFetching, isValidForSamplingapplyIfAbsent, applyIfPresent, clear, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, purgeStaleEntries, put, putAll, putIfAbsent, remove, remove, replace, replace, size, valuesclone, equals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllpublic QueryCacheRecordHashMap(SerializationService serializationService, int initialCapacity)
protected com.hazelcast.map.impl.querycache.subscriber.QueryCacheRecordHashMap.QueryCacheEvictableSamplingEntry createSamplingEntry(Data key, QueryCacheRecord value)
createSamplingEntry in class SampleableConcurrentHashMap<Data,QueryCacheRecord>public <C extends EvictionCandidate<Data,QueryCacheRecord>> boolean tryEvict(C evictionCandidate, EvictionListener<Data,QueryCacheRecord> evictionListener)
EvictableStoreEvictionStrategy to eventually evict, by the policy, selected
candidate from the internal data structures.
It could be the selected evicted candidate cannot be evicted. For example it might be gone at the time when
the method is executed. In this case it will indicate this condition by returning false.tryEvict in interface EvictableStore<Data,QueryCacheRecord>evictionCandidate - EvictionCandidate to be evictedevictionListener - EvictionListener to listen evicted entriestrue if the candidate was evicted, otherwise returns falsepublic Iterable<com.hazelcast.map.impl.querycache.subscriber.QueryCacheRecordHashMap.QueryCacheEvictableSamplingEntry> sample(int sampleCount)
SampleableEvictableStoresample in interface SampleableEvictableStore<Data,QueryCacheRecord>sampleCount - Entry count to be sampledEvictionCandidate to be evictedCopyright © 2018 Hazelcast, Inc.. All Rights Reserved.