org.apache.storm.trident.spout

## Class BatchSpoutExecutor.BatchSpoutEmitter

- java.lang.Object
- - org.apache.storm.trident.spout.BatchSpoutExecutor.BatchSpoutEmitter

- All Implemented Interfaces:
    ITridentSpout.Emitter<Object>
  Enclosing class:
    BatchSpoutExecutor

      public class BatchSpoutExecutor.BatchSpoutEmitter
      extends Object
      implements ITridentSpout.Emitter<Object>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BatchSpoutEmitter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Release any resources held by this emitter.
    `void` | `emitBatch(TransactionAttempt tx, Object coordinatorMeta, TridentCollector collector)` Emit a batch for the specified transaction attempt and metadata for the transaction.
    `void` | `success(TransactionAttempt tx)` This attempt committed successfully, so all state for this commit and before can be safely cleaned up.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BatchSpoutEmitter

          public BatchSpoutEmitter()

  - ### Method Detail

    - #### emitBatch

          public void emitBatch(TransactionAttempt tx,
                                Object coordinatorMeta,
                                TridentCollector collector)

      Description copied from interface: `ITridentSpout.Emitter`

      Emit a batch for the specified transaction attempt and metadata for the transaction. The metadata was created by the Coordinator in the initializeTransaction method. This method must always emit the same batch of tuples across all tasks for the same transaction id.

      Specified by:
        `emitBatch` in interface `ITridentSpout.Emitter<Object>`
      Parameters:
        `tx` - transaction id
        `coordinatorMeta` - metadata from the coordinator defining this transaction
        `collector` - output tuple collector

    - #### success

          public void success(TransactionAttempt tx)

      Description copied from interface: `ITridentSpout.Emitter`

      This attempt committed successfully, so all state for this commit and before can be safely cleaned up.

      Specified by:
        `success` in interface `ITridentSpout.Emitter<Object>`
      Parameters:
        `tx` - attempt object containing transaction id and attempt number

    - #### close

          public void close()

      Description copied from interface: `ITridentSpout.Emitter`

      Release any resources held by this emitter.

      Specified by:
        `close` in interface `ITridentSpout.Emitter<Object>`

Copyright © 2021 The Apache Software Foundation. All rights reserved.