Package org.apache.storm.state
Interface KeyValueState<K,V> 
- All Known Implementing Classes:
- InMemoryKeyValueState,- RedisKeyValueState
A state that supports key-value mappings.
- 
Method SummaryModifier and TypeMethodDescriptionDeletes the value mapped to the key, if there is any.Returns the value mapped to the key.Returns the value mapped to the key or defaultValue if no mapping is found.voidMaps the value with the key.Methods inherited from interface java.lang.IterableforEach, iterator, spliteratorMethods inherited from interface org.apache.storm.state.Statecommit, commit, prepareCommit, rollback
- 
Method Details- 
putMaps the value with the key.- Parameters:
- key- the key
- value- the value
 
- 
getReturns the value mapped to the key.- Parameters:
- key- the key
- Returns:
- the value or null if no mapping is found
 
- 
getReturns the value mapped to the key or defaultValue if no mapping is found.- Parameters:
- key- the key
- defaultValue- the value to return if no mapping is found
- Returns:
- the value or defaultValue if no mapping is found
 
- 
deleteDeletes the value mapped to the key, if there is any.- Parameters:
- key- the key
 
 
-