com.hazelcast.cache.impl
Class CacheRecordStore
java.lang.Object
com.hazelcast.cache.impl.AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
com.hazelcast.cache.impl.CacheRecordStore
- All Implemented Interfaces:
- ICacheRecordStore
public class CacheRecordStore
- extends AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
Hazelcast splits data homogeneously to partitions using keys. CacheRecordStore represents a named ICache on-heap
data store for a single partition.
This data structure is responsible for CRUD operations, entry processing, statistics, publishing events, cache
loader and writer and internal data operations like backup.
CacheRecordStore is accessed through CachePartitionSegment and
CacheService.
CacheRecordStore is managed by CachePartitionSegment.
Sample code accessing a CacheRecordStore and getting a value. Typical operation implementation:
CacheService service = getService();
ICacheRecordStore cache = service.getOrCreateCache(name, partitionId);
cache.get(key, expiryPolicy);
See AbstractCacheOperation
subclasses for actual examples.
- See Also:
CachePartitionSegment
,
CacheService
,
AbstractCacheOperation
Fields inherited from class com.hazelcast.cache.impl.AbstractCacheRecordStore |
batchEvent, cacheConfig, cacheLoader, cacheService, cacheWriter, DEFAULT_INITIAL_CAPACITY, defaultExpiryPolicy, evictionChecker, evictionConfig, evictionPolicyEvaluator, evictionStrategy, hasExpiringEntry, isEventBatchingEnabled, isEventsEnabled, maxSizeChecker, name, nodeEngine, partitionCount, partitionId, records, statistics |
Methods inherited from class com.hazelcast.cache.impl.AbstractCacheRecordStore |
accessRecord, clear, closeListeners, closeResources, compare, contains, createEvictionChecker, createRecord, createRecord, createRecord, createRecordWithExpiry, creatEvictionPolicyEvaluator, creatEvictionStrategy, deleteAllCacheEntry, deleteCacheEntry, deleteRecord, destroy, evictIfRequired, expiryPolicyToTTL, get, getAll, getAndPut, getAndRemove, getAndReplace, getCacheStats, getConfig, getExpiryPolicy, getName, getReadOnlyRecords, getRecord, invoke, isEvictionEnabled, isEvictionRequired, isReadThrough, isStatisticsEnabled, isWriteThrough, iterator, loadAll, loadAllCacheEntry, onDeleteRecord, onDeleteRecordError, onGet, onGetError, onPut, onPutError, onPutIfAbsent, onPutIfAbsentError, onRecordAccess, onRemove, onRemoveError, onReplace, onReplaceError, onUpdateRecord, onUpdateRecordError, processExpiredEntry, processExpiredEntry, publishBatchedEvents, publishEvent, put, put, put, putIfAbsent, putIfAbsent, putRecord, readThroughCache, readThroughRecord, remove, remove, removeAll, removeRecord, replace, replace, setRecord, size, toData, toEventData, toRecord, toValue, ttlToExpirePolicy, updateAccessDuration, updateGetAndPutStat, updateHasExpiringEntry, updateRecord, updateRecordWithExpiry, updateReplaceStat, writeThroughCache |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serializationService
protected SerializationService serializationService
cacheRecordFactory
protected CacheRecordFactory cacheRecordFactory
CacheRecordStore
public CacheRecordStore(String name,
int partitionId,
NodeEngine nodeEngine,
AbstractCacheService cacheService)
createCacheMaxSizeChecker
protected CacheMaxSizeChecker createCacheMaxSizeChecker(int size,
CacheEvictionConfig.CacheMaxSizePolicy maxSizePolicy)
- Overrides:
createCacheMaxSizeChecker
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
createRecordCacheMap
protected CacheRecordHashMap createRecordCacheMap()
- Specified by:
createRecordCacheMap
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
createCacheEntryProcessorEntry
protected CacheEntryProcessorEntry createCacheEntryProcessorEntry(Data key,
CacheRecord record,
long now,
int completionId)
- Specified by:
createCacheEntryProcessorEntry
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
createCacheRecordFactory
protected CacheRecordFactory createCacheRecordFactory()
createRecord
protected <T> CacheRecord createRecord(T value,
long creationTime,
long expiryTime)
- Specified by:
createRecord
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
valueToData
protected <T> Data valueToData(T value)
- Specified by:
valueToData
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
dataToValue
protected <T> T dataToValue(Data data)
- Specified by:
dataToValue
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
valueToRecord
protected <T> CacheRecord valueToRecord(T value)
- Specified by:
valueToRecord
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
recordToValue
protected <T> T recordToValue(CacheRecord record)
- Specified by:
recordToValue
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
recordToData
protected Data recordToData(CacheRecord record)
- Specified by:
recordToData
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
dataToRecord
protected CacheRecord dataToRecord(Data data)
- Specified by:
dataToRecord
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
toHeapData
protected Data toHeapData(Object obj)
- Specified by:
toHeapData
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.