System Balance Loader (non-user scheduled loader)
More...
#include <SystemBalanceLoader.h>
System Balance Loader (non-user scheduled loader)
- Warning
- This loader is effective only on Linux
- See also
- sese::service::BalanceLoader
◆ ~SystemBalanceLoader()
sese::service::SystemBalanceLoader::~SystemBalanceLoader |
( |
| ) |
|
|
noexcept |
◆ init() [1/2]
template<class SERVICE >
bool sese::service::SystemBalanceLoader::init |
( |
| ) |
|
|
noexcept |
Initialize loader resources
- Template Parameters
-
SERVICE | The service to be started |
- Returns
- Whether the initialization was successful
References init().
Referenced by init().
◆ init() [2/2]
template<class SERVICE >
bool sese::service::SystemBalanceLoader::init |
( |
std::function< SERVICE *()> | creator | ) |
|
|
noexcept |
◆ isStarted()
bool sese::service::SystemBalanceLoader::isStarted |
( |
| ) |
const |
|
inlinenodiscard |
Get the current loader status
- Returns
- The status of the loader
References _isStart.
◆ setAcceptTimeout()
void sese::service::SystemBalanceLoader::setAcceptTimeout |
( |
uint32_t | to | ) |
|
|
inlinenoexcept |
Set the timeout for dispatching from threads
- Parameters
-
to | Timeout in milliseconds |
References timeout.
◆ setAddress()
Set the service startup address
- Parameters
-
References address.
◆ setDispatchTimeout()
void sese::service::SystemBalanceLoader::setDispatchTimeout |
( |
uint32_t | to | ) |
|
|
inlinenoexcept |
Set the timeout for dispatching from threads
- Parameters
-
to | Timeout in milliseconds |
References timeout.
◆ setThreads()
void sese::service::SystemBalanceLoader::setThreads |
( |
size_t | th | ) |
|
|
noexcept |
Set the number of threads used by the loader
- Parameters
-
◆ start()
void sese::service::SystemBalanceLoader::start |
( |
| ) |
|
|
noexcept |
Start the current loader and service.
◆ stop()
void sese::service::SystemBalanceLoader::stop |
( |
| ) |
|
|
noexcept |
◆ _isStart
std::atomic_bool sese::service::SystemBalanceLoader::_isStart {false} |
|
protected |
◆ _isStop
std::atomic_bool sese::service::SystemBalanceLoader::_isStop {false} |
|
protected |
◆ address
◆ eventLoopVector
std::vector<event::EventLoop *> sese::service::SystemBalanceLoader::eventLoopVector |
|
protected |
◆ socketVector
std::vector<socket_t> sese::service::SystemBalanceLoader::socketVector |
|
protected |
◆ threads
size_t sese::service::SystemBalanceLoader::threads {2} |
|
protected |
◆ threadVector
◆ timeout
uint32_t sese::service::SystemBalanceLoader::timeout = 100 |
|
protected |
The documentation for this class was generated from the following files: