用户均衡负载器,此负载器适用于全部平台
更多...
#include <UserBalanceLoader.h>
|
void | master () noexcept |
|
void | slave (sese::event::EventLoop *event_loop, std::queue< SocketStatus > *master_queue, std::queue< SocketStatus > *slave_queue, std::mutex *mutex) noexcept |
|
◆ ~UserBalanceLoader()
sese::service::UserBalanceLoader::~UserBalanceLoader |
( |
| ) |
|
|
noexcept |
◆ dispatchSocket()
void sese::service::UserBalanceLoader::dispatchSocket |
( |
sese::socket_t | sock, |
|
|
void * | data ) |
◆ init() [1/2]
template<class SERVICE >
bool sese::service::UserBalanceLoader::init |
( |
| ) |
|
|
noexcept |
◆ init() [2/2]
template<class SERVICE >
bool sese::service::UserBalanceLoader::init |
( |
std::function< SERVICE *()> | creator | ) |
|
|
noexcept |
◆ isStarted()
bool sese::service::UserBalanceLoader::isStarted |
( |
| ) |
const |
|
inlinenodiscard |
◆ master()
void sese::service::UserBalanceLoader::master |
( |
| ) |
|
|
protectednoexcept |
◆ setAcceptTimeout()
void sese::service::UserBalanceLoader::setAcceptTimeout |
( |
uint32_t | to | ) |
|
|
inlinenoexcept |
◆ setAddress()
◆ setDispatchTimeout()
void sese::service::UserBalanceLoader::setDispatchTimeout |
( |
uint32_t | to | ) |
|
|
inlinenoexcept |
◆ setOnDispatchedCallbackFunction()
void sese::service::UserBalanceLoader::setOnDispatchedCallbackFunction |
( |
const std::function< void(int, sese::event::EventLoop *, void *)> & | cb | ) |
|
|
inline |
◆ setThreads()
void sese::service::UserBalanceLoader::setThreads |
( |
size_t | th | ) |
|
|
noexcept |
◆ slave()
void sese::service::UserBalanceLoader::slave |
( |
sese::event::EventLoop * | event_loop, |
|
|
std::queue< SocketStatus > * | master_queue, |
|
|
std::queue< SocketStatus > * | slave_queue, |
|
|
std::mutex * | mutex ) |
|
protectednoexcept |
◆ start()
void sese::service::UserBalanceLoader::start |
( |
| ) |
|
|
noexcept |
◆ stop()
void sese::service::UserBalanceLoader::stop |
( |
| ) |
|
|
noexcept |
◆ _isStart
std::atomic_bool sese::service::UserBalanceLoader::_isStart {false} |
|
protected |
◆ _isStop
std::atomic_bool sese::service::UserBalanceLoader::_isStop {false} |
|
protected |
◆ acceptTimeout
uint32_t sese::service::UserBalanceLoader::acceptTimeout = 100 |
|
protected |
◆ address
◆ dispatchTimeout
uint32_t sese::service::UserBalanceLoader::dispatchTimeout = 100 |
|
protected |
◆ eventLoopVector
std::vector<sese::event::EventLoop *> sese::service::UserBalanceLoader::eventLoopVector |
|
protected |
◆ masterEventLoop
◆ masterSocketQueueArray
std::queue<SocketStatus>* sese::service::UserBalanceLoader::masterSocketQueueArray {nullptr} |
|
protected |
◆ masterThread
◆ mutexArray
std::mutex* sese::service::UserBalanceLoader::mutexArray {nullptr} |
|
protected |
◆ onDispatchedCallbackFunction
std::function<void(int, sese::event::EventLoop *event_loop, void *)> sese::service::UserBalanceLoader::onDispatchedCallbackFunction |
|
protected |
◆ slaveSocketQueueArray
std::queue<SocketStatus>* sese::service::UserBalanceLoader::slaveSocketQueueArray {nullptr} |
|
protected |
◆ socket
◆ threads
size_t sese::service::UserBalanceLoader::threads {2} |
|
protected |
◆ threadVector
该类的文档由以下文件生成: