| Modifier and Type | Field and Description |
|---|---|
static String |
NEAR_CACHE_EXECUTOR_NAME |
DEFAULT_EXPIRATION_TASK_DELAY_IN_SECONDS, DEFAULT_EXPIRATION_TASK_INITIAL_DELAY_IN_SECONDS, NULL_OBJECT| Constructor and Description |
|---|
NearCacheImpl(String mapName,
NodeEngine nodeEngine) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all stored values.
|
void |
destroy()
Clears the record store and destroys it.
|
Object |
get(Data key)
Gets the value associated with the given
key. |
InMemoryFormat |
getInMemoryFormat()
Gets the
InMemoryFormat of the storage for internal records. |
String |
getName()
Gets the name of the
this NearCache instance. |
SizeEstimator |
getNearCacheSizeEstimator() |
NearCacheStatsImpl |
getNearCacheStats()
Get the
NearCacheStats instance to monitor this store. |
boolean |
isInvalidateOnChange() |
void |
put(Data key,
Object value)
Puts (associates) a value with the given
key. |
boolean |
remove(Data key)
Removes the value associated with the given
key. |
Object |
selectToSave(Object... candidates)
Selects the best candidate object to store from the given
candidates. |
void |
setNearCacheSizeEstimator(SizeEstimator nearCacheSizeEstimator) |
int |
size()
Gets the count of stored records.
|
public static final String NEAR_CACHE_EXECUTOR_NAME
public NearCacheImpl(String mapName, NodeEngine nodeEngine)
mapName - name of map which owns near cache.nodeEngine - node engine.public void put(Data key, Object value)
NearCachekey.public NearCacheStatsImpl getNearCacheStats()
NearCacheNearCacheStats instance to monitor this store.getNearCacheStats in interface NearCache<Data,Object>NearCacheStats instance to monitor this storepublic Object selectToSave(Object... candidates)
NearCachecandidates.selectToSave in interface NearCache<Data,Object>candidates - the candidates from which the best candidate object will be selected.candidates.public String getName()
NearCachethis NearCache instance.public Object get(Data key)
NearCachekey.public boolean remove(Data key)
NearCachekey.public boolean isInvalidateOnChange()
isInvalidateOnChange in interface NearCache<Data,Object>public int size()
NearCachepublic void clear()
NearCachepublic void destroy()
NearCachepublic InMemoryFormat getInMemoryFormat()
NearCacheInMemoryFormat of the storage for internal records.getInMemoryFormat in interface NearCache<Data,Object>InMemoryFormat of the storage for internal recordspublic SizeEstimator getNearCacheSizeEstimator()
public void setNearCacheSizeEstimator(SizeEstimator nearCacheSizeEstimator)
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.