|
SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
|
Go to the documentation of this file.
6 #ifndef swcdb_core_comm_ClientConnQueue_h
7 #define swcdb_core_comm_ClientConnQueue_h
13 #include <unordered_set>
16 namespace SWC {
namespace Comm {
namespace client {
25 typedef std::shared_ptr<ConnQueueReqBase>
Ptr;
31 :
cbp(std::move(a_cbp)),
queue(
nullptr) { }
36 :
cbp(std::move(a_cbp)),
queue(a_queue) { }
40 return std::dynamic_pointer_cast<ConnQueueReqBase>(shared_from_this());
43 virtual bool insistent() noexcept {
return false; };
47 void print(std::ostream& out);
58 private std::queue<ConnQueueReqBase::Ptr>,
59 public std::enable_shared_from_this<ConnQueue> {
74 ? new asio::high_resolution_timer(
m_ioctx->executor())
106 void print(std::ostream& out);
127 std::unordered_set<asio::high_resolution_timer*>
m_delayed;
137 #ifdef SWC_IMPL_SOURCE
142 #endif // swcdb_core_comm_ClientConnQueue_h
std::unordered_set< asio::high_resolution_timer * > m_delayed
ConnQueue(const ConnQueue &)=delete
EndPoint get_endpoint_remote() noexcept
SWC_CAN_INLINE Ptr req() noexcept
std::shared_ptr< Buffers > Ptr
asio::ip::tcp::endpoint EndPoint
void set(const ConnHandlerPtr &conn)
std::shared_ptr< IoContext > IoContextPtr
virtual ~ConnQueueReqBase() noexcept
void print(std::ostream &out)
The SWC-DB C++ namespace 'SWC'.
const Config::Property::Value_int32_g::Ptr cfg_again_delay_ms
void put(const ReqBase::Ptr &req)
SWC_CAN_INLINE ConnQueueReqBase(Buffers::Ptr &&a_cbp) noexcept
asio::high_resolution_timer * m_timer
Core::StateRunning m_q_state
void schedule_close(bool closing)
void delay(ReqBase::Ptr &&req)
EndPoint get_endpoint_local() noexcept
std::shared_ptr< ConnHandler > ConnHandlerPtr
void print(std::ostream &out)
virtual void close_issued()
ConnQueue(ConnQueue &&)=delete
SWC_CAN_INLINE ConnQueue(const IoContextPtr &ioctx, const Config::Property::Value_int32_g::Ptr keepalive_ms=nullptr, const Config::Property::Value_int32_g::Ptr again_delay_ms=nullptr)
SWC_CAN_INLINE ConnQueueReqBase(Buffers::Ptr &&a_cbp, const ConnQueuePtr &a_queue) noexcept
virtual ~ConnQueue() noexcept
std::shared_ptr< ConnQueueReqBase > Ptr
ConnQueue & operator=(const ConnQueue &)=delete
virtual bool insistent() noexcept
ConnQueue & operator=(ConnQueue &&)=delete
const Config::Property::Value_int32_g::Ptr cfg_keepalive_ms
std::shared_ptr< ConnQueue > ConnQueuePtr