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_, size_t min_snapshot_tx_interval_=0, std::chrono::microseconds snapshot_time_interval_=std::chrono::microseconds(0))
 
void init_after_public_recovery ()
 
void set_snapshot_generation (bool enabled)
 
void init_from_snapshot_status (const SnapshotStatus &status)
 
bool write_snapshot (std::span< uint8_t > snapshot_buf, uint32_t generation_count)
 
bool should_schedule_snapshot_unsafe (::consensus::Index threshold_idx)
 
bool should_schedule_snapshot (::consensus::Index threshold_idx) override
 
bool record_committable (::consensus::Index idx) override
 
void record_cose_signature (::consensus::Index idx, const std::vector< uint8_t > &cose_sig)
 
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 record_snapshot_status (const SnapshotStatus &status)
 
void schedule_snapshot (::consensus::Index idx, TimePoint timestamp)
 
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 bool should_schedule_snapshot (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_,
size_t  min_snapshot_tx_interval_ = 0,
std::chrono::microseconds  snapshot_time_interval_ = std::chrono::microseconds(0) 
)
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

◆ init_from_snapshot_status()

void ccf::Snapshotter::init_from_snapshot_status ( const SnapshotStatus status)
inline

◆ record_committable()

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

◆ record_cose_signature()

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

◆ record_serialised_tree()

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

◆ record_snapshot_evidence_idx()

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

◆ record_snapshot_status()

void ccf::Snapshotter::record_snapshot_status ( const SnapshotStatus status)
inline

◆ rollback()

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

◆ schedule_snapshot()

void ccf::Snapshotter::schedule_snapshot ( ::consensus::Index  idx,
TimePoint  timestamp 
)
inline

◆ set_snapshot_generation()

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

◆ should_schedule_snapshot()

bool ccf::Snapshotter::should_schedule_snapshot ( ::consensus::Index  threshold_idx)
inlineoverride

◆ should_schedule_snapshot_unsafe()

bool ccf::Snapshotter::should_schedule_snapshot_unsafe ( ::consensus::Index  threshold_idx)
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: