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 InitializingObjectpublic String getName()
NearCacheNearCache instance.public V get(K key)
NearCachekey.public void put(K key, V value)
NearCachekey.public boolean remove(K key)
NearCachekey.public boolean isInvalidatedOnChange()
NearCacheisInvalidatedOnChange in interface NearCache<K,V>true if values are invalidated on changes, false otherwisepublic void clear()
NearCachepublic void destroy()
NearCachepublic InMemoryFormat getInMemoryFormat()
NearCacheInMemoryFormat of the storage for internal records.getInMemoryFormat in interface NearCache<K,V>InMemoryFormat of the storage for internal recordspublic NearCachePreloaderConfig getPreloaderConfig()
NearCacheNearCachePreloaderConfig of this Near Cache.getPreloaderConfig in interface NearCache<K,V>NearCachePreloaderConfig of this Near Cachepublic NearCacheStats getNearCacheStats()
NearCacheNearCacheStats instance to monitor this store.getNearCacheStats in interface NearCache<K,V>NearCacheStats instance to monitor this storepublic Object selectToSave(Object... candidates)
NearCachecandidates.selectToSave in interface NearCache<K,V>candidates - the candidates from which the best candidate object will be selected.candidates.public int size()
NearCachepublic void preload(DataStructureAdapter adapter)
NearCacheDataStructureAdapter.public void storeKeys()
NearCachepublic boolean isPreloadDone()
NearCacheisPreloadDone in interface NearCache<K,V>true if the pre-loading is done, false otherwise.public <T> T unwrap(Class<T> clazz)
NearCacheIf this method is called on a wrapper object, result is wrapped object.
public KeyStateMarker getKeyStateMarker()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.