Package org.apache.storm.executor.spout

## Class SpoutOutputCollectorImpl

- java.lang.Object
- - org.apache.storm.executor.spout.SpoutOutputCollectorImpl

- All Implemented Interfaces:
    `ISpoutOutputCollector`, `IErrorReporter`

      public class SpoutOutputCollectorImpl
      extends Object
      implements ISpoutOutputCollector

  Methods are not thread safe. Each thread expected to have a separate instance, or else synchronize externally

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SpoutOutputCollectorImpl​(ISpout spout, SpoutExecutor executor, Task taskData, MutableLong emittedCount, boolean hasAckers, Random random, Boolean isEventLoggers, Boolean isDebug, RotatingMap<Long,​TupleInfo> pending)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `List<Integer>` | `emit​(String streamId, List<Object> tuple, Object messageId)` | Returns the task ids that received the tuples.
    `void` | `emitDirect​(int taskId, String streamId, List<Object> tuple, Object messageId)` |
    `void` | `flush()` |
    `long` | `getPendingCount()` |
    `void` | `reportError​(Throwable error)` |

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

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

- - ### Constructor Detail

    - #### SpoutOutputCollectorImpl

          public SpoutOutputCollectorImpl​(ISpout spout,
                                          SpoutExecutor executor,
                                          Task taskData,
                                          MutableLong emittedCount,
                                          boolean hasAckers,
                                          Random random,
                                          Boolean isEventLoggers,
                                          Boolean isDebug,
                                          RotatingMap<Long,​TupleInfo> pending)

  - ### Method Detail

    - #### emit

          public List<Integer> emit​(String streamId,
                                    List<Object> tuple,
                                    Object messageId)

      Description copied from interface: `ISpoutOutputCollector`
      Returns the task ids that received the tuples.
      Specified by:
        `emit` in interface `ISpoutOutputCollector`

    - #### emitDirect

          public void emitDirect​(int taskId,
                                 String streamId,
                                 List<Object> tuple,
                                 Object messageId)

      Specified by:
        `emitDirect` in interface `ISpoutOutputCollector`

    - #### flush

          public void flush()

      Specified by:
        `flush` in interface `ISpoutOutputCollector`

    - #### getPendingCount

          public long getPendingCount()

      Specified by:
        `getPendingCount` in interface `ISpoutOutputCollector`

    - #### reportError

          public void reportError​(Throwable error)

      Specified by:
        `reportError` in interface `IErrorReporter`