#include <RangeServerConnectionManager.h>
Classes | |
struct | InetAddrHash |
class | RangeServerConnectionEntry |
Private Types | |
typedef std::map< String, uint64_t > | HandleMap |
typedef boost::multi_index_container < RangeServerConnectionEntry, indexed_by< sequenced <>, hashed_unique < const_mem_fun < RangeServerConnectionEntry, const String &,&RangeServerConnectionEntry::location > >, hashed_non_unique < const_mem_fun < RangeServerConnectionEntry, const String &,&RangeServerConnectionEntry::hostname > >, hashed_unique < const_mem_fun < RangeServerConnectionEntry, InetAddr,&RangeServerConnectionEntry::public_addr > , InetAddrHash > , hashed_non_unique < const_mem_fun < RangeServerConnectionEntry, InetAddr,&RangeServerConnectionEntry::local_addr > , InetAddrHash > > > | ConnectionList |
typedef ConnectionList::nth_index < 0 >::type | Sequence |
typedef ConnectionList::nth_index < 1 >::type | LocationIndex |
typedef ConnectionList::nth_index < 2 >::type | HostnameIndex |
typedef ConnectionList::nth_index < 3 >::type | PublicAddrIndex |
typedef ConnectionList::nth_index < 4 >::type | LocalAddrIndex |
Private Member Functions | |
bool | find_server_by_location_unlocked (const String &location, RangeServerConnectionPtr &rsc) |
Private Attributes | |
std::mutex | m_mutex |
Mutex for serializing member access More... | |
ConnectionList | m_connections |
ConnectionList::iterator | m_connections_iter |
size_t | m_conn_count {} |
int32_t | m_disk_threshold {} |
Definition at line 52 of file RangeServerConnectionManager.h.
|
private |
Definition at line 123 of file RangeServerConnectionManager.h.
|
private |
Definition at line 91 of file RangeServerConnectionManager.h.
|
private |
Definition at line 127 of file RangeServerConnectionManager.h.
|
private |
Definition at line 129 of file RangeServerConnectionManager.h.
|
private |
Definition at line 126 of file RangeServerConnectionManager.h.
|
private |
Definition at line 128 of file RangeServerConnectionManager.h.
|
private |
Definition at line 125 of file RangeServerConnectionManager.h.
RangeServerConnectionManager::RangeServerConnectionManager | ( | ) |
Definition at line 34 of file RangeServerConnectionManager.cc.
void RangeServerConnectionManager::add_server | ( | RangeServerConnectionPtr & | rsc | ) |
Adds a range server connection.
rsc | RangeServer connection to add |
Definition at line 39 of file RangeServerConnectionManager.cc.
bool RangeServerConnectionManager::connect_server | ( | RangeServerConnectionPtr & | rsc, |
const String & | hostname, | ||
InetAddr | local_addr, | ||
InetAddr | public_addr | ||
) |
Definition at line 72 of file RangeServerConnectionManager.cc.
|
inline |
Definition at line 84 of file RangeServerConnectionManager.h.
bool RangeServerConnectionManager::disconnect_server | ( | RangeServerConnectionPtr & | rsc | ) |
Definition at line 133 of file RangeServerConnectionManager.cc.
bool RangeServerConnectionManager::exist_unbalanced_servers | ( | ) |
Definition at line 302 of file RangeServerConnectionManager.cc.
bool RangeServerConnectionManager::find_server_by_hostname | ( | const String & | hostname, |
RangeServerConnectionPtr & | rsc | ||
) |
Definition at line 177 of file RangeServerConnectionManager.cc.
bool RangeServerConnectionManager::find_server_by_local_addr | ( | InetAddr | addr, |
RangeServerConnectionPtr & | rsc | ||
) |
Definition at line 207 of file RangeServerConnectionManager.cc.
bool RangeServerConnectionManager::find_server_by_location | ( | const String & | location, |
RangeServerConnectionPtr & | rsc | ||
) |
Definition at line 152 of file RangeServerConnectionManager.cc.
|
private |
Definition at line 158 of file RangeServerConnectionManager.cc.
bool RangeServerConnectionManager::find_server_by_public_addr | ( | InetAddr | addr, |
RangeServerConnectionPtr & | rsc | ||
) |
Definition at line 193 of file RangeServerConnectionManager.cc.
void RangeServerConnectionManager::get_servers | ( | std::vector< RangeServerConnectionPtr > & | servers | ) |
Definition at line 275 of file RangeServerConnectionManager.cc.
void RangeServerConnectionManager::get_valid_connections | ( | StringSet & | locations, |
std::vector< RangeServerConnectionPtr > & | connections | ||
) |
Definition at line 283 of file RangeServerConnectionManager.cc.
bool RangeServerConnectionManager::is_connected | ( | const String & | location | ) |
Definition at line 143 of file RangeServerConnectionManager.cc.
bool RangeServerConnectionManager::next_available_server | ( | RangeServerConnectionPtr & | rsc, |
bool | urgent = false |
||
) |
Definition at line 224 of file RangeServerConnectionManager.cc.
bool RangeServerConnectionManager::remove_server | ( | const std::string & | location, |
RangeServerConnectionPtr & | rsc | ||
) |
Removes range server connection.
Checks if range server connection to location
exists in the live set and if so, removes it and adds location
to the dead set.
location | Proxy location of range server connection to remove |
rsc | Reference to RangeServerConnection output pointer |
rsc
populated, false otherwise. Definition at line 56 of file RangeServerConnectionManager.cc.
size_t RangeServerConnectionManager::server_count | ( | ) |
Definition at line 264 of file RangeServerConnectionManager.cc.
void RangeServerConnectionManager::set_range_server_state | ( | std::vector< RangeServerState > & | states | ) |
Definition at line 311 of file RangeServerConnectionManager.cc.
void RangeServerConnectionManager::set_servers_balanced | ( | const std::vector< RangeServerConnectionPtr > & | servers | ) |
Definition at line 296 of file RangeServerConnectionManager.cc.
|
private |
Definition at line 138 of file RangeServerConnectionManager.h.
|
private |
Definition at line 134 of file RangeServerConnectionManager.h.
|
private |
Definition at line 136 of file RangeServerConnectionManager.h.
|
private |
Definition at line 139 of file RangeServerConnectionManager.h.
|
private |
Mutex for serializing member access
Definition at line 132 of file RangeServerConnectionManager.h.