]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/Inquirer.h
2 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 /* DEBUG: section 16 Cache Manager API */
11 #ifndef SQUID_MGR_INQUIRER_H
12 #define SQUID_MGR_INQUIRER_H
14 #include "comm/forward.h"
15 #include "ipc/Inquirer.h"
16 #include "mgr/Action.h"
19 class CommCloseCbParams
;
24 /// Coordinator's job that sends a cache manage request to each strand,
25 /// aggregating individual strand responses and dumping the result if needed
26 class Inquirer
: public Ipc::Inquirer
29 Inquirer(Action::Pointer anAction
, const Request
&aCause
,
30 const Ipc::StrandCoords
&coords
);
35 virtual bool doneAll() const;
37 /* Ipc::Inquirer API */
38 virtual void cleanup();
39 virtual void sendResponse();
40 virtual bool aggregate(Ipc::Response::Pointer aResponse
);
43 void noteWroteHeader(const CommIoCbParams
& params
);
44 void noteCommClosed(const CommCloseCbParams
& params
);
45 void removeCloseHandler();
46 Ipc::StrandCoords
applyQueryParams(const Ipc::StrandCoords
& aStrands
,
47 const QueryParams
& aParams
);
49 Action::Pointer aggrAction
; //< action to aggregate
51 Comm::ConnectionPointer conn
; ///< HTTP client socket descriptor
53 AsyncCall::Pointer writer
; ///< comm_write callback
54 AsyncCall::Pointer closer
; ///< comm_close handler
56 CBDATA_CLASS2(Inquirer
);
61 #endif /* SQUID_MGR_INQUIRER_H */