|
rippled
|

Classes | |
| struct | AcquireInfo |
| class | Count |
| struct | StoreLedgerResult |
| Store a ledger. More... | |
Public Types | |
| enum | State { State::acquire, State::complete, State::finalizing, State::final } |
Public Member Functions | |
| Shard (Application &app, DatabaseShard const &db, std::uint32_t index, boost::filesystem::path const &dir, beast::Journal j) | |
| Shard (Application &app, DatabaseShard const &db, std::uint32_t index, beast::Journal j) | |
| ~Shard () | |
| bool | init (Scheduler &scheduler, nudb::context &context) |
| Initialize shard. More... | |
| bool | isOpen () const |
| Returns true if the database are open. More... | |
| bool | tryClose () |
| Try to close databases if not in use. More... | |
| void | stop () |
| Notify shard to prepare for shutdown. More... | |
| boost::optional< std::uint32_t > | prepare () |
| bool | storeNodeObject (std::shared_ptr< NodeObject > const &nodeObject) |
| std::shared_ptr< NodeObject > | fetchNodeObject (uint256 const &hash, FetchReport &fetchReport) |
| bool | fetchNodeObjectFromCache (uint256 const &hash, std::shared_ptr< NodeObject > &nodeObject) |
| StoreLedgerResult | storeLedger (std::shared_ptr< Ledger const > const &srcLedger, std::shared_ptr< Ledger const > const &next) |
| bool | setLedgerStored (std::shared_ptr< Ledger const > const &ledger) |
| bool | containsLedger (std::uint32_t ledgerSeq) const |
| void | sweep () |
| std::uint32_t | index () const |
| boost::filesystem::path const & | getDir () const |
| int | getDesiredAsyncReadCount () |
| float | getCacheHitRate () |
| std::chrono::steady_clock::time_point | getLastUse () const |
| std::pair< std::uint64_t, std::uint32_t > | getFileInfo () const |
| Returns a pair where the first item describes the storage space utilized and the second item is the number of file descriptors required. More... | |
| State | getState () const |
| std::int32_t | getWriteLoad () |
| bool | isLegacy () const |
Returns true if shard is older, without final key data. More... | |
| bool | finalize (bool const writeSQLite, boost::optional< uint256 > const &referenceHash) |
| Finalize shard by walking its ledgers and verifying each Merkle tree. More... | |
| void | removeOnDestroy () |
| Enables removal of the shard directory on destruction. More... | |
Static Public Attributes | |
| static constexpr State | acquire = State::acquire |
| static constexpr State | complete = State::complete |
| static constexpr State | finalizing = State::finalizing |
| static constexpr State | final = State::final |
| static constexpr std::uint32_t | version {2} |
| static const uint256 | finalKey {0} |
Private Member Functions | |
| bool | open (std::lock_guard< std::mutex > const &lock) |
| bool | initSQLite (std::lock_guard< std::mutex > const &) |
| bool | storeSQLite (std::shared_ptr< Ledger const > const &ledger, std::lock_guard< std::mutex > const &) |
| void | setFileStats (std::lock_guard< std::mutex > const &) |
| bool | verifyLedger (std::shared_ptr< Ledger const > const &ledger, std::shared_ptr< Ledger const > const &next) const |
| std::shared_ptr< NodeObject > | verifyFetch (uint256 const &hash) const |
| Shard::Count | makeBackendCount () |
Private Attributes | |
| Application & | app_ |
| const beast::Journal | j_ |
| std::mutex | mutex_ |
| const std::uint32_t | index_ |
| const std::uint32_t | firstSeq_ |
| const std::uint32_t | lastSeq_ |
| const std::uint32_t | maxLedgers_ |
| std::unique_ptr< PCache > | pCache_ |
| std::unique_ptr< NCache > | nCache_ |
| const boost::filesystem::path | dir_ |
| std::uint64_t | fileSz_ {0} |
| std::uint32_t | fdRequired_ {0} |
| std::unique_ptr< Backend > | backend_ |
| std::atomic< std::uint32_t > | backendCount_ {0} |
| std::unique_ptr< DatabaseCon > | lgrSQLiteDB_ |
| std::unique_ptr< DatabaseCon > | txSQLiteDB_ |
| std::unique_ptr< AcquireInfo > | acquireInfo_ |
| bool | legacy_ {false} |
| std::atomic< bool > | stop_ {false} |
| std::atomic< State > | state_ {State::acquire} |
| std::atomic< bool > | removeOnDestroy_ {false} |
| std::chrono::steady_clock::time_point | lastAccess_ |
|
strong |
| ripple::NodeStore::Shard::Shard | ( | Application & | app, |
| DatabaseShard const & | db, | ||
| std::uint32_t | index, | ||
| boost::filesystem::path const & | dir, | ||
| beast::Journal | j | ||
| ) |
| ripple::NodeStore::Shard::Shard | ( | Application & | app, |
| DatabaseShard const & | db, | ||
| std::uint32_t | index, | ||
| beast::Journal | j | ||
| ) |
| bool ripple::NodeStore::Shard::init | ( | Scheduler & | scheduler, |
| nudb::context & | context | ||
| ) |
| bool ripple::NodeStore::Shard::isOpen | ( | ) | const |
| bool ripple::NodeStore::Shard::tryClose | ( | ) |
| void ripple::NodeStore::Shard::stop | ( | ) |
| boost::optional< std::uint32_t > ripple::NodeStore::Shard::prepare | ( | ) |
| bool ripple::NodeStore::Shard::storeNodeObject | ( | std::shared_ptr< NodeObject > const & | nodeObject | ) |
| std::shared_ptr< NodeObject > ripple::NodeStore::Shard::fetchNodeObject | ( | uint256 const & | hash, |
| FetchReport & | fetchReport | ||
| ) |
| bool ripple::NodeStore::Shard::fetchNodeObjectFromCache | ( | uint256 const & | hash, |
| std::shared_ptr< NodeObject > & | nodeObject | ||
| ) |
| Shard::StoreLedgerResult ripple::NodeStore::Shard::storeLedger | ( | std::shared_ptr< Ledger const > const & | srcLedger, |
| std::shared_ptr< Ledger const > const & | next | ||
| ) |
| bool ripple::NodeStore::Shard::setLedgerStored | ( | std::shared_ptr< Ledger const > const & | ledger | ) |
| bool ripple::NodeStore::Shard::containsLedger | ( | std::uint32_t | ledgerSeq | ) | const |
| std::uint32_t ripple::NodeStore::Shard::index | ( | ) | const |
| boost::filesystem::path const& ripple::NodeStore::Shard::getDir | ( | ) | const |
| int ripple::NodeStore::Shard::getDesiredAsyncReadCount | ( | ) |
| std::chrono::steady_clock::time_point ripple::NodeStore::Shard::getLastUse | ( | ) | const |
| std::pair< std::uint64_t, std::uint32_t > ripple::NodeStore::Shard::getFileInfo | ( | ) | const |
| std::int32_t ripple::NodeStore::Shard::getWriteLoad | ( | ) |
| bool ripple::NodeStore::Shard::isLegacy | ( | ) | const |
| bool ripple::NodeStore::Shard::finalize | ( | bool const | writeSQLite, |
| boost::optional< uint256 > const & | referenceHash | ||
| ) |
| void ripple::NodeStore::Shard::removeOnDestroy | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.17