SWC-DB  v0.5.9 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::client::Query::Select::Scanner Class Referencefinal

#include <swcdb/db/client/Query/Select/Scanner.h>

+ Inheritance diagram for SWC::client::Query::Select::Scanner:
+ Collaboration diagram for SWC::client::Query::Select::Scanner:

Public Types

typedef std::shared_ptr< ScannerPtr
 

Public Member Functions

 Scanner (const Handlers::Base::Ptr &hdlr, const DB::Types::KeySeq col_seq, const DB::Specs::Interval &interval, const cid_t cid)
 
 Scanner (const Handlers::Base::Ptr &hdlr, const DB::Types::KeySeq col_seq, DB::Specs::Interval &&interval, const cid_t cid) noexcept
 
 ~Scanner () noexcept
 
SWC_CAN_INLINE bool valid () noexcept
 
SWC_CAN_INLINE Clients::Ptrget_clients () noexcept
 
SWC_CAN_INLINE Profilingget_profile () noexcept
 
void debug_res_cache (const char *msg, cid_t cid, rid_t rid, const Comm::EndPoints &endpoints)
 
void print (std::ostream &out)
 
void response_if_last ()
 
void next_call ()
 
void mngr_locate_master ()
 
bool mngr_located_master (const ReqBase::Ptr &base, Comm::Protocol::Mngr::Params::RgrGetRsp &rsp)
 
void rgr_locate_master ()
 
void rgr_located_master (const ReqBase::Ptr &base, const Comm::Protocol::Rgr::Params::RangeLocateRsp &rsp)
 
void mngr_resolve_rgr_meta ()
 
bool mngr_resolved_rgr_meta (const ReqBase::Ptr &base, Comm::Protocol::Mngr::Params::RgrGetRsp &rsp)
 
void rgr_locate_meta ()
 
void rgr_located_meta (const ReqBase::Ptr &base, const Comm::Protocol::Rgr::Params::RangeLocateRsp &rsp)
 
void mngr_resolve_rgr_select ()
 
bool mngr_resolved_rgr_select (const ReqBase::Ptr &base, Comm::Protocol::Mngr::Params::RgrGetRsp &rsp)
 
void rgr_select ()
 
void rgr_selected (const ReqBase::Ptr &req, Comm::Protocol::Rgr::Params::RangeQuerySelectRsp &rsp)
 

Static Public Member Functions

static SWC_CAN_INLINE void execute (const Handlers::Base::Ptr &hdlr, DB::Types::KeySeq key_seq, cid_t cid, const DB::Specs::Interval &intval)
 
static SWC_CAN_INLINE void execute (const Handlers::Base::Ptr &hdlr, DB::Types::KeySeq key_seq, cid_t cid, DB::Specs::Interval &&intval)
 

Public Attributes

Core::CompletionCounter< uint64_t > completion
 
Handlers::Base::Ptr selector
 
const DB::Types::KeySeq col_seq
 
DB::Specs::Interval interval
 
const cid_t master_cid
 
const cid_t meta_cid
 
const cid_t data_cid
 
cid_t master_rid
 
cid_t meta_rid
 
cid_t data_rid
 
int64_t master_mngr_revision
 
bool master_mngr_is_end
 
bool master_mngr_next
 
bool master_rgr_next
 
bool meta_next
 
uint8_t retry_point
 
bool need_data_cid_check
 
ReqBase::Ptr master_rgr_req_base
 
ReqBase::Ptr meta_req_base
 
ReqBase::Ptr data_req_base
 
DB::Cell::Key master_mngr_offset
 
DB::Cell::Key master_rgr_offset
 
DB::Cell::Key meta_offset
 
DB::Cell::Key meta_end
 
Comm::EndPoints master_rgr_endpoints
 
Comm::EndPoints meta_endpoints
 
Comm::EndPoints data_endpoints
 

Detailed Description

Definition at line 25 of file Scanner.h.

Member Typedef Documentation

◆ Ptr

Definition at line 45 of file Scanner.h.

Constructor & Destructor Documentation

◆ Scanner() [1/2]

SWC::client::Query::Select::Scanner::Scanner ( const Handlers::Base::Ptr hdlr,
const DB::Types::KeySeq  col_seq,
const DB::Specs::Interval interval,
const cid_t  cid 
)

Definition at line 35 of file Scanner.cc.

Referenced by execute().

+ Here is the caller graph for this function:

◆ Scanner() [2/2]

SWC::client::Query::Select::Scanner::Scanner ( const Handlers::Base::Ptr hdlr,
const DB::Types::KeySeq  col_seq,
DB::Specs::Interval &&  interval,
const cid_t  cid 
)
noexcept

Definition at line 58 of file Scanner.cc.

◆ ~Scanner()

SWC::client::Query::Select::Scanner::~Scanner ( )
noexcept

Definition at line 81 of file Scanner.cc.

Member Function Documentation

◆ debug_res_cache()

void SWC::client::Query::Select::Scanner::debug_res_cache ( const char *  msg,
cid_t  cid,
rid_t  rid,
const Comm::EndPoints endpoints 
)

Definition at line 83 of file Scanner.cc.

References SWC::LOG_DEBUG, print(), SWC_LOG_OSTREAM, and SWC_LOG_OUT.

Referenced by mngr_resolve_rgr_meta(), and mngr_resolve_rgr_select().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ execute() [1/2]

static SWC_CAN_INLINE void SWC::client::Query::Select::Scanner::execute ( const Handlers::Base::Ptr hdlr,
DB::Types::KeySeq  key_seq,
cid_t  cid,
const DB::Specs::Interval intval 
)
inlinestatic

Definition at line 29 of file Scanner.h.

References Scanner().

Referenced by SWC::client::Query::Select::Handlers::Base::default_executor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ execute() [2/2]

static SWC_CAN_INLINE void SWC::client::Query::Select::Scanner::execute ( const Handlers::Base::Ptr hdlr,
DB::Types::KeySeq  key_seq,
cid_t  cid,
DB::Specs::Interval &&  intval 
)
inlinestatic

Definition at line 37 of file Scanner.h.

References Scanner().

+ Here is the call graph for this function:

◆ get_clients()

SWC_CAN_INLINE Clients::Ptr& SWC::client::Query::Select::Scanner::get_clients ( )
inlinenoexcept

Definition at line 100 of file Scanner.h.

References selector.

◆ get_profile()

SWC_CAN_INLINE Profiling& SWC::client::Query::Select::Scanner::get_profile ( )
inlinenoexcept

Definition at line 105 of file Scanner.h.

References selector.

◆ mngr_locate_master()

◆ mngr_located_master()

◆ mngr_resolve_rgr_meta()

void SWC::client::Query::Select::Scanner::mngr_resolve_rgr_meta ( )

Definition at line 470 of file Scanner.cc.

References SWC::client::Query::Profiling::Component::Start::add(), completion, debug_res_cache(), SWC::Core::Vector< T, SizeT, GROW_SZ >::empty(), SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::endpoints, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::err, SWC::Core::CompletionCounter< CountT >::increment(), meta_cid, meta_endpoints, meta_rid, SWC::Error::OK, SWC::Comm::Protocol::Mngr::Req::RgrGet< DataT >::request(), response_if_last(), rgr_locate_meta(), SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::rid, selector, SWC_CAN_INLINE, and SWC_SCANNER_REQ_DEBUG.

Referenced by rgr_located_master().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mngr_resolve_rgr_select()

void SWC::client::Query::Select::Scanner::mngr_resolve_rgr_select ( )

Definition at line 678 of file Scanner.cc.

References SWC::client::Query::Profiling::Component::Start::add(), completion, data_cid, data_endpoints, data_rid, debug_res_cache(), SWC::Core::Vector< T, SizeT, GROW_SZ >::empty(), SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::endpoints, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::err, SWC::Core::CompletionCounter< CountT >::increment(), SWC::Error::OK, SWC::Comm::Protocol::Mngr::Req::RgrGet< DataT >::request(), response_if_last(), rgr_select(), SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::rid, selector, SWC_CAN_INLINE, and SWC_SCANNER_REQ_DEBUG.

Referenced by rgr_located_master(), and rgr_located_meta().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mngr_resolved_rgr_meta()

bool SWC::client::Query::Select::Scanner::mngr_resolved_rgr_meta ( const ReqBase::Ptr base,
Comm::Protocol::Mngr::Params::RgrGetRsp rsp 
)

◆ mngr_resolved_rgr_select()

bool SWC::client::Query::Select::Scanner::mngr_resolved_rgr_select ( const ReqBase::Ptr base,
Comm::Protocol::Mngr::Params::RgrGetRsp rsp 
)

◆ next_call()

void SWC::client::Query::Select::Scanner::next_call ( )

Definition at line 162 of file Scanner.cc.

References col_seq, SWC::DB::KeySeq::compare(), SWC::DB::Cell::Key::empty(), SWC::DB::Cell::Key::free(), interval, SWC::Condition::LT, master_mngr_next, master_rgr_next, meta_end, meta_next, mngr_locate_master(), SWC::DB::Specs::Interval::offset_key, SWC::DB::Specs::Interval::offset_rev, rgr_locate_master(), and rgr_locate_meta().

Referenced by rgr_located_master(), rgr_located_meta(), and rgr_selected().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print()

void SWC::client::Query::Select::Scanner::print ( std::ostream &  out)

Definition at line 95 of file Scanner.cc.

References col_seq, completion, SWC::Core::CompletionCounter< CountT >::count(), data_cid, data_rid, interval, master_cid, master_mngr_next, master_mngr_revision, master_rgr_next, master_rid, meta_cid, meta_next, meta_rid, SWC::DB::Specs::Interval::print(), retry_point, SWC::client::Query::Select::RETRY_POINT_DATA, SWC::client::Query::Select::RETRY_POINT_MASTER, SWC::client::Query::Select::RETRY_POINT_META, SWC::client::Query::Select::RETRY_POINT_NONE, and SWC::DB::Types::to_string().

Referenced by debug_res_cache().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ response_if_last()

void SWC::client::Query::Select::Scanner::response_if_last ( )

Definition at line 152 of file Scanner.cc.

References completion, data_req_base, SWC::Core::CompletionCounter< CountT >::is_last(), master_rgr_req_base, meta_req_base, SWC::Error::OK, and selector.

Referenced by mngr_locate_master(), mngr_resolve_rgr_meta(), mngr_resolve_rgr_select(), rgr_locate_master(), rgr_locate_meta(), rgr_located_master(), rgr_located_meta(), rgr_select(), and rgr_selected().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rgr_locate_master()

void SWC::client::Query::Select::Scanner::rgr_locate_master ( )

Definition at line 336 of file Scanner.cc.

References SWC::client::Query::Profiling::Component::Start::add(), col_seq, completion, SWC::DB::Cell::Key::copy(), SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::CURRENT_RANGE, data_cid, SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::err, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::flags, SWC::DB::Types::SystemColumn::get_meta_cid_str(), SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::HAVE_REVISION, SWC::Core::CompletionCounter< CountT >::increment(), SWC::DB::Cell::Key::insert(), SWC::DB::Types::SystemColumn::is_data(), master_cid, master_mngr_revision, master_rgr_endpoints, master_rgr_next, master_rgr_offset, master_rid, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::NEXT_RANGE, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::range_begin, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::range_end, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::range_offset, SWC::Comm::Protocol::Rgr::Req::RangeLocate< DataT >::request(), response_if_last(), retry_point, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::revision, SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::rid, selector, SWC_CAN_INLINE, SWC_SCANNER_REQ_DEBUG, and SWC::Core::to_string().

Referenced by mngr_locate_master(), mngr_located_master(), and next_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rgr_locate_meta()

void SWC::client::Query::Select::Scanner::rgr_locate_meta ( )

Definition at line 547 of file Scanner.cc.

References SWC::client::Query::Profiling::Component::Start::add(), SWC::DB::Specs::Interval::apply_possible_range(), completion, SWC::DB::Cell::Key::copy(), SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::CURRENT_RANGE, data_cid, SWC::DB::Cell::Key::empty(), SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::err, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::flags, SWC::DB::Specs::Interval::has_opt__key_equal(), SWC::DB::Specs::Interval::has_opt__range_end_rest(), SWC::Core::CompletionCounter< CountT >::increment(), SWC::DB::Cell::Key::insert(), interval, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::KEY_EQUAL, meta_cid, meta_endpoints, meta_next, meta_offset, meta_rid, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::NEXT_RANGE, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::range_begin, SWC::DB::Specs::Interval::range_end, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::range_end, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::RANGE_END_REST, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::range_offset, SWC::Comm::Protocol::Rgr::Req::RangeLocate< DataT >::request(), response_if_last(), retry_point, SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::rid, selector, SWC_CAN_INLINE, SWC_SCANNER_REQ_DEBUG, and SWC::Core::to_string().

Referenced by mngr_resolve_rgr_meta(), mngr_resolved_rgr_meta(), and next_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rgr_located_master()

◆ rgr_located_meta()

◆ rgr_select()

void SWC::client::Query::Select::Scanner::rgr_select ( )

Definition at line 761 of file Scanner.cc.

References SWC::client::Query::Profiling::Component::Start::add(), completion, data_cid, data_endpoints, data_rid, SWC::Comm::Protocol::Rgr::Params::RangeQuerySelectRsp::err, SWC::Core::CompletionCounter< CountT >::increment(), interval, SWC::Comm::Protocol::Rgr::Req::RangeQuerySelect< DataT >::request(), response_if_last(), selector, SWC_CAN_INLINE, and SWC_SCANNER_REQ_DEBUG.

Referenced by mngr_located_master(), mngr_resolve_rgr_select(), mngr_resolved_rgr_select(), and rgr_selected().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rgr_selected()

◆ valid()

SWC_CAN_INLINE bool SWC::client::Query::Select::Scanner::valid ( )
inlinenoexcept

Definition at line 95 of file Scanner.h.

References selector.

Member Data Documentation

◆ col_seq

const DB::Types::KeySeq SWC::client::Query::Select::Scanner::col_seq

Definition at line 49 of file Scanner.h.

Referenced by mngr_locate_master(), next_call(), print(), and rgr_locate_master().

◆ completion

Core::CompletionCounter<uint64_t> SWC::client::Query::Select::Scanner::completion

◆ data_cid

◆ data_endpoints

Comm::EndPoints SWC::client::Query::Select::Scanner::data_endpoints

◆ data_req_base

ReqBase::Ptr SWC::client::Query::Select::Scanner::data_req_base

◆ data_rid

cid_t SWC::client::Query::Select::Scanner::data_rid

◆ interval

DB::Specs::Interval SWC::client::Query::Select::Scanner::interval

Definition at line 50 of file Scanner.h.

Referenced by next_call(), print(), rgr_locate_meta(), rgr_select(), and rgr_selected().

◆ master_cid

const cid_t SWC::client::Query::Select::Scanner::master_cid

◆ master_mngr_is_end

bool SWC::client::Query::Select::Scanner::master_mngr_is_end

Definition at line 61 of file Scanner.h.

Referenced by mngr_locate_master(), and mngr_located_master().

◆ master_mngr_next

bool SWC::client::Query::Select::Scanner::master_mngr_next

Definition at line 62 of file Scanner.h.

Referenced by mngr_locate_master(), mngr_located_master(), next_call(), and print().

◆ master_mngr_offset

DB::Cell::Key SWC::client::Query::Select::Scanner::master_mngr_offset

Definition at line 73 of file Scanner.h.

Referenced by mngr_locate_master(), and mngr_located_master().

◆ master_mngr_revision

int64_t SWC::client::Query::Select::Scanner::master_mngr_revision

Definition at line 60 of file Scanner.h.

Referenced by mngr_locate_master(), mngr_located_master(), print(), and rgr_locate_master().

◆ master_rgr_endpoints

Comm::EndPoints SWC::client::Query::Select::Scanner::master_rgr_endpoints

Definition at line 78 of file Scanner.h.

Referenced by mngr_locate_master(), mngr_located_master(), and rgr_locate_master().

◆ master_rgr_next

bool SWC::client::Query::Select::Scanner::master_rgr_next

Definition at line 64 of file Scanner.h.

Referenced by next_call(), print(), rgr_locate_master(), and rgr_located_master().

◆ master_rgr_offset

DB::Cell::Key SWC::client::Query::Select::Scanner::master_rgr_offset

Definition at line 74 of file Scanner.h.

Referenced by rgr_locate_master(), and rgr_located_master().

◆ master_rgr_req_base

ReqBase::Ptr SWC::client::Query::Select::Scanner::master_rgr_req_base

◆ master_rid

cid_t SWC::client::Query::Select::Scanner::master_rid

◆ meta_cid

const cid_t SWC::client::Query::Select::Scanner::meta_cid

◆ meta_end

DB::Cell::Key SWC::client::Query::Select::Scanner::meta_end

Definition at line 76 of file Scanner.h.

Referenced by next_call(), and rgr_located_meta().

◆ meta_endpoints

Comm::EndPoints SWC::client::Query::Select::Scanner::meta_endpoints

Definition at line 79 of file Scanner.h.

Referenced by mngr_resolve_rgr_meta(), mngr_resolved_rgr_meta(), and rgr_locate_meta().

◆ meta_next

bool SWC::client::Query::Select::Scanner::meta_next

Definition at line 65 of file Scanner.h.

Referenced by next_call(), print(), rgr_locate_meta(), and rgr_located_meta().

◆ meta_offset

DB::Cell::Key SWC::client::Query::Select::Scanner::meta_offset

Definition at line 75 of file Scanner.h.

Referenced by rgr_locate_meta(), and rgr_located_meta().

◆ meta_req_base

ReqBase::Ptr SWC::client::Query::Select::Scanner::meta_req_base

◆ meta_rid

cid_t SWC::client::Query::Select::Scanner::meta_rid

◆ need_data_cid_check

bool SWC::client::Query::Select::Scanner::need_data_cid_check

Definition at line 67 of file Scanner.h.

Referenced by rgr_located_meta().

◆ retry_point

uint8_t SWC::client::Query::Select::Scanner::retry_point

◆ selector


The documentation for this class was generated from the following files: