|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MapLoader<K,V>
Hazelcast distributed map implementation is an in-memory data store but it can be backed by any type of data store such as RDBMS, OODBMS, or simply a file based data store.
IMap.get(key) normally returns the value that is available in-memory. If the entry doesn't exist in-memory, Hazelcast returns null. If a Loader implementation is provided then, instead of returning null, Hazelcast will load the unknown entry by calling the implementation's load (key) or loadAll(keys) methods. Loaded entries will be placed into the distributed map and they will stay in-memory until they are explicitly removed or implicitly evicted (if eviction is configured).
Method Summary | |
---|---|
V |
load(K key)
Loads the value of a given key. |
Map<K,V> |
loadAll(Collection<K> keys)
Loads given keys. |
Iterable<K> |
loadAllKeys()
Loads all of the keys from the store. |
Method Detail |
---|
V load(K key)
key
-
Map<K,V> loadAll(Collection<K> keys)
keys
- keys of the values entries to load
Iterable<K> loadAllKeys()
Iterable
may return the keys lazily
by loading them in batches. The Iterator
of this Iterable
may implement the
Closeable
interface in which case it will be closed once iteration is over.
This is intended for releasing resources such as closing a JDBC result set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |