libfoedus-core
FOEDUS Core Library
foedus::snapshot::ReducerBufferStatus Union Reference

Compactly represents important status informations of a reducer buffer. More...

Detailed Description

Compactly represents important status informations of a reducer buffer.

Concurrent threads use atomic CAS to change any of these information. Last 32 bits are tail position of the buffer in bytes divided by 8, so at most 32 GB buffer.

Definition at line 69 of file log_reducer_impl.hpp.

#include <log_reducer_impl.hpp>

Collaboration diagram for foedus::snapshot::ReducerBufferStatus:

Classes

struct  Components
 

Public Member Functions

bool is_no_more_writers () const
 
bool is_clear () const
 
uint16_t get_active_writers () const
 
BufferPosition get_tail_position () const
 
uint64_t get_tail_bytes () const
 

Public Attributes

uint64_t word
 
struct foedus::snapshot::ReducerBufferStatus::Components components
 

Member Function Documentation

uint16_t foedus::snapshot::ReducerBufferStatus::get_active_writers ( ) const
inline
uint64_t foedus::snapshot::ReducerBufferStatus::get_tail_bytes ( ) const
inline

Definition at line 83 of file log_reducer_impl.hpp.

References components, foedus::snapshot::from_buffer_position(), and foedus::snapshot::ReducerBufferStatus::Components::tail_position_.

struct foedus::snapshot::ReducerBufferStatus::Components components
uint64_t from_buffer_position(BufferPosition buffer_position)
Definition: snapshot_id.hpp:78

Here is the call graph for this function:

BufferPosition foedus::snapshot::ReducerBufferStatus::get_tail_position ( ) const
inline

Definition at line 82 of file log_reducer_impl.hpp.

References components, and foedus::snapshot::ReducerBufferStatus::Components::tail_position_.

82 { return components.tail_position_; }
struct foedus::snapshot::ReducerBufferStatus::Components components
bool foedus::snapshot::ReducerBufferStatus::is_clear ( ) const
inline

Definition at line 80 of file log_reducer_impl.hpp.

Referenced by foedus::snapshot::LogReducer::handle_process().

80 { return word == 0; }

Here is the caller graph for this function:

bool foedus::snapshot::ReducerBufferStatus::is_no_more_writers ( ) const
inline

Definition at line 77 of file log_reducer_impl.hpp.

References components, foedus::snapshot::ReducerBufferStatus::Components::flags_, and foedus::snapshot::kFlagNoMoreWriters.

Referenced by foedus::snapshot::LogReducer::handle_process().

77  {
78  return (components.flags_ & kFlagNoMoreWriters) != 0;
79  }
struct foedus::snapshot::ReducerBufferStatus::Components components
A bit-wise flag in ReducerBufferStatus's flags_.

Here is the caller graph for this function:

Member Data Documentation

uint64_t foedus::snapshot::ReducerBufferStatus::word

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