Filler.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 "mgr/Filler.h"
15 #include "mgr/Response.h"
16 #include "Store.h"
17 
18 CBDATA_NAMESPACED_CLASS_INIT(Mgr, Filler);
19 
21  unsigned int aRequestId):
22  StoreToCommWriter(conn, anAction->createStoreEntry()),
23  action(anAction),
24  requestId(aRequestId)
25 {
26  debugs(16, 5, HERE << conn << " action: " << action);
27 }
28 
29 void
31 {
32  debugs(16, 5, HERE);
33  Must(requestId != 0);
34  Must(action != NULL);
35 
37  action->run(entry, false);
38 }
39 
40 void
42 {
43  debugs(16, 5, HERE);
44  action->sendResponse(requestId);
46 }
47 
Action::Pointer action
action that will run() and sendResponse()
Definition: Filler.h:35
Filler(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn, unsigned int aRequestId)
Definition: Filler.cc:20
int conn
the current server connection FD
Definition: Transport.cc:26
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Debug.h:123
std::ostream & HERE(std::ostream &s)
Definition: Debug.h:147
bool action(int fd, size_t metasize, const char *fn, const char *url, const SquidMetaList &meta)
Definition: purge.cc:311
#define Must(cond)
Definition: TextException.h:89
CBDATA_NAMESPACED_CLASS_INIT(Mgr, Filler)
virtual void start()
called by AsyncStart; do not call directly
Definition: Filler.cc:30
virtual void swanSong()
Definition: Filler.cc:41
#define NULL
Definition: types.h:166
virtual void start()
called by AsyncStart; do not call directly

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors