ServiceRep.cc
Go to the documentation of this file.
75 writeableCfg().port = cfg().protocol.caseCmp("icaps") == 0 ? DEFAULT_ICAPS_PORT : DEFAULT_ICAP_PORT;
127 * retriable means you can repeat the request if you suspect the first try failed due to a pconn race.
130 * If there are zero idle connections, (2) is irrelevant. (2) is only relevant when there are many
146void Adaptation::Icap::ServiceRep::putConnection(const Comm::ConnectionPointer &conn, bool isReusable, bool sendReset, const char *comment)
521void Adaptation::Icap::ServiceRep::announceStatusChange(const char *downPhrase, bool important) const
729Adaptation::Icap::ConnWaiterDialer::ConnWaiterDialer(const CbcPointer<Adaptation::Icap::ModXact> &xact,
737Adaptation::Icap::ConnWaiterDialer::ConnWaiterDialer(const Adaptation::Icap::ConnWaiterDialer &aConnWaiter): Parent(aConnWaiter)
#define CallJobHere(debugSection, debugLevel, job, Class, method)
Definition: AsyncJobCalls.h:58
summarizes adaptation service answer for the noteAdaptationAnswer() API
Definition: Answer.h:23
ServiceRep::Pointer theService
Definition: ServiceRep.h:199
~ConnWaiterDialer() override
Definition: ServiceRep.cc:743
ConnWaiterDialer(const CbcPointer< Adaptation::Icap::ModXact > &xact, Adaptation::Icap::ConnWaiterDialer::Parent::Method aHandler)
Definition: ServiceRep.cc:729
Definition: ModXact.h:379
Definition: OptXact.h:56
Definition: Options.h:26
Definition: ServiceRep.h:61
void scheduleUpdate(time_t when)
Definition: ServiceRep.cc:608
void noteAdaptationAnswer(const Answer &answer) override
Definition: ServiceRep.cc:536
bool availableForOld() const
a transaction notified about connection slot availability may start communicating with the service
Definition: ServiceRep.cc:315
void noteConnectionUse(const Comm::ConnectionPointer &conn)
Definition: ServiceRep.cc:171
void scheduleNotification()
Definition: ServiceRep.cc:442
time_t optionsFetchTime() const
Definition: ServiceRep.cc:646
void startGettingOptions()
Definition: ServiceRep.cc:596
void changeOptions(Options *newOptions)
Definition: ServiceRep.cc:453
int availableConnections() const
Definition: ServiceRep.cc:198
void callException(const std::exception &e) override
called when the job throws during an async call
Definition: ServiceRep.cc:566
ServiceRep(const ServiceConfigPointer &aConfig)
Definition: ServiceRep.cc:33
bool needNewOptions() const
Definition: ServiceRep.cc:448
void callWhenAvailable(AsyncCall::Pointer &cb, bool priority=false)
Definition: ServiceRep.cc:401
bool wantsUrl(const SBuf &urlPath) const override
Definition: ServiceRep.cc:323
const char * status() const override
internal cleanup; do not call directly
Definition: ServiceRep.cc:677
void setMaxConnections()
Set the maximum allowed connections for the service.
Definition: ServiceRep.cc:183
void callWhenReady(AsyncCall::Pointer &cb)
Definition: ServiceRep.cc:419
void announceStatusChange(const char *downPhrase, bool important) const
Definition: ServiceRep.cc:521
void noteGoneWaiter()
An xaction is not waiting any more for service to be available.
Definition: ServiceRep.cc:237
Initiate * makeXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp) override
Definition: ServiceRep.cc:670
bool wantsPreview(const SBuf &urlPath, size_t &wantedSize) const
Definition: ServiceRep.cc:329
Comm::ConnectionPointer getIdleConnection(bool isRetriable)
Definition: ServiceRep.cc:117
bool availableForNew() const
a new transaction may start communicating with the service
Definition: ServiceRep.cc:305
void handleNewOptions(Options *newOptions)
Definition: ServiceRep.cc:574
void noteConnectionFailed(const char *comment)
Definition: ServiceRep.cc:177
void putConnection(const Comm::ConnectionPointer &conn, bool isReusable, bool sendReset, const char *comment)
Definition: ServiceRep.cc:146
int excessConnections() const
The number of connections which excess the Max-Connections limit.
Definition: ServiceRep.cc:222
Definition: Initiate.h:31
Definition: Service.h:28
Definition: AsyncJob.h:32
Definition: CbcPointer.h:26
Definition: HttpReply.h:25
Definition: HttpRequest.h:49
Definition: pconn.h:38
Definition: MemBuf.h:24
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
Definition: Packable.h:61
Definition: SquidString.h:26
void eventAdd(const char *name, EVH *func, void *arg, double when, int weight, bool cbdata)
Definition: event.cc:107
CBDATA_NAMESPACED_CLASS_INIT(Adaptation::Icap, ServiceRep)
static void ServiceRep_noteTimeToUpdate(void *data)
Definition: ServiceRep.cc:359
Definition: Client.h:17
Definition: AccessCheck.h:25
AsyncCall::Pointer callback
Definition: ServiceRep.h:122