| libfoedus-core
    FOEDUS Core Library | 
A single log buffer for metadata (eg create/drop storage). More...
A single log buffer for metadata (eg create/drop storage).
Per-engine/storage operations such as CREATE/DROP STORAGE are logged differently. They are always separated from usual transactions and also written to a separate log file. Metadata operation is rare, so we don't optimize the code here. Instead, this class is much simpler than ThreadLogBuffer. More precisely:
Definition at line 91 of file meta_log_buffer.hpp.
#include <meta_log_buffer.hpp>


| Public Member Functions | |
| MetaLogBuffer () | |
| MetaLogBuffer (Engine *engine, MetaLogControlBlock *block) | |
| void | commit (BaseLogType *metalog, Epoch *commit_epoch) | 
| Synchronously writes out the given log to metadata log file.  More... | |
|  Public Member Functions inherited from foedus::Attachable< MetaLogControlBlock > | |
| Attachable () | |
| Attachable (Engine *engine) | |
| Attachable (Engine *engine, MetaLogControlBlock *control_block) | |
| Attachable (MetaLogControlBlock *control_block) | |
| Attachable (const Attachable &other) | |
| virtual | ~Attachable () | 
| Attachable & | operator= (const Attachable &other) | 
| virtual void | attach (MetaLogControlBlock *control_block) | 
| Attaches to the given shared memory.  More... | |
| bool | is_attached () const | 
| Returns whether the object has been already attached to some shared memory.  More... | |
| MetaLogControlBlock * | get_control_block () const | 
| Engine * | get_engine () const | 
| void | set_engine (Engine *engine) | 
| Friends | |
| std::ostream & | operator<< (std::ostream &o, const MetaLogBuffer &v) | 
| Additional Inherited Members | |
|  Protected Attributes inherited from foedus::Attachable< MetaLogControlBlock > | |
| Engine * | engine_ | 
| Most attachable object stores an engine pointer (local engine), so we define it here.  More... | |
| MetaLogControlBlock * | control_block_ | 
| The shared data on shared memory that has been initialized in some SOC or master engine.  More... | |
| 
 | inline | 
Definition at line 93 of file meta_log_buffer.hpp.
| 
 | inline | 
Definition at line 94 of file meta_log_buffer.hpp.
| void foedus::log::MetaLogBuffer::commit | ( | BaseLogType * | metalog, | 
| Epoch * | commit_epoch | ||
| ) | 
Synchronously writes out the given log to metadata log file.
Definition at line 33 of file meta_log_buffer.cpp.
References foedus::xct::XctManager::advance_current_global_epoch(), ASSERT_ND, foedus::Attachable< MetaLogControlBlock >::control_block_, foedus::Attachable< MetaLogControlBlock >::engine_, foedus::xct::XctManager::get_current_global_epoch(), foedus::log::LogHeader::get_kind(), foedus::Engine::get_xct_manager(), foedus::log::BaseLogType::header_, foedus::log::kEngineLogs, foedus::log::kStorageLogs, foedus::log::LogHeader::log_length_, foedus::assorted::memory_fence_acquire(), foedus::xct::XctId::set_epoch(), and foedus::log::LogHeader::xct_id_.
Referenced by foedus::storage::StorageManagerPimpl::create_storage_and_log(), foedus::storage::StorageManagerPimpl::drop_storage(), and foedus::storage::sequential::SequentialStoragePimpl::truncate().


| 
 | friend | 
Definition at line 70 of file meta_log_buffer.cpp.