backtype.storm.transactional.partitioned
Class OpaquePartitionedTransactionalSpoutExecutor.Emitter

java.lang.Object
  extended by backtype.storm.transactional.partitioned.OpaquePartitionedTransactionalSpoutExecutor.Emitter
All Implemented Interfaces:
ICommitterTransactionalSpout.Emitter, ITransactionalSpout.Emitter
Enclosing class:
OpaquePartitionedTransactionalSpoutExecutor

public class OpaquePartitionedTransactionalSpoutExecutor.Emitter
extends java.lang.Object
implements ICommitterTransactionalSpout.Emitter


Constructor Summary
OpaquePartitionedTransactionalSpoutExecutor.Emitter(java.util.Map conf, TopologyContext context)
           
 
Method Summary
 void cleanupBefore(java.math.BigInteger txid)
          Any state for transactions prior to the provided transaction id can be safely cleaned up, so this method should clean up that state.
 void close()
          Release any resources held by this emitter.
 void commit(TransactionAttempt attempt)
           
 void emitBatch(TransactionAttempt tx, java.lang.Object coordinatorMeta, BatchOutputCollector collector)
          Emit a batch for the specified transaction attempt and metadata for the transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpaquePartitionedTransactionalSpoutExecutor.Emitter

public OpaquePartitionedTransactionalSpoutExecutor.Emitter(java.util.Map conf,
                                                           TopologyContext context)
Method Detail

emitBatch

public void emitBatch(TransactionAttempt tx,
                      java.lang.Object coordinatorMeta,
                      BatchOutputCollector collector)
Description copied from interface: ITransactionalSpout.Emitter
Emit a batch for the specified transaction attempt and metadata for the transaction. The metadata was created by the Coordinator in the initializeTranaction method. This method must always emit the same batch of tuples across all tasks for the same transaction id. The first field of all emitted tuples must contain the provided TransactionAttempt.

Specified by:
emitBatch in interface ITransactionalSpout.Emitter

cleanupBefore

public void cleanupBefore(java.math.BigInteger txid)
Description copied from interface: ITransactionalSpout.Emitter
Any state for transactions prior to the provided transaction id can be safely cleaned up, so this method should clean up that state.

Specified by:
cleanupBefore in interface ITransactionalSpout.Emitter

commit

public void commit(TransactionAttempt attempt)
Specified by:
commit in interface ICommitterTransactionalSpout.Emitter

close

public void close()
Description copied from interface: ITransactionalSpout.Emitter
Release any resources held by this emitter.

Specified by:
close in interface ITransactionalSpout.Emitter