#include <LoadBalancer.h>
Public Member Functions | |
LoadBalancer (ContextPtr context) | |
void | signal_new_server () |
bool | balance_needed () |
void | unpause () |
void | create_plan (BalancePlanPtr &plan, std::vector< RangeServerConnectionPtr > &balanced) |
void | transfer_monitoring_data (vector< RangeServerStatistics > &stats) |
Private Attributes | |
std::mutex | m_mutex |
ContextPtr | m_context |
std::mutex | m_add_mutex |
Crontab | m_crontab |
time_t | m_next_balance_time_load |
time_t | m_next_balance_time_new_server |
double | m_loadavg_threshold |
uint32_t | m_new_server_balance_delay |
bool | m_new_server_added |
bool | m_enabled |
bool | m_paused |
std::vector < RangeServerStatistics > | m_statistics |
Definition at line 39 of file LoadBalancer.h.
LoadBalancer::LoadBalancer | ( | ContextPtr | context | ) |
Definition at line 34 of file LoadBalancer.cc.
bool LoadBalancer::balance_needed | ( | ) |
Definition at line 66 of file LoadBalancer.cc.
void LoadBalancer::create_plan | ( | BalancePlanPtr & | plan, |
std::vector< RangeServerConnectionPtr > & | balanced | ||
) |
Split algorithm spec into algorithm name + arguments
Definition at line 98 of file LoadBalancer.cc.
void LoadBalancer::signal_new_server | ( | ) |
Definition at line 60 of file LoadBalancer.cc.
void LoadBalancer::transfer_monitoring_data | ( | vector< RangeServerStatistics > & | stats | ) |
Definition at line 92 of file LoadBalancer.cc.
void LoadBalancer::unpause | ( | ) |
Definition at line 79 of file LoadBalancer.cc.
|
private |
Definition at line 57 of file LoadBalancer.h.
|
private |
Definition at line 56 of file LoadBalancer.h.
|
private |
Definition at line 58 of file LoadBalancer.h.
|
private |
Definition at line 64 of file LoadBalancer.h.
|
private |
Definition at line 61 of file LoadBalancer.h.
|
private |
Definition at line 55 of file LoadBalancer.h.
|
private |
Definition at line 63 of file LoadBalancer.h.
|
private |
Definition at line 62 of file LoadBalancer.h.
|
private |
Definition at line 59 of file LoadBalancer.h.
|
private |
Definition at line 60 of file LoadBalancer.h.
|
private |
Definition at line 65 of file LoadBalancer.h.
|
private |
Definition at line 66 of file LoadBalancer.h.