Package org.apache.storm.trident.spout
Class BatchSpoutExecutor.EmptyCoordinator
java.lang.Object
org.apache.storm.trident.spout.BatchSpoutExecutor.EmptyCoordinator
- All Implemented Interfaces:
- ITridentSpout.BatchCoordinator<Object>
- Enclosing class:
- BatchSpoutExecutor
public static class BatchSpoutExecutor.EmptyCoordinator
extends Object
implements ITridentSpout.BatchCoordinator<Object>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Release any resources from this coordinator.initializeTransaction(long txid, Object prevMetadata, Object currMetadata) Create metadata for this particular transaction id which has never been emitted before.booleanisReady(long txid) hint to Storm if the spout is ready for the transaction id.voidsuccess(long txid) This attempt committed successfully, so all state for this commit and before can be safely cleaned up.
- 
Constructor Details- 
EmptyCoordinatorpublic EmptyCoordinator()
 
- 
- 
Method Details- 
initializeTransactionDescription copied from interface:ITridentSpout.BatchCoordinatorCreate 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 JSON encoding to store the metadata. Only simple types such as numbers, booleans, strings, lists, and maps should be used. - Specified by:
- initializeTransactionin interface- ITridentSpout.BatchCoordinator<Object>
- Parameters:
- txid- The id of the transaction.
- prevMetadata- The metadata of the previous transaction
- currMetadata- The metadata for this transaction the last time it was initialized. null if this is the first attempt
- Returns:
- the metadata for this new transaction
 
- 
closepublic void close()Description copied from interface:ITridentSpout.BatchCoordinatorRelease any resources from this coordinator.- Specified by:
- closein interface- ITridentSpout.BatchCoordinator<Object>
 
- 
successpublic void success(long txid) Description copied from interface:ITridentSpout.BatchCoordinatorThis attempt committed successfully, so all state for this commit and before can be safely cleaned up.- Specified by:
- successin interface- ITridentSpout.BatchCoordinator<Object>
- Parameters:
- txid- transaction id that completed
 
- 
isReadypublic boolean isReady(long txid) Description copied from interface:ITridentSpout.BatchCoordinatorhint to Storm if the spout is ready for the transaction id.- Specified by:
- isReadyin interface- ITridentSpout.BatchCoordinator<Object>
- Parameters:
- txid- the id of the transaction
- Returns:
- true, if the spout is ready for the given transaction id
 
 
-