Package org.apache.storm.flux.examples
Class StatefulWordCounter
java.lang.Object
org.apache.storm.topology.base.BaseStatefulBolt<KeyValueState<String,Long>>
 
org.apache.storm.flux.examples.StatefulWordCounter
- All Implemented Interfaces:
- Serializable,- IComponent,- IStatefulBolt<KeyValueState<String,,- Long>> - IStatefulComponent<KeyValueState<String,- Long>> 
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddeclareOutputFields(OutputFieldsDeclarer declarer) Declare the output schema for all the streams of this topology.voidAnalogue to bolt function.voidinitState(KeyValueState<String, Long> state) This method is invoked by the framework with the previously saved state of the component.voidprepare(Map<String, Object> topoConf, TopologyContext context, OutputCollector collector) Analogue to bolt function.Methods inherited from class org.apache.storm.topology.base.BaseStatefulBoltcleanup, getComponentConfiguration, preCommit, prePrepare, preRollback
- 
Constructor Details- 
StatefulWordCounterpublic StatefulWordCounter()
 
- 
- 
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<KeyValueState<String,- Long>> 
- Overrides:
- preparein class- BaseStatefulBolt<KeyValueState<String,- Long>> 
- See Also:
 
- 
initStateDescription copied from interface:IStatefulComponentThis 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.
 
- 
executeDescription copied from interface:IStatefulBoltAnalogue to bolt function.- See Also:
 
- 
declareOutputFieldsDescription copied from interface:IComponentDeclare the output schema for all the streams of this topology.- Specified by:
- declareOutputFieldsin interface- IComponent
- Overrides:
- declareOutputFieldsin class- BaseStatefulBolt<KeyValueState<String,- Long>> 
- Parameters:
- declarer- this is used to declare output stream ids, output fields, and whether or not each output stream is a direct stream
 
 
-