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

Rock::DbCellHeader::DbCellHeader ( )

Definition at line 14 of file

Referenced by sane().

Member Function Documentation

bool Rock::DbCellHeader::empty ( ) const

Definition at line 28 of file RockDbCell.h.

References firstSlot, nextSlot, and payloadSize.

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

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

Definition at line 33 of file RockDbCell.h.

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

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

Member Data Documentation

uint64_t Rock::DbCellHeader::entrySize
uint64_t Rock::DbCellHeader::key[2]
sfileno Rock::DbCellHeader::nextSlot

Definition at line 46 of file RockDbCell.h.

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

uint32_t Rock::DbCellHeader::payloadSize
uint32_t Rock::DbCellHeader::version

Definition at line 44 of file RockDbCell.h.

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

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






Web Site Translations