acl  3.5.3.0
acl::tcp_manager类 参考

#include <tcp_manager.hpp>

+ 类 acl::tcp_manager 继承关系图:
+ acl::tcp_manager 的协作图:

Public 成员函数

 tcp_manager (void)
 
virtual ~tcp_manager (void)
 
- Public 成员函数 继承自 acl::connect_manager
 connect_manager (void)
 
virtual ~connect_manager (void)
 
void bind_thread (bool yes)
 
void init (const char *default_addr, const char *addr_list, size_t count, int conn_timeout=30, int rw_timeout=30)
 
void set (const char *addr, size_t count, int conn_timeout=30, int rw_timeout=30)
 
const conn_configget_config (const char *addr, bool use_first=false)
 
void set_retry_inter (int n)
 
void set_idle_ttl (time_t ttl)
 
void set_check_inter (int n)
 
void remove (const char *addr)
 
connect_poolget (const char *addr, bool exclusive=true, bool restore=false)
 
virtual connect_poolpeek (void)
 
virtual connect_poolpeek (const char *key, bool exclusive=true)
 
void lock (void)
 
void unlock (void)
 
std::vector< connect_pool * > & get_pools (void)
 
size_t check_idle (size_t step, size_t *left=NULL)
 
size_t size (void) const
 
connect_poolget_default_pool (void)
 
void statistics (void)
 
bool start_monitor (connect_monitor *monitor)
 
connect_monitorstop_monitor (bool graceful=true)
 
void set_pools_status (const char *addr, bool alive)
 

Protected 成员函数

virtual connect_poolcreate_pool (const char *, size_t, size_t)
 
- Protected 成员函数 继承自 acl::connect_manager
void set_service_list (const char *addr_list, int count, int conn_timeout, int rw_timeout)
 
conns_poolsget_pools_by_id (unsigned long id)
 
connect_poolcreate_pool (const conn_config &cf, size_t idx)
 
void create_pools_for (pools_t &pools)
 
void remove (pools_t &pools, const char *addr)
 
void set_status (pools_t &pools, const char *addr, bool alive)
 
unsigned long get_id (void) const
 
void get_key (const char *addr, string &key)
 
void get_addr (const char *key, string &addr)
 
connect_pooladd_pool (const char *addr)
 
- Protected 成员函数 继承自 acl::acl::noncopyable
 noncopyable ()
 
 ~noncopyable ()
 

额外继承的成员函数

- Protected 类型 继承自 acl::connect_manager
typedef std::vector< connect_pool * > pools_t
 
typedef pools_t::iterator pools_it
 
typedef pools_t::const_iterator pools_cit
 
typedef std::map< unsigned long, conns_pools * > manager_t
 
typedef manager_t::iterator manager_it
 
typedef manager_t::const_iterator manager_cit
 
- 静态 Protected 成员函数 继承自 acl::connect_manager
static void thread_oninit (void)
 
static void thread_onexit (void *ctx)
 
- Protected 属性 继承自 acl::connect_manager
bool thread_binding_
 
string default_addr_
 
connect_pooldefault_pool_
 
std::map< string, conn_configaddrs_
 
manager_t manager_
 
locker lock_
 
int stat_inter_
 
int retry_inter_
 
time_t idle_ttl_
 
int check_inter_
 
connect_monitormonitor_
 

详细描述

在文件 tcp_manager.hpp10 行定义.

构造及析构函数说明

◆ tcp_manager()

acl::tcp_manager::tcp_manager ( void  )

◆ ~tcp_manager()

virtual acl::tcp_manager::~tcp_manager ( void  )
virtual

成员函数说明

◆ create_pool()

virtual connect_pool* acl::tcp_manager::create_pool ( const char *  ,
size_t  ,
size_t   
)
protectedvirtual

该类的文档由以下文件生成: