public abstract class BaseHeapNearCacheRecordStore<K,V,R extends NearCacheRecord> extends AbstractNearCacheRecordStore<K,V,K,R,HeapNearCacheRecordMap<K,R>>
AbstractNearCacheRecordStore.MaxSizeEvictionChecker
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_INITIAL_CAPACITY |
evictionChecker, evictionPolicyEvaluator, evictionStrategy, maxIdleMillis, maxSizeChecker, nearCacheConfig, nearCacheStats, records, REFERENCE_SIZE, serializationService, timeToLiveMillis
NO_LISTENER
Constructor and Description |
---|
BaseHeapNearCacheRecordStore(NearCacheConfig nearCacheConfig,
NearCacheContext nearCacheContext) |
Modifier and Type | Method and Description |
---|---|
protected MaxSizeChecker |
createNearCacheMaxSizeChecker(EvictionConfig evictionConfig,
NearCacheConfig nearCacheConfig,
NearCacheContext nearCacheContext) |
protected HeapNearCacheRecordMap<K,R> |
createNearCacheRecordMap(NearCacheConfig nearCacheConfig,
NearCacheContext nearCacheContext) |
void |
doExpiration()
Performs expiration and evicts expired records.
|
protected R |
getRecord(K key) |
void |
onEvict(K key,
R record)
Called when an
Evictable entry is evicted. |
protected R |
putRecord(K key,
R record) |
protected R |
removeRecord(K key) |
checkAvailable, clear, clearRecords, createEvictionChecker, createEvictionPolicyEvaluator, createEvictionStrategy, dataToValue, destroy, destroyStore, doEviction, doEvictionIfRequired, get, getKeyStorageMemoryCost, getNearCacheStats, getRecordStorageMemoryCost, getTotalStorageMemoryCost, isAvailable, isEvictionEnabled, isRecordExpired, onGet, onGetError, onPut, onPutError, onRecordAccess, onRecordCreate, onRemove, onRemoveError, put, putToRecord, recordToValue, remove, size, toData, toValue, valueToData, valueToRecord
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
selectToSave
protected static final int DEFAULT_INITIAL_CAPACITY
public BaseHeapNearCacheRecordStore(NearCacheConfig nearCacheConfig, NearCacheContext nearCacheContext)
protected MaxSizeChecker createNearCacheMaxSizeChecker(EvictionConfig evictionConfig, NearCacheConfig nearCacheConfig, NearCacheContext nearCacheContext)
createNearCacheMaxSizeChecker
in class AbstractNearCacheRecordStore<K,V,K,R extends NearCacheRecord,HeapNearCacheRecordMap<K,R extends NearCacheRecord>>
protected HeapNearCacheRecordMap<K,R> createNearCacheRecordMap(NearCacheConfig nearCacheConfig, NearCacheContext nearCacheContext)
createNearCacheRecordMap
in class AbstractNearCacheRecordStore<K,V,K,R extends NearCacheRecord,HeapNearCacheRecordMap<K,R extends NearCacheRecord>>
protected R getRecord(K key)
getRecord
in class AbstractNearCacheRecordStore<K,V,K,R extends NearCacheRecord,HeapNearCacheRecordMap<K,R extends NearCacheRecord>>
protected R putRecord(K key, R record)
putRecord
in class AbstractNearCacheRecordStore<K,V,K,R extends NearCacheRecord,HeapNearCacheRecordMap<K,R extends NearCacheRecord>>
protected R removeRecord(K key)
removeRecord
in class AbstractNearCacheRecordStore<K,V,K,R extends NearCacheRecord,HeapNearCacheRecordMap<K,R extends NearCacheRecord>>
public void onEvict(K key, R record)
EvictionListener
Evictable
entry is evicted.onEvict
in interface EvictionListener<K,R extends NearCacheRecord>
onEvict
in class AbstractNearCacheRecordStore<K,V,K,R extends NearCacheRecord,HeapNearCacheRecordMap<K,R extends NearCacheRecord>>
key
- Accessor of the Evictable
entry
that is evicted.record
- Evictable
entry that is evicted.public void doExpiration()
NearCacheRecordStore
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.