backtype.storm.transactional
Interface ITransactionalSpout.Coordinator<X>

All Known Implementing Classes:
OpaquePartitionedTransactionalSpoutExecutor.Coordinator
Enclosing interface:
ITransactionalSpout<T>

public static interface ITransactionalSpout.Coordinator<X>


Method Summary
 void close()
          Release any resources from this coordinator.
 X initializeTransaction(java.math.BigInteger txid, X prevMetadata)
          Create metadata for this particular transaction id which has never been emitted before.
 

Method Detail

initializeTransaction

X initializeTransaction(java.math.BigInteger txid,
                        X prevMetadata)
Create metadata for this particular transaction id which has never been emitted before. The metadata should contain whatever is necessary to be able to replay the exact batch for the transaction at a later point. The metadata is stored in Zookeeper. Storm uses the Kryo serializations configured in the component configuration for this spout to serialize and deserialize the metadata.

Parameters:
txid - The id of the transaction.
prevMetadata - The metadata of the previous transaction
Returns:
the metadata for this new transaction

close

void close()
Release any resources from this coordinator.