Class for iterating binary checkpoint files.
More...
#include <CheckpointPlayer.h>
Class for iterating binary checkpoint files.
Definition at line 29 of file CheckpointPlayer.h.
◆ CheckpointReader()
madara::knowledge::CheckpointReader::CheckpointReader |
( |
CheckpointSettings & |
in_checkpoint_settings | ) |
|
|
inline |
◆ get_checkpoint_settings()
const CheckpointSettings& madara::knowledge::CheckpointReader::get_checkpoint_settings |
( |
| ) |
const |
|
inline |
◆ get_file_header()
const FileHeader* madara::knowledge::CheckpointReader::get_file_header |
( |
| ) |
const |
|
inline |
◆ get_total_read()
int64_t madara::knowledge::CheckpointReader::get_total_read |
( |
| ) |
const |
|
inline |
Get total number of bytes read so far during iteration.
Definition at line 59 of file CheckpointPlayer.h.
◆ is_open()
bool madara::knowledge::CheckpointReader::is_open |
( |
| ) |
const |
|
inline |
Check if underlying file is open.
This does not imply there are more records left to read.
Definition at line 82 of file CheckpointPlayer.h.
◆ next()
std::pair< std::string, KnowledgeRecord > madara::knowledge::CheckpointReader::next |
( |
| ) |
|
Get the next update from the checkpoint file.
Returns an empty string and record if the end is reached.
What we read into the checkpoint_header will dictate our max_buffer. We want to make this checkpoint_header size into something reasonable.
Definition at line 165 of file CheckpointPlayer.cpp.
◆ start()
void madara::knowledge::CheckpointReader::start |
( |
| ) |
|
Begin by reading any header information.
Optional. Will be called automatically by next if need be. This opens the file specified in the settings based during construction. The file will be closed when this object is destructed.
check that there is more than one state and that the rest of the file is sufficient to at least be a message header (what we use as a checkpoint header
Definition at line 21 of file CheckpointPlayer.cpp.
◆ buffer
◆ buffer_remaining
int64_t madara::knowledge::CheckpointReader::buffer_remaining |
|
private |
◆ checkpoint_header
◆ checkpoint_settings
◆ checkpoint_size
uint64_t madara::knowledge::CheckpointReader::checkpoint_size |
|
private |
◆ checkpoint_start
size_t madara::knowledge::CheckpointReader::checkpoint_start |
|
private |
◆ current
char* madara::knowledge::CheckpointReader::current |
|
private |
◆ file
std::ifstream madara::knowledge::CheckpointReader::file |
|
private |
◆ logger_
◆ max_buffer
int64_t madara::knowledge::CheckpointReader::max_buffer |
|
private |
◆ meta
FileHeader madara::knowledge::CheckpointReader::meta |
|
private |
◆ stage
int madara::knowledge::CheckpointReader::stage = 0 |
|
private |
◆ state
uint64_t madara::knowledge::CheckpointReader::state |
|
private |
◆ total_read
int64_t madara::knowledge::CheckpointReader::total_read = 0 |
|
private |
◆ update
uint64_t madara::knowledge::CheckpointReader::update |
|
private |
The documentation for this class was generated from the following files: