Package io.sbk.api
Interface Reader<T>
- All Superinterfaces:
DataReader<T>
,DataRecordsReader<T>
Interface for Readers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.sbk.api.DataRecordsReader
DataRecordsReader.RecordTime<T>, DataRecordsReader.RecordTimeRequests<T>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the Reader.read()
Read the data.default void
recordRead
(DataType<T> dType, int size, io.time.Time time, Status status, io.perl.api.PerlChannel perlChannel) Default implementation for Reading data usingread()
and recording the benchmark statistics.default void
recordRead
(DataType<T> dType, int size, io.time.Time time, Status status, io.perl.api.PerlChannel perlChannel, int id, ReadRequestsLogger logger) Default implementation for Reading data usingread()
and recording the benchmark statistics.default void
recordReadTime
(DataType<T> dType, int size, io.time.Time time, Status status, io.perl.api.PerlChannel perlChannel) Default implementation for Reading data usingread()
, extracting start time from data and recording the benchmark statistics.default void
recordReadTime
(DataType<T> dType, int size, io.time.Time time, Status status, io.perl.api.PerlChannel perlChannel, int id, ReadRequestsLogger logger) Default implementation for Reading data usingread()
, extracting start time from data and recording the benchmark statistics.Methods inherited from interface io.sbk.api.DataRecordsReader
genericRecordsReader, genericRecordsReader, genericRecordsReaderRateControl, genericRecordsReaderRateControl, genericRecordsTimeReader, genericRecordsTimeReader, genericRecordsTimeReaderRateControl, genericRecordsTimeReaderRateControl, RecordsReader, RecordsReader, RecordsReaderRateControl, RecordsReaderRateControl, RecordsReaderRW, RecordsReaderRW, RecordsReaderRWRateControl, RecordsReaderRWRateControl, RecordsTimeReader, RecordsTimeReader, RecordsTimeReaderRateControl, RecordsTimeReaderRateControl, RecordsTimeReaderRW, RecordsTimeReaderRW, RecordsTimeReaderRWRateControl, RecordsTimeReaderRWRateControl
-
Method Details
-
read
Read the data.- Returns:
- T return the data.
- Throws:
EOFException
- If the End of the file occurred.IOException
- If an exception occurred.
-
close
Close the Reader.- Specified by:
close
in interfaceDataReader<T>
- Throws:
IOException
- If an exception occurred.
-
recordRead
default void recordRead(DataType<T> dType, int size, io.time.Time time, Status status, io.perl.api.PerlChannel perlChannel) throws EOFException, IOException Default implementation for Reading data usingread()
and recording the benchmark statistics. The end time of the status parameterStatus.endTime
of this method determines the terminating condition for time based reader performance benchmarking. If you are intend to not useread()
then you can override this method. If you are intend to read multiple records then you can override this method. otherwise, use the default implementation and don't override this method.- Specified by:
recordRead
in interfaceDataRecordsReader<T>
- Parameters:
dType
- dataTypesize
- size of the data in bytestime
- time interfacestatus
- TimestampperlChannel
- to call for benchmarking- Throws:
EOFException
- If the End of the file occurred.IOException
- If an exception occurred.
-
recordRead
default void recordRead(DataType<T> dType, int size, io.time.Time time, Status status, io.perl.api.PerlChannel perlChannel, int id, ReadRequestsLogger logger) throws EOFException, IOException Default implementation for Reading data usingread()
and recording the benchmark statistics. The end time of the status parameterStatus.endTime
of this method determines the terminating condition for time based reader performance benchmarking. If you are intend to not useread()
then you can override this method. If you are intend to read multiple records then you can override this method. otherwise, use the default implementation and don't override this method.- Specified by:
recordRead
in interfaceDataRecordsReader<T>
- Parameters:
dType
- dataTypesize
- size of the data in bytestime
- time interfacestatus
- TimestampperlChannel
- to call for benchmarkingid
- reader idlogger
- Read Request logger- Throws:
EOFException
- If the End of the file occurred.IOException
- If an exception occurred.
-
recordReadTime
default void recordReadTime(DataType<T> dType, int size, io.time.Time time, Status status, io.perl.api.PerlChannel perlChannel) throws EOFException, IOException Default implementation for Reading data usingread()
, extracting start time from data and recording the benchmark statistics. The end time of the status parameterStatus.endTime
of this method determines the terminating condition for time based reader performance benchmarking. If you are intend to not useread()
then you can override this method. If you are intend to read multiple records then you can override this method. otherwise, use the default implementation and don't override this method.- Specified by:
recordReadTime
in interfaceDataRecordsReader<T>
- Parameters:
dType
- dataTypesize
- size of the data in bytestime
- time interfacestatus
- TimestampperlChannel
- to call for benchmarking- Throws:
EOFException
- If the End of the file occurred.IOException
- If an exception occurred.
-
recordReadTime
default void recordReadTime(DataType<T> dType, int size, io.time.Time time, Status status, io.perl.api.PerlChannel perlChannel, int id, ReadRequestsLogger logger) throws EOFException, IOException Default implementation for Reading data usingread()
, extracting start time from data and recording the benchmark statistics. The end time of the status parameterStatus.endTime
of this method determines the terminating condition for time based reader performance benchmarking. If you are intend to not useread()
then you can override this method. If you are intend to read multiple records then you can override this method. otherwise, use the default implementation and don't override this method.- Specified by:
recordReadTime
in interfaceDataRecordsReader<T>
- Parameters:
dType
- dataTypesize
- size of the data in bytestime
- time interfacestatus
- TimestampperlChannel
- to call for benchmarkingid
- Reader idlogger
- log read requests- Throws:
EOFException
- If the End of the file occurred.IOException
- If an exception occurred.
-