20#ifndef RIPPLE_NODESTORE_ENCODEDBLOB_H_INCLUDED
21#define RIPPLE_NODESTORE_ENCODEDBLOB_H_INCLUDED
23#include <xrpld/nodestore/NodeObject.h>
25#include <xrpl/beast/utility/instrumentation.h>
27#include <boost/align/align_up.hpp>
87 "ripple::NodeStore::EncodedBlob::EncodedBlob : non-null input");
91 "EncodedBlob: unseated std::shared_ptr used.");
93 return obj->getData().size() + 9;
110 "ripple::NodeStore::EncodedBlob::~EncodedBlob : valid payload "
117 [[nodiscard]]
void const*
120 return static_cast<void const*
>(
key_.
data());
129 [[nodiscard]]
void const*
132 return static_cast<void const*
>(
ptr_);
Convert a NodeObject from in-memory to database format.
std::uint8_t *const ptr_
A pointer to the serialized data.
EncodedBlob(std::shared_ptr< NodeObject > const &obj)
std::array< std::uint8_t, boost::alignment::align_up(9+1024, alignof(std::uint32_t))> payload_
A pre-allocated buffer for the serialized object.
std::uint32_t size_
The size of the serialized data.
void const * getKey() const noexcept
std::array< std::uint8_t, 32 > key_
The 32-byte key of the serialized object.
std::size_t getSize() const noexcept
void const * getData() const noexcept
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.