|
rippled
|
DeterministicShard class. More...

Public Types | |
| using | nodeptr = std::shared_ptr< NodeObject > |
Public Member Functions | |
| DeterministicShard (DeterministicShard const &)=delete | |
| DeterministicShard & | operator= (DeterministicShard const &)=delete |
| DeterministicShard (Application &app, DatabaseShard const &db, std::uint32_t index, uint256 const &lastHash, beast::Journal j) | |
| Creates the object for shard database. More... | |
| ~DeterministicShard () | |
| bool | init () |
| Initializes the deterministic shard. More... | |
| void | close (bool cancel=false) |
| Finalizes and closes the shard. More... | |
| void | store (nodeptr nobj) |
| Store the object into memory pool. More... | |
| void | flush () |
| Flush all objects from memory pool to shard. More... | |
Private Member Functions | |
| uint160 | hash (const uint256 &lastHash) const |
| std::uint64_t | digest (int n) const |
Private Attributes | |
| bool | inited_ |
| std::set< nodeptr, std::function< bool(nodeptr, nodeptr)> > | nodeset_ |
| Application & | app_ |
| DatabaseShard const & | db_ |
| const std::uint32_t | index_ |
| const uint160 | hash_ |
| const boost::filesystem::path | tempdir_ |
| const boost::filesystem::path | finaldir_ |
| DummyScheduler | scheduler_ |
| std::unique_ptr< nudb::context > | ctx_ |
| std::shared_ptr< Backend > | backend_ |
| const beast::Journal | j_ |
DeterministicShard class.
Definition at line 42 of file DeterministicShard.h.
Definition at line 45 of file DeterministicShard.h.
|
delete |
| ripple::NodeStore::DeterministicShard::DeterministicShard | ( | Application & | app, |
| DatabaseShard const & | db, | ||
| std::uint32_t | index, | ||
| uint256 const & | lastHash, | ||
| beast::Journal | j | ||
| ) |
Creates the object for shard database.
| app | Application object |
| db | Shard Database which deterministic shard belongs to |
| index | Index of the shard |
| lastHash | Hash of last ledger in the shard |
| j | Journal to logging |
Definition at line 35 of file DeterministicShard.cpp.
| ripple::NodeStore::DeterministicShard::~DeterministicShard | ( | ) |
Definition at line 54 of file DeterministicShard.cpp.
|
delete |
| bool ripple::NodeStore::DeterministicShard::init | ( | ) |
Initializes the deterministic shard.
Definition at line 100 of file DeterministicShard.cpp.
| void ripple::NodeStore::DeterministicShard::close | ( | bool | cancel = false | ) |
Finalizes and closes the shard.
| cancel | True if reject the shard and delete all files, false if finalize the shard and store them |
Definition at line 163 of file DeterministicShard.cpp.
| void ripple::NodeStore::DeterministicShard::store | ( | nodeptr | nobj | ) |
Store the object into memory pool.
| nobj | Object to store. |
Definition at line 183 of file DeterministicShard.cpp.
| void ripple::NodeStore::DeterministicShard::flush | ( | ) |
Flush all objects from memory pool to shard.
Definition at line 192 of file DeterministicShard.cpp.
Definition at line 60 of file DeterministicShard.cpp.
|
private |
Definition at line 76 of file DeterministicShard.cpp.
|
private |
Definition at line 105 of file DeterministicShard.h.
|
private |
Definition at line 108 of file DeterministicShard.h.
|
private |
Definition at line 111 of file DeterministicShard.h.
|
private |
Definition at line 114 of file DeterministicShard.h.
|
private |
Definition at line 117 of file DeterministicShard.h.
|
private |
Definition at line 120 of file DeterministicShard.h.
|
private |
Definition at line 123 of file DeterministicShard.h.
|
private |
Definition at line 126 of file DeterministicShard.h.
|
private |
Definition at line 129 of file DeterministicShard.h.
|
private |
Definition at line 132 of file DeterministicShard.h.
|
private |
Definition at line 135 of file DeterministicShard.h.
|
private |
Definition at line 138 of file DeterministicShard.h.
1.8.17