Package org.apache.storm.state

# Interface StateProvider

All Known Implementing Classes:
  `InMemoryKeyValueStateProvider`, `RedisKeyValueStateProvider`

public interface StateProvider
Used by the `StateFactory` to create a new state instances.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `State`
  `newState(String namespace, Map<String,Object> topoConf, TopologyContext context)`
  Returns a new state instance.

- ## Method Details

  - ### newState

    State newState(String namespace, Map<String,Object> topoConf, TopologyContext context)
    Returns 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.
    Parameters:
      `namespace` - a namespace of the state
      `topoConf` - the storm topology configuration
      `context` - the `TopologyContext`
    Returns:
      a previously saved state if one exists otherwise a newly initialized state.