Interface RateController
- All Known Implementing Classes:
SbkRateController
public interface RateController
Interface for Rate or Throughput Controller.
Implementations of this interface are used to throttle the harness' I/O
operations to a configured target throughput (records per second). The
controller exposes a start method to configure the target rate and
a control callback that the harness calls periodically to allow
the controller to sleep or yield as necessary.
-
Method Summary
-
Method Details
-
start
void start(int recordsPerSec) Start the Rate Controller.- Parameters:
recordsPerSec- Records Per Second.
-
control
void control(long records, double elapsedSec) Blocks for small amounts of time to achieve target Throughput/events per sec.- Parameters:
records- current cumulative recordselapsedSec- Elapsed Seconds
-