public final class InvalidationAwareWrapper<K,V> extends Object implements NearCache<K,V>
KeyStateMarker
,
MapProxyImpl.get(java.lang.Object)
DEFAULT_EXPIRATION_TASK_DELAY_IN_SECONDS, DEFAULT_EXPIRATION_TASK_INITIAL_DELAY_IN_SECONDS, NULL_OBJECT
Modifier and Type | Method and Description |
---|---|
static <KEY,VALUE> |
asInvalidationAware(NearCache<KEY,VALUE> nearCache,
int markerCount) |
void |
clear()
Removes all stored values.
|
void |
destroy()
Clears the record store and destroys it.
|
V |
get(K 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 this
NearCache instance. |
NearCacheStats |
getNearCacheStats()
Get the
NearCacheStats instance to monitor this store. |
NearCachePreloaderConfig |
getPreloaderConfig()
Gets the
NearCachePreloaderConfig of this Near Cache. |
void |
initialize() |
boolean |
isInvalidatedOnChange()
Checks if values are invalidated on changes.
|
boolean |
isPreloadDone()
Checks if the pre-loading of the Near Cache is done.
|
void |
preload(DataStructureAdapter adapter)
Executes the Near Cache pre-loader on the given
DataStructureAdapter . |
void |
put(K key,
V value)
Puts (associates) a value with the given
key . |
boolean |
remove(K 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.
|
void |
storeKeys()
Stores the keys of the Near Cache.
|
<T> T |
unwrap(Class<T> clazz)
Used to access non-standard methods of an implementation.
|
public static <KEY,VALUE> NearCache<KEY,VALUE> asInvalidationAware(NearCache<KEY,VALUE> nearCache, int markerCount)
public void initialize()
initialize
in interface InitializingObject
public String getName()
NearCache
NearCache
instance.public V get(K key)
NearCache
key
.public void put(K key, V value)
NearCache
key
.public boolean remove(K key)
NearCache
key
.public boolean isInvalidatedOnChange()
NearCache
isInvalidatedOnChange
in interface NearCache<K,V>
true
if values are invalidated on changes, false
otherwisepublic void clear()
NearCache
public void destroy()
NearCache
public InMemoryFormat getInMemoryFormat()
NearCache
InMemoryFormat
of the storage for internal records.getInMemoryFormat
in interface NearCache<K,V>
InMemoryFormat
of the storage for internal recordspublic NearCachePreloaderConfig getPreloaderConfig()
NearCache
NearCachePreloaderConfig
of this Near Cache.getPreloaderConfig
in interface NearCache<K,V>
NearCachePreloaderConfig
of this Near Cachepublic NearCacheStats getNearCacheStats()
NearCache
NearCacheStats
instance to monitor this store.getNearCacheStats
in interface NearCache<K,V>
NearCacheStats
instance to monitor this storepublic Object selectToSave(Object... candidates)
NearCache
candidates
.selectToSave
in interface NearCache<K,V>
candidates
- the candidates from which the best candidate object will be selected.candidates
.public int size()
NearCache
public void preload(DataStructureAdapter adapter)
NearCache
DataStructureAdapter
.public void storeKeys()
NearCache
public boolean isPreloadDone()
NearCache
isPreloadDone
in interface NearCache<K,V>
true
if the pre-loading is done, false
otherwise.public <T> T unwrap(Class<T> clazz)
NearCache
If this method is called on a wrapper object, result is wrapped object.
public KeyStateMarker getKeyStateMarker()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.