com.hazelcast.cache.impl
public class CacheRecordStore extends AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
ICacheRecordStore
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.
CachePartitionSegment
,
CacheService
,
AbstractCacheOperation
AbstractCacheRecordStore.MaxSizeEvictionChecker
Modifier and Type | Field and Description |
---|---|
protected CacheRecordFactory |
cacheRecordFactory |
protected SerializationService |
serializationService |
batchEvent, cacheConfig, cacheLoader, cacheService, cacheWriter, DEFAULT_INITIAL_CAPACITY, defaultExpiryPolicy, evictionChecker, evictionConfig, evictionPolicyEvaluator, evictionStrategy, hasExpiringEntry, isEventBatchingEnabled, isEventsEnabled, maxSizeChecker, name, nodeEngine, partitionCount, partitionId, records, SOURCE_NOT_AVAILABLE, statistics
ONE_HUNDRED_PERCENT
NO_LISTENER
Constructor and Description |
---|
CacheRecordStore(String name,
int partitionId,
NodeEngine nodeEngine,
AbstractCacheService cacheService) |
Modifier and Type | Method and Description |
---|---|
protected CacheEntryProcessorEntry |
createCacheEntryProcessorEntry(Data key,
CacheRecord record,
long now,
int completionId) |
protected MaxSizeChecker |
createCacheMaxSizeChecker(int size,
EvictionConfig.MaxSizePolicy maxSizePolicy) |
protected CacheRecordFactory |
createCacheRecordFactory() |
protected CacheRecord |
createRecord(Object value,
long creationTime,
long expiryTime) |
protected CacheRecordHashMap |
createRecordCacheMap() |
protected Object |
dataToValue(Data data) |
protected Data |
recordToData(CacheRecord record) |
protected Object |
recordToValue(CacheRecord record) |
protected Data |
toHeapData(Object obj) |
protected Data |
valueToData(Object value) |
accessRecord, clear, closeListeners, compare, contains, createEvictionChecker, createEvictionPolicyEvaluator, createEvictionStrategy, createRecord, createRecord, createRecord, createRecord, createRecordWithExpiry, createRecordWithExpiry, createRecordWithExpiry, createRecordWithExpiry, deleteAllCacheEntry, deleteCacheEntry, deleteRecord, deleteRecord, deleteRecord, destroy, doPutRecord, doPutRecord, doRemoveRecord, doRemoveRecord, evictIfRequired, expiryPolicyToTTL, get, getAll, getAndPut, getAndRemove, getAndRemove, getAndReplace, getCacheStats, getConfig, getExpiryPolicy, getName, getReadOnlyRecords, getRecord, invalidateAllEntries, invalidateAllEntries, invalidateEntry, invalidateEntry, invoke, isEvictionEnabled, isReadThrough, isStatisticsEnabled, isWriteThrough, iterator, loadAll, loadAllCacheEntry, onClear, onDeleteRecord, onDeleteRecordError, onDestroy, onEvict, onGet, onGetError, onPut, onPutError, onPutIfAbsent, onPutIfAbsentError, onRecordAccess, onRemove, onRemoveError, onReplace, onReplaceError, onUpdateRecord, onUpdateRecordError, processExpiredEntry, processExpiredEntry, processExpiredEntry, processExpiredEntry, processExpiredEntry, processExpiredEntry, publishBatchedEvents, publishEvent, put, put, put, putIfAbsent, putIfAbsent, putRecord, readThroughCache, readThroughRecord, remove, remove, remove, remove, removeAll, removeRecord, replace, replace, setRecord, size, toData, toEventData, toStorageValue, toValue, ttlToExpirePolicy, updateAccessDuration, updateGetAndPutStat, updateHasExpiringEntry, updateRecord, updateRecord, updateRecord, updateRecordWithExpiry, updateRecordWithExpiry, updateRecordWithExpiry, updateRecordWithExpiry, updateRecordWithExpiry, updateRecordWithExpiry, updateReplaceStat, writeThroughCache
protected SerializationService serializationService
protected CacheRecordFactory cacheRecordFactory
public CacheRecordStore(String name, int partitionId, NodeEngine nodeEngine, AbstractCacheService cacheService)
protected MaxSizeChecker createCacheMaxSizeChecker(int size, EvictionConfig.MaxSizePolicy maxSizePolicy)
createCacheMaxSizeChecker
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
protected CacheRecordHashMap createRecordCacheMap()
createRecordCacheMap
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
protected CacheEntryProcessorEntry createCacheEntryProcessorEntry(Data key, CacheRecord record, long now, int completionId)
createCacheEntryProcessorEntry
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
protected CacheRecordFactory createCacheRecordFactory()
protected CacheRecord createRecord(Object value, long creationTime, long expiryTime)
createRecord
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
protected Data valueToData(Object value)
valueToData
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
protected Object dataToValue(Data data)
dataToValue
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
protected Object recordToValue(CacheRecord record)
recordToValue
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
protected Data recordToData(CacheRecord record)
recordToData
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
protected Data toHeapData(Object obj)
toHeapData
in class AbstractCacheRecordStore<CacheRecord,CacheRecordHashMap>
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.