Zero  0.1.0
Friends | List of all members
btree_page Class Reference

B-tree page. More...

#include <btree_page.h>

Inheritance diagram for btree_page:
btree_page_data generic_page_header

Friends

class btree_page_h
 
template<class T >
class page_img_format_t
 
class btree_split_log
 
class btree_impl
 
class test_bf_tree
 
w_rc_t test_bf_fix_virgin_root (ss_m *, test_volume_t *test_volume)
 
w_rc_t test_bf_fix_virgin_child (ss_m *, test_volume_t *test_volume)
 
w_rc_t test_bf_evict (ss_m *, test_volume_t *test_volume)
 
w_rc_t _test_bf_swizzle (ss_m *, test_volume_t *test_volume, bool enable_swizzle)
 

Additional Inherited Members

- Public Types inherited from btree_page_data
enum  { hdr_sz = sizeof(generic_page_header) + 48, data_sz = sizeof(generic_page) - hdr_sz }
 
- Public Member Functions inherited from btree_page_data
bool eq (const btree_page_data &) const
 
- Public Member Functions inherited from generic_page_header
uint32_t calculate_checksum () const
 Calculate the correct value of checksum for this page. More...
 
- 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...
 
- Static Public Attributes inherited from generic_page_header
static const size_t page_sz = SM_PAGESIZE
 Size of all Zero pages. More...
 
- Protected Types inherited from btree_page_data
typedef uint16_t poor_man_key
 The type of poor_man_key data. More...
 
- Protected Member Functions inherited from btree_page_data
void init_items ()
 
void remove_items (const int item_count, const w_keystr_t &high)
 
int number_of_items () const
 
int number_of_ghosts () const
 return number of current items that are ghosts More...
 
bool is_ghost (int item) const
 is the given item a ghost? More...
 
void set_ghost (int item)
 turn the given item into a ghost item More...
 
void unset_ghost (int item)
 turn the given item into a non-ghost item More...
 
poor_man_key item_poor (int item) const
 return the poor_man_key data for the given item More...
 
poor_man_keyitem_poor (int item)
 return a reference to the poor_man_key data for the given item More...
 
PageIDitem_child (int item)
 
char * item_data (int item)
 
size_t item_length (int item) const
 
bool insert_item (int item, bool ghost, poor_man_key poor, PageID child, size_t data_length)
 
bool insert_item (int item, bool ghost, poor_man_key poor, PageID child, const cvec_t &data)
 
bool resize_item (int item, size_t new_length, size_t keep_old)
 
bool replace_item_data (int item, size_t offset, const cvec_t &new_data)
 
void delete_item (int item)
 
void delete_range (int from, int to)
 
void truncate_all (size_t amount, size_t pos)
 
size_t item_space (int item) const
 
size_t predict_item_space (size_t data_length) const
 
size_t usable_space () const
 
void compact ()
 compact item space, making all freed space available. More...
 
char * unused_part (size_t &length)
 
bool _items_are_consistent () const
 
- Protected Attributes inherited from btree_page_data
PageID btree_root
 
PageID btree_pid0
 First child pointer in non-leaf nodes. More...
 
PageID btree_foster
 Foster link page ID (0 if not linked). More...
 
int16_t btree_level
 
int16_t btree_fence_low_length
 
int16_t btree_fence_high_length
 
int16_t btree_chain_fence_high_length
 
int16_t btree_prefix_length
 
int16_t btree_consecutive_skewed_insertions
 
lsn_t btree_pid0_emlsn
 
lsn_t btree_foster_emlsn
 
- 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...
 
- Static Protected Attributes inherited from btree_page_data
static const size_t max_item_overhead
 

Detailed Description

B-tree page.

These pages contain the data that makes up B-trees.

The implementation is spread between this class' superclass, btree_page_data, and its handle class, btree_page_h. The superclass contains the basic fields and dynamically-sized–item list implementation while the secrets of their usage are contained in the handle class.

This class itself contains only friend declarations; those classes/members it friends have access to the protected but not private members of the superclass.

Friends And Related Function Documentation

§ _test_bf_swizzle

w_rc_t _test_bf_swizzle ( ss_m ,
test_volume_t *  test_volume,
bool  enable_swizzle 
)
friend

§ btree_impl

friend class btree_impl
friend

§ btree_page_h

friend class btree_page_h
friend

§ btree_split_log

friend class btree_split_log
friend

§ page_img_format_t

template<class T >
friend class page_img_format_t
friend

§ test_bf_evict

w_rc_t test_bf_evict ( ss_m ,
test_volume_t *  test_volume 
)
friend

§ test_bf_fix_virgin_child

w_rc_t test_bf_fix_virgin_child ( ss_m ,
test_volume_t *  test_volume 
)
friend

§ test_bf_fix_virgin_root

w_rc_t test_bf_fix_virgin_root ( ss_m ,
test_volume_t *  test_volume 
)
friend

§ test_bf_tree

friend class test_bf_tree
friend

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