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)
NearCache
key
.public NearCacheStatsImpl getNearCacheStats()
NearCache
NearCacheStats
instance to monitor this store.getNearCacheStats
in interface NearCache<Data,Object>
NearCacheStats
instance to monitor this storepublic Object selectToSave(Object... candidates)
NearCache
candidates
.selectToSave
in interface NearCache<Data,Object>
candidates
- the candidates from which the best candidate object will be selected.candidates
.public String getName()
NearCache
this
NearCache
instance.public Object get(Data key)
NearCache
key
.public boolean remove(Data key)
NearCache
key
.public boolean isInvalidateOnChange()
isInvalidateOnChange
in interface NearCache<Data,Object>
public int size()
NearCache
public void clear()
NearCache
public void destroy()
NearCache
public InMemoryFormat getInMemoryFormat()
NearCache
InMemoryFormat
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.