libfoedus-core
FOEDUS Core Library
foedus::storage::DropLogType Struct Reference

Log type of DROP STORAGE operation. More...

Detailed Description

Log type of DROP STORAGE operation.

This log corresponds to StorageManager::drop_storage() opereation. DROP STORAGE has no in-epoch transaction order. It is always processed in a separate epoch from operations for the storage. Thus, we advance epoch before and after dropping a storage.

Definition at line 46 of file storage_log_types.hpp.

#include <storage_log_types.hpp>

Inheritance diagram for foedus::storage::DropLogType:
Collaboration diagram for foedus::storage::DropLogType:

Public Member Functions

 DropLogType ()=delete
 
 DropLogType (const DropLogType &other)=delete
 
 ~DropLogType ()=delete
 
void populate (StorageId storage_id)
 
void apply_storage (Engine *engine, StorageId storage_id)
 
void assert_valid ()
 
- Public Member Functions inherited from foedus::log::StorageLogType
bool is_engine_log () const
 
bool is_storage_log () const
 
bool is_record_log () const
 
void apply_engine (thread::Thread *)
 
void apply_record (thread::Thread *, storage::StorageId, xct::RwLockableXctId *, char *)
 
void assert_valid_generic () __attribute__((always_inline))
 Verifies the log contains essential fields set. More...
 

Friends

std::ostream & operator<< (std::ostream &o, const DropLogType &v)
 

Additional Inherited Members

- Public Attributes inherited from foedus::log::BaseLogType
LogHeader header_
 

Constructor & Destructor Documentation

foedus::storage::DropLogType::DropLogType ( )
delete

Referenced by populate().

Here is the caller graph for this function:

foedus::storage::DropLogType::DropLogType ( const DropLogType other)
delete
foedus::storage::DropLogType::~DropLogType ( )
delete

Member Function Documentation

void foedus::storage::DropLogType::apply_storage ( Engine engine,
StorageId  storage_id 
)

Definition at line 44 of file storage_log_types.cpp.

References ASSERT_ND, foedus::storage::StorageManager::drop_storage_apply(), and foedus::Engine::get_storage_manager().

44  {
45  ASSERT_ND(storage_id > 0);
46  LOG(INFO) << "Applying DROP STORAGE log: " << *this;
47  engine->get_storage_manager()->drop_storage_apply(storage_id);
48  LOG(INFO) << "Applied DROP STORAGE log: " << *this;
49 }
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
Definition: assert_nd.hpp:72

Here is the call graph for this function:

void foedus::storage::DropLogType::assert_valid ( )

Definition at line 51 of file storage_log_types.cpp.

References ASSERT_ND, foedus::log::StorageLogType::assert_valid_generic(), foedus::log::LogHeader::get_type(), foedus::log::BaseLogType::header_, and foedus::log::LogHeader::log_length_.

51  {
54  ASSERT_ND(header_.get_type() == log::get_log_code<DropLogType>());
55 }
uint16_t log_length_
Byte size of this log entry including this header itself and everything.
LogCode get_type() const __attribute__((always_inline))
Convenience method to cast into LogCode.
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
Definition: assert_nd.hpp:72
void assert_valid_generic() __attribute__((always_inline))
Verifies the log contains essential fields set.

Here is the call graph for this function:

void foedus::storage::DropLogType::populate ( StorageId  storage_id)

Definition at line 38 of file storage_log_types.cpp.

References ASSERT_ND, DropLogType(), foedus::log::BaseLogType::header_, foedus::log::LogHeader::log_length_, foedus::log::LogHeader::log_type_code_, and foedus::log::LogHeader::storage_id_.

Referenced by foedus::storage::StorageManagerPimpl::drop_storage().

38  {
39  ASSERT_ND(storage_id > 0);
40  header_.log_type_code_ = log::get_log_code<DropLogType>();
42  header_.storage_id_ = storage_id;
43 }
uint16_t log_type_code_
Actually of LogCode defined in the X-Macro, but we want to make sure the type size is 2 bytes...
uint16_t log_length_
Byte size of this log entry including this header itself and everything.
storage::StorageId storage_id_
The storage this loggable operation mainly affects.
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
Definition: assert_nd.hpp:72

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const DropLogType v 
)
friend

Definition at line 56 of file storage_log_types.cpp.

56  {
57  o << "<StorageDropLog>"
58  << "<storage_id_>" << v.header_.storage_id_ << "</storage_id_>"
59  << "</StorageDropLog>";
60  return o;
61 }

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