Package org.apache.storm.topology.base
Class BaseStatefulBolt<T extends State>
java.lang.Object
org.apache.storm.topology.base.BaseStatefulBolt<T>
- All Implemented Interfaces:
- Serializable,- IComponent,- IStatefulBolt<T>,- IStatefulComponent<T>
- Direct Known Subclasses:
- StatefulWordCounter
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcleanup()Analogue to bolt function.voiddeclareOutputFields(OutputFieldsDeclarer declarer) Declare the output schema for all the streams of this topology.Declare configuration specific to this component.voidpreCommit(long txid) This is a hook for the component to perform some actions just before the framework commits its state.voidprepare(Map<String, Object> topoConf, TopologyContext context, OutputCollector collector) Analogue to bolt function.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 class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.storm.topology.IStatefulBoltexecuteMethods inherited from interface org.apache.storm.topology.IStatefulComponentinitState
- 
Constructor Details- 
BaseStatefulBoltpublic BaseStatefulBolt()
 
- 
- 
Method Details- 
preparepublic void prepare(Map<String, Object> topoConf, TopologyContext context, OutputCollector collector) Description copied from interface:IStatefulBoltAnalogue to bolt function.- Specified by:
- preparein interface- IStatefulBolt<T extends State>
- See Also:
 
- 
cleanuppublic void cleanup()Description copied from interface:IStatefulBoltAnalogue to bolt function.- Specified by:
- cleanupin interface- IStatefulBolt<T extends State>
- See Also:
 
- 
declareOutputFieldsDescription copied from interface:IComponentDeclare the output schema for all the streams of this topology.- Specified by:
- declareOutputFieldsin interface- IComponent
- Parameters:
- declarer- this is used to declare output stream ids, output fields, and whether or not each output stream is a direct stream
 
- 
getComponentConfigurationDescription copied from interface:IComponentDeclare configuration specific to this component. Only a subset of the "topology.*" configs can be overridden. The component configuration can be further overridden when constructing the topology usingTopologyBuilder- Specified by:
- getComponentConfigurationin interface- IComponent
 
- 
preCommitpublic void preCommit(long txid) Description copied from interface:IStatefulComponentThis is a hook for the component to perform some actions just before the framework commits its state.- Specified by:
- preCommitin interface- IStatefulComponent<T extends State>
 
- 
prePreparepublic void prePrepare(long txid) Description copied from interface:IStatefulComponentThis is a hook for the component to perform some actions just before the framework prepares its state.- Specified by:
- prePreparein interface- IStatefulComponent<T extends State>
 
- 
preRollbackpublic void preRollback()Description copied from interface:IStatefulComponentThis is a hook for the component to perform some actions just before the framework rolls back the prepared state.- Specified by:
- preRollbackin interface- IStatefulComponent<T extends State>
 
 
-