public class NearCacheDataRecordStore<K,V> extends BaseHeapNearCacheRecordStore<K,V,NearCacheDataRecord>
AbstractNearCacheRecordStore.MaxSizeEvictionChecker
DEFAULT_INITIAL_CAPACITY
evictionChecker, evictionPolicyEvaluator, evictionStrategy, maxIdleMillis, maxSizeChecker, nearCacheConfig, nearCacheStats, records, REFERENCE_SIZE, serializationService, timeToLiveMillis
NO_LISTENER
Constructor and Description |
---|
NearCacheDataRecordStore(NearCacheConfig nearCacheConfig,
NearCacheContext nearCacheContext) |
Modifier and Type | Method and Description |
---|---|
protected long |
getKeyStorageMemoryCost(K key) |
protected long |
getRecordStorageMemoryCost(NearCacheDataRecord record) |
protected void |
putToRecord(NearCacheDataRecord record,
V value) |
protected V |
recordToValue(NearCacheDataRecord record) |
Object |
selectToSave(Object... candidates)
Selects the best candidate object to store from the given
candidates . |
protected NearCacheDataRecord |
valueToRecord(V value) |
createNearCacheMaxSizeChecker, createNearCacheRecordMap, doExpiration, getRecord, onEvict, putRecord, removeRecord
checkAvailable, clear, clearRecords, createEvictionChecker, createEvictionPolicyEvaluator, createEvictionStrategy, dataToValue, destroy, destroyStore, doEviction, doEvictionIfRequired, get, getNearCacheStats, getTotalStorageMemoryCost, isAvailable, isEvictionEnabled, isRecordExpired, onGet, onGetError, onPut, onPutError, onRecordAccess, onRecordCreate, onRemove, onRemoveError, put, remove, size, toData, toValue, valueToData
public NearCacheDataRecordStore(NearCacheConfig nearCacheConfig, NearCacheContext nearCacheContext)
protected long getKeyStorageMemoryCost(K key)
getKeyStorageMemoryCost
in class AbstractNearCacheRecordStore<K,V,K,NearCacheDataRecord,HeapNearCacheRecordMap<K,NearCacheDataRecord>>
protected long getRecordStorageMemoryCost(NearCacheDataRecord record)
getRecordStorageMemoryCost
in class AbstractNearCacheRecordStore<K,V,K,NearCacheDataRecord,HeapNearCacheRecordMap<K,NearCacheDataRecord>>
protected NearCacheDataRecord valueToRecord(V value)
valueToRecord
in class AbstractNearCacheRecordStore<K,V,K,NearCacheDataRecord,HeapNearCacheRecordMap<K,NearCacheDataRecord>>
protected V recordToValue(NearCacheDataRecord record)
recordToValue
in class AbstractNearCacheRecordStore<K,V,K,NearCacheDataRecord,HeapNearCacheRecordMap<K,NearCacheDataRecord>>
protected void putToRecord(NearCacheDataRecord record, V value)
putToRecord
in class AbstractNearCacheRecordStore<K,V,K,NearCacheDataRecord,HeapNearCacheRecordMap<K,NearCacheDataRecord>>
public Object selectToSave(Object... candidates)
NearCacheRecordStore
candidates
.candidates
- the candidates from which the best candidate object will be selected.candidates
.Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.