libfoedus-core
FOEDUS Core Library
foedus::storage::Page Struct Referencefinal

Just a marker to denote that the memory region represents a data page. More...

Detailed Description

Just a marker to denote that the memory region represents a data page.

We don't instantiate this object nor derive from this. This is just a marker. Because derived page objects have more header properties and even the data_ is layed out differently. We thus make everything private to prevent misuse.

Attention
Remember, anyway we don't have RTTI for data pages. They are just byte arrays used with reinterpret_cast.

Definition at line 334 of file page.hpp.

#include <page.hpp>

Public Member Functions

PageHeaderget_header ()
 At least the basic header exists in all pages. More...
 
const PageHeaderget_header () const
 
PageType get_page_type () const
 
VolatilePagePointer get_volatile_page_id () const
 
SnapshotPagePointer get_snapshot_page_id () const
 
char * get_data ()
 
const char * get_data () const
 

Member Function Documentation

char* foedus::storage::Page::get_data ( )
inline

Definition at line 347 of file page.hpp.

347 { return data_; }
const char* foedus::storage::Page::get_data ( ) const
inline

Definition at line 348 of file page.hpp.

348 { return data_; }
PageHeader& foedus::storage::Page::get_header ( )
inline

At least the basic header exists in all pages.

Definition at line 336 of file page.hpp.

Referenced by foedus::storage::assert_valid_volatile_page(), foedus::storage::assert_within_valid_volatile_page_impl(), foedus::xct::RetrospectiveLockList::construct(), foedus::storage::masstree::MasstreeComposer::construct_root(), foedus::storage::masstree::extract_page_layer(), foedus::thread::ThreadPimpl::find_or_read_a_snapshot_page(), foedus::thread::ThreadPimpl::find_or_read_snapshot_pages_batch(), foedus::thread::ThreadPimpl::follow_page_pointer(), foedus::thread::ThreadPimpl::follow_page_pointers_for_read_batch(), foedus::thread::ThreadPimpl::follow_page_pointers_for_write_batch(), foedus::storage::hash::hash_data_volatile_page_init(), foedus::storage::hash::hash_intermediate_volatile_page_init(), foedus::xct::RwLockableXctId::hotter(), foedus::storage::hash::HashDataPage::initialize_volatile_page(), foedus::thread::ThreadPimpl::install_a_volatile_page(), foedus::xct::RwLockableXctId::is_hot(), foedus::thread::Thread::is_hot_page(), foedus::thread::ThreadPimpl::is_volatile_page_retired(), foedus::storage::hash::HashStoragePimpl::locate_record_in_snapshot(), foedus::xct::Xct::on_record_read(), foedus::xct::operator<<(), foedus::thread::ThreadPimpl::place_a_new_volatile_page(), foedus::storage::StorageManagerPimpl::reinitialize_for_recovered_snapshot(), foedus::xct::SysxctLockList::release_all_locks(), foedus::memory::GlobalVolatilePageResolver::resolve_offset(), and foedus::xct::to_universal_lock_id().

336 { return header_; }

Here is the caller graph for this function:

const PageHeader& foedus::storage::Page::get_header ( ) const
inline

Definition at line 337 of file page.hpp.

337 { return header_; }
PageType foedus::storage::Page::get_page_type ( ) const
inline

Definition at line 338 of file page.hpp.

References foedus::storage::PageHeader::get_page_type().

Referenced by foedus::storage::masstree::verify_page_basic().

338 { return header_.get_page_type(); }
PageType get_page_type() const
Definition: page.hpp:280

Here is the call graph for this function:

Here is the caller graph for this function:

SnapshotPagePointer foedus::storage::Page::get_snapshot_page_id ( ) const
inline

Definition at line 343 of file page.hpp.

References ASSERT_ND, foedus::storage::PageHeader::page_id_, and foedus::storage::PageHeader::snapshot_.

Referenced by foedus::storage::StorageManagerPimpl::reinitialize_for_recovered_snapshot().

343  {
344  ASSERT_ND(header_.snapshot_);
345  return static_cast<SnapshotPagePointer>(header_.page_id_);
346  }
uint64_t SnapshotPagePointer
Page ID of a snapshot page.
Definition: storage_id.hpp:79
bool snapshot_
Whether this page image is of a snapshot page.
Definition: page.hpp:211
#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
uint64_t page_id_
Page ID of this page.
Definition: page.hpp:191

Here is the caller graph for this function:

VolatilePagePointer foedus::storage::Page::get_volatile_page_id ( ) const
inline

Definition at line 339 of file page.hpp.

References ASSERT_ND, foedus::storage::PageHeader::page_id_, and foedus::storage::PageHeader::snapshot_.

Referenced by foedus::xct::SysxctLockList::assert_sorted_impl(), foedus::xct::lock_assert_sorted(), foedus::xct::PageComparator::operator()(), foedus::storage::StorageManagerPimpl::reinitialize_for_recovered_snapshot(), and foedus::xct::SysxctLockList::request_page_lock().

339  {
340  ASSERT_ND(!header_.snapshot_);
341  return VolatilePagePointer(header_.page_id_);
342  }
bool snapshot_
Whether this page image is of a snapshot page.
Definition: page.hpp:211
#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
uint64_t page_id_
Page ID of this page.
Definition: page.hpp:191

Here is the caller graph for this function:


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