Package io.sbk.api
Interface AsyncReader<T>
- All Superinterfaces:
DataReader<T>
,DataRecordsReader<T>
Interface for Asynchronous Readers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.sbk.api.DataRecordsReader
DataRecordsReader.RecordTime<T>, DataRecordsReader.RecordTimeRequests<T>
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
Close the Reader.readAsync
(int size) Read the dat asynchronously.default void
recordRead
(DataType<T> dType, int size, io.time.Time time, Status status, io.perl.api.PerlChannel perlChannel) Default implementation for Reading data usingreadAsync(int)
()} 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 usingreadAsync(int)
()} 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 usingReader.read()
, 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 usingReader.read()
, 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
-
readAsync
Read the dat asynchronously.- Parameters:
size
- size of the data in bytes to read.- Returns:
- Completable Future.
- 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 usingreadAsync(int)
()} 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 usereadAsync(int)
()} 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 usingreadAsync(int)
()} 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 usereadAsync(int)
()} 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 usingReader.read()
, 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 useReader.read()
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 usingReader.read()
, 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 useReader.read()
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
- Read Request logger- Throws:
EOFException
- If the End of the file occurred.IOException
- If an exception occurred.
-