Wire Sysio Wire Sysion 1.0.0
|
#include <store_provider.hpp>
Classes | |
struct | index_header |
Public Types | |
enum class | open_state { read , write } |
Provides access to the slice directory. It is only intended to be used by store_provider and unit tests.
Definition at line 96 of file store_provider.hpp.
|
strong |
sysio::trace_api::slice_directory::slice_directory | ( | const boost::filesystem::path & | slice_dir, |
uint32_t | 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 153 of file store_provider.cpp.
std::optional< compressed_file > sysio::trace_api::slice_directory::find_compressed_trace_slice | ( | uint32_t | slice_number, |
bool | open_file = true ) const |
Find the read-only compressed trace file associated with the indicated slice_number
slice_number | : slice number of the requested slice file |
open_file | : indicate if the file should be opened (if found) or not |
open_file
paraneter, Otherwise, the returned optional is empty Definition at line 227 of file store_provider.cpp.
bool sysio::trace_api::slice_directory::find_index_slice | ( | uint32_t | slice_number, |
open_state | state, | ||
fc::cfile & | index_file, | ||
bool | open_file = true ) const |
Find the index file associated with the indicated slice_number
slice_number | : slice number of the requested slice file |
state | : indicate if the file is going to be written to (appended) or read |
index_file | : the cfile that will be set to the appropriate slice filename (always) and opened to that file (if it was found) |
open_file | : indicate if the file should be opened (if found) or not |
Definition at line 173 of file store_provider.cpp.
bool sysio::trace_api::slice_directory::find_or_create_index_slice | ( | uint32_t | slice_number, |
open_state | state, | ||
fc::cfile & | index_file ) const |
Find or create the index file associated with the indicated slice_number
slice_number | : slice number of the requested slice file |
state | : indicate if the file is going to be written to (appended) or read |
index_file | : the cfile that will be set to the appropriate slice filename and opened to that file |
Definition at line 165 of file store_provider.cpp.
void sysio::trace_api::slice_directory::find_or_create_slice_pair | ( | uint32_t | slice_number, |
open_state | state, | ||
fc::cfile & | trace, | ||
fc::cfile & | index ) |
Find or create a trace and index file pair
slice_number | : slice number of the requested slice file |
state | : indicate if the file is going to be written to (appended) or read |
trace | : the cfile that will be set to the appropriate slice filename and opened to that file |
Definition at line 262 of file store_provider.cpp.
bool sysio::trace_api::slice_directory::find_or_create_trace_slice | ( | uint32_t | slice_number, |
open_state | state, | ||
fc::cfile & | trace_file ) const |
Find or create the trace file associated with the indicated slice_number
slice_number | : slice number of the requested slice file |
state | : indicate if the file is going to be written to (appended) or read |
trace_file | : the cfile that will be set to the appropriate slice filename and opened to that file |
Definition at line 201 of file store_provider.cpp.
bool sysio::trace_api::slice_directory::find_or_create_trx_id_slice | ( | uint32_t | slice_number, |
open_state | state, | ||
fc::cfile & | trx_id_file ) const |
Find or create a trx id file that contains all the transaction ids and associated block numbers
slice_number | : slice number of the requested slice file |
state | : indicate if the file is going to be written to (appended) or read |
trx_id_file | : the cfile |
Definition at line 272 of file store_provider.cpp.
bool sysio::trace_api::slice_directory::find_trace_slice | ( | uint32_t | slice_number, |
open_state | state, | ||
fc::cfile & | trace_file, | ||
bool | open_file = true ) const |
Find the trace file associated with the indicated slice_number
slice_number | : slice number of the requested slice file |
state | : indicate if the file is going to be written to (appended) or read |
trace_file | : the cfile that will be set to the appropriate slice filename (always) and opened to that file (if it was found) |
open_file | : indicate if the file should be opened (if found) or not |
Definition at line 211 of file store_provider.cpp.
bool sysio::trace_api::slice_directory::find_trx_id_slice | ( | uint32_t | slice_number, |
open_state | state, | ||
fc::cfile & | trx_id_file, | ||
bool | open_file = true ) const |
Find the trx id file
slice_number | : slice number of the requested slice file |
state | : indicate if the file is going to be written to (appended) or read |
trx_id_file | : the cfile |
open_file | : indicate if the file should be opened (if found) or not |
Definition at line 280 of file store_provider.cpp.
void sysio::trace_api::slice_directory::run_maintenance_tasks | ( | uint32_t | lib, |
const log_handler & | log ) |
Cleans up all slices that are no longer needed to maintain the minimum number of blocks past lib Compresses up all slices that can be compressed
lib | : block number of the current lib |
Definition at line 355 of file store_provider.cpp.
void sysio::trace_api::slice_directory::set_lib | ( | uint32_t | lib | ) |
set the LIB for maintenance
lib |
Definition at line 291 of file store_provider.cpp.
Return the slice number that would include the passed in block_height
block_height | : height of the requested data |
Definition at line 112 of file store_provider.hpp.
void sysio::trace_api::slice_directory::start_maintenance_thread | ( | log_handler | log | ) |
Start a thread which does background maintenance
Definition at line 299 of file store_provider.cpp.
void sysio::trace_api::slice_directory::stop_maintenance_thread | ( | ) |
Stop and join the thread doing background maintenance
Definition at line 329 of file store_provider.cpp.