Wire Sysio Wire Sysion 1.0.0
|
#include <store_provider.hpp>
Public Types | |
using | open_state = slice_directory::open_state |
Public Member Functions | |
store_provider (const boost::filesystem::path &slice_dir, uint32_t stride_width, std::optional< uint32_t > minimum_irreversible_history_blocks, std::optional< uint32_t > minimum_uncompressed_irreversible_history_blocks, size_t compression_seek_point_stride) | |
template<typename BlockTrace > | |
void | append (const BlockTrace &bt) |
void | append_lib (uint32_t lib) |
void | append_trx_ids (block_trxs_entry tt) |
get_block_t | get_block (uint32_t block_height, const yield_function &yield={}) |
get_block_n | get_trx_block_number (const chain::transaction_id_type &trx_id, std::optional< uint32_t > minimum_irreversible_history_blocks, const yield_function &yield={}) |
void | start_maintenance_thread (log_handler log) |
void | stop_maintenance_thread () |
Protected Member Functions | |
template<typename Fn > | |
uint64_t | scan_metadata_log_from (uint32_t block_height, uint64_t offset, Fn &&fn, const yield_function &yield) |
std::optional< data_log_entry > | read_data_log (uint32_t block_height, uint64_t offset) |
void | initialize_new_index_slice_file (fc::cfile &index) |
void | validate_existing_index_slice_file (fc::cfile &index, open_state state) |
Protected Attributes | |
slice_directory | _slice_directory |
Provides read and write access to block trace data.
Definition at line 264 of file store_provider.hpp.
Definition at line 266 of file store_provider.hpp.
sysio::trace_api::store_provider::store_provider | ( | const boost::filesystem::path & | slice_dir, |
uint32_t | stride_width, | ||
std::optional< uint32_t > | minimum_irreversible_history_blocks, | ||
std::optional< uint32_t > | minimum_uncompressed_irreversible_history_blocks, | ||
size_t | compression_seek_point_stride ) |
Definition at line 34 of file store_provider.cpp.
template void sysio::trace_api::store_provider::append< block_trace_v2 > | ( | const BlockTrace & | bt | ) |
Definition at line 40 of file store_provider.cpp.
void sysio::trace_api::store_provider::append_lib | ( | uint32_t | lib | ) |
Definition at line 55 of file store_provider.cpp.
void sysio::trace_api::store_provider::append_trx_ids | ( | block_trxs_entry | tt | ) |
Definition at line 66 of file store_provider.cpp.
get_block_t sysio::trace_api::store_provider::get_block | ( | uint32_t | block_height, |
const yield_function & | yield = {} ) |
Read the trace for a given block
block_height | : the height of the data being read |
Definition at line 74 of file store_provider.cpp.
get_block_n sysio::trace_api::store_provider::get_trx_block_number | ( | const chain::transaction_id_type & | trx_id, |
std::optional< uint32_t > | minimum_irreversible_history_blocks, | ||
const yield_function & | yield = {} ) |
Definition at line 102 of file store_provider.cpp.
|
protected |
Initialize a new index slice with a valid header
index | : index file to open and add header to |
|
inlineprotected |
Read from the data log
block_height | : the block_height of the data being read |
offset | : the offset in the datalog to read |
std::exception | : when the data is not the correct type or if the log is corrupt in some way |
Definition at line 336 of file store_provider.hpp.
|
inlineprotected |
Read the metadata log font-to-back starting at an offset passing each entry to a provided functor/lambda
Fn | : type of the functor/lambda |
block_height | : height of the requested data |
offset | : initial offset to read from |
fn | : the functor/lambda |
Definition at line 304 of file store_provider.hpp.
|
inline |
Definition at line 286 of file store_provider.hpp.
|
inline |
Definition at line 289 of file store_provider.hpp.
|
protected |
Ensure an existing index slice has a valid header
index | : index file to open and read header from |
state | : indicate if the file is going to be written to (appended) or read |
|
protected |
Definition at line 378 of file store_provider.hpp.