Rock::DbCellHeader Class Reference

#include <RockDbCell.h>

Collaboration diagram for Rock::DbCellHeader:

Public Member Functions

 DbCellHeader ()
 
bool empty () const
 true iff no entry occupies this slot More...
 
bool sane (const size_t slotSize, int slotLimit) const
 whether this slot is not corrupted More...
 

Public Attributes

uint64_t key [2]
 StoreEntry key. More...
 
uint64_t entrySize
 total entry content size or zero if still unknown More...
 
uint32_t payloadSize
 slot contents size, always positive More...
 
uint32_t version
 detects conflicts among same-key entries More...
 
sfileno firstSlot
 slot ID of the first slot occupied by the entry More...
 
sfileno nextSlot
 slot ID of the next slot occupied by the entry More...
 

Detailed Description

Meta-information at the beginning of every db cell. Links multiple map slots belonging to the same entry into an entry chain. Stored on disk and used as sizeof() argument so it must remain POD.

Definition at line 22 of file RockDbCell.h.

Constructor & Destructor Documentation

◆ DbCellHeader()

Rock::DbCellHeader::DbCellHeader ( )

Definition at line 14 of file RockDbCell.cc.

Referenced by sane().

Member Function Documentation

◆ empty()

bool Rock::DbCellHeader::empty ( ) const
inline

Definition at line 28 of file RockDbCell.h.

References firstSlot, nextSlot, and payloadSize.

Referenced by Rock::Rebuild::loadOneSlot().

◆ sane()

bool Rock::DbCellHeader::sane ( const size_t  slotSize,
int  slotLimit 
) const
inline

Definition at line 33 of file RockDbCell.h.

References DbCellHeader(), firstSlot, nextSlot, payloadSize, and version.

Referenced by Rock::Rebuild::loadOneSlot().

Member Data Documentation

◆ entrySize

uint64_t Rock::DbCellHeader::entrySize

◆ firstSlot

◆ key

uint64_t Rock::DbCellHeader::key[2]

◆ nextSlot

sfileno Rock::DbCellHeader::nextSlot

Definition at line 46 of file RockDbCell.h.

Referenced by empty(), Rock::Rebuild::mapSlot(), sane(), and Rock::IoState::writeToDisk().

◆ payloadSize

uint32_t Rock::DbCellHeader::payloadSize

◆ version

uint32_t Rock::DbCellHeader::version

Definition at line 44 of file RockDbCell.h.

Referenced by Rock::Rebuild::primeNewEntry(), sane(), and Rock::IoState::writeToDisk().


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors