Interface IExternalFlowStore
public interface IExternalFlowStore
Abstraction for the external flow store.
- Since:
- 12.1
- Author:
- Voicu Moldovan
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes the specifiedkey
.<T extends Serializable>
TReturns the value specified fot the givenkey
.boolean
Checks if the given key exists in the external flow store.void
set
(String key, Serializable value) Saves aSerializable
object in the external flow store.
-
Method Details
-
delete
Removes the specifiedkey
.If the given key does not exist in the store, no exception is thrown.
- Parameters:
key
- The key to delete, cannot benull
orempty
- Throws:
ExternalFlowStoreException
- when there is an error communicating with the external flow storeIllegalArgumentException
- ifkey
isnull
orempty
-
get
<T extends Serializable> T get(String key, Class<T> valueType) throws ExternalFlowStoreException, IllegalArgumentException Returns the value specified fot the givenkey
.- Parameters:
key
- The key from where to retrieve the data, cannot benull
orempty
valueType
- The Java type of the value- Returns:
- the saved value or
null
if nothing was found - Throws:
ExternalFlowStoreException
- when there is an error communicating with the external flow storeIllegalArgumentException
- ifkey
isnull
orempty
, or if thevalue
is not assignment compatible withvalueType
-
hasKey
Checks if the given key exists in the external flow store.- Parameters:
key
- The key to check for existence, cannot benull
orempty
- Returns:
true
if the key exists, otherwise- Throws:
ExternalFlowStoreException
- when there is an error communicating with the external flow storeIllegalArgumentException
- if parameterkey
isnull
orempty
-
set
void set(String key, Serializable value) throws ExternalFlowStoreException, IllegalArgumentException Saves aSerializable
object in the external flow store.If a value already exists for the given key, it will be overwritten.
- Parameters:
key
- The key where the value will be saved under, cannot benull
orempty
value
-Serializable
object to persist in the external flow store, cannot benull
- Throws:
ExternalFlowStoreException
- when there is an error communicating with the external flow storeIllegalArgumentException
- if parameterkey
isnull
orempty
-