K - the type of the keyV - the type of the valuepublic interface NearCacheRecordStore<K,V> extends InitializingObject
NearCacheRecordStore is the contract point to store keys and values as
 NearCacheRecord internally and to serve them.| Modifier and Type | Method and Description | 
|---|---|
| void | clear()Removes all stored values. | 
| void | destroy()Clears the record store and destroys it. | 
| void | doEviction()Does eviction as specified configuration  EvictionConfiginNearCacheConfigregardless from the max-size policy. | 
| void | doEvictionIfRequired()Does eviction as specified configuration  EvictionConfiginNearCacheConfig. | 
| void | doExpiration()Performs expiration and evicts expired records. | 
| V | get(K key)Gets the value associated with the given  key. | 
| NearCacheStats | getNearCacheStats()Get the  NearCacheStatsinstance to monitor this record store. | 
| StaleReadDetector | getStaleReadDetector() | 
| void | loadKeys(DataStructureAdapter<Data,?> adapter)Loads the keys into the Near Cache. | 
| 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. | 
| void | setStaleReadDetector(StaleReadDetector detector) | 
| int | size()Gets the number of stored records. | 
| void | storeKeys()Persists the key set of the Near Cache. | 
initializeV get(K key)
key.key - the key from which to get the associated value.key.void put(K key, V value)
key.key - the key to which the given value will be associated.value - the value that will be associated with the key.boolean remove(K key)
key.key - the key from which the value will be removed.true if the value was removed, otherwise false.void clear()
void destroy()
NearCacheStats getNearCacheStats()
NearCacheStats instance to monitor this record store.NearCacheStats instance to monitor this record store.Object selectToSave(Object... candidates)
candidates.candidates - the candidates from which the best candidate object will be selected.candidates.int size()
void doExpiration()
void doEvictionIfRequired()
EvictionConfig
 in NearCacheConfig.void doEviction()
EvictionConfig
 in NearCacheConfig regardless from the max-size policy.void loadKeys(DataStructureAdapter<Data,?> adapter)
void storeKeys()
void setStaleReadDetector(StaleReadDetector detector)
StaleReadDetectorStaleReadDetector getStaleReadDetector()
StaleReadDetectorCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.