public final class StaleReadPreventerNearCacheWrapper extends Object implements NearCache
NearCache against stale reads by using KeyStateMarkerKeyStateMarkerDEFAULT_EXPIRATION_TASK_DELAY_IN_SECONDS, DEFAULT_EXPIRATION_TASK_INITIAL_DELAY_IN_SECONDS, NULL_OBJECT| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all stored values.
|
void |
destroy()
Clears the record store and destroys it.
|
Object |
get(Object key)
Gets the value associated with the given
key. |
InMemoryFormat |
getInMemoryFormat()
Gets the
InMemoryFormat of the storage for internal records. |
KeyStateMarker |
getKeyStateMarker() |
String |
getName()
Gets the name of the
this NearCache instance. |
NearCacheStats |
getNearCacheStats()
Get the
NearCacheStats instance to monitor this store. |
boolean |
isInvalidateOnChange() |
void |
put(Object key,
Object value)
Puts (associates) a value with the given
key. |
boolean |
remove(Object key)
Removes the value associated with the given
key. |
Object |
selectToSave(Object... candidates)
Selects the best candidate object to store from the given
candidates. |
int |
size()
Gets the count of stored records.
|
static NearCache |
wrapAsStaleReadPreventerNearCache(NearCache nearCache,
int markerCount) |
public static NearCache wrapAsStaleReadPreventerNearCache(NearCache nearCache, int markerCount)
public String getName()
NearCachethis NearCache instance.public Object get(Object key)
NearCachekey.public void put(Object key, Object value)
NearCachekey.public boolean remove(Object key)
NearCachekey.public boolean isInvalidateOnChange()
isInvalidateOnChange in interface NearCachepublic void clear()
NearCachepublic void destroy()
NearCachepublic InMemoryFormat getInMemoryFormat()
NearCacheInMemoryFormat of the storage for internal records.getInMemoryFormat in interface NearCacheInMemoryFormat of the storage for internal recordspublic NearCacheStats getNearCacheStats()
NearCacheNearCacheStats instance to monitor this store.getNearCacheStats in interface NearCacheNearCacheStats instance to monitor this storepublic Object selectToSave(Object... candidates)
NearCachecandidates.selectToSave in interface NearCachecandidates - the candidates from which the best candidate object will be selected.candidates.public int size()
NearCachepublic KeyStateMarker getKeyStateMarker()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.