3#include <xrpl/basics/Blob.h>
4#include <xrpl/basics/base_uint.h>
5#include <xrpl/beast/utility/Journal.h>
6#include <xrpl/nodestore/Backend.h>
7#include <xrpl/nodestore/Database.h>
8#include <xrpl/nodestore/DatabaseRotating.h>
9#include <xrpl/nodestore/NodeObject.h>
10#include <xrpl/nodestore/Scheduler.h>
A generic endpoint for log messages.
Holds a collection of configuration values.
void store(NodeObjectType type, Blob &&data, uint256 const &hash, std::uint32_t) override
Store the object.
bool isSameDB(std::uint32_t, std::uint32_t) override
Check if two ledgers are in the same database.
~DatabaseRotatingImp() override
DatabaseRotatingImp()=delete
void setRotationInFlight(bool inFlight) override
Marks an online-delete rotation as in progress (or completed).
void importDatabase(Database &source) override
Import objects from another database.
std::atomic< std::uint64_t > copyForwardCount_
std::string getName() const override
Retrieve the name associated with this backend.
std::atomic< bool > rotationInFlight_
std::int32_t getWriteLoad() const override
Retrieve the estimated number of pending write operations.
std::shared_ptr< Backend > writableBackend_
void sweep() override
Remove expired entries from the positive and negative caches.
void rotate(std::unique_ptr< node_store::Backend > &&newBackend, std::function< void(std::string const &writableName, std::string const &archiveName)> const &f) override
Rotates the backends.
std::shared_ptr< Backend > archiveBackend_
DatabaseRotatingImp & operator=(DatabaseRotatingImp const &)=delete
DatabaseRotatingImp(DatabaseRotatingImp const &)=delete
void forEach(std::function< void(std::shared_ptr< NodeObject >)> f) override
Visit every object in the database This is usually called during import.
std::shared_ptr< NodeObject > fetchNodeObject(uint256 const &hash, std::uint32_t, FetchReport &fetchReport, bool duplicate) override
DatabaseRotating(Scheduler &scheduler, int readThreads, Section const &config, beast::Journal journal)
Persistency layer for NodeObject.
Scheduling for asynchronous backend activity.
NodeObjectType
The types of node objects.
std::vector< unsigned char > Blob
Storage for linear binary data.
Contains information about a fetch operation.