|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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.
| Field Summary | |
|---|---|
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 |
| Method Summary | |
|---|---|
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. |
| Field Detail |
|---|
static final int DEFAULT_EXPIRATION_TASK_INITIAL_DELAY_IN_SECONDS
static final int DEFAULT_EXPIRATION_TASK_DELAY_IN_SECONDS
static final Object NULL_OBJECT
| Method Detail |
|---|
String getName()
this NearCache instance.
this NearCache instanceV get(K key)
key.
key - the key of the requested value
key
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||