|
rippled
|
A backend used for the NodeStore. More...

Public Member Functions | |
| virtual | ~Backend ()=default |
| Destroy the backend. More... | |
| virtual std::string | getName ()=0 |
| Get the human-readable name of this backend. More... | |
| virtual void | open (bool createIfMissing=true)=0 |
| Open the backend. More... | |
| virtual bool | isOpen ()=0 |
| Returns true is the database is open. More... | |
| virtual void | close ()=0 |
| Close the backend. More... | |
| virtual Status | fetch (void const *key, std::shared_ptr< NodeObject > *pObject)=0 |
| Fetch a single object. More... | |
| virtual void | store (std::shared_ptr< NodeObject > const &object)=0 |
| Store a single object. More... | |
| virtual void | storeBatch (Batch const &batch)=0 |
| Store a group of objects. More... | |
| virtual void | for_each (std::function< void(std::shared_ptr< NodeObject >)> f)=0 |
| Visit every object in the database This is usually called during import. More... | |
| virtual int | getWriteLoad ()=0 |
| Estimate the number of write operations pending. More... | |
| virtual void | setDeletePath ()=0 |
| Remove contents on disk upon destruction. More... | |
| virtual void | verify ()=0 |
| Perform consistency checks on database. More... | |
| virtual int | fdRequired () const =0 |
| Returns the number of file descriptors the backend expects to need. More... | |
| bool | backed () const |
| Returns true if the backend uses permanent storage. More... | |
A backend used for the NodeStore.
The NodeStore uses a swappable backend so that other database systems can be tried. Different databases may offer various features such as improved performance, fault tolerant or distributed storage, or all in-memory operation.
A given instance of a backend is fixed to a particular key size.
|
virtualdefault |
Destroy the backend.
All open files are closed and flushed. If there are batched writes or other tasks scheduled, they will be completed before this call returns.
|
pure virtual |
Get the human-readable name of this backend.
This is used for diagnostic output.
Implemented in ripple::NodeStore::MemoryBackend, ripple::NodeStore::NuDBBackend, and ripple::NodeStore::NullBackend.
|
pure virtual |
Open the backend.
| createIfMissing | Create the database files if necessary. This allows the caller to catch exceptions. |
Implemented in ripple::NodeStore::MemoryBackend, ripple::NodeStore::NuDBBackend, and ripple::NodeStore::NullBackend.
|
pure virtual |
Returns true is the database is open.
Implemented in ripple::NodeStore::NuDBBackend, ripple::NodeStore::MemoryBackend, and ripple::NodeStore::NullBackend.
|
pure virtual |
Close the backend.
This allows the caller to catch exceptions.
Implemented in ripple::NodeStore::NuDBBackend, ripple::NodeStore::MemoryBackend, and ripple::NodeStore::NullBackend.
|
pure virtual |
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. |
Implemented in ripple::NodeStore::MemoryBackend, ripple::NodeStore::NuDBBackend, and ripple::NodeStore::NullBackend.
|
pure virtual |
Store a single object.
Depending on the implementation this may happen immediately or deferred using a scheduled task.
| object | The object to store. |
Implemented in ripple::NodeStore::MemoryBackend, ripple::NodeStore::NullBackend, and ripple::NodeStore::NuDBBackend.
|
pure virtual |
Store a group of objects.
Implemented in ripple::NodeStore::NuDBBackend, ripple::NodeStore::MemoryBackend, and ripple::NodeStore::NullBackend.
|
pure virtual |
Visit every object in the database This is usually called during import.
Implemented in ripple::NodeStore::NuDBBackend, ripple::NodeStore::MemoryBackend, and ripple::NodeStore::NullBackend.
|
pure virtual |
Estimate the number of write operations pending.
Implemented in ripple::NodeStore::NuDBBackend, ripple::NodeStore::MemoryBackend, and ripple::NodeStore::NullBackend.
|
pure virtual |
Remove contents on disk upon destruction.
Implemented in ripple::NodeStore::NuDBBackend, ripple::NodeStore::MemoryBackend, and ripple::NodeStore::NullBackend.
|
pure virtual |
Perform consistency checks on database.
Implemented in ripple::NodeStore::NuDBBackend, ripple::NodeStore::MemoryBackend, and ripple::NodeStore::NullBackend.
|
pure virtual |
Returns the number of file descriptors the backend expects to need.
Implemented in ripple::NodeStore::NuDBBackend, ripple::NodeStore::MemoryBackend, and ripple::NodeStore::NullBackend.
1.8.17