libfoedus-core
FOEDUS Core Library
|
Metadata of an array storage. More...
Metadata of an array storage.
Definition at line 40 of file array_metadata.hpp.
#include <array_metadata.hpp>
Public Types | |
enum | Constants { kDefaultSnapshotDropVolatilePagesThreshold = 3 } |
Public Member Functions | |
ArrayMetadata () | |
ArrayMetadata (StorageId id, const StorageName &name, uint16_t payload_size, ArrayOffset array_size) | |
ArrayMetadata (const StorageName &name, uint16_t payload_size, ArrayOffset array_size) | |
This one is for newly creating a storage. More... | |
std::string | describe () const |
![]() | |
Metadata () | |
Metadata (StorageId id, StorageType type, const StorageName &name) | |
Metadata (StorageId id, StorageType type, const StorageName &name, SnapshotPagePointer root_snapshot_page_id) | |
bool | keeps_all_volatile_pages () const |
Public Attributes | |
uint16_t | payload_size_ |
byte size of one record in this array storage without internal overheads More... | |
uint16_t | snapshot_drop_volatile_pages_threshold_ |
Number of levels of volatile pages to keep after each snapshotting. More... | |
uint32_t | padding_ |
ArrayOffset | array_size_ |
Size of this array. More... | |
![]() | |
StorageId | id_ |
the unique ID of this storage. More... | |
StorageType | type_ |
type of the storage. More... | |
StorageName | name_ |
the unique name of this storage. More... | |
SnapshotPagePointer | root_snapshot_page_id_ |
Pointer to a snapshotted page this storage is rooted at. More... | |
SnapshotThresholds | snapshot_thresholds_ |
Friends | |
std::ostream & | operator<< (std::ostream &o, const ArrayMetadata &v) |
Additional Inherited Members | |
![]() | |
static std::string | describe (const Metadata &metadata) |
to_string operator of all Metadata objects. More... | |
Enumerator | |
---|---|
kDefaultSnapshotDropVolatilePagesThreshold |
Definition at line 41 of file array_metadata.hpp.
|
inline |
Definition at line 44 of file array_metadata.hpp.
|
inline |
Definition at line 50 of file array_metadata.hpp.
|
inline |
This one is for newly creating a storage.
Definition at line 62 of file array_metadata.hpp.
std::string foedus::storage::array::ArrayMetadata::describe | ( | ) | const |
Definition at line 28 of file array_metadata.cpp.
|
friend |
Definition at line 33 of file array_metadata.cpp.
ArrayOffset foedus::storage::array::ArrayMetadata::array_size_ |
Size of this array.
Definition at line 85 of file array_metadata.hpp.
Referenced by foedus::storage::array::calculate_levels(), foedus::storage::array::ArrayStoragePimpl::get_array_size(), foedus::storage::array::ArrayMetadataSerializer::load(), foedus::storage::array::ArrayStoragePimpl::load_empty(), and foedus::storage::array::ArrayMetadataSerializer::save().
uint32_t foedus::storage::array::ArrayMetadata::padding_ |
Definition at line 83 of file array_metadata.hpp.
uint16_t foedus::storage::array::ArrayMetadata::payload_size_ |
byte size of one record in this array storage without internal overheads
Definition at line 74 of file array_metadata.hpp.
Referenced by foedus::storage::array::calculate_levels(), foedus::storage::array::ArrayStoragePimpl::get_payload_size(), foedus::storage::array::ArrayMetadataSerializer::load(), foedus::storage::array::ArrayStoragePimpl::load_empty(), and foedus::storage::array::ArrayMetadataSerializer::save().
uint16_t foedus::storage::array::ArrayMetadata::snapshot_drop_volatile_pages_threshold_ |
Number of levels of volatile pages to keep after each snapshotting.
0 means this storage keeps no volatile pages after snapshotting. 1 means it keeps only the root page, 2 means another level, ... The default is 3. Keeping 256^2=64k pages in higher level should hit a good balance. If it doesn't, the user (you) chooses the right value per storage.
Definition at line 82 of file array_metadata.hpp.
Referenced by foedus::storage::array::ArrayStoragePimpl::get_snapshot_drop_volatile_pages_threshold(), foedus::storage::array::ArrayMetadataSerializer::load(), and foedus::storage::array::ArrayMetadataSerializer::save().