Package io.sbk.api

Interface Storage<T>


public interface Storage<T>
Interface for Benchmarking.
  • Method Details

    • addArgs

      void addArgs(InputOptions params) throws IllegalArgumentException
      Add the driver specific command line arguments.
      Parameters:
      params - Parameters object to be extended.
      Throws:
      IllegalArgumentException - If an exception occurred.
    • parseArgs

      void parseArgs(ParameterOptions params) throws IllegalArgumentException
      Parse the driver specific command line arguments.
      Parameters:
      params - Parameters object to be parsed for driver specific parameters/arguments.
      Throws:
      IllegalArgumentException - If an exception occurred.
    • openStorage

      void openStorage(ParameterOptions params) throws IOException
      Open the storage device / client to perform the benchmarking.
      Parameters:
      params - Parameters object enclosing all commandline arguments, see ParameterOptions to get the basic benchmarking parameters.
      Throws:
      IOException - If an exception occurred.
    • closeStorage

      void closeStorage(ParameterOptions params) throws IOException
      Close the Storage device / client.
      Parameters:
      params - Parameters object enclosing all commandline arguments, see ParameterOptions to get the basic benchmarking parameters.
      Throws:
      IOException - If an exception occurred.
    • createWriter

      DataWriter<T> createWriter(int id, ParameterOptions params) throws IOException
      Create a Single Data Writer / Producer.
      Parameters:
      id - Writer id
      params - Parameters object enclosing all commandline arguments, see ParameterOptions to get the basic benchmarking parameters.
      Returns:
      Writer return the Writer , null in case of failure
      Throws:
      IOException - If an exception occurred.
    • createReader

      DataReader<T> createReader(int id, ParameterOptions params) throws IOException
      Create a Single Reader / Consumer.
      Parameters:
      id - Reader id
      params - Parameters object enclosing all commandline arguments, see ParameterOptions to get the basic benchmarking parameters.
      Returns:
      Reader return the Reader , null in case of failure
      Throws:
      IOException - If an exception occurred.
    • getDataType

      default DataType<T> getDataType() throws IllegalArgumentException
      Default implementation to create a payload or data to write/read. Default data type is byte[]. If your Benchmark data type is other than byte[] then you need to implement your own Data class. If the data type of your Benchmark, Reader and Writer classes is byte[] (Byte Array), then use this default implementation as it is.
      Returns:
      Data Data interface.
      Throws:
      IllegalArgumentException - if data type is other than byte[]