libfoedus-core
FOEDUS Core Library
|
A base layout of shared data for all storage types. More...
A base layout of shared data for all storage types.
Individual storage types define their own control blocks that is compatible with this layout.
Definition at line 53 of file storage.hpp.
#include <storage.hpp>
Public Member Functions | |
StorageControlBlock ()=delete | |
~StorageControlBlock ()=delete | |
bool | exists () const |
bool | is_valid_status () const |
void | initialize () |
void | uninitialize () |
Public Attributes | |
soc::SharedMutex | status_mutex_ |
The mutext to protect changing the status. More... | |
StorageStatus | status_ |
Status of the storage. More... | |
DualPagePointer | root_page_pointer_ |
Points to the root page (or something equivalent). More... | |
Metadata | meta_ |
common part of the metadata. More... | |
char | padding_ [ 4096-sizeof(soc::SharedMutex)-8-sizeof(DualPagePointer)-sizeof(Metadata)] |
Just to make this exactly 4kb. More... | |
|
delete |
|
delete |
|
inline |
Definition at line 58 of file storage.hpp.
References foedus::storage::kExists, and status_.
Referenced by foedus::storage::StorageManagerPimpl::create_storage_and_log(), foedus::storage::StorageManagerPimpl::drop_storage(), foedus::storage::StorageManagerPimpl::drop_storage_apply(), foedus::storage::StorageManager::get_name(), foedus::storage::StorageManagerPimpl::hcc_reset_all_temperature_stat(), foedus::storage::StorageManagerPimpl::reinitialize_for_recovered_snapshot(), and foedus::storage::StorageManagerPimpl::track_moved_record().
|
inline |
Definition at line 63 of file storage.hpp.
References foedus::soc::SharedMutex::initialize(), foedus::storage::kNotExists, root_page_pointer_, foedus::storage::DualPagePointer::snapshot_pointer_, status_, status_mutex_, foedus::storage::DualPagePointer::volatile_pointer_, and foedus::storage::VolatilePagePointer::word.
Referenced by foedus::storage::StorageManagerPimpl::create_storage(), foedus::storage::StorageManagerPimpl::create_storage_apply(), and foedus::storage::StorageManagerPimpl::initialize_read_latest_snapshot().
|
inline |
Definition at line 59 of file storage.hpp.
References foedus::storage::kExists, foedus::storage::kMarkedForDeath, foedus::storage::kNotExists, and status_.
Referenced by foedus::snapshot::SnapshotManagerPimpl::snapshot_metadata().
|
inline |
Definition at line 69 of file storage.hpp.
References status_mutex_, and foedus::soc::SharedMutex::uninitialize().
Referenced by foedus::storage::StorageManagerPimpl::drop_storage(), and foedus::storage::StorageManagerPimpl::drop_storage_apply().
Metadata foedus::storage::StorageControlBlock::meta_ |
common part of the metadata.
individual storage control blocks would have derived metadata
Definition at line 84 of file storage.hpp.
Referenced by foedus::storage::StorageManagerPimpl::create_storage(), foedus::storage::StorageManagerPimpl::create_storage_apply(), foedus::storage::StorageManagerPimpl::drop_storage(), foedus::storage::StorageManagerPimpl::drop_storage_apply(), foedus::snapshot::SnapshotManagerPimpl::drop_volatile_pages_parallel(), foedus::snapshot::SnapshotMetadata::get_metadata(), foedus::storage::StorageManager::get_name(), foedus::storage::StorageManagerPimpl::hcc_reset_all_temperature_stat(), foedus::storage::StorageManagerPimpl::initialize_read_latest_snapshot(), foedus::storage::array::ArrayStoragePimpl::load(), foedus::storage::masstree::MasstreeStoragePimpl::load(), foedus::storage::hash::HashStoragePimpl::load(), foedus::storage::sequential::SequentialStoragePimpl::load(), foedus::storage::MetadataSerializer::load_all_storages_from_xml(), foedus::storage::Partitioner::Partitioner(), foedus::storage::MetadataSerializer::save_all_storages_to_xml(), and foedus::storage::StorageManagerPimpl::track_moved_record().
char foedus::storage::StorageControlBlock::padding_[ 4096-sizeof(soc::SharedMutex)-8-sizeof(DualPagePointer)-sizeof(Metadata)] |
Just to make this exactly 4kb.
Individual control block doesn't have this.
Definition at line 88 of file storage.hpp.
DualPagePointer foedus::storage::StorageControlBlock::root_page_pointer_ |
Points to the root page (or something equivalent).
Definition at line 82 of file storage.hpp.
Referenced by foedus::snapshot::SnapshotManagerPimpl::drop_volatile_pages_parallel(), initialize(), foedus::storage::StorageManagerPimpl::initialize_read_latest_snapshot(), and foedus::storage::StorageManagerPimpl::reinitialize_for_recovered_snapshot().
StorageStatus foedus::storage::StorageControlBlock::status_ |
Status of the storage.
Definition at line 80 of file storage.hpp.
Referenced by foedus::storage::StorageManagerPimpl::drop_storage(), foedus::storage::StorageManagerPimpl::drop_storage_apply(), exists(), initialize(), foedus::storage::StorageManagerPimpl::initialize_read_latest_snapshot(), is_valid_status(), and foedus::storage::MetadataSerializer::load_all_storages_from_xml().
soc::SharedMutex foedus::storage::StorageControlBlock::status_mutex_ |
The mutext to protect changing the status.
Reading the status is not protected, so we have to make sure we don't suddenly drop a storage. We first change the status to kMarkedForDeath, then drop it after a while.
Definition at line 78 of file storage.hpp.
Referenced by initialize(), and uninitialize().