Squid Web Cache master
Loading...
Searching...
No Matches
Mgr::Filler Class Referenceabstract

provides Coordinator with a local cache manager response More...

#include <Filler.h>

Inheritance diagram for Mgr::Filler:
[legend]
Collaboration diagram for Mgr::Filler:
[legend]

Public Types

typedef CbcPointer< AsyncJobPointer
 

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< AsyncJobid
 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 &params)
 called by Comm after the action results are written
 
void noteCommClosed (const CommCloseCbParams &params)
 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.
 
StoreEntryentry
 store entry with the cache manager response
 
store_clientsc
 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
 

Detailed Description

Definition at line 23 of file Filler.h.

Member Typedef Documentation

◆ Pointer

Definition at line 34 of file AsyncJob.h.

Constructor & Destructor Documentation

◆ Filler()

Mgr::Filler::Filler ( const Action::Pointer anAction,
const Comm::ConnectionPointer conn,
Ipc::RequestId  aRequestId 
)

Definition at line 21 of file Filler.cc.

References action, and debugs.

Member Function Documentation

◆ callEnd()

void AsyncJob::callEnd ( )
virtualinherited

◆ callException()

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)
inherited

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const
inherited

Definition at line 117 of file AsyncJob.cc.

References AsyncCall::cancel(), debugs, and AsyncJob::inCall.

◆ CBDATA_CHILD()

Mgr::Filler::CBDATA_CHILD ( Filler  )
private

◆ CBDATA_INTERMEDIATE()

Mgr::StoreToCommWriter::CBDATA_INTERMEDIATE ( )
privateinherited

◆ close()

void Mgr::StoreToCommWriter::close ( )
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().

◆ deleteThis()

void AsyncJob::deleteThis ( const char *  aReason)
protectedinherited

◆ done()

bool AsyncJob::done ( ) const
protectedinherited

◆ doneAll()

bool Mgr::StoreToCommWriter::doneAll ( ) const
overrideprotectedvirtualinherited

Reimplemented from AsyncJob.

Definition at line 158 of file StoreToCommWriter.cc.

References STORE_OK.

◆ finalizedInCbdataChild()

virtual void CbdataParent::finalizedInCbdataChild ( )
privatepure virtualinherited

◆ handleStopRequest()

void AsyncJob::handleStopRequest ( )
inlineinherited

Definition at line 73 of file AsyncJob.h.

References AsyncJob::mustStop().

◆ HandleStoreAbort()

void Mgr::StoreToCommWriter::HandleStoreAbort ( StoreToCommWriter param)
staticprotectedinherited

◆ mustStop()

◆ noteCommClosed()

void Mgr::StoreToCommWriter::noteCommClosed ( const CommCloseCbParams params)
protectedinherited

Definition at line 130 of file StoreToCommWriter.cc.

References debugs, and MYNAME.

Referenced by Mgr::StoreToCommWriter::StoreToCommWriter().

◆ noteCommWrote()

void Mgr::StoreToCommWriter::noteCommWrote ( const CommIoCbParams params)
protectedinherited

◆ noteStoreCopied()

void Mgr::StoreToCommWriter::noteStoreCopied ( StoreIOBuffer  ioBuf)
protectedinherited

◆ NoteStoreCopied()

void Mgr::StoreToCommWriter::NoteStoreCopied ( void *  data,
StoreIOBuffer  ioBuf 
)
staticprotectedinherited

◆ RegisterWithCacheManager()

void AsyncJob::RegisterWithCacheManager ( )
staticinherited

Definition at line 215 of file AsyncJob.cc.

References Mgr::RegisterAction(), and AsyncJob::ReportAllJobs().

Referenced by mainInitialize().

◆ ReportAllJobs()

void AsyncJob::ReportAllJobs ( StoreEntry e)
staticprotectedinherited

Definition at line 198 of file AsyncJob.cc.

References AllJobs().

Referenced by AsyncJob::RegisterWithCacheManager().

◆ scheduleCommWrite()

void Mgr::StoreToCommWriter::scheduleCommWrite ( const StoreIOBuffer ioBuf)
protectedinherited

◆ scheduleStoreCopy()

void Mgr::StoreToCommWriter::scheduleStoreCopy ( )
protectedinherited

Definition at line 70 of file StoreToCommWriter.cc.

References debugs, Must, MYNAME, and storeClientCopy().

◆ start()

void Mgr::Filler::start ( )
overrideprotectedvirtual

Reimplemented from AsyncJob.

Definition at line 31 of file Filler.cc.

References debugs, Must, MYNAME, and Mgr::StoreToCommWriter::start().

◆ Start()

◆ status()

◆ swanSong()

void Mgr::Filler::swanSong ( )
overrideprotectedvirtual

Reimplemented from AsyncJob.

Definition at line 42 of file Filler.cc.

References debugs, MYNAME, and Mgr::StoreToCommWriter::swanSong().

◆ toCbdata()

virtual void * CbdataParent::toCbdata ( )
pure virtualinherited

Member Data Documentation

◆ action

Action::Pointer Mgr::Filler::action
private

Definition at line 36 of file Filler.h.

Referenced by Filler().

◆ buffer

char Mgr::StoreToCommWriter::buffer[HTTP_REQBUF_SZ]
protectedinherited

Definition at line 69 of file StoreToCommWriter.h.

◆ clientConnection

Comm::ConnectionPointer Mgr::StoreToCommWriter::clientConnection
protectedinherited

◆ closer

AsyncCall::Pointer Mgr::StoreToCommWriter::closer
protectedinherited

Definition at line 68 of file StoreToCommWriter.h.

Referenced by Mgr::StoreToCommWriter::StoreToCommWriter().

◆ entry

StoreEntry* Mgr::StoreToCommWriter::entry
protectedinherited

Definition at line 64 of file StoreToCommWriter.h.

◆ id

const InstanceId<AsyncJob> AsyncJob::id
inherited

Definition at line 75 of file AsyncJob.h.

◆ inCall

AsyncCall::Pointer AsyncJob::inCall
protectedinherited

◆ requestId

Ipc::RequestId Mgr::Filler::requestId
private

Definition at line 37 of file Filler.h.

◆ sc

store_client* Mgr::StoreToCommWriter::sc
protectedinherited

Definition at line 65 of file StoreToCommWriter.h.

◆ started_

bool AsyncJob::started_ = false
protectedinherited

Definition at line 88 of file AsyncJob.h.

Referenced by AsyncJob::~AsyncJob(), AsyncJob::callEnd(), and AsyncJob::Start().

◆ stopReason

const char* AsyncJob::stopReason
protectedinherited

◆ swanSang_

bool AsyncJob::swanSang_ = false
protectedinherited

Definition at line 89 of file AsyncJob.h.

Referenced by AsyncJob::~AsyncJob(), and AsyncJob::callEnd().

◆ typeName

◆ writeOffset

int64_t Mgr::StoreToCommWriter::writeOffset
protectedinherited

Definition at line 66 of file StoreToCommWriter.h.


The documentation for this class was generated from the following files: