K
- the type of the key stored in Near CacheV
- the type of the value stored in Near Cachepublic class NearCacheObjectRecordStore<K,V> extends BaseHeapNearCacheRecordStore<K,V,NearCacheObjectRecord<V>>
NearCacheRecordStore
implementation for Near Caches
with InMemoryFormat.OBJECT
in-memory-format.AbstractNearCacheRecordStore.ReserveForUpdateFunction
classLoader, evictionChecker, evictionDisabled, evictionPolicyEvaluator, evictionStrategy, maxIdleMillis, MILLI_SECONDS_IN_A_SECOND, nearCacheConfig, nearCacheStats, records, REFERENCE_SIZE, RESERVATION_ID, reservationId, serializationService, staleReadDetector, timeToLiveMillis
NO_LISTENER
Constructor and Description |
---|
NearCacheObjectRecordStore(String name,
NearCacheConfig nearCacheConfig,
SerializationService serializationService,
ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
protected long |
getKeyStorageMemoryCost(K key) |
protected long |
getRecordStorageMemoryCost(NearCacheObjectRecord record) |
protected V |
recordToValue(NearCacheObjectRecord<V> record) |
Object |
selectToSave(Object... candidates)
Selects the best candidate object to store from the given
candidates . |
protected void |
updateRecordValue(NearCacheObjectRecord<V> record,
V value) |
protected NearCacheObjectRecord<V> |
valueToRecord(V value) |
containsRecordKey, createNearCacheEvictionChecker, createNearCacheRecordMap, destroy, doExpiration, getOrCreateToReserve, getRecord, loadKeys, onEvict, putRecord, removeRecord, storeKeys, updateAndGetReserved
checkAvailable, clear, dataToValue, doEviction, doEvictionIfRequired, get, getNearCacheStats, getStaleReadDetector, getTotalStorageMemoryCost, initialize, isAvailable, isRecordExpired, onExpire, onGet, onGetError, onPut, onPutError, onRecordCreate, onRemove, onRemoveError, put, remove, setStaleReadDetector, size, toData, toValue, tryPublishReserved, tryReserveForUpdate, updateReservedRecordInternal, valueToData
public NearCacheObjectRecordStore(String name, NearCacheConfig nearCacheConfig, SerializationService serializationService, ClassLoader classLoader)
protected long getKeyStorageMemoryCost(K key)
getKeyStorageMemoryCost
in class AbstractNearCacheRecordStore<K,V,K,NearCacheObjectRecord<V>,HeapNearCacheRecordMap<K,NearCacheObjectRecord<V>>>
protected long getRecordStorageMemoryCost(NearCacheObjectRecord record)
getRecordStorageMemoryCost
in class AbstractNearCacheRecordStore<K,V,K,NearCacheObjectRecord<V>,HeapNearCacheRecordMap<K,NearCacheObjectRecord<V>>>
protected NearCacheObjectRecord<V> valueToRecord(V value)
valueToRecord
in class AbstractNearCacheRecordStore<K,V,K,NearCacheObjectRecord<V>,HeapNearCacheRecordMap<K,NearCacheObjectRecord<V>>>
protected void updateRecordValue(NearCacheObjectRecord<V> record, V value)
updateRecordValue
in class AbstractNearCacheRecordStore<K,V,K,NearCacheObjectRecord<V>,HeapNearCacheRecordMap<K,NearCacheObjectRecord<V>>>
protected V recordToValue(NearCacheObjectRecord<V> record)
recordToValue
in class AbstractNearCacheRecordStore<K,V,K,NearCacheObjectRecord<V>,HeapNearCacheRecordMap<K,NearCacheObjectRecord<V>>>
public Object selectToSave(Object... candidates)
NearCacheRecordStore
candidates
.candidates
- the candidates from which the best candidate object will be selected.candidates
.Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.