public final class StaleReadPreventerNearCacheWrapper extends Object implements NearCache
NearCache
against stale reads by using KeyStateMarker
KeyStateMarker
DEFAULT_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()
NearCache
this
NearCache
instance.public Object get(Object key)
NearCache
key
.public void put(Object key, Object value)
NearCache
key
.public boolean remove(Object key)
NearCache
key
.public boolean isInvalidateOnChange()
isInvalidateOnChange
in interface NearCache
public void clear()
NearCache
public void destroy()
NearCache
public InMemoryFormat getInMemoryFormat()
NearCache
InMemoryFormat
of the storage for internal records.getInMemoryFormat
in interface NearCache
InMemoryFormat
of the storage for internal recordspublic NearCacheStats getNearCacheStats()
NearCache
NearCacheStats
instance to monitor this store.getNearCacheStats
in interface NearCache
NearCacheStats
instance to monitor this storepublic Object selectToSave(Object... candidates)
NearCache
candidates
.selectToSave
in interface NearCache
candidates
- the candidates from which the best candidate object will be selected.candidates
.public int size()
NearCache
public KeyStateMarker getKeyStateMarker()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.