Package io.sbk.api

Interface DataRecordsWriter<T>

All Superinterfaces:
DataWriter<T>
All Known Subinterfaces:
Writer<T>

public sealed interface DataRecordsWriter<T> extends DataWriter<T> permits Writer<T>
Interface for Data Records Writers.
  • Method Details

    • write

      CompletableFuture<?> write(DataType<T> dType, T data, int size, io.time.Time time, Status status) throws IOException
      Write the Data and attach the start time to data.
      Parameters:
      dType - Data Type interface
      data - data to writer
      size - size of the data
      time - time interface
      status - write status to return; Status
      Returns:
      CompletableFuture completable future. null if write completed synchronously .
      Throws:
      IOException - If an exception occurred.
    • write

      CompletableFuture<?> write(DataType<T> dType, T data, int size, io.time.Time time, Status status, int id, WriteRequestsLogger logger) throws IOException
      Write the Data and attach the start time to data.
      Parameters:
      dType - Data Type interface
      data - data to writer
      size - size of the data
      time - time interface
      status - write status to return; Status
      id - Writer id
      logger - Writer requests logger
      Returns:
      CompletableFuture completable future. null if write completed synchronously .
      Throws:
      IOException - If an exception occurred.
    • writeSetTime

      void writeSetTime(DataType<T> dType, T data, int size, io.time.Time time, Status status) throws IOException
      Write the Data and attach the start time to data.
      Parameters:
      dType - Data Type interface
      data - data to writer
      size - size of the data
      time - time interface
      status - write status to return; Status
      Throws:
      IOException - If an exception occurred.
    • writeSetTime

      void writeSetTime(DataType<T> dType, T data, int size, io.time.Time time, Status status, int id, WriteRequestsLogger logger) throws IOException
      Write the Data and attach the start time to data.
      Parameters:
      dType - Data Type interface
      data - data to writer
      size - size of the data
      time - time interface
      status - write status to return; Status
      id - Writer id
      logger - Write requests logger
      Throws:
      IOException - If an exception occurred.
    • sync

      void sync() throws IOException
      Flush / Sync the data.
      Throws:
      IOException - If an exception occurred.
    • recordWrite

      void recordWrite(DataType<T> dType, T data, int size, io.time.Time time, Status status, io.perl.api.PerlChannel perlChannel) throws IOException
      Write the data and record the benchmark statistics.
      Parameters:
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      status - Write status to return; Status
      perlChannel - to call for benchmarking
      Throws:
      IOException - If an exception occurred.
    • recordWrite

      void recordWrite(DataType<T> dType, T data, int size, io.time.Time time, Status status, io.perl.api.PerlChannel perlChannel, int id, WriteRequestsLogger logger) throws IOException
      Write the data and record the benchmark statistics.
      Parameters:
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      status - Write status to return; Status
      perlChannel - to call for benchmarking
      logger - log write requests
      id - Writer id
      Throws:
      IOException - If an exception occurred.
    • RecordsWriter

      default void RecordsWriter(Worker writer, long recordsCount, DataType<T> dType, T data, int size, io.time.Time time) throws IOException
      Default implementation for writer benchmarking by writing given number of records. Write is performed using recordWrite(DataType, Object, int, Time, Status, PerlChannel) sync is invoked after writing all the records.
      Specified by:
      RecordsWriter in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      recordsCount - Records Count
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      Throws:
      IOException - If an exception occurred.
    • RecordsWriter

      default void RecordsWriter(Worker writer, long recordsCount, DataType<T> dType, T data, int size, io.time.Time time, WriteRequestsLogger logger) throws IOException
      Default implementation for writer benchmarking by writing given number of records. Write is performed using recordWrite(DataType, Object, int, Time, Status, PerlChannel) sync is invoked after writing all the records.
      Specified by:
      RecordsWriter in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      recordsCount - Records Count
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      logger - log write requests
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterSync

      default void RecordsWriterSync(Worker writer, long recordsCount, DataType<T> dType, T data, int size, io.time.Time time, RateController rController) throws IOException
      Default implementation for writer benchmarking by writing given number of records. Write is performed using recordWrite(DataType, Object, int, Time, Status, PerlChannel) sync is invoked after writing given set of records.
      Specified by:
      RecordsWriterSync in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      recordsCount - Records Count
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      rController - Rate Controller
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterSync

      default void RecordsWriterSync(Worker writer, long recordsCount, DataType<T> dType, T data, int size, io.time.Time time, RateController rController, WriteRequestsLogger logger) throws IOException
      Default implementation for writer benchmarking by writing given number of records. Write is performed using recordWrite(DataType, Object, int, Time, Status, PerlChannel) sync is invoked after writing given set of records.
      Specified by:
      RecordsWriterSync in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      recordsCount - Records Count
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      rController - Rate Controller
      logger - log write requests
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterTime

      default void RecordsWriterTime(Worker writer, long secondsToRun, DataType<T> dType, T data, int size, io.time.Time time) throws IOException
      Default implementation for writer benchmarking by continuously writing data records for specific time duration. Write is performed using recordWrite(DataType, Object, int, Time, Status, PerlChannel) sync is invoked after writing records for given time.
      Specified by:
      RecordsWriterTime in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      secondsToRun - Number of seconds to Run
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterTime

      default void RecordsWriterTime(Worker writer, long secondsToRun, DataType<T> dType, T data, int size, io.time.Time time, WriteRequestsLogger logger) throws IOException
      Default implementation for writer benchmarking by continuously writing data records for specific time duration. Write is performed using recordWrite(DataType, Object, int, Time, Status, PerlChannel) sync is invoked after writing records for given time.
      Specified by:
      RecordsWriterTime in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      secondsToRun - Number of seconds to Run
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      logger - log write requests
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterTimeSync

      default void RecordsWriterTimeSync(Worker writer, long secondsToRun, DataType<T> dType, T data, int size, io.time.Time time, RateController rController) throws IOException
      Default implementation for writer benchmarking by continuously writing data records for specific time duration. Write is performed using recordWrite(DataType, Object, int, Time, Status, PerlChannel) sync is invoked after writing given set of records.
      Specified by:
      RecordsWriterTimeSync in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      secondsToRun - Number of seconds to Run
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      rController - Rate Controller
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterTimeSync

      default void RecordsWriterTimeSync(Worker writer, long secondsToRun, DataType<T> dType, T data, int size, io.time.Time time, RateController rController, WriteRequestsLogger logger) throws IOException
      Default implementation for writer benchmarking by continuously writing data records for specific time duration. Write is performed using recordWrite(DataType, Object, int, Time, Status, PerlChannel) sync is invoked after writing given set of records.
      Specified by:
      RecordsWriterTimeSync in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      secondsToRun - Number of seconds to Run
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      rController - Rate Controller
      logger - log write requests
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterRW

      default void RecordsWriterRW(Worker writer, long recordsCount, DataType<T> dType, T data, int size, io.time.Time time, RateController rController) throws IOException
      Default implementation for writing given number of records. No Writer Benchmarking is performed. Write is performed using writeSetTime(DataType, Object, int, Time, Status) . sync is invoked after writing given set of records.
      Specified by:
      RecordsWriterRW in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      recordsCount - Records Count
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      rController - Rate Controller
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterRW

      default void RecordsWriterRW(Worker writer, long recordsCount, DataType<T> dType, T data, int size, io.time.Time time, RateController rController, WriteRequestsLogger logger) throws IOException
      Default implementation for writing given number of records. No Writer Benchmarking is performed. Write is performed using writeSetTime(DataType, Object, int, Time, Status) . sync is invoked after writing given set of records.
      Specified by:
      RecordsWriterRW in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      recordsCount - Records Count
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      rController - Rate Controller
      logger - log write requests
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterTimeRW

      default void RecordsWriterTimeRW(Worker writer, long secondsToRun, DataType<T> dType, T data, int size, io.time.Time time, RateController rController) throws IOException
      Default implementation for writing data records for specific time duration. No Writer Benchmarking is performed. Write is performed using writeSetTime(DataType, Object, int, Time, Status) . sync is invoked after writing given set of records.
      Specified by:
      RecordsWriterTimeRW in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      secondsToRun - Number of seconds to Run
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      rController - Rate Controller
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterTimeRW

      default void RecordsWriterTimeRW(Worker writer, long secondsToRun, DataType<T> dType, T data, int size, io.time.Time time, RateController rController, WriteRequestsLogger logger) throws IOException
      Default implementation for writing data records for specific time duration. No Writer Benchmarking is performed. Write is performed using writeSetTime(DataType, Object, int, Time, Status) . sync is invoked after writing given set of records.
      Specified by:
      RecordsWriterTimeRW in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      secondsToRun - Number of seconds to Run
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      rController - Rate Controller
      logger - log write requests
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterRO

      default void RecordsWriterRO(Worker writer, long recordsCount, DataType<T> dType, T data, int size, io.time.Time time, RateController rController) throws IOException
      Default implementation for writing given number of records. No Writer Benchmarking is performed. Write is performed using write(DataType, Object, int, Time, Status). sync is invoked after writing given set of records.
      Specified by:
      RecordsWriterRO in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      recordsCount - Records Count
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      rController - Rate Controller
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterRO

      default void RecordsWriterRO(Worker writer, long recordsCount, DataType<T> dType, T data, int size, io.time.Time time, RateController rController, WriteRequestsLogger logger) throws IOException
      Default implementation for writing given number of records. No Writer Benchmarking is performed. Write is performed using write(DataType, Object, int, Time, Status). sync is invoked after writing given set of records.
      Specified by:
      RecordsWriterRO in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      recordsCount - Records Count
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      rController - Rate Controller
      logger - log write requests
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterTimeRO

      default void RecordsWriterTimeRO(Worker writer, long secondsToRun, DataType<T> dType, T data, int size, io.time.Time time, RateController rController) throws IOException
      Default implementation for writing data records for specific time duration. No Writer Benchmarking is performed. Write is performed using write(DataType, Object, int, Time, Status). sync is invoked after writing given set of records.
      Specified by:
      RecordsWriterTimeRO in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      secondsToRun - Number of seconds to Run
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      rController - Rate Controller
      Throws:
      IOException - If an exception occurred.
    • RecordsWriterTimeRO

      default void RecordsWriterTimeRO(Worker writer, long secondsToRun, DataType<T> dType, T data, int size, io.time.Time time, RateController rController, WriteRequestsLogger logger) throws IOException
      Default implementation for writing data records for specific time duration. No Writer Benchmarking is performed. Write is performed using write(DataType, Object, int, Time, Status). sync is invoked after writing given set of records.
      Specified by:
      RecordsWriterTimeRO in interface DataWriter<T>
      Parameters:
      writer - Writer Descriptor
      secondsToRun - Number of seconds to Run
      dType - Data Type interface
      data - data to write
      size - size of the data
      time - time interface
      rController - Rate Controller
      logger - log write requests
      Throws:
      IOException - If an exception occurred.