helper.h
Go to the documentation of this file.
173 friend void helperStatefulSubmit(const statefulhelper::Pointer &, const char *buf, HLPCB *, void *cbData, const Helper::ReservationId &);
180 void submit(const char *buf, HLPCB * callback, void *data, const Helper::ReservationId & reservation);
181 bool trySubmit(const char *buf, HLPCB * callback, void *data, const Helper::ReservationId & reservation);
338void helperStatefulSubmit(const statefulhelper::Pointer &, const char *buf, HLPCB *, void *cbData, uint64_t reservation);
#define RefCountable
The locking interface for use on Reference-Counted classes.
Definition: Lock.h:66
Definition: cbdata.h:276
Definition: Client.h:35
Definition: CommCalls.h:134
Definition: ChildConfig.h:22
Definition: helper.h:67
bool queueFull() const
whether queuing an additional request would overload the helper
Definition: helper.cc:488
void handleKilledServer(SessionBase *, bool &needsNewServers)
Definition: helper.cc:863
void packStatsInto(Packable *p, const char *label=nullptr) const
Dump some stats about the helper state to a Packable object.
Definition: helper.cc:696
void handleFewerServers(bool madeProgress)
Definition: helper.cc:881
void submit(const char *buf, HLPCB *callback, void *data)
dispatches or enqueues a helper requests; does not enforce queue limits
Definition: helper.cc:564
bool trySubmit(const char *buf, HLPCB *callback, void *data)
If possible, submit request. Otherwise, either kill Squid or return false.
Definition: helper.cc:553
void syncQueueStats()
synchronizes queue-dependent measurements with the current queue state
Definition: helper.cc:499
void callBack(Xaction &)
sends transaction response to the transaction initiator
Definition: helper.cc:572
struct Helper::Client::_stats stats
Definition: Reply.h:30
Definition: Request.h:21
a (temporary) lock on a (stateful) helper channel
Definition: ReservationId.h:18
struct Helper::SessionBase::_helper_flags flags
void closePipesSafely(const char *name)
Definition: helper.cc:72
virtual void dropQueued(Client &)
dequeues and sends an Unknown answer to all queued requests
Definition: helper.cc:126
virtual bool reserved()=0
whether the server is locked for exclusive use by a client
struct Helper::SessionBase::@68 stats
void closeWritePipeSafely(const char *name)
Definition: helper.cc:100
Definition: helper.h:260
static void HelperServerClosed(Session *)
close handler to handle exited server processes
Definition: helper.cc:912
bool reserved() override
whether the server is locked for exclusive use by a client
Definition: helper.h:297
void dropQueued(Client &) override
dequeues and sends an Unknown answer to all queued requests
Definition: helper.cc:169
void checkForTimedOutRequests(bool const retry)
Definition: helper.cc:1550
bool ignoreToEom
Whether to ignore current message, because it is timed-out or other reason.
Definition: helper.h:278
CBDATA_CHILD(Session)
std::map< uint64_t, Requests::iterator > RequestIndex
Definition: helper.h:281
static void requestTimeout(const CommTimeoutCbParams &io)
Read timeout handler.
Definition: helper.cc:1588
MEMPROXY_CLASS(Helper::Xaction)
Definition: InstanceId.h:47
Definition: Address.h:41
Definition: MemBuf.h:24
Definition: Packable.h:53
Definition: dlink.h:24
Definition: dlink.h:15
Definition: helper.h:313
bool reserved() override
whether the server is locked for exclusive use by a client
Definition: helper.h:322
~helper_stateful_server() override
Definition: helper.cc:175
static void HelperServerClosed(helper_stateful_server *srv)
close handler to handle exited server processes
Definition: helper.cc:921
CBDATA_CHILD(helper_stateful_server)
Definition: helper.h:154
void submit(const char *buf, HLPCB *callback, void *data, const Helper::ReservationId &reservation)
Definition: helper.cc:664
helper_stateful_server * findServer(const Helper::ReservationId &reservation)
Definition: helper.cc:633
~statefulhelper() override=default
std::unordered_map< Helper::ReservationId, helper_stateful_server * > Reservations
Definition: helper.h:157
void cancelReservation(const Helper::ReservationId reservation)
undo reserveServer(), clear the reservation and kick the queue
Definition: helper.cc:617
friend void helperStatefulSubmit(const statefulhelper::Pointer &, const char *buf, HLPCB *, void *cbData, const Helper::ReservationId &)
Definition: helper.cc:586
bool trySubmit(const char *buf, HLPCB *callback, void *data, const Helper::ReservationId &reservation)
reserved servers indexed by reservation IDs
Definition: helper.cc:594
Definition: wordlist.h:20
void helperSubmit(const Helper::Client::Pointer &, const char *buf, HLPCB *, void *cbData)
Definition: helper.cc:480
void helperStatefulSubmit(const statefulhelper::Pointer &, const char *buf, HLPCB *, void *cbData, uint64_t reservation)
void helperStatefulShutdown(const statefulhelper::Pointer &)
Definition: helper.cc:807
Definition: helper.h:131
Definition: helper.h:238