Interface ConcurrentMetadataStore
- All Superinterfaces:
MetadataStore
- All Known Subinterfaces:
ListenableMetadataStore
- All Known Implementing Classes:
PropertiesPersistingMetadataStore
,SimpleMetadataStore
public interface ConcurrentMetadataStore extends MetadataStore
Supports atomic updates to values in the store.
- Since:
- 4.0
-
Method Summary
Modifier and Type Method Description java.lang.String
putIfAbsent(java.lang.String key, java.lang.String value)
Atomically insert the key into the store.boolean
replace(java.lang.String key, java.lang.String oldValue, java.lang.String newValue)
Atomically replace the value for the key in the store if the old value matches the oldValue argument.Methods inherited from interface org.springframework.integration.metadata.MetadataStore
get, put, remove
-
Method Details
-
putIfAbsent
java.lang.String putIfAbsent(java.lang.String key, java.lang.String value)Atomically insert the key into the store.- Parameters:
key
- The key.value
- The value.- Returns:
- null if successful, the old value otherwise.
-
replace
boolean replace(java.lang.String key, java.lang.String oldValue, java.lang.String newValue)Atomically replace the value for the key in the store if the old value matches the oldValue argument.- Parameters:
key
- The key.oldValue
- The old value.newValue
- The new value.- Returns:
- true if successful.
-