|
rippled
|


Public Member Functions | |
| NuDBBackend (size_t keyBytes, Section const &keyValues, std::size_t burstSize, Scheduler &scheduler, beast::Journal journal) | |
| NuDBBackend (size_t keyBytes, Section const &keyValues, std::size_t burstSize, Scheduler &scheduler, nudb::context &context, beast::Journal journal) | |
| ~NuDBBackend () override | |
| std::string | getName () override |
| Get the human-readable name of this backend. More... | |
| void | open (bool createIfMissing) override |
| Open the backend. More... | |
| bool | isOpen () override |
| Returns true is the database is open. More... | |
| void | close () override |
| Close the backend. More... | |
| Status | fetch (void const *key, std::shared_ptr< NodeObject > *pno) override |
| Fetch a single object. More... | |
| bool | canFetchBatch () override |
Return true if batch fetches are optimized. More... | |
| std::pair< std::vector< std::shared_ptr< NodeObject > >, Status > | fetchBatch (std::vector< uint256 const * > const &hashes) override |
| Fetch a batch synchronously. More... | |
| void | do_insert (std::shared_ptr< NodeObject > const &no) |
| void | store (std::shared_ptr< NodeObject > const &no) override |
| Store a single object. More... | |
| void | storeBatch (Batch const &batch) override |
| Store a group of objects. More... | |
| void | sync () override |
| void | for_each (std::function< void(std::shared_ptr< NodeObject >)> f) override |
| Visit every object in the database This is usually called during import. More... | |
| int | getWriteLoad () override |
| Estimate the number of write operations pending. More... | |
| void | setDeletePath () override |
| Remove contents on disk upon destruction. More... | |
| void | verify () override |
| Perform consistency checks on database. More... | |
| int | fdRequired () const override |
| Returns the number of file descriptors the backend expects to need. More... | |
| Counters const & | counters () const override |
| bool | backed () const |
| Returns true if the backend uses permanent storage. More... | |
Public Attributes | |
| const beast::Journal | j_ |
| const size_t | keyBytes_ |
| const std::size_t | burstSize_ |
| const std::string | name_ |
| nudb::store | db_ |
| std::atomic< bool > | deletePath_ |
| Scheduler & | scheduler_ |
Static Public Attributes | |
| static constexpr std::size_t | currentType = 1 |
Definition at line 38 of file NuDBFactory.cpp.
| ripple::NodeStore::NuDBBackend::NuDBBackend | ( | size_t | keyBytes, |
| Section const & | keyValues, | ||
| std::size_t | burstSize, | ||
| Scheduler & | scheduler, | ||
| beast::Journal | journal | ||
| ) |
Definition at line 51 of file NuDBFactory.cpp.
| ripple::NodeStore::NuDBBackend::NuDBBackend | ( | size_t | keyBytes, |
| Section const & | keyValues, | ||
| std::size_t | burstSize, | ||
| Scheduler & | scheduler, | ||
| nudb::context & | context, | ||
| beast::Journal | journal | ||
| ) |
Definition at line 69 of file NuDBFactory.cpp.
|
override |
Definition at line 89 of file NuDBFactory.cpp.
|
overridevirtual |
Get the human-readable name of this backend.
This is used for diagnostic output.
Implements ripple::NodeStore::Backend.
Definition at line 95 of file NuDBFactory.cpp.
|
overridevirtual |
Open the backend.
| createIfMissing | Create the database files if necessary. This allows the caller to catch exceptions. |
Implements ripple::NodeStore::Backend.
Definition at line 101 of file NuDBFactory.cpp.
|
overridevirtual |
Returns true is the database is open.
Implements ripple::NodeStore::Backend.
Definition at line 142 of file NuDBFactory.cpp.
|
overridevirtual |
Close the backend.
This allows the caller to catch exceptions.
Implements ripple::NodeStore::Backend.
Definition at line 148 of file NuDBFactory.cpp.
|
overridevirtual |
Fetch a single object.
If the object is not found or an error is encountered, the result will indicate the condition.
| key | A pointer to the key data. |
| pObject | [out] The created object if successful. |
Implements ripple::NodeStore::Backend.
Definition at line 164 of file NuDBFactory.cpp.
|
overridevirtual |
Return true if batch fetches are optimized.
Implements ripple::NodeStore::Backend.
Definition at line 192 of file NuDBFactory.cpp.
|
overridevirtual |
Fetch a batch synchronously.
Implements ripple::NodeStore::Backend.
Definition at line 198 of file NuDBFactory.cpp.
| void ripple::NodeStore::NuDBBackend::do_insert | ( | std::shared_ptr< NodeObject > const & | no | ) |
Definition at line 216 of file NuDBFactory.cpp.
|
overridevirtual |
Store a single object.
Depending on the implementation this may happen immediately or deferred using a scheduled task.
| object | The object to store. |
Implements ripple::NodeStore::Backend.
Definition at line 229 of file NuDBFactory.cpp.
|
overridevirtual |
Store a group of objects.
Implements ripple::NodeStore::Backend.
Definition at line 241 of file NuDBFactory.cpp.
|
overridevirtual |
Implements ripple::NodeStore::Backend.
Definition at line 254 of file NuDBFactory.cpp.
|
overridevirtual |
Visit every object in the database This is usually called during import.
Implements ripple::NodeStore::Backend.
Definition at line 259 of file NuDBFactory.cpp.
|
overridevirtual |
Estimate the number of write operations pending.
Implements ripple::NodeStore::Backend.
Definition at line 296 of file NuDBFactory.cpp.
|
overridevirtual |
Remove contents on disk upon destruction.
Implements ripple::NodeStore::Backend.
Definition at line 302 of file NuDBFactory.cpp.
|
overridevirtual |
Perform consistency checks on database.
Implements ripple::NodeStore::Backend.
Definition at line 308 of file NuDBFactory.cpp.
|
overridevirtual |
Returns the number of file descriptors the backend expects to need.
Implements ripple::NodeStore::Backend.
Definition at line 327 of file NuDBFactory.cpp.
|
overridevirtual |
Implements ripple::NodeStore::Backend.
Definition at line 333 of file NuDBFactory.cpp.
|
inherited |
|
staticconstexpr |
Definition at line 41 of file NuDBFactory.cpp.
| const beast::Journal ripple::NodeStore::NuDBBackend::j_ |
Definition at line 43 of file NuDBFactory.cpp.
| const size_t ripple::NodeStore::NuDBBackend::keyBytes_ |
Definition at line 44 of file NuDBFactory.cpp.
| const std::size_t ripple::NodeStore::NuDBBackend::burstSize_ |
Definition at line 45 of file NuDBFactory.cpp.
| const std::string ripple::NodeStore::NuDBBackend::name_ |
Definition at line 46 of file NuDBFactory.cpp.
| nudb::store ripple::NodeStore::NuDBBackend::db_ |
Definition at line 47 of file NuDBFactory.cpp.
| std::atomic<bool> ripple::NodeStore::NuDBBackend::deletePath_ |
Definition at line 48 of file NuDBFactory.cpp.
| Scheduler& ripple::NodeStore::NuDBBackend::scheduler_ |
Definition at line 49 of file NuDBFactory.cpp.
1.8.17