]> git.ipfire.org Git - thirdparty/squid.git/blame - src/mgr/Filler.cc
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / mgr / Filler.cc
CommitLineData
8822ebee 1/*
f70aedc4 2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
8822ebee 3 *
bbc27441
AJ
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.
8822ebee
AR
7 */
8
bbc27441
AJ
9/* DEBUG: section 16 Cache Manager API */
10
f7f3304a 11#include "squid.h"
8822ebee 12#include "base/TextException.h"
c3e8e4e9 13#include "comm/Connection.h"
4c218615 14#include "ipc/RequestId.h"
8822ebee
AR
15#include "mgr/Filler.h"
16#include "mgr/Response.h"
17#include "Store.h"
18
8822ebee
AR
19CBDATA_NAMESPACED_CLASS_INIT(Mgr, Filler);
20
c3e8e4e9 21Mgr::Filler::Filler(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn,
4c218615 22 const Ipc::RequestId aRequestId):
f53969cc
SM
23 StoreToCommWriter(conn, anAction->createStoreEntry()),
24 action(anAction),
25 requestId(aRequestId)
8822ebee 26{
c3e8e4e9 27 debugs(16, 5, HERE << conn << " action: " << action);
8822ebee
AR
28}
29
30void
31Mgr::Filler::start()
32{
33 debugs(16, 5, HERE);
34 Must(requestId != 0);
35 Must(action != NULL);
36
37 StoreToCommWriter::start();
38 action->run(entry, false);
39}
40
41void
42Mgr::Filler::swanSong()
43{
44 debugs(16, 5, HERE);
45 action->sendResponse(requestId);
46 StoreToCommWriter::swanSong();
47}
f53969cc 48