ark::logging::ReadCursor
Defined in header “ark/logging/read_cursor.hh”.
A read cursor is spawned from log readers, and provides a mechanism to read over the data stored within a log.
Methods
-
ReadCursor()
Constructor. Creates an empty cursor. -
ReadCursor(ReadCursorConfiguration config)
Constructor. Initializes the cursor from the given configuration. -
ReadCursor(const ReadCursor & other)
Explicit copy constructor, since we are dealing with shared pointers. -
ReadCursor(ReadCursor && other)
Explicit move constructor. -
ReadCursor & operator=(const ReadCursor & other)
Copy operator, since we are working with shared pointers. -
ReadCursor & operator=(ReadCursor && other)
Move operator. -
bool peek(LoggingClock::time_point & indexed_time)
Peeks at the data available, returning the next timestamp that will be played back. Returns false if no further items will be played back. -
LoggedObject step()
Returns the next logged object in this scan of the log. The object will be invalid if there are no more objects contained in the log, or an exception will be thrown if there is an exceptional error.This is a blocking call, and can throw on errors.
-
RequiredLogUrlList required_urls()
Returns all URLs (or files) that will be queried from this cursor. You can use this as a mechanism to determine all of the files that “belong” to a particular log.