public class CacheRecordStore extends Object implements ICacheRecordStore
ICacheRecordStore
Represents a named ICache on-heap data for a single partition.
Total data of an ICache object is the total CacheRecordStore on all partitions.
This data structure is the actual cache operations implementation, data access, statistics, event firing etc.
CacheRecordStore is managed by CachePartitionSegment.CachePartitionSegment| Modifier and Type | Method and Description |
|---|---|
void |
clear(Set<Data> keys,
boolean isRemoveAll) |
boolean |
contains(Data key) |
protected void |
deleteAllCacheEntry(Set<Data> keys)
modifies the keys
|
protected void |
deleteCacheEntry(Data key) |
void |
destroy() |
void |
evictExpiredRecords() |
Object |
get(Data key,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
MapEntrySet |
getAll(Set<Data> keySet,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
Object |
getAndPut(Data key,
Object value,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
String caller) |
protected Object |
getAndPut(Data key,
Object value,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
String caller,
boolean getValue) |
protected Object |
getAndPut(Data key,
Object value,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
String caller,
boolean getValue,
boolean disableWriteThrough) |
Object |
getAndRemove(Data key,
String caller) |
Object |
getAndReplace(Data key,
Object value,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
String caller) |
CacheStatisticsImpl |
getCacheStats() |
CacheConfig |
getConfig() |
String |
getName() |
Map<Data,CacheRecord> |
getReadOnlyRecords() |
CacheRecord |
getRecord(Data key) |
Object |
invoke(Data key,
javax.cache.processor.EntryProcessor entryProcessor,
Object[] arguments) |
CacheKeyIteratorResult |
iterator(int tableIndex,
int size) |
Set<Data> |
loadAll(Set<Data> keys,
boolean replaceExistingValues) |
protected Map<Data,Object> |
loadAllCacheEntry(Set<Data> keys) |
void |
onDestroy() |
protected boolean |
processExpiredEntry(Data key,
CacheRecord record,
long now) |
protected boolean |
processExpiredEntry(Data key,
CacheRecord record,
long expiryTime,
long now) |
void |
publishCompletedEvent(String cacheName,
int completionId,
Data dataKey,
int orderKey) |
protected void |
publishEvent(String cacheName,
CacheEventType eventType,
Data dataKey,
Data dataOldValue,
Data dataValue,
boolean isOldValueAvailable) |
void |
put(Data key,
Object value,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
String caller) |
boolean |
putIfAbsent(Data key,
Object value,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
String caller) |
protected boolean |
putIfAbsent(Data key,
Object value,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
String caller,
boolean disableWriteThrough) |
protected Object |
readThroughCache(Data key) |
boolean |
remove(Data key,
Object value,
String caller) |
boolean |
remove(Data key,
String caller) |
CacheRecord |
removeRecord(Data key) |
boolean |
replace(Data key,
Object value,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
String caller) |
boolean |
replace(Data key,
Object oldValue,
Object newValue,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
String caller) |
void |
setRecord(Data key,
CacheRecord record) |
int |
size() |
protected void |
writeThroughCache(Data key,
Object value) |
public Object get(Data key, javax.cache.expiry.ExpiryPolicy expiryPolicy)
get in interface ICacheRecordStorepublic void put(Data key, Object value, javax.cache.expiry.ExpiryPolicy expiryPolicy, String caller)
put in interface ICacheRecordStoreprotected Object getAndPut(Data key, Object value, javax.cache.expiry.ExpiryPolicy expiryPolicy, String caller, boolean getValue, boolean disableWriteThrough)
protected Object getAndPut(Data key, Object value, javax.cache.expiry.ExpiryPolicy expiryPolicy, String caller, boolean getValue)
public Object getAndPut(Data key, Object value, javax.cache.expiry.ExpiryPolicy expiryPolicy, String caller)
getAndPut in interface ICacheRecordStorepublic boolean putIfAbsent(Data key, Object value, javax.cache.expiry.ExpiryPolicy expiryPolicy, String caller)
putIfAbsent in interface ICacheRecordStoreprotected boolean putIfAbsent(Data key, Object value, javax.cache.expiry.ExpiryPolicy expiryPolicy, String caller, boolean disableWriteThrough)
public Object getAndRemove(Data key, String caller)
getAndRemove in interface ICacheRecordStorepublic boolean remove(Data key, String caller)
remove in interface ICacheRecordStorepublic boolean remove(Data key, Object value, String caller)
remove in interface ICacheRecordStorepublic boolean replace(Data key, Object value, javax.cache.expiry.ExpiryPolicy expiryPolicy, String caller)
replace in interface ICacheRecordStorepublic boolean replace(Data key, Object oldValue, Object newValue, javax.cache.expiry.ExpiryPolicy expiryPolicy, String caller)
replace in interface ICacheRecordStorepublic Object getAndReplace(Data key, Object value, javax.cache.expiry.ExpiryPolicy expiryPolicy, String caller)
getAndReplace in interface ICacheRecordStorepublic boolean contains(Data key)
contains in interface ICacheRecordStorepublic MapEntrySet getAll(Set<Data> keySet, javax.cache.expiry.ExpiryPolicy expiryPolicy)
getAll in interface ICacheRecordStorepublic int size()
size in interface ICacheRecordStorepublic void clear(Set<Data> keys, boolean isRemoveAll)
clear in interface ICacheRecordStorepublic void destroy()
destroy in interface ICacheRecordStorepublic void onDestroy()
public CacheRecord getRecord(Data key)
getRecord in interface ICacheRecordStorepublic void setRecord(Data key, CacheRecord record)
setRecord in interface ICacheRecordStorepublic CacheRecord removeRecord(Data key)
removeRecord in interface ICacheRecordStorepublic CacheKeyIteratorResult iterator(int tableIndex, int size)
iterator in interface ICacheRecordStorepublic Object invoke(Data key, javax.cache.processor.EntryProcessor entryProcessor, Object[] arguments)
invoke in interface ICacheRecordStorepublic Set<Data> loadAll(Set<Data> keys, boolean replaceExistingValues)
loadAll in interface ICacheRecordStorepublic CacheStatisticsImpl getCacheStats()
getCacheStats in interface ICacheRecordStorepublic CacheConfig getConfig()
getConfig in interface ICacheRecordStorepublic String getName()
getName in interface ICacheRecordStorepublic Map<Data,CacheRecord> getReadOnlyRecords()
getReadOnlyRecords in interface ICacheRecordStorepublic void evictExpiredRecords()
protected Object readThroughCache(Data key) throws javax.cache.integration.CacheLoaderException
javax.cache.integration.CacheLoaderExceptionprotected void writeThroughCache(Data key, Object value) throws javax.cache.integration.CacheWriterException
javax.cache.integration.CacheWriterExceptionprotected void deleteCacheEntry(Data key)
protected void deleteAllCacheEntry(Set<Data> keys)
keys - : keys to delete, after method returns it includes only deleted keysprotected boolean processExpiredEntry(Data key, CacheRecord record, long now)
protected boolean processExpiredEntry(Data key, CacheRecord record, long expiryTime, long now)
public void publishCompletedEvent(String cacheName, int completionId, Data dataKey, int orderKey)
publishCompletedEvent in interface ICacheRecordStoreprotected void publishEvent(String cacheName, CacheEventType eventType, Data dataKey, Data dataOldValue, Data dataValue, boolean isOldValueAvailable)
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.