libfoedus-core
FOEDUS Core Library
foedus::xct::WriteXctAccess Struct Reference

Represents a record of write-access during a transaction. More...

Detailed Description

Represents a record of write-access during a transaction.

POD
This is a POD struct. Default destructor/copy-constructor/assignment operator work fine.

Definition at line 168 of file xct_access.hpp.

#include <xct_access.hpp>

Inheritance diagram for foedus::xct::WriteXctAccess:
Collaboration diagram for foedus::xct::WriteXctAccess:

Static Public Member Functions

static bool compare (const WriteXctAccess &left, const WriteXctAccess &right) __attribute__((always_inline))
 
- Static Public Member Functions inherited from foedus::xct::RecordXctAccess
static bool compare (const RecordXctAccess &left, const RecordXctAccess &right) __attribute__((always_inline))
 sort the write set in a unique order. More...
 

Public Attributes

char * payload_address_
 Pointer to the payload of the record. More...
 
log::RecordLogTypelog_entry_
 Pointer to the log entry in private log buffer for this write opereation. More...
 
ReadXctAccessrelated_read_
 
- Public Attributes inherited from foedus::xct::RecordXctAccess
storage::StorageId storage_id_
 The storage we accessed. More...
 
uint32_t ordinal_
 Indicates the ordinal among ReadXctAccess/WriteXctAccess of this transaction. More...
 
RwLockableXctIdowner_id_address_
 Pointer to the accessed record. More...
 
UniversalLockId owner_lock_id_
 Universal Lock ID of the lock in the record. More...
 

Friends

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

Additional Inherited Members

- Public Member Functions inherited from foedus::xct::RecordXctAccess
void set_owner_id_and_lock_id (RwLockableXctId *owner_id_address, UniversalLockId owner_lock_id)
 Setter for owner_id_address_/owner_lock_id_. More...
 
void set_owner_id_resolve_lock_id (const memory::GlobalVolatilePageResolver &resolver, RwLockableXctId *owner_id_address)
 Calculate owner_lock_id using the resolver. More...
 

Member Function Documentation

static bool foedus::xct::WriteXctAccess::compare ( const WriteXctAccess left,
const WriteXctAccess right 
)
inlinestatic

Definition at line 181 of file xct_access.hpp.

References foedus::xct::RecordXctAccess::compare().

Referenced by foedus::xct::XctManagerPimpl::precommit_xct_sort_access().

181  {
182  return RecordXctAccess::compare(left, right);
183  }
static bool compare(const RecordXctAccess &left, const RecordXctAccess &right) __attribute__((always_inline))
sort the write set in a unique order.
Definition: xct_access.hpp:240

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 WriteXctAccess v 
)
friend

Definition at line 59 of file xct_access.cpp.

59  {
60  o << "<WriteAccess><storage>" << v.storage_id_ << "</storage>"
61  << "<record_address>" << v.owner_id_address_ << "</record_address>"
62 // << "<current_lock_position_>" << v.current_lock_position_ << "</current_lock_position_>"
63  << "<ordinal_>" << v.ordinal_ << "</ordinal_>"
64  << "<current_owner_id>" << *(v.owner_id_address_) << "</current_owner_id><log>"
65  << "<owner_lock_id>" << v.owner_lock_id_ << "</owner_lock_id><log>";
66  log::invoke_ostream(v.log_entry_, &o);
67  o << "</log>";
68  if (v.related_read_) {
69  o << "<HasRelatedRead />"; // does not output its content to avoid circle
70  }
71  o << "</WriteAccess>";
72  return o;
73 }
void invoke_ostream(const void *buffer, std::ostream *ptr)
Invokes the ostream operator for the given log type defined in log_type.xmacro.

Member Data Documentation

log::RecordLogType* foedus::xct::WriteXctAccess::log_entry_

Pointer to the log entry in private log buffer for this write opereation.

Definition at line 175 of file xct_access.hpp.

Referenced by foedus::xct::Xct::add_to_write_set(), foedus::xct::operator<<(), foedus::xct::XctManagerPimpl::precommit_xct_apply(), and foedus::storage::hash::HashStoragePimpl::track_moved_record().


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