libfoedus-core
FOEDUS Core Library
foedus::storage::hash::HashStorageControlBlock Struct Referencefinal

Shared data of this storage type. More...

Detailed Description

Shared data of this storage type.

Definition at line 49 of file hash_storage_pimpl.hpp.

#include <hash_storage_pimpl.hpp>

Collaboration diagram for foedus::storage::hash::HashStorageControlBlock:

Public Member Functions

 HashStorageControlBlock ()=delete
 
 ~HashStorageControlBlock ()=delete
 
bool exists () const
 
uint16_t get_root_children () const
 

Public Attributes

soc::SharedMutex status_mutex_
 
StorageStatus status_
 Status of the storage. More...
 
DualPagePointer root_page_pointer_
 Points to the root page (or something equivalent). More...
 
HashMetadata meta_
 metadata of this storage. More...
 
uint64_t bin_count_
 How many hash bins this storage has. More...
 
uint8_t levels_
 Number of levels of pages. More...
 
char padding_ [7]
 

Constructor & Destructor Documentation

foedus::storage::hash::HashStorageControlBlock::HashStorageControlBlock ( )
delete
foedus::storage::hash::HashStorageControlBlock::~HashStorageControlBlock ( )
delete

Member Function Documentation

bool foedus::storage::hash::HashStorageControlBlock::exists ( ) const
inline

Definition at line 54 of file hash_storage_pimpl.hpp.

References foedus::storage::kExists, foedus::storage::kMarkedForDeath, and status_.

54 { return status_ == kExists || status_ == kMarkedForDeath; }
The storage has been marked for drop and can't be used.
Definition: storage_id.hpp:164
StorageStatus status_
Status of the storage.
The storage has been created and ready for use.
Definition: storage_id.hpp:158
uint16_t foedus::storage::hash::HashStorageControlBlock::get_root_children ( ) const
inline
Returns
the number of child pointers in the root page for this storage

Definition at line 56 of file hash_storage_pimpl.hpp.

References bin_count_, foedus::assorted::int_div_ceil(), foedus::storage::hash::kHashMaxBins, and levels_.

56  {
58  }
uint8_t levels_
Number of levels of pages.
uint64_t bin_count_
How many hash bins this storage has.
int64_t int_div_ceil(int64_t dividee, int64_t dividor)
Efficient ceil(dividee/dividor) for integer.
const uint64_t kHashMaxBins[]
kHashTotalBins[n] gives the maximum number of hash bins n-level hash can hold.
Definition: hash_id.hpp:74

Here is the call graph for this function:

Member Data Documentation

uint64_t foedus::storage::hash::HashStorageControlBlock::bin_count_

How many hash bins this storage has.

bin_count_ = 2^bin_bits

Definition at line 76 of file hash_storage_pimpl.hpp.

Referenced by get_root_children().

uint8_t foedus::storage::hash::HashStorageControlBlock::levels_

Number of levels of pages.

1 means there is only 1 intermediate page pointing to data pages. 2 means a root page pointing down to leaf intermediate pages pointing to data pages. At least 1, and surely within 8 levels.

Definition at line 82 of file hash_storage_pimpl.hpp.

Referenced by get_root_children().

HashMetadata foedus::storage::hash::HashStorageControlBlock::meta_

metadata of this storage.

Definition at line 66 of file hash_storage_pimpl.hpp.

Referenced by foedus::storage::hash::operator<<().

char foedus::storage::hash::HashStorageControlBlock::padding_[7]

Definition at line 83 of file hash_storage_pimpl.hpp.

DualPagePointer foedus::storage::hash::HashStorageControlBlock::root_page_pointer_

Points to the root page (or something equivalent).

Definition at line 64 of file hash_storage_pimpl.hpp.

Referenced by foedus::storage::hash::HashPartitioner::design_partition_task().

StorageStatus foedus::storage::hash::HashStorageControlBlock::status_

Status of the storage.

Definition at line 62 of file hash_storage_pimpl.hpp.

Referenced by exists().

soc::SharedMutex foedus::storage::hash::HashStorageControlBlock::status_mutex_

Definition at line 60 of file hash_storage_pimpl.hpp.


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