信道管理类 更多...
#include <channel.hpp>
Public 类型 | |
| using | ptr = std::shared_ptr< ChannelManager > |
| 信道管理句柄 | |
| using | ptr = std::shared_ptr< ChannelManager > |
| 信道管理句柄 | |
Public 成员函数 | |
| ChannelManager () | |
| 构造函数 | |
| Channel::ptr | create (const muduo::net::TcpConnectionPtr &conn, const ProtobufCodecPtr &codec) |
| 新建一个信道 | |
| void | remove (const std::string &cid) |
| 移除一个信道 | |
| Channel::ptr | get (const std::string &cid) |
| 获取一个信道 | |
| ChannelManager () | |
| 构造函数 | |
| bool | openChannel (const std::string &id, const VirtualHost::ptr &host, const ConsumerManager::ptr &cmp, const ProtobufCodecPtr &codec, const muduo::net::TcpConnectionPtr &conn, const threadpool::ptr &pool) |
| 打开一个信道 | |
| void | closeChannel (const std::string &id) |
| 关闭信道 | |
| Channel::ptr | getChannel (const std::string &id) |
| 获取信道句柄 | |
Private 属性 | |
| std::mutex | _mutex |
| 互斥锁 | |
| std::unordered_map< std::string, Channel::ptr > | _channels |
| 信道id和信道句柄的映射表 | |
信道管理类
| using XuMQ::ChannelManager::ptr = std::shared_ptr<ChannelManager> |
信道管理句柄
| using XuMQ::ChannelManager::ptr = std::shared_ptr<ChannelManager> |
信道管理句柄
|
inline |
构造函数
|
inline |
构造函数
|
inline |
关闭信道
| id | 信道id |
|
inline |
新建一个信道
| conn | muduo连接句柄 |
| codec | 协议解析句柄 |
|
inline |
获取一个信道
| cid | 信道id |
|
inline |
获取信道句柄
| id | 信道id |
|
inline |
打开一个信道
| id | 信道id |
| host | 虚拟机 |
| cmp | 消费者管理句柄 |
| codec | 协议处理句柄 |
| conn | muduo连接管理句柄 |
| pool | 线程池管理句柄 |
|
inline |
移除一个信道
| cid | 信道id |
|
private |
信道id和信道句柄的映射表
信道id到信道管理句柄的映射表
|
private |
互斥锁