Public Member Functions | Data Fields

CongestionEntry Struct Reference

#include <Congestion.h>

Inherits RequestData.

Collaboration diagram for CongestionEntry:
Collaboration graph
[legend]

Public Member Functions

 CongestionEntry (const char *hostname, sockaddr const *ip, CongestionControlRecord *rule, uint64_t key)
 CongestionEntry ()
virtual ~CongestionEntry ()
virtual char * get_string ()
virtual const char * get_host ()
virtual sockaddr const * get_ip ()
virtual const sockaddr * get_client_ip ()
virtual RD_Type data_type (void)
int sprint (char *buf, int buflen, int format=0)
void get ()
void put ()
bool F_congested ()
bool M_congested (ink_hrtime t)
bool congested ()
void go_alive ()
void failed_at (ink_hrtime t)
void connection_opened ()
void connection_closed ()
bool proxy_retry (ink_hrtime t)
int client_retry_after ()
int connect_retries ()
int connect_timeout ()
char * getErrorPage ()
void stat_inc_F ()
void stat_inc_M ()
void clearFailHistory ()
bool compCongested ()
bool usefulInfo (ink_hrtime t)
bool validate ()
void applyNewRule (CongestionControlRecord *rule)
void init (CongestionControlRecord *rule)

Data Fields

uint64_t m_key
IpEndpoint m_ip
char * m_hostname
CongestionControlRecordpRecord
FailHistory m_history
Ptr< ProxyMutexm_hist_lock
ink_hrtime m_last_congested
volatile int m_congested
int m_stat_congested_conn_failures
volatile int m_M_congested
ink_hrtime m_last_M_congested
int m_num_connections
int m_stat_congested_max_conn
int m_ref_count

Detailed Description

Definition at line 199 of file Congestion.h.


Constructor & Destructor Documentation

CongestionEntry::CongestionEntry ( const char *  hostname,
sockaddr const *  ip,
CongestionControlRecord rule,
uint64_t  key 
)
CongestionEntry::CongestionEntry (  )  [inline]

Definition at line 411 of file Congestion.h.

References m_hist_lock, m_ip, and new_ProxyMutex().

CongestionEntry::~CongestionEntry (  )  [inline, virtual]

Definition at line 422 of file Congestion.h.

References ats_free(), m_hist_lock, and m_hostname.


Member Function Documentation

void CongestionEntry::applyNewRule ( CongestionControlRecord rule  ) 
void CongestionEntry::clearFailHistory (  )  [inline]

Definition at line 405 of file Congestion.h.

References FailHistory::init(), m_congested, and m_history.

Referenced by CongestionEntry(), and init().

int CongestionEntry::client_retry_after (  )  [inline]
bool CongestionEntry::compCongested (  )  [inline]

Definition at line 378 of file Congestion.h.

References FailHistory::events, m_congested, and m_history.

Referenced by failed_at().

bool CongestionEntry::congested (  )  [inline]

Definition at line 340 of file Congestion.h.

References F_congested(), and m_M_congested.

Referenced by get_congest_list(), and CongestionDBCont::get_congest_list().

int CongestionEntry::connect_retries (  )  [inline]

Definition at line 346 of file Congestion.h.

References F_congested().

Referenced by HttpTransact::handle_response_from_server().

int CongestionEntry::connect_timeout (  )  [inline]

Definition at line 356 of file Congestion.h.

References F_congested().

Referenced by HttpSM::attach_server_session(), and HttpSM::do_http_server_open().

void CongestionEntry::connection_closed (  )  [inline]

Definition at line 396 of file Congestion.h.

References m_M_congested, and m_num_connections.

Referenced by HttpTransact::State::destroy().

void CongestionEntry::connection_opened (  )  [inline]
virtual RD_Type CongestionEntry::data_type ( void   )  [inline, virtual]

Reimplemented from RequestData.

Definition at line 249 of file Congestion.h.

bool CongestionEntry::F_congested (  )  [inline]
void CongestionEntry::failed_at ( ink_hrtime  t  ) 
void CongestionEntry::get ( void   )  [inline]

Definition at line 432 of file Congestion.h.

References m_ref_count.

Referenced by CongestionDB::addRecord(), and get_congest_entry().

virtual const sockaddr* CongestionEntry::get_client_ip (  )  [inline, virtual]

Implements RequestData.

Definition at line 245 of file Congestion.h.

virtual const char* CongestionEntry::get_host (  )  [inline, virtual]

Implements RequestData.

Definition at line 237 of file Congestion.h.

References m_hostname.

virtual sockaddr const* CongestionEntry::get_ip (  )  [inline, virtual]

Implements RequestData.

Definition at line 241 of file Congestion.h.

References m_ip, and IpEndpoint::sa.

virtual char* CongestionEntry::get_string (  )  [inline, virtual]

Implements RequestData.

Definition at line 233 of file Congestion.h.

char* CongestionEntry::getErrorPage (  )  [inline]

Definition at line 278 of file Congestion.h.

Referenced by HttpTransact::handle_server_died().

void CongestionEntry::go_alive (  ) 

Definition at line 726 of file Congestion.cc.

References m_congested.

Referenced by HttpSM::kill_this().

void CongestionEntry::init ( CongestionControlRecord rule  ) 
bool CongestionEntry::M_congested ( ink_hrtime  t  )  [inline]

Definition at line 328 of file Congestion.h.

References m_last_M_congested, m_M_congested, and m_num_connections.

Referenced by HttpSM::do_http_server_open().

bool CongestionEntry::proxy_retry ( ink_hrtime  t  )  [inline]

Definition at line 318 of file Congestion.h.

References ink_hrtime_to_sec(), FailHistory::last_event, and m_history.

Referenced by HttpSM::do_http_server_open().

void CongestionEntry::put (  )  [inline]
int CongestionEntry::sprint ( char *  buf,
int  buflen,
int  format = 0 
)
void CongestionEntry::stat_inc_F (  )  [inline]
void CongestionEntry::stat_inc_M (  )  [inline]

Definition at line 373 of file Congestion.h.

References m_stat_congested_max_conn.

Referenced by HttpSM::do_http_server_open().

bool CongestionEntry::usefulInfo ( ink_hrtime  t  )  [inline]
bool CongestionEntry::validate (  ) 

Field Documentation

Definition at line 213 of file Congestion.h.

Referenced by CongestionEntry(), failed_at(), and ~CongestionEntry().

Definition at line 205 of file Congestion.h.

Referenced by CongestionEntry(), get_host(), sprint(), validate(), and ~CongestionEntry().

Definition at line 204 of file Congestion.h.

Referenced by CongestionEntry(), get_ip(), sprint(), and validate().

Definition at line 214 of file Congestion.h.

Referenced by failed_at(), and sprint().

Definition at line 219 of file Congestion.h.

Referenced by M_congested().

Definition at line 218 of file Congestion.h.

Referenced by applyNewRule(), congested(), connection_closed(), init(), and M_congested().

Definition at line 216 of file Congestion.h.

Referenced by sprint(), and stat_inc_F().

Definition at line 223 of file Congestion.h.

Referenced by sprint(), and stat_inc_M().

Definition at line 209 of file Congestion.h.

Referenced by get_congest_list(), and CongestionDBCont::get_congest_list().


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