Package org.apache.storm.loadgen

## Class OutputStreamEngine

- java.lang.Object
- - org.apache.storm.loadgen.OutputStreamEngine

-     public class OutputStreamEngine
      extends Object

  Provides an API to simulate the output of a stream.

  Right now it is just rate, but in the future we expect to do data skew as well...

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `String` | `streamName` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `OutputStreamEngine​(OutputStream stats)` | Create an engine that can simulate the given stats.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `nextInt​(int bound)` |
    `String` | `nextKey()` | Get the next key to emit.
    `Long` | `shouldEmit()` | Should we emit or not.

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

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

- - ### Field Detail

    - #### streamName

          public final String streamName

  - ### Constructor Detail

    - #### OutputStreamEngine

          public OutputStreamEngine​(OutputStream stats)

      Create an engine that can simulate the given stats.
      Parameters:
        `stats` - the stats to follow

  - ### Method Detail

    - #### shouldEmit

          public Long shouldEmit()

      Should we emit or not.
      Returns:
        the start time of the message, or null of nothing should be emitted.

    - #### nextKey

          public String nextKey()

      Get the next key to emit.
      Returns:
        the key that should be emitted.

    - #### nextInt

          public int nextInt​(int bound)