libfoedus-core
FOEDUS Core Library
foedus::snapshot::LogBuffer Struct Reference

Packages handling of 4-bytes representation of position in log buffers. More...

Detailed Description

Packages handling of 4-bytes representation of position in log buffers.

Definition at line 38 of file log_buffer.hpp.

#include <log_buffer.hpp>

Public Member Functions

 LogBuffer (char *base_address)
 
log::RecordLogTyperesolve (BufferPosition position) const
 
BufferPosition compact (const log::RecordLogType *address) const
 

Public Attributes

char *const base_address_
 

Constructor & Destructor Documentation

foedus::snapshot::LogBuffer::LogBuffer ( char *  base_address)
inlineexplicit

Definition at line 39 of file log_buffer.hpp.

39 : base_address_(base_address) {}

Member Function Documentation

BufferPosition foedus::snapshot::LogBuffer::compact ( const log::RecordLogType address) const
inline

Definition at line 46 of file log_buffer.hpp.

References foedus::snapshot::to_buffer_position().

46  {
47  return to_buffer_position(reinterpret_cast<const char*>(address) - base_address_);
48  }
BufferPosition to_buffer_position(uint64_t byte_position)
Definition: snapshot_id.hpp:74

Here is the call graph for this function:

log::RecordLogType* foedus::snapshot::LogBuffer::resolve ( BufferPosition  position) const
inline

Definition at line 42 of file log_buffer.hpp.

References foedus::snapshot::from_buffer_position().

Referenced by foedus::storage::array::compact_logs(), foedus::storage::hash::HashPartitioner::partition_batch(), foedus::storage::array::ArrayPartitioner::partition_batch(), foedus::storage::array::prepare_sort_entries(), foedus::storage::hash::prepare_sort_entries(), foedus::storage::masstree::prepare_sort_entries(), and foedus::storage::masstree::resolve_log().

42  {
43  return reinterpret_cast<log::RecordLogType*>(
45  }
uint64_t from_buffer_position(BufferPosition buffer_position)
Definition: snapshot_id.hpp:78

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

char* const foedus::snapshot::LogBuffer::base_address_

Definition at line 40 of file log_buffer.hpp.


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