public interface IStatefulComponent<T extends State> extends IComponent
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.Modifier and Type | Method and Description |
---|---|
void |
initState(T state)
This method is invoked by the framework with the previously saved state of the component.
|
void |
preCommit(long txid)
This is a hook for the component to perform some actions just before the framework commits its state.
|
void |
prePrepare(long txid)
This is a hook for the component to perform some actions just before the framework prepares its state.
|
void |
preRollback()
This is a hook for the component to perform some actions just before the framework rolls back the prepared state.
|
declareOutputFields, getComponentConfiguration
void initState(T state)
state
- the previously saved state of the component.void preCommit(long txid)
void prePrepare(long txid)
void preRollback()