Filler.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
3  *
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.
7  */
8 
9 /* DEBUG: section 16 Cache Manager API */
10 
11 #include "squid.h"
12 #include "base/TextException.h"
13 #include "comm/Connection.h"
14 #include "ipc/RequestId.h"
15 #include "mgr/Filler.h"
16 #include "mgr/Response.h"
17 #include "Store.h"
18 
20 
22  const Ipc::RequestId aRequestId):
23  StoreToCommWriter(conn, anAction->createStoreEntry()),
24  action(anAction),
25  requestId(aRequestId)
26 {
27  debugs(16, 5, HERE << conn << " action: " << action);
28 }
29 
30 void
32 {
33  debugs(16, 5, HERE);
34  Must(requestId != 0);
35  Must(action != NULL);
36 
38  action->run(entry, false);
39 }
40 
41 void
43 {
44  debugs(16, 5, HERE);
45  action->sendResponse(requestId);
47 }
48 
static bool action(int fd, size_t metasize, const char *fn, const char *url, const SquidMetaList &meta)
Definition: purge.cc:311
Action::Pointer action
action that will run() and sendResponse()
Definition: Filler.h:36
virtual void start()
called by AsyncStart; do not call directly
#define NULL
Definition: types.h:166
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Debug.h:123
virtual void start()
called by AsyncStart; do not call directly
Definition: Filler.cc:31
std::ostream & HERE(std::ostream &s)
Definition: Debug.h:152
int conn
the current server connection FD
Definition: Transport.cc:26
Filler(const Action::Pointer &, const Comm::ConnectionPointer &, Ipc::RequestId)
Definition: Filler.cc:21
#define Must(condition)
Like assert() but throws an exception instead of aborting the process.
Definition: TextException.h:73
virtual void swanSong()
Definition: Filler.cc:42
CBDATA_NAMESPACED_CLASS_INIT(Mgr, Filler)
Cache Manager API.
Definition: Action.h:20

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors