Class HazelcastMetadataStore
java.lang.Object
org.springframework.integration.hazelcast.metadata.HazelcastMetadataStore
- All Implemented Interfaces:
InitializingBean,ConcurrentMetadataStore,ListenableMetadataStore,MetadataStore
public class HazelcastMetadataStore
extends Object
implements ListenableMetadataStore, InitializingBean
The Hazelcast
IMap-based ListenableMetadataStore implementation.- Author:
- Vinicius Carvalho, Artem Bilan
-
Constructor Summary
ConstructorsConstructorDescriptionHazelcastMetadataStore(com.hazelcast.core.HazelcastInstance hazelcastInstance) HazelcastMetadataStore(com.hazelcast.map.IMap<String, String> map) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(MetadataStoreListener callback) Register a listener with the metadata store.voidReads a value for the given key from this MetadataStore.voidWrites a key value pair to this MetadataStore.putIfAbsent(String key, String value) Atomically insert the key into the store.Remove a value for the given key from this MetadataStore.voidremoveListener(MetadataStoreListener callback) Unregister a listener.booleanAtomically replace the value for the key in the store if the old value matches the oldValue argument.
-
Constructor Details
-
HazelcastMetadataStore
public HazelcastMetadataStore(com.hazelcast.core.HazelcastInstance hazelcastInstance) -
HazelcastMetadataStore
-
-
Method Details
-
putIfAbsent
Description copied from interface:ConcurrentMetadataStoreAtomically insert the key into the store.- Specified by:
putIfAbsentin interfaceConcurrentMetadataStore- Parameters:
key- The key.value- The value.- Returns:
- null if successful, the old value otherwise.
-
replace
Description copied from interface:ConcurrentMetadataStoreAtomically replace the value for the key in the store if the old value matches the oldValue argument.- Specified by:
replacein interfaceConcurrentMetadataStore- Parameters:
key- The key.oldValue- The old value.newValue- The new value.- Returns:
- true if successful.
-
put
Description copied from interface:MetadataStoreWrites a key value pair to this MetadataStore.- Specified by:
putin interfaceMetadataStore- Parameters:
key- The key.value- The value.
-
get
Description copied from interface:MetadataStoreReads a value for the given key from this MetadataStore.- Specified by:
getin interfaceMetadataStore- Parameters:
key- The key.- Returns:
- The value.
-
remove
Description copied from interface:MetadataStoreRemove a value for the given key from this MetadataStore.- Specified by:
removein interfaceMetadataStore- Parameters:
key- The key.- Returns:
- The previous value associated with key, or null if there was no mapping for key.
-
addListener
Description copied from interface:ListenableMetadataStoreRegister a listener with the metadata store.- Specified by:
addListenerin interfaceListenableMetadataStore- Parameters:
callback- the callback to be registered
-
removeListener
Description copied from interface:ListenableMetadataStoreUnregister a listener.- Specified by:
removeListenerin interfaceListenableMetadataStore- Parameters:
callback- the callback to be unregistered
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceInitializingBean
-