Singleton class to keep track of the number of connections per host. More...
#include <HttpConnectionCount.h>
Data Structures | |
struct | ConnAddr |
class | ConnAddrHashFns |
Public Member Functions | |
int | getCount (const IpEndpoint &addr) |
Gets the number of connections for the host. | |
void | incrementCount (const IpEndpoint &addr, const int delta=1) |
Change (increment/decrement) the connection count. | |
Static Public Member Functions | |
static ConnectionCount * | getInstance () |
Static method to get the instance of the class. |
Singleton class to keep track of the number of connections per host.
Definition at line 33 of file HttpConnectionCount.h.
int ConnectionCount::getCount | ( | const IpEndpoint & | addr | ) | [inline] |
Gets the number of connections for the host.
ip | IP address of the host |
Definition at line 49 of file HttpConnectionCount.h.
References HashMap< K, AHashFns, C, A >::get(), ink_mutex_acquire(), and ink_mutex_release().
Referenced by HttpSM::do_http_server_open(), HttpServerSession::do_io_close(), ServerSessionPool::eventHandler(), and HttpServerSession::new_connection().
static ConnectionCount* ConnectionCount::getInstance | ( | ) | [inline, static] |
Static method to get the instance of the class.
Definition at line 40 of file HttpConnectionCount.h.
Referenced by HttpSM::do_http_server_open(), and HttpServerSession::new_connection().
void ConnectionCount::incrementCount | ( | const IpEndpoint & | addr, | |
const int | delta = 1 | |||
) | [inline] |
Change (increment/decrement) the connection count.
ip | IP address of the host | |
delta | Default is +1, can be set to negative to decrement |
Definition at line 61 of file HttpConnectionCount.h.
References HashMap< K, AHashFns, C, A >::get(), ink_mutex_acquire(), ink_mutex_release(), and HashMap< K, AHashFns, C, A >::put().
Referenced by HttpServerSession::do_io_close(), and HttpServerSession::new_connection().