Package org.agrona.concurrent.errors
Class ErrorLogReader
java.lang.Object
org.agrona.concurrent.errors.ErrorLogReader
Reader for the log created by a
DistinctErrorLog encoded as UTF-8 errors.
The read methods are thread safe.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanhasErrors(AtomicBuffer buffer) Has the error buffer any recorded errors?static intread(AtomicBuffer buffer, ErrorConsumer consumer) Read all the errors in a log since the creation of the log.static intread(AtomicBuffer buffer, ErrorConsumer consumer, long sinceTimestamp) Read all the errors in a log since a given timestamp.
-
Method Details
-
hasErrors
Has the error buffer any recorded errors?- Parameters:
buffer- containing theDistinctErrorLog.- Returns:
- true if there is at least one error.
-
read
Read all the errors in a log since the creation of the log.- Parameters:
buffer- containing theDistinctErrorLog.consumer- to be called for each exception encountered.- Returns:
- the number of entries that has been read.
-
read
Read all the errors in a log since a given timestamp.- Parameters:
buffer- containing theDistinctErrorLog.consumer- to be called for each exception encountered.sinceTimestamp- for filtering errors that have been recorded since this time.- Returns:
- the number of entries that has been read.
-