Package org.apache.storm.state
Class StateFactory
java.lang.Object
org.apache.storm.state.StateFactory
A factory for creating
State
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic State
Returns a new state instance using theConfig.TOPOLOGY_STATE_PROVIDER
or aInMemoryKeyValueState
if no provider is configured.
-
Constructor Details
-
StateFactory
public StateFactory()
-
-
Method Details
-
getState
public static State getState(String namespace, Map<String, Object> topoConf, TopologyContext context) Returns a new state instance using theConfig.TOPOLOGY_STATE_PROVIDER
or aInMemoryKeyValueState
if no provider is configured.- Parameters:
namespace
- the state namespacetopoConf
- the storm confcontext
- the topology context- Returns:
- the state instance
-