Package org.apache.storm.state
Class InMemoryKeyValueStateProvider
- java.lang.Object
-
- org.apache.storm.state.InMemoryKeyValueStateProvider
-
- All Implemented Interfaces:
StateProvider
public class InMemoryKeyValueStateProvider extends Object implements StateProvider
ProvidesInMemoryKeyValueState.
-
-
Constructor Summary
Constructors Constructor Description InMemoryKeyValueStateProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatenewState(String namespace, Map<String,Object> topoConf, TopologyContext context)Returns a new state instance.
-
-
-
Method Detail
-
newState
public State newState(String namespace, Map<String,Object> topoConf, TopologyContext context)
Description copied from interface:StateProviderReturns a new state instance. Each state belongs unique namespace which is typically the componentid-task of the task, so that each task can have its own unique state.- Specified by:
newStatein interfaceStateProvider- Parameters:
namespace- a namespace of the statetopoConf- the storm topology configurationcontext- theTopologyContext- Returns:
- a previously saved state if one exists otherwise a newly initialized state.
-
-