#include <PeerSelectState.h>

Inheritance diagram for ps_state:
Collaboration diagram for ps_state:

Public Member Functions

 ps_state (PeerSelectionInitiator *initiator)
 
virtual ~ps_state () override
 
virtual void noteIp (const Ip::Address &ip) override
 Called when/if nbgethostbyname() discovers a new good IP address. More...
 
virtual void noteIps (const Dns::CachedIps *ips, const Dns::LookupDetails &details) override
 
virtual void noteLookup (const Dns::LookupDetails &details) override
 
const SBuf url () const
 
PeerSelectionInitiatorinterestedInitiator ()
 
bool wantsMoreDestinations () const
 
void handlePath (Comm::ConnectionPointer &path, FwdServer &fs)
 processes a newly discovered/finalized path More...
 
virtual void * toCbdata ()=0
 

Public Attributes

HttpRequestrequest
 
AccessLogEntry::Pointer al
 info for the future access.log entry More...
 
StoreEntryentry
 
allow_t always_direct
 
allow_t never_direct
 
int direct
 
size_t foundPaths = 0
 number of unique destinations identified so far More...
 
void * peerCountMcastPeerXXX = nullptr
 a hack to help peerCountMcastPeersStart() More...
 
ErrorStatelastError
 
FwdServerservers
 temporary linked list of peers we will pass back. More...
 
Ip::Address first_parent_miss
 
Ip::Address closest_parent_miss
 
CachePeerhit
 
peer_t hit_type
 
ping_data ping
 
ACLChecklistacl_checklist
 
const InstanceId< ps_stateid
 unique identification in worker log More...
 

Private Types

typedef CbcPointer
< PeerSelectionInitiator
Initiator
 

Private Member Functions

 CBDATA_CHILD (ps_state)
 

Private Attributes

Initiator initiator_
 recipient of the destinations we select; use interestedInitiator() to access More...
 

Detailed Description

Definition at line 54 of file PeerSelectState.h.

Member Typedef Documentation

Definition at line 116 of file PeerSelectState.h.

Constructor & Destructor Documentation

ps_state::ps_state ( PeerSelectionInitiator initiator)
explicit

Definition at line 941 of file peer_select.cc.

Member Function Documentation

ps_state::CBDATA_CHILD ( ps_state  )
private
PeerSelectionInitiator * ps_state::interestedInitiator ( )
Returns
valid/interested peer initiator or nil

Definition at line 974 of file peer_select.cc.

References debugs, initiator_, and CbcPointer< Cbc >::valid().

Referenced by handlePath(), peerSelectDnsPaths(), and peerSelectionAborted().

void ps_state::noteIps ( const Dns::CachedIps ips,
const Dns::LookupDetails details 
)
overridevirtual

Called when nbgethostbyname() fully resolves the name. The ips may contain both bad and good IP addresses, but each good IP (if any) is guaranteed to had been previously reported via noteIp().

Implements Dns::IpReceiver.

Definition at line 364 of file peer_select.cc.

References FwdServer::_peer, FwdServer::code, debugs, ErrorState::dnsError, ERR_DNS_FAIL, Dns::LookupDetails::error, HIER_DIRECT, CachePeer::host, URL::host(), lastError, FwdServer::next, NULL, peerSelectDnsPaths(), peerSelectionAborted(), request, Http::scServiceUnavailable, servers, HttpRequest::url, and CbcPointer< Cbc >::valid().

void ps_state::noteLookup ( const Dns::LookupDetails )
overridevirtual

Called when/if nbgethostbyname() completes a single DNS lookup if called, called before all the noteIp() calls for that DNS lookup.

Reimplemented from Dns::IpReceiver.

Definition at line 327 of file peer_select.cc.

References peerSelectionAborted(), HttpRequest::recordLookup(), request, and wantsMoreDestinations().

virtual void* CbdataParent::toCbdata ( )
pure virtualinherited
bool ps_state::wantsMoreDestinations ( ) const
Returns
whether the initiator may use more destinations

Definition at line 993 of file peer_select.cc.

References Config, SquidConfig::forward_max_tries, foundPaths, and type.

Referenced by noteIp(), noteLookup(), and peerSelectDnsPaths().

Member Data Documentation

ACLChecklist* ps_state::acl_checklist

Definition at line 81 of file PeerSelectState.h.

Referenced by peerSelectFoo().

allow_t ps_state::always_direct
Ip::Address ps_state::closest_parent_miss
Ip::Address ps_state::first_parent_miss
size_t ps_state::foundPaths = 0

Definition at line 86 of file PeerSelectState.h.

Referenced by handlePath(), peerSelectDnsPaths(), and wantsMoreDestinations().

CachePeer* ps_state::hit
peer_t ps_state::hit_type
const InstanceId<ps_state> ps_state::id

Definition at line 112 of file PeerSelectState.h.

Referenced by peerSelectDnsPaths().

Initiator ps_state::initiator_
private

Definition at line 117 of file PeerSelectState.h.

Referenced by interestedInitiator().

ErrorState* ps_state::lastError

Definition at line 88 of file PeerSelectState.h.

Referenced by noteIps(), peerSelectDnsPaths(), and ~ps_state().

allow_t ps_state::never_direct
void* ps_state::peerCountMcastPeerXXX = nullptr

Definition at line 87 of file PeerSelectState.h.

Referenced by peerCountMcastPeersDone(), and peerCountMcastPeersStart().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors