backtype.storm.transactional.partitioned
Interface IPartitionedTransactionalSpout.Coordinator

Enclosing interface:
IPartitionedTransactionalSpout<T>

public static interface IPartitionedTransactionalSpout.Coordinator


Method Summary
 void close()
           
 boolean isReady()
          Returns true if its ok to emit start a new transaction, false otherwise (will skip this transaction).
 int numPartitions()
          Return the number of partitions currently in the source of data.
 

Method Detail

numPartitions

int numPartitions()
Return the number of partitions currently in the source of data. The idea is is that if a new partition is added and a prior transaction is replayed, it doesn't emit tuples for the new partition because it knows how many partitions were in that transaction.


isReady

boolean isReady()
Returns true if its ok to emit start a new transaction, false otherwise (will skip this transaction). You should sleep here if you want a delay between asking for the next transaction (this will be called repeatedly in a loop).


close

void close()