|
Squid Web Cache master
|
provides Coordinator with a local cache manager response More...
#include <Filler.h>
Public Types | |
| typedef CbcPointer< AsyncJob > | Pointer |
Public Member Functions | |
| Filler (const Action::Pointer &, const Comm::ConnectionPointer &, Ipc::RequestId) | |
| bool | canBeCalled (AsyncCall &call) const |
| whether we can be called | |
| void | callStart (AsyncCall &call) |
| virtual void | callEnd () |
| called right after the called job method | |
| virtual void | callException (const std::exception &e) |
| called when the job throws during an async call | |
| void | handleStopRequest () |
| process external request to terminate now (i.e. during this async call) | |
| virtual void * | toCbdata ()=0 |
Static Public Member Functions | |
| static void | Start (const Pointer &job) |
| static void | RegisterWithCacheManager () |
Public Attributes | |
| const InstanceId< AsyncJob > | id |
| job identifier | |
Protected Member Functions | |
| void | start () override |
| called by AsyncStart; do not call directly | |
| void | swanSong () override |
| bool | doneAll () const override |
| whether positive goal has been reached | |
| void | scheduleStoreCopy () |
| request more action results from the store | |
| void | noteStoreCopied (StoreIOBuffer ioBuf) |
| receive some action results from the store | |
| void | scheduleCommWrite (const StoreIOBuffer &ioBuf) |
| tell Comm to write action results | |
| void | noteCommWrote (const CommIoCbParams ¶ms) |
| called by Comm after the action results are written | |
| void | noteCommClosed (const CommCloseCbParams ¶ms) |
| called by Comm if the client socket got closed | |
| void | close () |
| closes the local connection to the HTTP client, if any | |
| void | deleteThis (const char *aReason) |
| void | mustStop (const char *aReason) |
| bool | done () const |
| the job is destroyed in callEnd() when done() | |
| virtual const char * | status () const |
| internal cleanup; do not call directly | |
Static Protected Member Functions | |
| static void | NoteStoreCopied (void *data, StoreIOBuffer ioBuf) |
| static void | HandleStoreAbort (StoreToCommWriter *param) |
| called by Store if the entry is no longer usable | |
| static void | ReportAllJobs (StoreEntry *) |
| writes a cache manager report about all jobs existing in this worker | |
Protected Attributes | |
| Comm::ConnectionPointer | clientConnection |
| HTTP client descriptor. | |
| StoreEntry * | entry |
| store entry with the cache manager response | |
| store_client * | sc |
| our registration with the store | |
| int64_t | writeOffset |
| number of bytes written to the client | |
| AsyncCall::Pointer | closer |
| comm_close handler | |
| char | buffer [HTTP_REQBUF_SZ] |
| action results; Store fills, Comm writes | |
| const char * | stopReason |
| reason for forcing done() to be true | |
| const char * | typeName |
| kid (leaf) class name, for debugging | |
| AsyncCall::Pointer | inCall |
| the asynchronous call being handled, if any | |
| bool | started_ = false |
| Start() has finished successfully. | |
| bool | swanSang_ = false |
| swanSong() was called | |
Private Member Functions | |
| CBDATA_CHILD (Filler) | |
| CBDATA_INTERMEDIATE () | |
| virtual void | finalizedInCbdataChild ()=0 |
| hack: ensure CBDATA_CHILD() after a toCbdata()-defining CBDATA_INTERMEDIATE() | |
Private Attributes | |
| Action::Pointer | action |
| action that will run() and sendResponse() | |
| Ipc::RequestId | requestId |
| the ID of the Request we are responding to | |
|
inherited |
Definition at line 34 of file AsyncJob.h.
| Mgr::Filler::Filler | ( | const Action::Pointer & | anAction, |
| const Comm::ConnectionPointer & | conn, | ||
| Ipc::RequestId | aRequestId | ||
| ) |
|
virtualinherited |
called right after the called job method
Reimplemented in Adaptation::Icap::Xaction.
Definition at line 152 of file AsyncJob.cc.
References assert, AsyncCall::debugLevel, debugs, AsyncCall::debugSection, AsyncJob::done(), AsyncJob::inCall, AsyncJob::started_, AsyncJob::status(), AsyncJob::swanSang_, AsyncJob::swanSong(), and AsyncJob::typeName.
Referenced by Adaptation::Icap::Xaction::callEnd(), and AsyncJob::deleteThis().
|
virtualinherited |
Reimplemented in ConnStateData, ClientHttpRequest, Rock::Rebuild, Adaptation::Icap::ModXact, Adaptation::Icap::ServiceRep, Adaptation::Icap::Xaction, Ipc::Forwarder, Ipc::Inquirer, and Ftp::Server.
Definition at line 143 of file AsyncJob.cc.
References cbdataReferenceValid(), debugs, Must, AsyncJob::mustStop(), and CbdataParent::toCbdata().
Referenced by ConnStateData::callException(), Adaptation::Icap::Xaction::callException(), Ipc::Forwarder::callException(), Ipc::Inquirer::callException(), and Ftp::Server::callException().
|
inherited |
called just before the called method
Definition at line 130 of file AsyncJob.cc.
References cbdataReferenceValid(), AsyncCall::debugLevel, debugs, AsyncCall::debugSection, AsyncJob::inCall, Must, AsyncJob::status(), CbdataParent::toCbdata(), and AsyncJob::typeName.
|
inherited |
Definition at line 117 of file AsyncJob.cc.
References AsyncCall::cancel(), debugs, and AsyncJob::inCall.
|
private |
|
privateinherited |
|
protectedinherited |
closes our copy of the client HTTP connection socket
Definition at line 43 of file StoreToCommWriter.cc.
References comm_remove_close_handler(), and Comm::IsConnOpen().
|
protectedinherited |
Definition at line 65 of file AsyncJob.cc.
References asyncCall(), AsyncJob::callEnd(), debugs, AsyncJob::deleteThis(), AsyncJob::inCall, JobMemFun(), Must, AsyncJob::stopReason, and AsyncJob::typeName.
Referenced by ConnStateData::connStateClosed(), and AsyncJob::deleteThis().
|
protectedinherited |
Definition at line 106 of file AsyncJob.cc.
References AsyncJob::doneAll(), and AsyncJob::stopReason.
Referenced by AsyncJob::callEnd(), HappyConnOpener::checkForNewConnection(), Downloader::downloadFinished(), and HappyConnOpener::maybeOpenPrimeConnection().
|
overrideprotectedvirtualinherited |
Reimplemented from AsyncJob.
Definition at line 158 of file StoreToCommWriter.cc.
References STORE_OK.
|
privatepure virtualinherited |
|
inlineinherited |
Definition at line 73 of file AsyncJob.h.
References AsyncJob::mustStop().
|
staticprotectedinherited |
Definition at line 166 of file StoreToCommWriter.cc.
References Mgr::StoreToCommWriter::clientConnection, Comm::Connection::close(), and Comm::IsConnOpen().
Referenced by Mgr::StoreToCommWriter::start().
|
protectedinherited |
Definition at line 85 of file AsyncJob.cc.
References debugs, AsyncJob::inCall, Must, AsyncJob::stopReason, and AsyncJob::typeName.
Referenced by HttpStateData::abortAll(), AsyncJob::callException(), HttpStateData::continueAfterParsingHeader(), HttpStateData::drop1xx(), AsyncJob::handleStopRequest(), HttpStateData::httpStateConnClosed(), HttpStateData::httpTimeout(), HttpStateData::proceedAfter1xx(), ConnStateData::proxyProtocolError(), HttpStateData::readReply(), HttpStateData::start(), and HttpStateData::wroteLast().
|
protectedinherited |
Definition at line 130 of file StoreToCommWriter.cc.
References debugs, and MYNAME.
Referenced by Mgr::StoreToCommWriter::StoreToCommWriter().
|
protectedinherited |
Definition at line 118 of file StoreToCommWriter.cc.
References debugs, CommCommonCbParams::fd, CommCommonCbParams::flag, Must, MYNAME, Comm::OK, and CommIoCbParams::size.
Referenced by Mgr::StoreToCommWriter::scheduleCommWrite().
|
protectedinherited |
Definition at line 93 of file StoreToCommWriter.cc.
References debugs, StoreIOBuffer::error, StoreIOBuffer::flags, StoreIOBuffer::length, Must, and MYNAME.
Referenced by Mgr::StoreToCommWriter::NoteStoreCopied().
|
staticprotectedinherited |
Definition at line 80 of file StoreToCommWriter.cc.
References asyncCall(), Must, Mgr::StoreToCommWriter::noteStoreCopied(), and ScheduleCallHere.
|
staticinherited |
Definition at line 215 of file AsyncJob.cc.
References Mgr::RegisterAction(), and AsyncJob::ReportAllJobs().
Referenced by mainInitialize().
|
staticprotectedinherited |
Definition at line 198 of file AsyncJob.cc.
References AllJobs().
Referenced by AsyncJob::RegisterWithCacheManager().
|
protectedinherited |
Definition at line 104 of file StoreToCommWriter.cc.
References asyncCall(), StoreIOBuffer::data, debugs, Comm::IsConnOpen(), StoreIOBuffer::length, Must, MYNAME, Mgr::StoreToCommWriter::noteCommWrote(), and Comm::Write().
|
protectedinherited |
Definition at line 70 of file StoreToCommWriter.cc.
References debugs, Must, MYNAME, and storeClientCopy().
|
overrideprotectedvirtual |
|
staticinherited |
Promises to start the configured job (eventually). The job is deemed to be running asynchronously beyond this point, so the caller should only access the job object via AsyncCalls rather than directly.
swanSong() is only called for jobs for which this method has returned successfully (i.e. without throwing).
Definition at line 37 of file AsyncJob.cc.
References CallJobHere, AsyncJob::start(), and AsyncJob::started_.
Referenced by Ftp::Server::AcceptCtrlConnection(), clientListenerConnectionOpened(), Ipc::Coordinator::handleCacheMgrRequest(), Ipc::Coordinator::handleSnmpRequest(), httpAccept(), httpsAccept(), httpStart(), idnsInitVC(), Ftp::Gateway::listenForDataChannel(), Ftp::Server::listenForDataConnection(), Log::TcpLogger::Open(), peerProbeConnect(), Mgr::FunAction::respond(), Mgr::InfoAction::respond(), Ipc::SendMessage(), Mgr::Inquirer::sendResponse(), snmpConstructReponse(), SquidMain(), CacheManager::start(), Adaptation::AccessCheck::Start(), Rock::Rebuild::Start(), JobWaitBase::start_(), BodyPipe::startAutoConsumptionIfNeeded(), Ftp::StartGateway(), Ftp::StartRelay(), and Rock::SwapDir::updateHeaders().
|
protectedvirtualinherited |
for debugging, starts with space
Reimplemented in Adaptation::Ecap::XactionRep, Adaptation::Icap::ServiceRep, Adaptation::Icap::Xaction, Adaptation::Initiate, Http::Tunneler, Comm::TcpAcceptor, HappyConnOpener, Ipc::Inquirer, and Security::PeerConnector.
Definition at line 182 of file AsyncJob.cc.
References MemBuf::append(), Packable::appendf(), MemBuf::content(), MemBuf::reset(), AsyncJob::stopReason, and MemBuf::terminate().
Referenced by AsyncJob::callEnd(), AsyncJob::callStart(), Adaptation::Initiate::status(), and Comm::TcpAcceptor::status().
|
overrideprotectedvirtual |
|
pure virtualinherited |
Referenced by AsyncJob::callException(), and AsyncJob::callStart().
|
private |
|
protectedinherited |
Definition at line 69 of file StoreToCommWriter.h.
|
protectedinherited |
Definition at line 62 of file StoreToCommWriter.h.
Referenced by Mgr::StoreToCommWriter::StoreToCommWriter(), and Mgr::StoreToCommWriter::HandleStoreAbort().
|
protectedinherited |
Definition at line 68 of file StoreToCommWriter.h.
Referenced by Mgr::StoreToCommWriter::StoreToCommWriter().
|
protectedinherited |
Definition at line 64 of file StoreToCommWriter.h.
|
inherited |
Definition at line 75 of file AsyncJob.h.
|
protectedinherited |
Definition at line 86 of file AsyncJob.h.
Referenced by AsyncJob::callEnd(), AsyncJob::callStart(), AsyncJob::canBeCalled(), AsyncJob::deleteThis(), and AsyncJob::mustStop().
|
private |
|
protectedinherited |
Definition at line 65 of file StoreToCommWriter.h.
|
protectedinherited |
Definition at line 88 of file AsyncJob.h.
Referenced by AsyncJob::~AsyncJob(), AsyncJob::callEnd(), and AsyncJob::Start().
|
protectedinherited |
Definition at line 84 of file AsyncJob.h.
Referenced by AsyncJob::deleteThis(), AsyncJob::done(), AsyncJob::mustStop(), AsyncJob::status(), and HappyConnOpener::status().
|
protectedinherited |
Definition at line 89 of file AsyncJob.h.
Referenced by AsyncJob::~AsyncJob(), and AsyncJob::callEnd().
|
protectedinherited |
Definition at line 85 of file AsyncJob.h.
Referenced by AsyncJob::AsyncJob(), Adaptation::Icap::Xaction::Xaction(), AsyncJob::~AsyncJob(), AsyncJob::callEnd(), AsyncJob::callStart(), AsyncJob::deleteThis(), and AsyncJob::mustStop().
|
protectedinherited |
Definition at line 66 of file StoreToCommWriter.h.