K
- KeyV
- Valuepublic abstract class HazelcastMongoDbMapStore<K,V> extends Object implements com.hazelcast.core.MapStore<K,V>
The MongoDB client must be stored as
"com.threecrickets.prudence.cache.HazelcastMongoDbMapStore.mongoDb" in the
Component
's context.
The MongoDB database will be "prudence".
Modifier and Type | Field and Description |
---|---|
static String |
MONGODB_CLIENT_ATTRIBUTE
MongoDB default connection attribute for a
Component . |
Constructor and Description |
---|
HazelcastMongoDbMapStore(String collectionName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(K key) |
void |
deleteAll(Collection<K> keys) |
MongoCollection<Document> |
getCollection()
The MongoDB collection used for the store.
|
V |
load(K key) |
Map<K,V> |
loadAll(Collection<K> keys) |
Set<K> |
loadAllKeys() |
void |
store(K key,
V value) |
void |
storeAll(Map<K,V> map) |
public HazelcastMongoDbMapStore(String collectionName)
collectionName
- The name of the MongoDB collection used for the storepublic MongoCollection<Document> getCollection()
public Map<K,V> loadAll(Collection<K> keys)
public void deleteAll(Collection<K> keys)
Copyright © 2009-2016 Three Crickets LLC.