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

Represents a record of special read-access during a transaction without any need for locking. More...

Detailed Description

Represents a record of special read-access during a transaction without any need for locking.

POD
Some storage type doesn't need locking for serializability (so far Sequential Storage only) For them, we record only a XctId in its metadata placed in control block. It's almost same as the usual ReadXctAccess in terms of the information we store here and how we verify that at precommit, but to clarify we separate it to this object. Also, there is a small difference now: the owner_id_address_ in this object points to a control block whereas usual ReadXctAccess assumes that it points to a valid data page so that we can always convert to UniversalLockId.

Definition at line 200 of file xct_access.hpp.

#include <xct_access.hpp>

Collaboration diagram for foedus::xct::LockFreeReadXctAccess:

Public Attributes

XctId observed_owner_id_
 XID value we observed. More...
 
storage::StorageId storage_id_
 The storage we accessed. More...
 
RwLockableXctIdowner_id_address_
 Pointer to the TID we protect against. More...
 

Friends

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

Friends And Related Function Documentation

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

Definition at line 75 of file xct_access.cpp.

75  {
76  o << "<LockFreeReadXctAccess>"
77  << "<storage>" << v.storage_id_ << "</storage>"
78  << "<observed_owner_id>" << v.observed_owner_id_ << "</observed_owner_id>"
79  << "<record_address>" << v.owner_id_address_ << "</record_address>"
80  << "<current_owner_id>" << *v.owner_id_address_ << "</current_owner_id>";
81  o << "</LockFreeReadXctAccess>";
82  return o;
83 }

Member Data Documentation

RwLockableXctId* foedus::xct::LockFreeReadXctAccess::owner_id_address_
storage::StorageId foedus::xct::LockFreeReadXctAccess::storage_id_

The storage we accessed.

Definition at line 207 of file xct_access.hpp.

Referenced by foedus::xct::Xct::add_to_lock_free_read_set(), and foedus::xct::operator<<().


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