public class NearCacheObjectRecordStore<K,V> extends BaseHeapNearCacheRecordStore<K,V,NearCacheObjectRecord>
AbstractNearCacheRecordStore.MaxSizeEvictionChecker
DEFAULT_INITIAL_CAPACITY
evictionChecker, evictionPolicyEvaluator, evictionStrategy, maxIdleMillis, maxSizeChecker, nearCacheConfig, nearCacheStats, records, REFERENCE_SIZE, serializationService, timeToLiveMillis
NO_LISTENER
Constructor and Description |
---|
NearCacheObjectRecordStore(NearCacheConfig nearCacheConfig,
NearCacheContext nearCacheContext) |
Modifier and Type | Method and Description |
---|---|
protected long |
getKeyStorageMemoryCost(K key) |
protected long |
getRecordStorageMemoryCost(NearCacheObjectRecord record) |
protected void |
putToRecord(NearCacheObjectRecord record,
V value) |
protected V |
recordToValue(NearCacheObjectRecord record) |
Object |
selectToSave(Object... candidates)
Selects the best candidate object to store from the given
candidates . |
protected NearCacheObjectRecord |
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 NearCacheObjectRecordStore(NearCacheConfig nearCacheConfig, NearCacheContext nearCacheContext)
protected long getKeyStorageMemoryCost(K key)
getKeyStorageMemoryCost
in class AbstractNearCacheRecordStore<K,V,K,NearCacheObjectRecord,HeapNearCacheRecordMap<K,NearCacheObjectRecord>>
protected long getRecordStorageMemoryCost(NearCacheObjectRecord record)
getRecordStorageMemoryCost
in class AbstractNearCacheRecordStore<K,V,K,NearCacheObjectRecord,HeapNearCacheRecordMap<K,NearCacheObjectRecord>>
protected NearCacheObjectRecord valueToRecord(V value)
valueToRecord
in class AbstractNearCacheRecordStore<K,V,K,NearCacheObjectRecord,HeapNearCacheRecordMap<K,NearCacheObjectRecord>>
protected V recordToValue(NearCacheObjectRecord record)
recordToValue
in class AbstractNearCacheRecordStore<K,V,K,NearCacheObjectRecord,HeapNearCacheRecordMap<K,NearCacheObjectRecord>>
protected void putToRecord(NearCacheObjectRecord record, V value)
putToRecord
in class AbstractNearCacheRecordStore<K,V,K,NearCacheObjectRecord,HeapNearCacheRecordMap<K,NearCacheObjectRecord>>
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.