Class GemfireMetadataStore
java.lang.Object
org.springframework.integration.gemfire.metadata.GemfireMetadataStore
- All Implemented Interfaces:
ConcurrentMetadataStore
,ListenableMetadataStore
,MetadataStore
Gemfire implementation of
ListenableMetadataStore
.
Use this MetadataStore
to achieve meta-data persistence shared across application instances and
restarts.- Since:
- 4.0
- Author:
- Artem Bilan, Venil Noronha, Gary Russell
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGemfireMetadataStore
(org.apache.geode.cache.Cache cache) GemfireMetadataStore
(org.apache.geode.cache.Region<String, String> region) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(MetadataStoreListener listener) Register a listener with the metadata store.Reads a value for the given key from this MetadataStore.void
Writes 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.void
removeListener
(MetadataStoreListener listener) Unregister a listener.boolean
Atomically replace the value for the key in the store if the old value matches the oldValue argument.
-
Field Details
-
KEY
- See Also:
-
-
Constructor Details
-
GemfireMetadataStore
public GemfireMetadataStore(org.apache.geode.cache.Cache cache) -
GemfireMetadataStore
-
-
Method Details
-
put
Description copied from interface:MetadataStore
Writes a key value pair to this MetadataStore.- Specified by:
put
in interfaceMetadataStore
- Parameters:
key
- The key.value
- The value.
-
putIfAbsent
Description copied from interface:ConcurrentMetadataStore
Atomically insert the key into the store.- Specified by:
putIfAbsent
in interfaceConcurrentMetadataStore
- Parameters:
key
- The key.value
- The value.- Returns:
- null if successful, the old value otherwise.
-
replace
Description copied from interface:ConcurrentMetadataStore
Atomically replace the value for the key in the store if the old value matches the oldValue argument.- Specified by:
replace
in interfaceConcurrentMetadataStore
- Parameters:
key
- The key.oldValue
- The old value.newValue
- The new value.- Returns:
- true if successful.
-
get
Description copied from interface:MetadataStore
Reads a value for the given key from this MetadataStore.- Specified by:
get
in interfaceMetadataStore
- Parameters:
key
- The key.- Returns:
- The value.
-
remove
Description copied from interface:MetadataStore
Remove a value for the given key from this MetadataStore.- Specified by:
remove
in 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:ListenableMetadataStore
Register a listener with the metadata store.- Specified by:
addListener
in interfaceListenableMetadataStore
- Parameters:
listener
- the callback to be registered
-
removeListener
Description copied from interface:ListenableMetadataStore
Unregister a listener.- Specified by:
removeListener
in interfaceListenableMetadataStore
- Parameters:
listener
- the callback to be unregistered
-