PeerSelectionInitiator Class Referenceabstract

Interface for those who need a list of peers to forward a request to. More...

#include <PeerSelectState.h>

Inheritance diagram for PeerSelectionInitiator:
Collaboration diagram for PeerSelectionInitiator:

Public Member Functions

 ~PeerSelectionInitiator () override=default
 
virtual void noteDestination (Comm::ConnectionPointer path)=0
 called when a new unique destination has been found More...
 
virtual void noteDestinationsEnd (ErrorState *error)=0
 
void startSelectingDestinations (HttpRequest *request, const AccessLogEntry::Pointer &ale, StoreEntry *entry)
 
virtual void * toCbdata ()=0
 

Public Attributes

bool subscribed = false
 whether noteDestination() and noteDestinationsEnd() calls are allowed More...
 

Private Member Functions

virtual void finalizedInCbdataChild ()=0
 hack: ensure CBDATA_CHILD() after a toCbdata()-defining CBDATA_INTERMEDIATE() More...
 

Detailed Description

Definition at line 32 of file PeerSelectState.h.

Constructor & Destructor Documentation

◆ ~PeerSelectionInitiator()

PeerSelectionInitiator::~PeerSelectionInitiator ( )
overridedefault

Member Function Documentation

◆ finalizedInCbdataChild()

virtual void CbdataParent::finalizedInCbdataChild ( )
privatepure virtualinherited

◆ noteDestination()

virtual void PeerSelectionInitiator::noteDestination ( Comm::ConnectionPointer  path)
pure virtual

Implemented in FwdState, and TunnelStateData.

◆ noteDestinationsEnd()

virtual void PeerSelectionInitiator::noteDestinationsEnd ( ErrorState error)
pure virtual

called when there will be no more noteDestination() calls

Parameters
erroris a possible reason why no destinations were found; it is guaranteed to be nil if there was at least one noteDestination() call

Implemented in FwdState, and TunnelStateData.

◆ startSelectingDestinations()

void PeerSelectionInitiator::startSelectingDestinations ( HttpRequest request,
const AccessLogEntry::Pointer ale,
StoreEntry entry 
)

Initiates asynchronous peer selection that eventually results in zero or more noteDestination() calls and exactly one noteDestinationsEnd() call.

Definition at line 335 of file peer_select.cc.

References peerSelect(), and subscribed.

Referenced by FwdState::start(), and tunnelStart().

◆ toCbdata()

virtual void * CbdataParent::toCbdata ( )
pure virtualinherited

Member Data Documentation

◆ subscribed


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors