File based queue reader where each message is represented by a file (with incrementing names) in a directory.
More...
|
| FileQueueReader (const std::string &directory) |
| Creates a file queue reader around directory. More...
|
|
| FileQueueReader (const std::string &directory, const std::string &readerIndexFilename, const std::string &writerIndexFilename) |
|
size_t | pending () const |
| Gets the number of pending messages. More...
|
|
bool | tryReadNextMessage (const consumer< std::vector< uint8_t >> &consumer) |
| Tries to read the next message and forwards it to consumer if successful. More...
|
|
void | skip (uint32_t count) |
| Skips at most the next count messages. More...
|
|
File based queue reader where each message is represented by a file (with incrementing names) in a directory.
◆ FileQueueReader() [1/2]
catapult::io::FileQueueReader::FileQueueReader |
( |
const std::string & |
directory | ) |
|
|
explicit |
Creates a file queue reader around directory.
◆ FileQueueReader() [2/2]
catapult::io::FileQueueReader::FileQueueReader |
( |
const std::string & |
directory, |
|
|
const std::string & |
readerIndexFilename, |
|
|
const std::string & |
writerIndexFilename |
|
) |
| |
Creates a file queue reader around directory containing (reader and writer) index files (readerIndexFilename, writerIndexFilename).
◆ pending()
size_t catapult::io::FileQueueReader::pending |
( |
| ) |
const |
Gets the number of pending messages.
◆ process()
bool catapult::io::FileQueueReader::process |
( |
const consumer< const std::string & > & |
processFilename | ) |
|
|
private |
◆ skip()
void catapult::io::FileQueueReader::skip |
( |
uint32_t |
count | ) |
|
Skips at most the next count messages.
◆ tryReadNextMessage()
bool catapult::io::FileQueueReader::tryReadNextMessage |
( |
const consumer< std::vector< uint8_t >> & |
consumer | ) |
|
Tries to read the next message and forwards it to consumer if successful.
◆ m_directory
boost::filesystem::path catapult::io::FileQueueReader::m_directory |
|
private |
◆ m_readerIndexFile
IndexFile catapult::io::FileQueueReader::m_readerIndexFile |
|
private |
◆ m_writerIndexFile
IndexFile catapult::io::FileQueueReader::m_writerIndexFile |
|
private |
The documentation for this class was generated from the following files: