22#include "data/Types.hpp"
23#include "etlng/Models.hpp"
25#include <xrpl/basics/base_uint.h>
26#include <xrpl/basics/hardened_hash.h>
57 update(std::vector<LedgerObject>
const& objs, uint32_t seq,
bool isBackground =
false) = 0;
66 update(std::vector<etlng::model::Object>
const& objs, uint32_t seq) = 0;
75 virtual std::optional<Blob>
76 get(ripple::uint256
const& key, uint32_t seq)
const = 0;
85 virtual std::optional<Blob>
86 getDeleted(ripple::uint256
const& key, uint32_t seq)
const = 0;
97 virtual std::optional<LedgerObject>
109 virtual std::optional<LedgerObject>
Cache for an entire ledger.
Definition LedgerCacheInterface.hpp:38
virtual std::optional< LedgerObject > getPredecessor(ripple::uint256 const &key, uint32_t seq) const =0
Gets a cached predcessor.
virtual bool isFull() const =0
virtual float getObjectHitRate() const =0
virtual void update(std::vector< LedgerObject > const &objs, uint32_t seq, bool isBackground=false)=0
Update the cache with new ledger objects.
virtual bool isDisabled() const =0
virtual void setDisabled()=0
Disables the cache.
virtual void setFull()=0
Sets the full flag to true.
virtual std::optional< Blob > get(ripple::uint256 const &key, uint32_t seq) const =0
Fetch a cached object by its key and sequence number.
virtual size_t size() const =0
virtual std::optional< LedgerObject > getSuccessor(ripple::uint256 const &key, uint32_t seq) const =0
Gets a cached successor.
virtual void update(std::vector< etlng::model::Object > const &objs, uint32_t seq)=0
Update the cache with new ledger objects.
virtual void waitUntilCacheContainsSeq(uint32_t seq)=0
Waits until the cache contains a specific sequence.
virtual std::optional< Blob > getDeleted(ripple::uint256 const &key, uint32_t seq) const =0
Fetch a recently deleted object by its key and sequence number.
virtual float getSuccessorHitRate() const =0
virtual uint32_t latestLedgerSequence() const =0
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:70