public interface StaleReadDetector
NearCache.get(Object)
, if one or more invalidations are lost for a key,
we will make near cached data unreachable with the help of StaleReadDetector
and next get()
from the
Near Cache will return null
to force fresh data fetching from underlying IMap/ICache.AbstractNearCacheRecordStore.get(K)
Modifier and Type | Field and Description |
---|---|
static StaleReadDetector |
ALWAYS_FRESH
This instance will be used when Near Cache invalidations are disabled.
|
Modifier and Type | Method and Description |
---|---|
MetaDataContainer |
getMetaDataContainer(int partitionId) |
int |
getPartitionId(Object key) |
boolean |
isStaleRead(Object key,
NearCacheRecord record) |
static final StaleReadDetector ALWAYS_FRESH
boolean isStaleRead(Object key, NearCacheRecord record)
key
- the keyrecord
- the Near Cache recordtrue
if reading with the supplied invalidation metadata is stale,
otherwise returns false
int getPartitionId(Object key)
MetaDataContainer getMetaDataContainer(int partitionId)
partitionId
- supplied partition ID to get valueMetaDataContainer
for this keyCopyright © 2019 Hazelcast, Inc.. All Rights Reserved.