#include <sqlite_hot_store.hpp>
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< ChangeRecord > | readChangesSince (std::int64_t after_change_seq, std::size_t limit) const |
| std::vector< ChangeRecord > | readDeadLetters (int projector_bit, std::size_t limit) const |
| Public Member Functions inherited from dcn::events::IHotEventStore | |
| virtual | ~IHotEventStore ()=default |
| dcn::events::SQLiteHotStore::SQLiteHotStore | ( | const std::filesystem::path & | hot_db_path, |
| const int | default_chain_id ) |
|
override |
|
overridevirtual |
Implements dcn::events::IHotEventStore.
| storage::sqlite::WalCheckpointStats dcn::events::SQLiteHotStore::checkpointWal | ( | storage::sqlite::WalCheckpointMode | mode | ) |
| bool dcn::events::SQLiteHotStore::clearDeadLetter | ( | int | projector_bit, |
| int | chain_id, | ||
| const std::string & | block_hash, | ||
| std::int64_t | log_index ) |
| 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 ) |
|
overridevirtual |
Implements dcn::events::IHotEventStore.
| std::int64_t dcn::events::SQLiteHotStore::loadHeadBlock | ( | int | chain_id | ) |
|
overridevirtual |
Implements dcn::events::IHotEventStore.
| std::optional< std::uint64_t > dcn::events::SQLiteHotStore::loadNextLocalSeq | ( | const int | chain_id | ) |
| 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 |
| bool dcn::events::SQLiteHotStore::markDeadLetter | ( | int | projector_bit, |
| int | chain_id, | ||
| const std::string & | block_hash, | ||
| std::int64_t | log_index ) |
| std::size_t dcn::events::SQLiteHotStore::pruneConsumedRaw | ( | std::int64_t | watermark, |
| std::int64_t | finalized_floor_block, | ||
| std::size_t | batch_limit ) |
| std::vector< ChangeRecord > dcn::events::SQLiteHotStore::readChangesSince | ( | std::int64_t | after_change_seq, |
| std::size_t | limit ) const |
| std::vector< ChangeRecord > dcn::events::SQLiteHotStore::readDeadLetters | ( | int | projector_bit, |
| std::size_t | limit ) const |
| bool dcn::events::SQLiteHotStore::saveNextLocalSeq | ( | const int | chain_id, |
| const std::uint64_t | next_seq, | ||
| const std::int64_t | now_ms ) |