Interface DataRecordsReader<T>

All Superinterfaces:
DataReader<T>
All Known Subinterfaces:
AsyncReader<T>, Reader<T>

public sealed interface DataRecordsReader<T> extends DataReader<T> permits AsyncReader<T>, Reader<T>
Interface for Data Record Readers.

This interface defines the higher-level read primitives the SBK harness uses to exercise read workloads. It focuses on recording read metrics and provides default implementations that compose lower-level read operations into common benchmark patterns (count-based, time-based, with/without rate control and optional per-request logging).

Key concepts:

  • recordRead(...) and recordReadTime(...) are the primitive metric-reporting callbacks drivers should implement or rely on via the provided default helpers.
  • Default methods like genericRecordsReader and genericRecordsTimeReader implement common patterns and avoid duplication across drivers.
  • Rate-controlled variants accept a RateController and call its control method to throttle throughput.

Implementation notes:

  • Prefer implementing the most efficient primitive (single-record or multi-record) and let the default methods compose them for the harness.
  • When payloads embed a start timestamp, implement recordReadTime so end-to-end latency is measured correctly.

Original brief description preserved for compatibility:

Interface for Data Record Readers.