com.hazelcast.cache.impl.nearcache
K
- the type of the keyV
- the type of the valuepublic interface NearCache<K,V>
NearCache
is the contract point to store keys and values in underlying
NearCacheRecordStore
.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_EXPIRATION_TASK_DELAY_IN_SECONDS
Default expiration task delay time as seconds
|
static int |
DEFAULT_EXPIRATION_TASK_INITIAL_DELAY_IN_SECONDS
Default expiration task initial delay time as seconds
|
static Object |
NULL_OBJECT
NULL Object
|
Modifier and Type | Method and Description |
---|---|
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. |
String |
getName()
Gets the name of the
this NearCache instance. |
NearCacheStats |
getNearCacheStats()
Get the
NearCacheStats instance to monitor this store. |
void |
invalidate(K key)
Invalidates the value associated with the given
key . |
boolean |
isInvalidateOnChange() |
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.
|
static final int DEFAULT_EXPIRATION_TASK_INITIAL_DELAY_IN_SECONDS
static final int DEFAULT_EXPIRATION_TASK_DELAY_IN_SECONDS
static final Object NULL_OBJECT
String getName()
this
NearCache
instance.this
NearCache
instanceV get(K key)
key
.key
- the key of the requested valuekey
void put(K key, V value)
key
.key
- the key of the value will be storedvalue
- the value will be storedboolean remove(K key)
key
.key
- the key of the value will be removedvoid invalidate(K key)
key
.key
- the key of the value will be removedboolean isInvalidateOnChange()
void clear()
void destroy()
InMemoryFormat getInMemoryFormat()
InMemoryFormat
of the storage for internal records.InMemoryFormat
of the storage for internal recordsNearCacheStats getNearCacheStats()
NearCacheStats
instance to monitor this store.NearCacheStats
instance to monitor this storeObject selectToSave(Object... candidates)
candidates
.candidates
- the candidates from which the best candidate object will be selected.candidates
.int size()
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.