libfoedus-core
FOEDUS Core Library
foedus::storage::hash::HashBinRange Struct Reference

Represents a range of hash bins in a hash storage, such as what an intermediate page is responsible for. More...

Detailed Description

Represents a range of hash bins in a hash storage, such as what an intermediate page is responsible for.

Begin is inclusive, end is exclusive. This is a range of hash bins, not full hash values.

Definition at line 172 of file hash_id.hpp.

#include <hash_id.hpp>

Public Member Functions

 HashBinRange ()
 
 HashBinRange (HashBin begin, HashBin end)
 
bool contains (HashBin hash) const
 
bool contains (const HashBinRange &other) const
 
bool operator== (const HashBinRange &other) const
 
bool operator!= (const HashBinRange &other) const
 
uint64_t length () const
 

Public Attributes

HashBin begin_
 Inclusive beginning of the range. More...
 
HashBin end_
 Exclusive end of the range. More...
 

Friends

std::ostream & operator<< (std::ostream &o, const HashBinRange &v)
 this one is NOT header-only. More...
 

Constructor & Destructor Documentation

foedus::storage::hash::HashBinRange::HashBinRange ( )
inline

Definition at line 173 of file hash_id.hpp.

173 : begin_(0), end_(0) {}
HashBin begin_
Inclusive beginning of the range.
Definition: hash_id.hpp:191
HashBin end_
Exclusive end of the range.
Definition: hash_id.hpp:193
foedus::storage::hash::HashBinRange::HashBinRange ( HashBin  begin,
HashBin  end 
)
inline

Definition at line 174 of file hash_id.hpp.

174 : begin_(begin), end_(end) {}
HashBin begin_
Inclusive beginning of the range.
Definition: hash_id.hpp:191
HashBin end_
Exclusive end of the range.
Definition: hash_id.hpp:193

Member Function Documentation

bool foedus::storage::hash::HashBinRange::contains ( HashBin  hash) const
inline

Definition at line 176 of file hash_id.hpp.

References begin_, and end_.

Referenced by foedus::storage::hash::HashIntermediatePage::assert_bin(), foedus::storage::hash::HashIntermediatePage::initialize_volatile_page(), foedus::storage::hash::HashDataPage::initialize_volatile_page(), and foedus::storage::hash::ComposedBinsMergedStream::open_path().

176 { return hash >= begin_ && hash < end_; }
HashBin begin_
Inclusive beginning of the range.
Definition: hash_id.hpp:191
HashBin end_
Exclusive end of the range.
Definition: hash_id.hpp:193

Here is the caller graph for this function:

bool foedus::storage::hash::HashBinRange::contains ( const HashBinRange other) const
inline

Definition at line 177 of file hash_id.hpp.

References begin_, and end_.

177  {
178  return begin_ <= other.begin_ && end_ >= other.end_;
179  }
HashBin begin_
Inclusive beginning of the range.
Definition: hash_id.hpp:191
HashBin end_
Exclusive end of the range.
Definition: hash_id.hpp:193
uint64_t foedus::storage::hash::HashBinRange::length ( ) const
inline

Definition at line 185 of file hash_id.hpp.

References begin_, and end_.

Referenced by foedus::storage::hash::HashIntermediatePage::assert_range(), foedus::storage::hash::hash_data_volatile_page_init(), and foedus::storage::hash::ComposedBinsMergedStream::open_path().

185 { return end_ - begin_; }
HashBin begin_
Inclusive beginning of the range.
Definition: hash_id.hpp:191
HashBin end_
Exclusive end of the range.
Definition: hash_id.hpp:193

Here is the caller graph for this function:

bool foedus::storage::hash::HashBinRange::operator!= ( const HashBinRange other) const
inline

Definition at line 183 of file hash_id.hpp.

References operator==().

183 { return !(this->operator==(other)); }
bool operator==(const HashBinRange &other) const
Definition: hash_id.hpp:180

Here is the call graph for this function:

bool foedus::storage::hash::HashBinRange::operator== ( const HashBinRange other) const
inline

Definition at line 180 of file hash_id.hpp.

References begin_, and end_.

Referenced by operator!=().

180  {
181  return begin_ == other.begin_ && end_ == other.end_;
182  }
HashBin begin_
Inclusive beginning of the range.
Definition: hash_id.hpp:191
HashBin end_
Exclusive end of the range.
Definition: hash_id.hpp:193

Here is the caller graph for this function:

Friends And Related Function Documentation

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

this one is NOT header-only.

Defined in hash_id.cpp

Definition at line 28 of file hash_id.cpp.

28  {
29  o << "<HashBinRange from=\""
30  << assorted::Hex(v.begin_)
31  << "\" to=\"" << assorted::Hex(v.end_) << "\" />";
32  return o;
33 }

Member Data Documentation


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