backtype.storm.topology.base
Class BaseRichSpout

java.lang.Object
  extended by backtype.storm.topology.base.BaseComponent
      extended by backtype.storm.topology.base.BaseRichSpout
All Implemented Interfaces:
ISpout, IComponent, IRichSpout, java.io.Serializable
Direct Known Subclasses:
SpoutTracker, TestPlannerSpout, TestWordSpout

public abstract class BaseRichSpout
extends BaseComponent
implements IRichSpout

See Also:
Serialized Form

Constructor Summary
BaseRichSpout()
           
 
Method Summary
 void ack(java.lang.Object msgId)
          Storm has determined that the tuple emitted by this spout with the msgId identifier has been fully processed.
 void close()
          Called when an ISpout is going to be shutdown.
 void fail(java.lang.Object msgId)
          The tuple emitted by this spout with the msgId identifier has failed to be fully processed.
 
Methods inherited from class backtype.storm.topology.base.BaseComponent
getComponentConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface backtype.storm.spout.ISpout
nextTuple, open
 
Methods inherited from interface backtype.storm.topology.IComponent
declareOutputFields, getComponentConfiguration
 

Constructor Detail

BaseRichSpout

public BaseRichSpout()
Method Detail

close

public void close()
Description copied from interface: ISpout
Called when an ISpout is going to be shutdown. There is no guarentee that close will be called, because the supervisor kill -9's worker processes on the cluster.

The one context where close is guaranteed to be called is a topology is killed when running Storm in local mode.

Specified by:
close in interface ISpout

ack

public void ack(java.lang.Object msgId)
Description copied from interface: ISpout
Storm has determined that the tuple emitted by this spout with the msgId identifier has been fully processed. Typically, an implementation of this method will take that message off the queue and prevent it from being replayed.

Specified by:
ack in interface ISpout

fail

public void fail(java.lang.Object msgId)
Description copied from interface: ISpout
The tuple emitted by this spout with the msgId identifier has failed to be fully processed. Typically, an implementation of this method will put that message back on the queue to be replayed at a later time.

Specified by:
fail in interface ISpout