CCF
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
ccf::Snapshotter Class Reference

#include <snapshotter.h>

Inherits std::enable_shared_from_this< Snapshotter >, and ccf::kv::AbstractSnapshotter.

Public Member Functions

 Snapshotter (ringbuffer::AbstractWriterFactory &writer_factory_, std::shared_ptr< ccf::kv::Store > &store_, size_t snapshot_tx_interval_)
 
void init_after_public_recovery ()
 
void set_snapshot_generation (bool enabled)
 
void set_last_snapshot_idx (::consensus::Index idx)
 
bool write_snapshot (std::span< uint8_t > snapshot_buf, uint32_t generation_count)
 
bool record_committable (::consensus::Index idx) override
 
void record_signature (::consensus::Index idx, const std::vector< uint8_t > &sig, const NodeId &node_id, const ccf::crypto::Pem &node_cert)
 
void record_serialised_tree (::consensus::Index idx, const std::vector< uint8_t > &tree)
 
void record_snapshot_evidence_idx (::consensus::Index idx, const SnapshotHash &snapshot)
 
void schedule_snapshot (::consensus::Index idx)
 
void commit (::consensus::Index idx, bool generate_snapshot) override
 
void rollback (::consensus::Index idx) override
 
- Public Member Functions inherited from ccf::kv::AbstractSnapshotter
virtual ~AbstractSnapshotter ()=default
 
virtual bool record_committable (ccf::kv::Version v)=0
 
virtual void commit (ccf::kv::Version v, bool generate_snapshot)=0
 
virtual void rollback (ccf::kv::Version v)=0
 

Constructor & Destructor Documentation

◆ Snapshotter()

ccf::Snapshotter::Snapshotter ( ringbuffer::AbstractWriterFactory writer_factory_,
std::shared_ptr< ccf::kv::Store > &  store_,
size_t  snapshot_tx_interval_ 
)
inline

Member Function Documentation

◆ commit()

void ccf::Snapshotter::commit ( ::consensus::Index  idx,
bool  generate_snapshot 
)
inlineoverride

◆ init_after_public_recovery()

void ccf::Snapshotter::init_after_public_recovery ( )
inline

◆ record_committable()

bool ccf::Snapshotter::record_committable ( ::consensus::Index  idx)
inlineoverride

◆ record_serialised_tree()

void ccf::Snapshotter::record_serialised_tree ( ::consensus::Index  idx,
const std::vector< uint8_t > &  tree 
)
inline

◆ record_signature()

void ccf::Snapshotter::record_signature ( ::consensus::Index  idx,
const std::vector< uint8_t > &  sig,
const NodeId node_id,
const ccf::crypto::Pem node_cert 
)
inline

◆ record_snapshot_evidence_idx()

void ccf::Snapshotter::record_snapshot_evidence_idx ( ::consensus::Index  idx,
const SnapshotHash snapshot 
)
inline

◆ rollback()

void ccf::Snapshotter::rollback ( ::consensus::Index  idx)
inlineoverride

◆ schedule_snapshot()

void ccf::Snapshotter::schedule_snapshot ( ::consensus::Index  idx)
inline

◆ set_last_snapshot_idx()

void ccf::Snapshotter::set_last_snapshot_idx ( ::consensus::Index  idx)
inline

◆ set_snapshot_generation()

void ccf::Snapshotter::set_snapshot_generation ( bool  enabled)
inline

◆ write_snapshot()

bool ccf::Snapshotter::write_snapshot ( std::span< uint8_t >  snapshot_buf,
uint32_t  generation_count 
)
inline

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