Decentralised Art Server
High-performance C++ backend that exposes HTML interface and a secure REST API for managing Performative Transactions entities
Loading...
Searching...
No Matches
dcn::events::SQLiteHotStore Class Referencefinal

#include <sqlite_hot_store.hpp>

Inheritance diagram for dcn::events::SQLiteHotStore:
dcn::events::IHotEventStore

Public Member Functions

 SQLiteHotStore (const std::filesystem::path &hot_db_path, const int default_chain_id)
 ~SQLiteHotStore () override
std::optional< std::int64_t > loadNextFromBlock (const int chain_id) override
std::optional< std::uint64_t > loadNextLocalSeq (const int chain_id)
bool saveNextLocalSeq (const int chain_id, const std::uint64_t next_seq, const std::int64_t now_ms)
std::vector< std::int64_t > loadReorgWindowBlocks (const int chain_id, const std::int64_t from_block, const std::int64_t to_block) const
bool ingestBatch (const int chain_id, const std::vector< RawChainLog > &raw_events, const std::vector< DecodedEvent > &decoded_events, const std::vector< ChainBlockInfo > &block_infos, const std::int64_t next_from_block, const std::int64_t now_ms, const std::optional< std::uint64_t > next_local_seq=std::nullopt) override
bool ingestBatch (const int chain_id, const std::vector< DecodedEvent > &events, const std::vector< ChainBlockInfo > &block_infos, const std::int64_t next_from_block, const std::int64_t now_ms)
bool applyFinality (const int chain_id, const FinalityHeights &heights, const std::int64_t now_ms, const std::size_t reorg_window_blocks) override
std::size_t pruneConsumedRaw (std::int64_t watermark, std::int64_t finalized_floor_block, std::size_t batch_limit)
std::int64_t loadHeadBlock (int chain_id)
storage::sqlite::WalCheckpointStats checkpointWal (storage::sqlite::WalCheckpointMode mode)
bool markDeadLetter (int projector_bit, int chain_id, const std::string &block_hash, std::int64_t log_index)
bool clearDeadLetter (int projector_bit, int chain_id, const std::string &block_hash, std::int64_t log_index)
std::vector< ChangeRecordreadChangesSince (std::int64_t after_change_seq, std::size_t limit) const
std::vector< ChangeRecordreadDeadLetters (int projector_bit, std::size_t limit) const
Public Member Functions inherited from dcn::events::IHotEventStore
virtual ~IHotEventStore ()=default

Constructor & Destructor Documentation

◆ SQLiteHotStore()

dcn::events::SQLiteHotStore::SQLiteHotStore ( const std::filesystem::path & hot_db_path,
const int default_chain_id )

◆ ~SQLiteHotStore()

dcn::events::SQLiteHotStore::~SQLiteHotStore ( )
override

Member Function Documentation

◆ applyFinality()

bool dcn::events::SQLiteHotStore::applyFinality ( const int chain_id,
const FinalityHeights & heights,
const std::int64_t now_ms,
const std::size_t reorg_window_blocks )
overridevirtual

◆ checkpointWal()

storage::sqlite::WalCheckpointStats dcn::events::SQLiteHotStore::checkpointWal ( storage::sqlite::WalCheckpointMode mode)

◆ clearDeadLetter()

bool dcn::events::SQLiteHotStore::clearDeadLetter ( int projector_bit,
int chain_id,
const std::string & block_hash,
std::int64_t log_index )

◆ ingestBatch() [1/2]

bool dcn::events::SQLiteHotStore::ingestBatch ( const int chain_id,
const std::vector< DecodedEvent > & events,
const std::vector< ChainBlockInfo > & block_infos,
const std::int64_t next_from_block,
const std::int64_t now_ms )

◆ ingestBatch() [2/2]

bool dcn::events::SQLiteHotStore::ingestBatch ( const int chain_id,
const std::vector< RawChainLog > & raw_events,
const std::vector< DecodedEvent > & decoded_events,
const std::vector< ChainBlockInfo > & block_infos,
const std::int64_t next_from_block,
const std::int64_t now_ms,
const std::optional< std::uint64_t > next_local_seq = std::nullopt )
overridevirtual

◆ loadHeadBlock()

std::int64_t dcn::events::SQLiteHotStore::loadHeadBlock ( int chain_id)

◆ loadNextFromBlock()

std::optional< std::int64_t > dcn::events::SQLiteHotStore::loadNextFromBlock ( const int chain_id)
overridevirtual

◆ loadNextLocalSeq()

std::optional< std::uint64_t > dcn::events::SQLiteHotStore::loadNextLocalSeq ( const int chain_id)

◆ loadReorgWindowBlocks()

std::vector< std::int64_t > dcn::events::SQLiteHotStore::loadReorgWindowBlocks ( const int chain_id,
const std::int64_t from_block,
const std::int64_t to_block ) const

◆ markDeadLetter()

bool dcn::events::SQLiteHotStore::markDeadLetter ( int projector_bit,
int chain_id,
const std::string & block_hash,
std::int64_t log_index )

◆ pruneConsumedRaw()

std::size_t dcn::events::SQLiteHotStore::pruneConsumedRaw ( std::int64_t watermark,
std::int64_t finalized_floor_block,
std::size_t batch_limit )

◆ readChangesSince()

std::vector< ChangeRecord > dcn::events::SQLiteHotStore::readChangesSince ( std::int64_t after_change_seq,
std::size_t limit ) const

◆ readDeadLetters()

std::vector< ChangeRecord > dcn::events::SQLiteHotStore::readDeadLetters ( int projector_bit,
std::size_t limit ) const

◆ saveNextLocalSeq()

bool dcn::events::SQLiteHotStore::saveNextLocalSeq ( const int chain_id,
const std::uint64_t next_seq,
const std::int64_t now_ms )

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