Class SbkRateController

java.lang.Object
io.sbk.api.impl.SbkRateController
All Implemented Interfaces:
RateController

public final class SbkRateController extends Object implements RateController
  • Constructor Details

    • SbkRateController

      public SbkRateController()
  • Method Details

    • start

      public void start(int recordsPerSec)
      Start the Rate Controller.
      Specified by:
      start in interface RateController
      Parameters:
      recordsPerSec - Records Per Second.
    • control

      public void control(long events, double elapsedSec)
      Blocks for small amounts of time to achieve target Throughput/events per sec.
      Specified by:
      control in interface RateController
      Parameters:
      events - current cumulative events
      elapsedSec - Elapsed seconds