13#ifndef ROOT_RSealedPage
14#define ROOT_RSealedPage
43 RSealedPage(
const void *buffer, std::size_t bufferSize, std::uint32_t nElements,
bool hasChecksum =
false)
79 SealedPageSequence_t::const_iterator
fFirst;
80 SealedPageSequence_t::const_iterator
fLast;
84 const SealedPageSequence_t::const_iterator &
e)
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
std::deque< RSealedPage > SealedPageSequence_t
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
A range of sealed pages referring to the same column that can be used for vector commit.
RSealedPageGroup(ROOT::DescriptorId_t d, const SealedPageSequence_t::const_iterator &b, const SealedPageSequence_t::const_iterator &e)
ROOT::DescriptorId_t fPhysicalColumnId
SealedPageSequence_t::const_iterator fLast
SealedPageSequence_t::const_iterator fFirst
RSealedPageGroup()=default
A sealed page contains the bytes of a page as written to storage (packed & compressed).
static constexpr std::size_t kNBytesPageChecksum
The page checksum is a 64bit xxhash3.
void SetBufferSize(std::size_t bufferSize)
bool fHasChecksum
If set, the last 8 bytes of the buffer are the xxhash of the rest of the buffer.
RSealedPage(const RSealedPage &other)=default
std::size_t GetBufferSize() const
std::size_t GetDataSize() const
RSealedPage(RSealedPage &&other)=default
RSealedPage & operator=(const RSealedPage &other)=default
void SetNElements(std::uint32_t nElements)
void SetBuffer(const void *buffer)
RResult< std::uint64_t > GetChecksum() const
Returns a failure if the sealed page has no checksum.
bool GetHasChecksum() const
const void * GetBuffer() const
RResult< void > VerifyChecksumIfEnabled() const
std::uint32_t GetNElements() const
RSealedPage(const void *buffer, std::size_t bufferSize, std::uint32_t nElements, bool hasChecksum=false)
std::size_t fBufferSize
Size of the page payload and the trailing checksum (if available)
void SetHasChecksum(bool hasChecksum)
RSealedPage & operator=(RSealedPage &&other)=default