Package org.apache.camel.spi
Interface StateRepository<K,V>
- Type Parameters:
K
- Key typeV
- Value type
- All Superinterfaces:
AutoCloseable
,Service
This
StateRepository
holds a set of key/value pairs for defining a particular state of a component.
For instance, it can be a set of indexes.
An IdempotentRepository
behaves more or less like a Set
whereas this StateRepository
behaves
like a Map
.-
Method Summary
-
Method Details
-
setState
Sets the state value for the given key.- Parameters:
key
- State keyvalue
- State value
-
getState
Gets the state value for the given key. It returnsnull
if the key is unknown.- Parameters:
key
- State key- Returns:
- State value or null the key is unknown
-