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 Summary
Constructors -
Method Summary
Modifier 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.storm.topology.IStatefulBolt
executeMethods inherited from interface org.apache.storm.topology.IStatefulComponent
initState
-
Constructor Details
-
BaseStatefulBolt
public BaseStatefulBolt()
-
-
Method Details
-
prepare
public void prepare(Map<String, Object> topoConf, TopologyContext context, OutputCollector collector) Description copied from interface:IStatefulBoltAnalogue to bolt function.- Specified by:
preparein interfaceIStatefulBolt<T extends State>- See Also:
-
cleanup
public void cleanup()Description copied from interface:IStatefulBoltAnalogue to bolt function.- Specified by:
cleanupin interfaceIStatefulBolt<T extends State>- See Also:
-
declareOutputFields
Description copied from interface:IComponentDeclare the output schema for all the streams of this topology.- Specified by:
declareOutputFieldsin interfaceIComponent- Parameters:
declarer- this is used to declare output stream ids, output fields, and whether or not each output stream is a direct stream
-
getComponentConfiguration
Description 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 interfaceIComponent
-
preCommit
public 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 interfaceIStatefulComponent<T extends State>
-
prePrepare
public 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 interfaceIStatefulComponent<T extends State>
-
preRollback
public 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 interfaceIStatefulComponent<T extends State>
-