CCF
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | List of all members
snapshots::SnapshotManager Class Reference

#include <snapshot_manager.h>

Classes

struct  AsyncSnapshotSyncAndRename
 

Public Member Functions

 SnapshotManager (const std::string &snapshot_dir_, ringbuffer::AbstractWriterFactory &writer_factory, const std::optional< std::string > &read_snapshot_dir_=std::nullopt)
 
fs::path get_main_directory () const
 
std::shared_ptr< std::vector< uint8_t > > add_pending_snapshot (::consensus::Index idx, ::consensus::Index evidence_idx, size_t requested_size)
 
void commit_snapshot (::consensus::Index snapshot_idx, const uint8_t *receipt_data, size_t receipt_size)
 
std::optional< std::pair< fs::path, fs::path > > find_latest_committed_snapshot ()
 
void register_message_handlers (messaging::Dispatcher< ringbuffer::Message > &disp)
 

Static Public Member Functions

static void on_snapshot_sync_and_rename (uv_work_t *req)
 
static void on_snapshot_sync_and_rename_complete (uv_work_t *req, int status)
 

Constructor & Destructor Documentation

◆ SnapshotManager()

snapshots::SnapshotManager::SnapshotManager ( const std::string &  snapshot_dir_,
ringbuffer::AbstractWriterFactory writer_factory,
const std::optional< std::string > &  read_snapshot_dir_ = std::nullopt 
)
inline

Member Function Documentation

◆ add_pending_snapshot()

std::shared_ptr< std::vector< uint8_t > > snapshots::SnapshotManager::add_pending_snapshot ( ::consensus::Index  idx,
::consensus::Index  evidence_idx,
size_t  requested_size 
)
inline

◆ commit_snapshot()

void snapshots::SnapshotManager::commit_snapshot ( ::consensus::Index  snapshot_idx,
const uint8_t *  receipt_data,
size_t  receipt_size 
)
inline

◆ find_latest_committed_snapshot()

std::optional< std::pair< fs::path, fs::path > > snapshots::SnapshotManager::find_latest_committed_snapshot ( )
inline

◆ get_main_directory()

fs::path snapshots::SnapshotManager::get_main_directory ( ) const
inline

◆ on_snapshot_sync_and_rename()

static void snapshots::SnapshotManager::on_snapshot_sync_and_rename ( uv_work_t *  req)
inlinestatic

◆ on_snapshot_sync_and_rename_complete()

static void snapshots::SnapshotManager::on_snapshot_sync_and_rename_complete ( uv_work_t *  req,
int  status 
)
inlinestatic

◆ register_message_handlers()

void snapshots::SnapshotManager::register_message_handlers ( messaging::Dispatcher< ringbuffer::Message > &  disp)
inline

The documentation for this class was generated from the following file: