SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::client::Query::Update::Handlers::Base Class Referenceabstract

#include <swcdb/db/client/Query/Update/Handlers/Base.h>

+ Inheritance diagram for SWC::client::Query::Update::Handlers::Base:
+ Collaboration diagram for SWC::client::Query::Update::Handlers::Base:

Classes

class  Column
 

Public Types

typedef std::shared_ptr< BasePtr
 
typedef Core::Vector< Column * > Colms
 

Public Member Functions

SWC_CAN_INLINE Base (const Clients::Ptr &a_clients, Clients::Flag a_executor=Clients::Flag::DEFAULT) noexcept
 
 Base (Base &&)=delete
 
 Base (const Base &)=delete
 
Baseoperator= (const Base &)=delete
 
Baseoperator= (Base &&)=delete
 
virtual bool valid () noexcept=0
 
virtual void response (int err=Error::OK)=0
 
virtual bool requires_commit () noexcept=0
 
virtual bool empty () noexcept=0
 
virtual size_t size_bytes () noexcept=0
 
virtual void next (Colms &cols) noexcept=0
 
virtual Columnnext (cid_t cid) noexcept=0
 
virtual void error (cid_t cid, int err) noexcept=0
 
virtual int error () noexcept
 
virtual void error (int err) noexcept
 
SWC_CAN_INLINE void add_resend_count (size_t count) noexcept
 
SWC_CAN_INLINE size_t get_resend_count (bool reset=true) noexcept
 
void commit ()
 
SWC_CAN_INLINE void commit (const cid_t cid)
 
void commit (Column *colp)
 

Public Attributes

Clients::Ptr clients
 
Profiling profile
 
Core::Atomic< int > state_error
 
Core::CompletionCounter< uint64_t > completion
 
Core::Atomic< uint32_t > timeout
 
Core::Atomic< uint32_t > timeout_ratio
 
Core::Atomic< uint32_t > buff_sz
 
Core::Atomic< uint8_t > buff_ahead
 
const Clients::Flag executor
 

Protected Member Functions

virtual void _execute (Column *colp)
 
virtual ~Base () noexcept
 

Private Member Functions

void default_executor (Column *colp)
 

Private Attributes

Core::Atomic< size_t > m_resend_cells
 

Detailed Description

Definition at line 25 of file Base.h.

Member Typedef Documentation

◆ Colms

◆ Ptr

Definition at line 27 of file Base.h.

Constructor & Destructor Documentation

◆ Base() [1/3]

SWC_CAN_INLINE SWC::client::Query::Update::Handlers::Base::Base ( const Clients::Ptr a_clients,
Clients::Flag  a_executor = Clients::Flag::DEFAULT 
)
inlinenoexcept

Definition at line 122 of file Base.h.

References SWC::Core::AtomicBase< T, OrderT >::store(), and timeout_ratio.

+ Here is the call graph for this function:

◆ Base() [2/3]

SWC::client::Query::Update::Handlers::Base::Base ( Base &&  )
delete

◆ Base() [3/3]

SWC::client::Query::Update::Handlers::Base::Base ( const Base )
delete

◆ ~Base()

virtual SWC::client::Query::Update::Handlers::Base::~Base ( )
inlineprotectedvirtualnoexcept

Definition at line 206 of file Base.h.

Member Function Documentation

◆ _execute()

virtual void SWC::client::Query::Update::Handlers::Base::_execute ( Column colp)
inlineprotectedvirtual

Definition at line 202 of file Base.h.

References default_executor().

Referenced by commit().

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

◆ add_resend_count()

SWC_CAN_INLINE void SWC::client::Query::Update::Handlers::Base::add_resend_count ( size_t  count)
inlinenoexcept

Definition at line 170 of file Base.h.

References SWC::Core::Atomic< T, OrderT >::fetch_add(), and m_resend_cells.

+ Here is the call graph for this function:

◆ commit() [1/3]

void SWC::client::Query::Update::Handlers::Base::commit ( )
inline

◆ commit() [2/3]

void SWC::client::Query::Update::Handlers::Base::commit ( Column colp)
inline

Definition at line 193 of file Base.h.

References _execute(), completion, SWC::client::Query::Update::Handlers::Base::Column::empty(), SWC::Core::CompletionCounter< CountT >::increment(), and response().

+ Here is the call graph for this function:

◆ commit() [3/3]

SWC_CAN_INLINE void SWC::client::Query::Update::Handlers::Base::commit ( const cid_t  cid)
inline

Definition at line 189 of file Base.h.

References commit(), and next().

+ Here is the call graph for this function:

◆ default_executor()

void SWC::client::Query::Update::Handlers::Base::default_executor ( Column colp)
private

Definition at line 17 of file Base.cc.

References SWC::client::Clients::BROKER, SWC::client::Clients::DEFAULT, SWC::client::Query::Update::BrokerCommitter::execute(), SWC::client::Query::Update::Committer::execute(), executor, SWC::Error::INVALID_ARGUMENT, and SWC_THROWF.

Referenced by _execute().

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

◆ empty()

virtual bool SWC::client::Query::Update::Handlers::Base::empty ( )
pure virtualnoexcept

◆ error() [1/3]

◆ error() [2/3]

virtual void SWC::client::Query::Update::Handlers::Base::error ( cid_t  cid,
int  err 
)
pure virtualnoexcept

◆ error() [3/3]

virtual void SWC::client::Query::Update::Handlers::Base::error ( int  err)
inlinevirtualnoexcept

Definition at line 163 of file Base.h.

◆ get_resend_count()

SWC_CAN_INLINE size_t SWC::client::Query::Update::Handlers::Base::get_resend_count ( bool  reset = true)
inlinenoexcept

Definition at line 175 of file Base.h.

References SWC::Core::AtomicBase< T, OrderT >::exchange(), SWC::Core::AtomicBase< T, OrderT >::load(), m_resend_cells, and reset().

+ Here is the call graph for this function:

◆ next() [1/2]

virtual Column* SWC::client::Query::Update::Handlers::Base::next ( cid_t  cid)
pure virtualnoexcept

◆ next() [2/2]

virtual void SWC::client::Query::Update::Handlers::Base::next ( Colms cols)
pure virtualnoexcept

Implemented in SWC::client::Query::Update::Handlers::BaseUnorderedMap, and SWC::client::Query::Update::Handlers::BaseSingleColumn.

Referenced by commit().

+ Here is the caller graph for this function:

◆ operator=() [1/2]

Base& SWC::client::Query::Update::Handlers::Base::operator= ( Base &&  )
delete

◆ operator=() [2/2]

Base& SWC::client::Query::Update::Handlers::Base::operator= ( const Base )
delete

Referenced by SWC::client::Query::Update::Handlers::Common::response(), SWC::Ranger::Query::Update::CommonMeta::response(), and SWC::Ranger::Range::MetaRegOnLoadReq::response().

+ Here is the caller graph for this function:

◆ requires_commit()

virtual bool SWC::client::Query::Update::Handlers::Base::requires_commit ( )
pure virtualnoexcept

◆ response()

virtual void SWC::client::Query::Update::Handlers::Base::response ( int  err = Error::OK)
pure virtual

Implemented in SWC::Ranger::Range::MetaRegOnAddReq, SWC::Ranger::Range::MetaRegOnLoadReq, SWC::Ranger::Query::Update::CommonMeta, SWC::DB::RgrData::BaseUpdater, SWC::client::Query::Update::Handlers::Metric::Reporting, SWC::client::Query::Update::Handlers::Common, and SWC::Comm::Protocol::Bkr::Handler::Updater.

Referenced by commit().

+ Here is the caller graph for this function:

◆ size_bytes()

virtual size_t SWC::client::Query::Update::Handlers::Base::size_bytes ( )
pure virtualnoexcept

◆ valid()

Member Data Documentation

◆ buff_ahead

Core::Atomic<uint8_t> SWC::client::Query::Update::Handlers::Base::buff_ahead

◆ buff_sz

Core::Atomic<uint32_t> SWC::client::Query::Update::Handlers::Base::buff_sz

◆ clients

Clients::Ptr SWC::client::Query::Update::Handlers::Base::clients

◆ completion

◆ executor

const Clients::Flag SWC::client::Query::Update::Handlers::Base::executor

Definition at line 119 of file Base.h.

Referenced by default_executor(), and SWC::client::Query::Update::Handlers::Common::make().

◆ m_resend_cells

Core::Atomic<size_t> SWC::client::Query::Update::Handlers::Base::m_resend_cells
private

Definition at line 212 of file Base.h.

Referenced by add_resend_count(), and get_resend_count().

◆ profile

◆ state_error

Core::Atomic<int> SWC::client::Query::Update::Handlers::Base::state_error

◆ timeout

Core::Atomic<uint32_t> SWC::client::Query::Update::Handlers::Base::timeout

Definition at line 115 of file Base.h.

◆ timeout_ratio

Core::Atomic<uint32_t> SWC::client::Query::Update::Handlers::Base::timeout_ratio

Definition at line 116 of file Base.h.

Referenced by Base().


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