Zero  0.1.0
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
stnode_page Class Reference

Store-node page that contains one stnode_t for each (possibly deleted or uncreated) store belonging to a given volume. More...

#include <stnode_page.h>

Inheritance diagram for stnode_page:
generic_page_header

Public Member Functions

stnode_t get (size_t index) const
 
void set_root (size_t index, PageID root)
 
void set_last_extent (size_t index, extent_id_t ext)
 
extent_id_t get_last_extent (size_t index)
 
void format_empty ()
 
char * unused_part (size_t &length)
 
- Public Member Functions inherited from generic_page_header
uint32_t calculate_checksum () const
 Calculate the correct value of checksum for this page. More...
 

Static Public Attributes

static constexpr size_t max
 
static constexpr PageID stpid = 1
 
- Static Public Attributes inherited from generic_page_header
static const size_t page_sz = SM_PAGESIZE
 Size of all Zero pages. More...
 

Private Attributes

stnode_t stnode [max]
 stnode[i] is the stnode_t for store # i of this volume More...
 

Additional Inherited Members

- Public Attributes inherited from generic_page_header
uint32_t checksum
 Stored checksum of this page. More...
 
PageID pid
 ID of this page. More...
 
lsn_t lsn
 LSN (Log Sequence Number) of the last write to this page. More...
 
StoreID store
 ID of the store to which this page belongs (0 if none) More...
 
uint16_t tag
 Page type (a page_tag_t) More...
 
- Protected Attributes inherited from generic_page_header
uint16_t page_flags
 Page flags (an OR of page_flag_t's) More...
 
uint64_t reserved
 Reserved for subclass usage. More...
 

Detailed Description

Store-node page that contains one stnode_t for each (possibly deleted or uncreated) store belonging to a given volume.

Member Function Documentation

§ format_empty()

void stnode_page::format_empty ( )
inline

§ get()

stnode_t stnode_page::get ( size_t  index) const
inline

§ get_last_extent()

extent_id_t stnode_page::get_last_extent ( size_t  index)
inline

§ set_last_extent()

void stnode_page::set_last_extent ( size_t  index,
extent_id_t  ext 
)
inline

§ set_root()

void stnode_page::set_root ( size_t  index,
PageID  root 
)
inline

§ unused_part()

char* stnode_page::unused_part ( size_t &  length)
inline

Member Data Documentation

§ max

constexpr size_t stnode_page::max
static
Initial value:
=
(page_sz - sizeof(generic_page_header)) / sizeof(stnode_t)

max # stnode_t's on a single stnode_page; thus, the maximum number of stores per volume

§ stnode

stnode_t stnode_page::stnode[max]
private

stnode[i] is the stnode_t for store # i of this volume

§ stpid

constexpr PageID stnode_page::stpid = 1
static

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