20 #include <glog/logging.h>
49 o <<
"<ArrayCreateLog>" << v.
metadata_ <<
"</ArrayCreateLog>";
54 o <<
"<ArrayOverwriteLog>"
55 <<
"<offset_>" << v.
offset_ <<
"</offset_>"
60 for (uint16_t i = 0; i < std::min<uint16_t>(8, v.
payload_count_); ++i) {
61 o << i <<
":" <<
static_cast<int>(v.
payload_[i]) <<
" ";
64 o <<
"</ArrayOverwriteLog>";
70 inline T
as(
const void *address) {
71 const T* casted =
reinterpret_cast<const T*
>(address);
76 o <<
"<ArrayIncrementLog>"
77 <<
"<offset_>" << v.
offset_ <<
"</offset_>"
83 o <<
"int8_t</type><addendum_>" <<
static_cast<int16_t
>(as<int8_t>(v.
addendum_));
86 o <<
"int16_t</type><addendum_>" << as<int16_t>(v.
addendum_);
89 o <<
"int32_t</type><addendum_>" << as<int32_t>(v.
addendum_);
93 o <<
"uint8_t</type><addendum_>" <<
static_cast<uint16_t
>(as<uint8_t>(v.
addendum_));
96 o <<
"uint16_t</type><addendum_>" << as<uint16_t>(v.
addendum_);
99 o <<
"uint32_t</type><addendum_>" << as<uint32_t>(v.
addendum_);
102 o <<
"float</type><addendum_>" << as<float>(v.
addendum_);
107 o <<
"int64_t</type><addendum_>" << as<int64_t>(v.
addendum_ + 4);
110 o <<
"uint64_t</type><addendum_>" << as<uint64_t>(v.
addendum_ + 4);
113 o <<
"double</type><addendum_>" << as<double>(v.
addendum_ + 4);
121 o <<
"</ArrayIncrementLog>";
Declares all log types used in this storage type.
uint32_t StorageId
Unique ID for storage.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
void apply_storage(Engine *engine, StorageId storage_id)
Log type of array-storage's overwrite operation.
Declares common log types for all (or at least multiple) storage types.
Database engine object that holds all resources and provides APIs.
Log type of array-storage's increment operation.
std::ostream & operator<<(std::ostream &o, const ArrayCreateLogType &v)
Log type of CREATE ARRAY STORAGE operation.
ValueType get_value_type() const __attribute__((always_inline))
Base type for CREATE STORAGE operation.
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
T as(const void *address)