public class ElasticSearchMapPersistence extends Object implements MapPersistence
| Modifier and Type | Field and Description |
|---|---|
protected Charset |
_encoding |
protected org.elasticsearch.client.Client |
_esClient |
protected String |
_index |
protected String |
_type |
| Constructor and Description |
|---|
ElasticSearchMapPersistence() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkForIndex(String esIndex) |
void |
delete(Object key)
Deletes the entry with a given key from the store.
|
void |
deleteAll(Collection keys)
Deletes multiple entries from the store.
|
void |
destroy()
Hazelcast will call this method before shutting down.
|
void |
init(com.hazelcast.core.HazelcastInstance hazelcastInstance,
Properties properties,
String mapName)
Initializes this MapLoader implementation.
|
Object |
load(Object key)
Loads the value of a given key.
|
Map |
loadAll(Collection keys)
Loads given keys.
|
Set |
loadAllKeys()
Loads all of the keys from the store.
|
protected String[] |
mapParts(String mapName) |
void |
setEsClient(org.elasticsearch.client.Client esClient) |
void |
store(Object key,
Object value)
Stores the key-value pair.
|
void |
storeAll(Map map)
Stores multiple entries.
|
protected String _index
protected String _type
protected org.elasticsearch.client.Client _esClient
protected Charset _encoding
protected void checkForIndex(String esIndex)
public void setEsClient(org.elasticsearch.client.Client esClient)
public void init(com.hazelcast.core.HazelcastInstance hazelcastInstance,
Properties properties,
String mapName)
init in interface com.hazelcast.core.MapLoaderLifecycleSupporthazelcastInstance - HazelcastInstance of this mapLoader.properties - Properties set for this mapStore. see MapStoreConfigmapName - name of the map.public void destroy()
destroy in interface com.hazelcast.core.MapLoaderLifecycleSupportpublic void delete(Object key)
delete in interface com.hazelcast.core.MapStorekey - key to delete from the store.public void deleteAll(Collection keys)
deleteAll in interface com.hazelcast.core.MapStorekeys - keys of the entries to delete.public void storeAll(Map map)
storeAll in interface com.hazelcast.core.MapStoremap - map of entries to storepublic void store(Object key, Object value)
store in interface com.hazelcast.core.MapStorekey - key of the entry to storevalue - value of the entry to storepublic Object load(Object key)
load in interface com.hazelcast.core.MapLoaderkey - public Map loadAll(Collection keys)
loadAll in interface com.hazelcast.core.MapLoaderkeys - keys of the values entries to loadpublic Set loadAllKeys()
loadAllKeys in interface com.hazelcast.core.MapLoaderCopyright © 2015. All rights reserved.