Package org.apache.storm.topology
Interface IStatefulComponent<T extends State>
- All Superinterfaces:
- IComponent,- Serializable
- All Known Subinterfaces:
- IStatefulBolt<T>,- IStatefulWindowedBolt<T>
- All Known Implementing Classes:
- BaseStatefulBolt,- BaseStatefulWindowedBolt,- PersistentWindowedBoltExecutor,- StatefulWindowedBoltExecutor,- StatefulWordCounter
Common methods for stateful components in the topology.
A stateful component is one that has state (e.g. the result of some computation in a bolt) and wants the framework to manage its state.- 
Method SummaryModifier and TypeMethodDescriptionvoidThis method is invoked by the framework with the previously saved state of the component.voidpreCommit(long txid) This is a hook for the component to perform some actions just before the framework commits its state.voidprePrepare(long txid) This is a hook for the component to perform some actions just before the framework prepares its state.voidThis is a hook for the component to perform some actions just before the framework rolls back the prepared state.Methods inherited from interface org.apache.storm.topology.IComponentdeclareOutputFields, getComponentConfiguration
- 
Method Details- 
initStateThis method is invoked by the framework with the previously saved state of the component. This is invoked after prepare but before the component starts processing tuples.- Parameters:
- state- the previously saved state of the component.
 
- 
preCommitvoid preCommit(long txid) This is a hook for the component to perform some actions just before the framework commits its state.
- 
prePreparevoid prePrepare(long txid) This is a hook for the component to perform some actions just before the framework prepares its state.
- 
preRollbackvoid preRollback()This is a hook for the component to perform some actions just before the framework rolls back the prepared state.
 
-