Class 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 Details

    • streamName

      public final String streamName
  • Constructor Details

    • OutputStreamEngine

      public OutputStreamEngine(OutputStream stats)
      Create an engine that can simulate the given stats.
      stats - the stats to follow
  • Method Details

    • shouldEmit

      public Long shouldEmit()
      Should we emit or not.
      the start time of the message, or null of nothing should be emitted.
    • nextKey

      public String nextKey()
      Get the next key to emit.
      the key that should be emitted.
    • nextInt

      public int nextInt(int bound)