0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
Hypertable::LoadBalancer Class Reference

#include <LoadBalancer.h>

Collaboration diagram for Hypertable::LoadBalancer:
Collaboration graph
[legend]

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
 

Detailed Description

Definition at line 39 of file LoadBalancer.h.

Constructor & Destructor Documentation

LoadBalancer::LoadBalancer ( ContextPtr  context)

Definition at line 34 of file LoadBalancer.cc.

Member Function Documentation

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.

Member Data Documentation

std::mutex Hypertable::LoadBalancer::m_add_mutex
private

Definition at line 57 of file LoadBalancer.h.

ContextPtr Hypertable::LoadBalancer::m_context
private

Definition at line 56 of file LoadBalancer.h.

Crontab Hypertable::LoadBalancer::m_crontab
private

Definition at line 58 of file LoadBalancer.h.

bool Hypertable::LoadBalancer::m_enabled
private

Definition at line 64 of file LoadBalancer.h.

double Hypertable::LoadBalancer::m_loadavg_threshold
private

Definition at line 61 of file LoadBalancer.h.

std::mutex Hypertable::LoadBalancer::m_mutex
private

Definition at line 55 of file LoadBalancer.h.

bool Hypertable::LoadBalancer::m_new_server_added
private

Definition at line 63 of file LoadBalancer.h.

uint32_t Hypertable::LoadBalancer::m_new_server_balance_delay
private

Definition at line 62 of file LoadBalancer.h.

time_t Hypertable::LoadBalancer::m_next_balance_time_load
private

Definition at line 59 of file LoadBalancer.h.

time_t Hypertable::LoadBalancer::m_next_balance_time_new_server
private

Definition at line 60 of file LoadBalancer.h.

bool Hypertable::LoadBalancer::m_paused
private

Definition at line 65 of file LoadBalancer.h.

std::vector<RangeServerStatistics> Hypertable::LoadBalancer::m_statistics
private

Definition at line 66 of file LoadBalancer.h.


The documentation for this class was generated from the following files: