libfoedus-core
FOEDUS Core Library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
foedus::storage::hash::HashDataPage::Slot Struct Reference

Fix-sized slot for each record, which is placed at the end of data region. More...

Detailed Description

Fix-sized slot for each record, which is placed at the end of data region.

Definition at line 161 of file hash_page_impl.hpp.

#include <hash_page_impl.hpp>

Collaboration diagram for foedus::storage::hash::HashDataPage::Slot:

Public Member Functions

uint16_t get_aligned_key_length () const
 
uint16_t get_max_payload () const
 

Public Attributes

xct::RwLockableXctId tid_
 TID of the record. More...
 
uint16_t offset_
 Byte offset in data_ where this record starts. More...
 
uint16_t physical_record_length_
 Byte count this record occupies. More...
 
uint16_t key_length_
 Byte length of key of the record. More...
 
uint16_t payload_length_
 Byte length of the payload. More...
 
HashValue hash_
 Full hash of the key of the record. More...
 

Member Function Documentation

uint16_t foedus::storage::hash::HashDataPage::Slot::get_aligned_key_length ( ) const
inline

Definition at line 196 of file hash_page_impl.hpp.

References foedus::assorted::align8().

Referenced by foedus::storage::hash::HashDataPage::assert_entries_impl(), get_max_payload(), and foedus::storage::hash::operator<<().

196 { return assorted::align8(key_length_); }
T align8(T value)
8-alignment.
uint16_t key_length_
Byte length of key of the record.

Here is the call graph for this function:

Here is the caller graph for this function:

uint16_t foedus::storage::hash::HashDataPage::Slot::get_max_payload ( ) const
inline

Definition at line 197 of file hash_page_impl.hpp.

References get_aligned_key_length().

Referenced by foedus::storage::hash::ReserveRecords::find_or_create_or_expand().

197  {
199  }
uint16_t physical_record_length_
Byte count this record occupies.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

uint16_t foedus::storage::hash::HashDataPage::Slot::payload_length_

Byte length of the payload.

Padding is not included. This is mutable. Only changed with update. If the updated payload is too large for physical_record_length_, we move the record, leaving the deleted and moved flags in this old record.

Definition at line 191 of file hash_page_impl.hpp.

Referenced by foedus::storage::hash::HashDataPage::assert_entries_impl(), foedus::storage::hash::HashDataPage::create_record_in_snapshot(), foedus::storage::hash::operator<<(), foedus::storage::hash::RecordLocation::populate_logical(), foedus::storage::hash::RecordLocation::populate_physical(), and foedus::storage::hash::HashDataPage::reserve_record().

uint16_t foedus::storage::hash::HashDataPage::Slot::physical_record_length_

Byte count this record occupies.

This is immutable once the record is allocated.

Invariant
physical_record_length_ % 8 == 0
physical_record_length_ >= align8(key_length_) + align8(payload_length_)
offset_ + physical_record_length_ == next record's offset_

Definition at line 179 of file hash_page_impl.hpp.

Referenced by foedus::storage::hash::HashDataPage::assert_entries_impl(), foedus::storage::hash::HashDataPage::create_record_in_snapshot(), foedus::storage::hash::HashDataPage::next_offset(), foedus::storage::hash::operator<<(), foedus::storage::hash::RecordLocation::populate_logical(), foedus::storage::hash::RecordLocation::populate_physical(), and foedus::storage::hash::HashDataPage::reserve_record().


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