#include <swcdb/db/Protocol/Mngr/req/MngrActive.h>
Public Types | |
typedef std::shared_ptr< MngrActive > | Ptr |
Public Types inherited from SWC::Comm::client::ConnQueueReqBase | |
typedef std::shared_ptr< ConnQueueReqBase > | Ptr |
Public Types inherited from SWC::Comm::DispatchHandler | |
typedef std::shared_ptr< DispatchHandler > | Ptr |
Public Member Functions | |
SWC_CAN_INLINE | MngrActive (const SWC::client::Clients::Ptr &a_clients, const uint8_t &a_role, const cid_t &a_cid, const DispatchHandler::Ptr &a_hdlr, uint32_t a_timeout_ms) |
virtual | ~MngrActive () noexcept |
void | run_within (uint32_t t_ms=1000) |
void | handle_no_conn () override |
bool | run () override |
void | handle (ConnHandlerPtr conn, const Event::Ptr &ev) override |
Public Member Functions inherited from SWC::Comm::client::ConnQueueReqBase | |
SWC_CAN_INLINE | ConnQueueReqBase (Buffers::Ptr &&a_cbp) noexcept |
SWC_CAN_INLINE | ConnQueueReqBase (Buffers::Ptr &&a_cbp, const ConnQueuePtr &a_queue) noexcept |
SWC_CAN_INLINE Ptr | req () noexcept |
virtual bool | insistent () noexcept |
void | request_again () |
void | print (std::ostream &out) |
Public Member Functions inherited from SWC::Comm::DispatchHandler | |
virtual bool | valid () |
Static Public Member Functions | |
static SWC_CAN_INLINE Ptr | make (const SWC::client::Clients::Ptr &clients, const cid_t &a_cid, const DispatchHandler::Ptr &hdlr, uint32_t timeout_ms=60000) |
static SWC_CAN_INLINE Ptr | make (const SWC::client::Clients::Ptr &clients, const uint8_t &a_role, const DispatchHandler::Ptr &hdlr, uint32_t timeout_ms=60000) |
Protected Attributes | |
const uint32_t | timeout_ms |
Private Attributes | |
SWC::client::Clients::Ptr | clients |
const uint8_t | role |
const cid_t | cid |
DispatchHandler::Ptr | hdlr |
size_t | nxt |
SWC::client::Mngr::Hosts | hosts |
SWC::client::Mngr::Groups::GroupHost | group_host |
asio::high_resolution_timer | timer |
Additional Inherited Members | |
Public Attributes inherited from SWC::Comm::client::ConnQueueReqBase | |
Buffers::Ptr | cbp |
ConnQueuePtr | queue |
Protected Member Functions inherited from SWC::Comm::client::ConnQueueReqBase | |
virtual | ~ConnQueueReqBase () noexcept |
Protected Member Functions inherited from SWC::Comm::DispatchHandler | |
virtual | ~DispatchHandler () noexcept |
Definition at line 20 of file MngrActive.h.
typedef std::shared_ptr<MngrActive> SWC::Comm::Protocol::Mngr::Req::MngrActive::Ptr |
Definition at line 22 of file MngrActive.h.
|
inline |
Definition at line 41 of file MngrActive.h.
Referenced by make().
|
inlinevirtualnoexcept |
Definition at line 58 of file MngrActive.h.
|
overridevirtual |
Implements SWC::Comm::DispatchHandler.
Definition at line 77 of file MngrActive.cc.
References clients, SWC::Comm::Serializable::decode(), SWC::client::Mngr::Groups::GroupHost::endpoints, SWC::Comm::Protocol::Mngr::Params::MngrActiveRsp::endpoints, group_host, hdlr, run_within(), SWC::Core::Vector< T, SizeT, GROW_SZ >::size(), and SWC_LOG_CURRENT_EXCEPTION.
|
overridevirtual |
Implements SWC::Comm::DispatchHandler.
Definition at line 43 of file MngrActive.cc.
References cid, SWC::Core::Vector< T, SizeT, GROW_SZ >::clear(), clients, hdlr, hosts, SWC::LOG_DEBUG, nxt, role, run(), run_within(), SWC::Core::Vector< T, SizeT, GROW_SZ >::size(), SWC_FMT_LU, SWC_LOGF, and SWC::Core::type_name().
|
inlinestatic |
Definition at line 25 of file MngrActive.h.
References clients, SWC::DB::Types::MngrRole::COLUMNS, hdlr, MngrActive(), and timeout_ms.
Referenced by SWC::client::Managers::put(), SWC::client::Managers::put_role_schemas(), SWC::Comm::Protocol::Mngr::Req::ColumnStatus::run(), SWC::Comm::Protocol::Mngr::Req::RangersStatus::run(), SWC::Comm::Protocol::Mngr::Req::ManagersStatus::run(), and SWC::Comm::Protocol::Mngr::Req::RgrMngId::run().
|
inlinestatic |
Definition at line 33 of file MngrActive.h.
References clients, hdlr, MngrActive(), SWC::DB::SchemaPrimitives::NO_CID, and timeout_ms.
|
overridevirtual |
Reimplemented from SWC::Comm::DispatchHandler.
Definition at line 60 of file MngrActive.cc.
References cid, clients, SWC::Core::Vector< T, SizeT, GROW_SZ >::empty(), group_host, hdlr, hosts, SWC::LOG_WARN, nxt, SWC::Comm::client::ConnQueueReqBase::req(), role, run_within(), SWC::Core::Vector< T, SizeT, GROW_SZ >::size(), SWC_FMT_LU, SWC_LOGF, and SWC::Core::type_name().
Referenced by handle_no_conn().
void SWC::Comm::Protocol::Mngr::Req::MngrActive::run_within | ( | uint32_t | t_ms = 1000 | ) |
Definition at line 15 of file MngrActive.cc.
References clients, hdlr, SWC_CAN_INLINE, and timer.
Referenced by handle(), handle_no_conn(), and run().
|
private |
Definition at line 71 of file MngrActive.h.
Referenced by handle_no_conn(), and run().
|
private |
Definition at line 69 of file MngrActive.h.
Referenced by handle(), handle_no_conn(), make(), run(), and run_within().
|
private |
Definition at line 75 of file MngrActive.h.
|
private |
Definition at line 72 of file MngrActive.h.
Referenced by handle(), handle_no_conn(), make(), run(), and run_within().
|
private |
Definition at line 74 of file MngrActive.h.
Referenced by handle_no_conn(), and run().
|
private |
Definition at line 73 of file MngrActive.h.
Referenced by handle_no_conn(), and run().
|
private |
Definition at line 70 of file MngrActive.h.
Referenced by handle_no_conn(), and run().
|
protected |
Definition at line 79 of file MngrActive.h.
Referenced by make().
|
private |
Definition at line 76 of file MngrActive.h.
Referenced by run_within().