storm.trident.testing
Class FeederCommitterBatchSpout

java.lang.Object
  extended by storm.trident.testing.FeederCommitterBatchSpout
All Implemented Interfaces:
java.io.Serializable, ICommitterTridentSpout, ITridentSpout, IFeeder

public class FeederCommitterBatchSpout
extends java.lang.Object
implements ICommitterTridentSpout, IFeeder

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface storm.trident.spout.ICommitterTridentSpout
ICommitterTridentSpout.Emitter
 
Nested classes/interfaces inherited from interface storm.trident.spout.ITridentSpout
ITridentSpout.BatchCoordinator<X>
 
Constructor Summary
FeederCommitterBatchSpout(java.util.List<java.lang.String> fields)
           
 
Method Summary
 void feed(java.lang.Object tuples)
           
 java.util.Map getComponentConfiguration()
           
 ITridentSpout.BatchCoordinator getCoordinator(java.lang.String txStateId, java.util.Map conf, TopologyContext context)
          The coordinator for a TransactionalSpout runs in a single thread and indicates when batches of tuples should be emitted and when transactions should commit.
 ICommitterTridentSpout.Emitter getEmitter(java.lang.String txStateId, java.util.Map conf, TopologyContext context)
          The emitter for a TransactionalSpout runs as many tasks across the cluster.
 Fields getOutputFields()
           
 void setWaitToEmit(boolean trueIfWait)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeederCommitterBatchSpout

public FeederCommitterBatchSpout(java.util.List<java.lang.String> fields)
Method Detail

setWaitToEmit

public void setWaitToEmit(boolean trueIfWait)

getEmitter

public ICommitterTridentSpout.Emitter getEmitter(java.lang.String txStateId,
                                                 java.util.Map conf,
                                                 TopologyContext context)
Description copied from interface: ITridentSpout
The emitter for a TransactionalSpout runs as many tasks across the cluster. Emitters are responsible for emitting batches of tuples for a transaction and must ensure that the same batch of tuples is always emitted for the same transaction id.

Specified by:
getEmitter in interface ICommitterTridentSpout
Specified by:
getEmitter in interface ITridentSpout

getCoordinator

public ITridentSpout.BatchCoordinator getCoordinator(java.lang.String txStateId,
                                                     java.util.Map conf,
                                                     TopologyContext context)
Description copied from interface: ITridentSpout
The coordinator for a TransactionalSpout runs in a single thread and indicates when batches of tuples should be emitted and when transactions should commit. The Coordinator that you provide in a TransactionalSpout provides metadata for each transaction so that the transactions can be replayed.

Specified by:
getCoordinator in interface ITridentSpout

getOutputFields

public Fields getOutputFields()
Specified by:
getOutputFields in interface ITridentSpout

getComponentConfiguration

public java.util.Map getComponentConfiguration()
Specified by:
getComponentConfiguration in interface ITridentSpout

feed

public void feed(java.lang.Object tuples)
Specified by:
feed in interface IFeeder