Data Structures | Public Member Functions | Data Fields | Static Public Attributes

HostDBContinuation Struct Reference

#include <P_HostDBProcessor.h>

Inherits Continuation.

Collaboration diagram for HostDBContinuation:
Collaboration graph
[legend]

Data Structures

struct  Options
 Optional values for init. More...

Public Member Functions

int probeEvent (int event, Event *e)
int clusterEvent (int event, Event *e)
int clusterResponseEvent (int event, Event *e)
int dnsEvent (int event, HostEnt *e)
int dnsPendingEvent (int event, Event *e)
int backgroundEvent (int event, Event *e)
int retryEvent (int event, Event *e)
int removeEvent (int event, Event *e)
int setbyEvent (int event, Event *e)
void refresh_MD5 ()
 Recompute the MD5 and update ancillary values.
void do_dns ()
bool is_byname ()
bool is_srv ()
HostDBInfolookup_done (IpAddr const &ip, char const *aname, bool round_robin, unsigned int attl, SRVHosts *s=NULL)
bool do_get_response (Event *e)
void do_put_response (ClusterMachine *m, HostDBInfo *r, Continuation *cont)
int failed_cluster_request (Event *e)
int key_partition ()
void remove_trigger_pending_dns ()
int set_check_pending_dns ()
ClusterMachinemaster_machine (ClusterConfiguration *cc)
HostDBInfoinsert (unsigned int attl)
void init (HostDBMD5 const &md5, Options const &opt=DEFAULT_OPTIONS)
int make_get_message (char *buf, int len)
int make_put_message (HostDBInfo *r, Continuation *c, char *buf, int len)
 HostDBContinuation ()

Data Fields

Action action
HostDBMD5 md5
unsigned int ttl
HostResStyle host_res_style
 Original IP address family style.
int dns_lookup_timeout
Eventtimeout
ClusterMachinefrom
Continuationfrom_cont
HostDBApplicationInfo app
int probe_depth
ClusterMachinepast_probes [CONFIGURATION_HISTORY_PROBE_DEPTH]
char md5_host_name_store [MAXDNAME+1]
char srv_target_name [MAXDNAME]
void * m_pDS
Actionpending_action
unsigned int missing:1
unsigned int force_dns:1
unsigned int round_robin:1

Static Public Attributes

static const Options DEFAULT_OPTIONS
 Default defaults.

Detailed Description

Definition at line 438 of file P_HostDBProcessor.h.


Constructor & Destructor Documentation

HostDBContinuation::HostDBContinuation (  )  [inline]

Definition at line 521 of file P_HostDBProcessor.h.

References HostDBMD5::hash, probeEvent(), and SET_HANDLER.


Member Function Documentation

int HostDBContinuation::backgroundEvent ( int  event,
Event e 
)

Definition at line 2132 of file HostDB.cc.

References hostdb_current_interval.

Referenced by HostDBProcessor::start().

int HostDBContinuation::clusterEvent ( int  event,
Event e 
)
int HostDBContinuation::clusterResponseEvent ( int  event,
Event e 
)
int HostDBContinuation::dnsEvent ( int  event,
HostEnt e 
)

Definition at line 1372 of file HostDB.cc.

References IpAddr::_family, action, MultiCacheBase::alloc(), HostDBApplicationInfo::allotment, HostDBInfo::app, HostDBApplicationInfo::application_data_allotment::application1, HostDBApplicationInfo::application_data_allotment::application2, MultiCacheHeader::buckets, Action::cancel(), Action::cancelled, check_for_retry(), cluster_machine_at_depth(), Action::continuation, HostDBRoundRobin::current, HostDBInfo::data, HostDBMD5::db_mark, Debug, do_put_response(), HostEnt::ent, EVENT_HOST_DB_LOOKUP, EVENT_INTERVAL, fold_md5(), HostDBInfo::full, HostDBRoundRobin::good, Continuation::handleEvent(), HostDBMD5::hash, SRV::host, HOST_DB_MAX_ROUND_ROBIN_INFO, HOST_DB_RETRY_PERIOD, SRV::host_len, HostDBMD5::host_name, hostdb_cont_free(), hostdb_insert_timeout, SRVHosts::hosts, HRTIME_SECONDS, HostDBRoundRobin::info, ink_assert, HostDBInfo::ip, HostDBMD5::ip, ip_addr_set(), is_addr_valid(), is_byname(), HostDBInfo::is_srv, is_srv(), SRV::key, SRVInfo::key, HostDBRoundRobin::length, MultiCacheBase::lock_for_bucket(), lookup_done(), master_hash(), HostDBInfo::md5_high, HostDBInfo::md5_low, HostDBInfo::md5_low_low, memcpy, Action::mutex, MUTEX_RETRY_DELAY, MUTEX_TRY_LOCK_FOR, HostDBApplicationInfo::application_data_rr::offset, pending_action, SRV::port, SRV::priority, probe(), probeEvent(), refresh_MD5(), remove_trigger_pending_dns(), reply_to_cont(), restore_info(), HostDBInfo::reverse_dns, HostDBInfo::round_robin, HostDBApplicationInfo::rr, HostDBInfo::rr(), HostDBRoundRobin::rrcount, EThread::schedule_in(), SET_CONTINUATION_HANDLER, SET_HANDLER, HostDBRoundRobin::size(), skip(), HostDBInfo::srv, SRVHosts::srv_host_count, HostEnt::srv_hosts, SRVHosts::srv_hosts_length, SRVInfo::srv_offset, SRVInfo::srv_port, SRVInfo::srv_priority, SRVInfo::srv_weight, HostDBInfo::srvname(), this_ethread(), ProxyMutex::thread_holding, timeout, HostEnt::ttl, ttl, Warning, and SRV::weight.

Referenced by do_dns().

int HostDBContinuation::dnsPendingEvent ( int  event,
Event e 
)
void HostDBContinuation::do_dns (  ) 
bool HostDBContinuation::do_get_response ( Event e  ) 
void HostDBContinuation::do_put_response ( ClusterMachine m,
HostDBInfo r,
Continuation cont 
)
int HostDBContinuation::failed_cluster_request ( Event e  ) 

Definition at line 2035 of file HostDB.cc.

References action, Action::cancelled, do_dns(), do_get_response(), and hostdb_cont_free().

Referenced by clusterEvent().

void HostDBContinuation::init ( HostDBMD5 const &  md5,
Options const &  opt = DEFAULT_OPTIONS 
)
HostDBInfo * HostDBContinuation::insert ( unsigned int  attl  ) 
bool HostDBContinuation::is_byname (  )  [inline]

Definition at line 481 of file P_HostDBProcessor.h.

References HostDBMD5::db_mark, and HOSTDB_MARK_IPV4.

Referenced by dnsEvent(), do_dns(), and lookup_done().

bool HostDBContinuation::is_srv (  )  [inline]

Definition at line 485 of file P_HostDBProcessor.h.

References HostDBMD5::db_mark.

Referenced by dnsEvent(), do_dns(), lookup_done(), and setbyEvent().

int HostDBContinuation::key_partition (  )  [inline]
HostDBInfo * HostDBContinuation::lookup_done ( IpAddr const &  ip,
char const *  aname,
bool  round_robin,
unsigned int  attl,
SRVHosts s = NULL 
)
int HostDBContinuation::make_get_message ( char *  buf,
int  len 
)
int HostDBContinuation::make_put_message ( HostDBInfo r,
Continuation c,
char *  buf,
int  len 
)
ClusterMachine * HostDBContinuation::master_machine ( ClusterConfiguration cc  ) 

Definition at line 2221 of file HostDB.cc.

References HostDBMD5::hash, and ClusterConfiguration::machine_hash().

int HostDBContinuation::probeEvent ( int  event,
Event e 
)
void HostDBContinuation::refresh_MD5 (  ) 

Recompute the MD5 and update ancillary values.

Definition at line 522 of file HostDB.cc.

References MultiCacheHeader::buckets, fold_md5(), HostDBMD5::hash, MultiCacheBase::lock_for_bucket(), md5, Continuation::mutex, HostDBMD5::refresh(), and remove_trigger_pending_dns().

Referenced by dnsEvent().

void HostDBContinuation::remove_trigger_pending_dns (  ) 
int HostDBContinuation::removeEvent ( int  event,
Event e 
)
int HostDBContinuation::retryEvent ( int  event,
Event e 
)
int HostDBContinuation::set_check_pending_dns (  ) 
int HostDBContinuation::setbyEvent ( int  event,
Event e 
)

Field Documentation

Default defaults.

Definition at line 515 of file P_HostDBProcessor.h.

Definition at line 449 of file P_HostDBProcessor.h.

Referenced by init().

Definition at line 465 of file P_HostDBProcessor.h.

Referenced by probeEvent().

Original IP address family style.

Note this will disagree with md5.db_mark when doing a retry on an alternate family. The retry logic depends on it to avoid looping. Address family priority.

Definition at line 448 of file P_HostDBProcessor.h.

Referenced by init().

Definition at line 461 of file P_HostDBProcessor.h.

Definition at line 459 of file P_HostDBProcessor.h.

Referenced by init(), and lookup_done().

Definition at line 464 of file P_HostDBProcessor.h.

Referenced by clusterResponseEvent(), and put_hostinfo_ClusterFunction().

ClusterMachine* HostDBContinuation::past_probes[CONFIGURATION_HISTORY_PROBE_DEPTH]

Definition at line 456 of file P_HostDBProcessor.h.

Referenced by do_get_response().

Definition at line 462 of file P_HostDBProcessor.h.

Referenced by dnsEvent(), do_dns(), and hostdb_cont_free().

Definition at line 455 of file P_HostDBProcessor.h.

Referenced by do_get_response().

Definition at line 466 of file P_HostDBProcessor.h.

Referenced by clusterResponseEvent(), and put_hostinfo_ClusterFunction().

Definition at line 460 of file P_HostDBProcessor.h.

Referenced by HostDBProcessor::setby_srv().

Definition at line 451 of file P_HostDBProcessor.h.

Referenced by clusterEvent(), dnsEvent(), dnsPendingEvent(), do_dns(), and do_get_response().


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