libfoedus-core
FOEDUS Core Library
foedus::storage::sequential::SequentialRootPage Class Referencefinal

Represents one stable root page in Sequential Storage. More...

Detailed Description

Represents one stable root page in Sequential Storage.

In Sequential Storage, a root page is merely a set of pointers to head pages, which are the beginnings of singly-linked list of data pages. Root pages themselves can form singly-linked list if there are many head pages after many snapshotting (on head page for each node in each snapshot, so it can be many in a large machine).

All contents of root pages are stable. They are never dynamically changed. The volatile part of Sequential Storage is maintained as a set of singly-linked list pointed directly from the storage object, so there is no root page for it.

This is a private implementation-details of Sequential Storage, thus file name ends with _impl. Do not include this header from a client program unless you know what you are doing.

Attention
Do NOT instantiate this object or derive from this class. A page is always reinterpret-ed from a pooled memory region. No meaningful RTTI.

Definition at line 250 of file sequential_page_impl.hpp.

#include <sequential_page_impl.hpp>

Public Member Functions

 SequentialRootPage ()=delete
 
 SequentialRootPage (const SequentialRootPage &other)=delete
 
SequentialRootPageoperator= (const SequentialRootPage &other)=delete
 
PageHeaderheader ()
 
const PageHeaderheader () const
 
uint16_t get_pointer_count () const
 Returns How many pointers to head pages exist in this page. More...
 
const HeadPagePointerget_pointers () const
 
void set_pointers (HeadPagePointer *pointers, uint16_t pointer_count)
 
SnapshotPagePointer get_next_page () const
 
void set_next_page (SnapshotPagePointer page)
 
void initialize_snapshot_page (StorageId storage_id, SnapshotPagePointer page_id)
 Called only when this page is initialized. More...
 
const char * unused_dummy_func_filler () const
 

Constructor & Destructor Documentation

foedus::storage::sequential::SequentialRootPage::SequentialRootPage ( )
delete
foedus::storage::sequential::SequentialRootPage::SequentialRootPage ( const SequentialRootPage other)
delete

Member Function Documentation

SnapshotPagePointer foedus::storage::sequential::SequentialRootPage::get_next_page ( ) const
inline

Definition at line 271 of file sequential_page_impl.hpp.

Referenced by foedus::storage::sequential::SequentialComposer::construct_root().

271 { return next_page_; }

Here is the caller graph for this function:

uint16_t foedus::storage::sequential::SequentialRootPage::get_pointer_count ( ) const
inline

Returns How many pointers to head pages exist in this page.

Definition at line 262 of file sequential_page_impl.hpp.

Referenced by foedus::storage::sequential::SequentialComposer::construct_root().

262 { return pointer_count_; }

Here is the caller graph for this function:

const HeadPagePointer* foedus::storage::sequential::SequentialRootPage::get_pointers ( ) const
inline

Definition at line 263 of file sequential_page_impl.hpp.

Referenced by foedus::storage::sequential::SequentialComposer::construct_root().

263 { return head_page_pointers_; }

Here is the caller graph for this function:

PageHeader& foedus::storage::sequential::SequentialRootPage::header ( )
inline

Definition at line 258 of file sequential_page_impl.hpp.

Referenced by foedus::storage::sequential::SequentialComposer::construct_root().

258 { return header_; }

Here is the caller graph for this function:

const PageHeader& foedus::storage::sequential::SequentialRootPage::header ( ) const
inline

Definition at line 259 of file sequential_page_impl.hpp.

259 { return header_; }
void foedus::storage::sequential::SequentialRootPage::initialize_snapshot_page ( StorageId  storage_id,
SnapshotPagePointer  page_id 
)
inline

Called only when this page is initialized.

Definition at line 275 of file sequential_page_impl.hpp.

References foedus::storage::PageHeader::init_snapshot(), and foedus::storage::kSequentialRootPageType.

Referenced by foedus::storage::sequential::SequentialComposer::construct_root().

275  {
276  header_.init_snapshot(page_id, storage_id, kSequentialRootPageType);
277  pointer_count_ = 0;
278  next_page_ = 0;
279  }
void init_snapshot(SnapshotPagePointer page_id, StorageId storage_id, PageType page_type) __attribute__((always_inline))
Definition: page.hpp:301

Here is the call graph for this function:

Here is the caller graph for this function:

SequentialRootPage& foedus::storage::sequential::SequentialRootPage::operator= ( const SequentialRootPage other)
delete
void foedus::storage::sequential::SequentialRootPage::set_next_page ( SnapshotPagePointer  page)
inline

Definition at line 272 of file sequential_page_impl.hpp.

Referenced by foedus::storage::sequential::SequentialComposer::construct_root().

272 { next_page_ = page; }

Here is the caller graph for this function:

void foedus::storage::sequential::SequentialRootPage::set_pointers ( HeadPagePointer pointers,
uint16_t  pointer_count 
)
inline

Definition at line 265 of file sequential_page_impl.hpp.

References ASSERT_ND, and foedus::storage::sequential::kRootPageMaxHeadPointers.

Referenced by foedus::storage::sequential::SequentialComposer::construct_root().

265  {
266  ASSERT_ND(pointer_count <= kRootPageMaxHeadPointers);
267  pointer_count_ = pointer_count;
268  std::memcpy(head_page_pointers_, pointers, sizeof(HeadPagePointer) * pointer_count);
269  }
const uint16_t kRootPageMaxHeadPointers
Maximum number of head pointers in one root page.
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
Definition: assert_nd.hpp:72

Here is the caller graph for this function:

const char* foedus::storage::sequential::SequentialRootPage::unused_dummy_func_filler ( ) const
inline

Definition at line 281 of file sequential_page_impl.hpp.

281 { return filler_; }

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