#include <ledger.h>
|
| Ledger (const fs::path &ledger_dir, ringbuffer::AbstractWriterFactory &writer_factory, size_t max_read_cache_files=ledger_max_read_cache_files_default, const std::vector< std::string > &read_ledger_dirs_={}) |
|
| Ledger (const Ledger &that)=delete |
|
void | init (size_t idx, size_t recovery_start_idx_=0) |
|
void | complete_recovery () |
|
size_t | get_last_idx () const |
|
void | set_recovery_start_idx (size_t idx) |
|
std::optional< LedgerReadResult > | read_entry (size_t idx) |
|
std::optional< LedgerReadResult > | read_entries (size_t from, size_t to, std::optional< size_t > max_entries_size=std::nullopt) |
|
size_t | write_entry (const uint8_t *data, size_t size, bool committable) |
|
void | truncate (size_t idx) |
|
void | commit (size_t idx) |
|
bool | is_in_committed_file (size_t idx) |
|
void | write_ledger_get_range_response (size_t from_idx, size_t to_idx, std::optional< LedgerReadResult > &&read_result, ::consensus::LedgerRequestPurpose purpose) |
|
void | register_message_handlers (messaging::Dispatcher< ringbuffer::Message > &disp) |
|
◆ Ledger() [1/2]
asynchost::Ledger::Ledger |
( |
const fs::path & |
ledger_dir, |
|
|
ringbuffer::AbstractWriterFactory & |
writer_factory, |
|
|
size_t |
max_read_cache_files = ledger_max_read_cache_files_default , |
|
|
const std::vector< std::string > & |
read_ledger_dirs_ = {} |
|
) |
| |
|
inline |
◆ Ledger() [2/2]
asynchost::Ledger::Ledger |
( |
const Ledger & |
that | ) |
|
|
delete |
◆ commit()
void asynchost::Ledger::commit |
( |
size_t |
idx | ) |
|
|
inline |
◆ complete_recovery()
void asynchost::Ledger::complete_recovery |
( |
| ) |
|
|
inline |
◆ get_last_idx()
size_t asynchost::Ledger::get_last_idx |
( |
| ) |
const |
|
inline |
◆ init()
void asynchost::Ledger::init |
( |
size_t |
idx, |
|
|
size_t |
recovery_start_idx_ = 0 |
|
) |
| |
|
inline |
◆ is_in_committed_file()
bool asynchost::Ledger::is_in_committed_file |
( |
size_t |
idx | ) |
|
|
inline |
◆ on_ledger_get_async()
static void asynchost::Ledger::on_ledger_get_async |
( |
uv_work_t * |
req | ) |
|
|
inlinestatic |
◆ on_ledger_get_async_complete()
static void asynchost::Ledger::on_ledger_get_async_complete |
( |
uv_work_t * |
req, |
|
|
int |
status |
|
) |
| |
|
inlinestatic |
◆ read_entries()
std::optional< LedgerReadResult > asynchost::Ledger::read_entries |
( |
size_t |
from, |
|
|
size_t |
to, |
|
|
std::optional< size_t > |
max_entries_size = std::nullopt |
|
) |
| |
|
inline |
◆ read_entry()
◆ register_message_handlers()
◆ set_recovery_start_idx()
void asynchost::Ledger::set_recovery_start_idx |
( |
size_t |
idx | ) |
|
|
inline |
◆ truncate()
void asynchost::Ledger::truncate |
( |
size_t |
idx | ) |
|
|
inline |
◆ write_entry()
size_t asynchost::Ledger::write_entry |
( |
const uint8_t * |
data, |
|
|
size_t |
size, |
|
|
bool |
committable |
|
) |
| |
|
inline |
◆ write_ledger_get_range_response()
The documentation for this class was generated from the following file: