26 theService(aService), theXaction(nullptr), theLaunches(0)
39 Must(theInitiator.set());
40 launchXaction(
"first");
47 debugs(93,4,
"launching " << xkind <<
" xaction #" << theLaunches);
50 if (theLaunches > 1) {
56 theXaction = initiateAdaptation(x);
57 Must(initiated(theXaction));
62 debugs(93,5,
"launches: " << theLaunches <<
" answer: " << answer);
68 clearAdaptation(theXaction);
75 announceInitiatorAbort(theXaction);
83 debugs(93,5,
"theXaction:" << theXaction <<
" launches: " << theLaunches);
87 clearAdaptation(theXaction);
88 launchXaction(
"retry");
89 }
else if (canRepeat(info)) {
90 clearAdaptation(theXaction);
91 launchXaction(
"repeat");
93 debugs(93,3,
"cannot retry or repeat a failed transaction");
94 clearAdaptation(theXaction);
95 tellQueryAborted(
false);
107 if (theInitiator.set())
108 tellQueryAborted(
true);
110 if (theXaction.set())
111 clearAdaptation(theXaction);
151 HttpReply *anIcapReply,
bool beRetriable,
bool beRepeatable):
152 icapRequest(anIcapRequest),
153 icapReply(anIcapReply),
154 isRetriable(beRetriable),
155 isRepeatable(beRepeatable)
164 icapRequest(i.icapRequest),
165 icapReply(i.icapReply),
166 isRetriable(i.isRetriable),
167 isRepeatable(i.isRepeatable)
Acl::Answer const & fastCheck()
void updateReply(const HttpReply::Pointer &)
summarizes adaptation service answer for the noteAdaptationAnswer() API
Kind kind
the type of the answer
@ akError
no adapted message will come; see bypassable
int repeat_limit
icap_retry_limit in squid.conf
acl_access * repeat
icap_retry ACL in squid.conf
void noteAdaptationAnswer(const Answer &answer) override
bool canRepeat(XactAbortInfo &info) const
virtual void noteXactAbort(XactAbortInfo info)
void noteInitiatorAborted() override
bool canRetry(XactAbortInfo &info) const
bool doneAll() const override
whether positive goal has been reached
void start() override
called by AsyncStart; do not call directly
void launchXaction(const char *xkind)
Launcher(const char *aTypeName, Adaptation::ServicePointer &aService)
XactAbortInfo(HttpRequest *anIcapRequest, HttpReply *anIcapReply, bool beRetriable, bool beRepeatable)
HttpRequest * icapRequest
int attempts
the number of times we tried to get to the service, including this time
void disableRepeats(const char *reason)
virtual void clearError()
clear stored error details, if any; used for retries/repeats
virtual bool doneAll() const
whether positive goal has been reached
virtual void start()
called by AsyncStart; do not call directly
Http::StatusCode status() const
retrieve the status code for this status line
#define debugs(SECTION, LEVEL, CONTENT)
void HTTPMSGUNLOCK(M *&a)
void HTTPMSGLOCK(Http::Message *a)