#include <UdsOp.h>

Inheritance diagram for Ipc::UdsOp:
Collaboration diagram for Ipc::UdsOp:

Public Types

typedef CbcPointer< AsyncJobPointer

Public Member Functions

 UdsOp (const String &pathAddr)
 ~UdsOp () override
bool canBeCalled (AsyncCall &call) const
 whether we can be called More...
void callStart (AsyncCall &call)
virtual void callEnd ()
 called right after the called job method More...
virtual void callException (const std::exception &e)
 called when the job throws during an async call More...
void handleStopRequest ()
 process external request to terminate now (i.e. during this async call) More...
virtual void * toCbdata ()=0

Static Public Member Functions

static void Start (const Pointer &job)
static void RegisterWithCacheManager ()

Public Attributes

struct sockaddr_un address
 UDS address from path; treat as read-only. More...
const InstanceId< AsyncJobid
 job identifier More...

Protected Member Functions

virtual void timedout ()
 called after setTimeout() if timed out More...
Comm::ConnectionPointerconn ()
 creates if needed and returns raw UDS socket descriptor More...
void setTimeout (time_t seconds, const char *handlerName)
 call timedout() if no UDS messages in a given number of seconds More...
void clearTimeout ()
 remove previously set timeout, if any More...
void setOptions (int newOptions)
 changes socket options More...
void deleteThis (const char *aReason)
void mustStop (const char *aReason)
bool done () const
 the job is destroyed in callEnd() when done() More...
virtual void start ()
 called by AsyncStart; do not call directly More...
virtual bool doneAll () const
 whether positive goal has been reached More...
virtual void swanSong ()
virtual const char * status () const
 internal cleanup; do not call directly More...

Static Protected Member Functions

static void ReportAllJobs (StoreEntry *)
 writes a cache manager report about all jobs existing in this worker More...

Protected Attributes

const char * stopReason
 reason for forcing done() to be true More...
const char * typeName
 kid (leaf) class name, for debugging More...
AsyncCall::Pointer inCall
 the asynchronous call being handled, if any More...
bool started_ = false
 Start() has finished successfully. More...
bool swanSang_ = false
 swanSong() was called More...

Private Member Functions

void noteTimeout (const CommTimeoutCbParams &p)
 Comm timeout callback; calls timedout() More...
 UdsOp (const UdsOp &)
UdsOpoperator= (const UdsOp &)
virtual void finalizedInCbdataChild ()=0
 hack: ensure CBDATA_CHILD() after a toCbdata()-defining CBDATA_INTERMEDIATE() More...

Private Attributes

int options
 UDS options. More...
Comm::ConnectionPointer conn_
 UDS descriptor. More...

Detailed Description

code shared by unix-domain socket senders (e.g., UdsSender or Coordinator) and receivers (e.g. Port or Coordinator)

Definition at line 30 of file UdsOp.h.

Member Typedef Documentation

◆ Pointer

Definition at line 34 of file AsyncJob.h.

Constructor & Destructor Documentation

◆ UdsOp() [1/2]

Ipc::UdsOp::UdsOp ( const String pathAddr)

Definition at line 19 of file UdsOp.cc.

References debugs.

◆ ~UdsOp()

Ipc::UdsOp::~UdsOp ( )

Definition at line 27 of file UdsOp.cc.

References debugs, and Comm::IsConnOpen().

◆ UdsOp() [2/2]

Ipc::UdsOp::UdsOp ( const UdsOp )

Member Function Documentation

◆ callEnd()

void AsyncJob::callEnd ( )

◆ callException()

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const

Definition at line 117 of file AsyncJob.cc.

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

◆ clearTimeout()

void Ipc::UdsOp::clearTimeout ( )

Definition at line 62 of file UdsOp.cc.

References commUnsetConnTimeout(), and conn.

◆ conn()

Comm::ConnectionPointer & Ipc::UdsOp::conn ( )

Definition at line 41 of file UdsOp.cc.

References COMM_DOBIND, comm_open_uds(), Comm::IsConnOpen(), and Must.

◆ deleteThis()

void AsyncJob::deleteThis ( const char *  aReason)

◆ done()

bool AsyncJob::done ( ) const

◆ doneAll()

◆ finalizedInCbdataChild()

virtual void CbdataParent::finalizedInCbdataChild ( )
privatepure virtualinherited

◆ handleStopRequest()

void AsyncJob::handleStopRequest ( )

Definition at line 73 of file AsyncJob.h.

References AsyncJob::mustStop().

◆ mustStop()

◆ noteTimeout()

void Ipc::UdsOp::noteTimeout ( const CommTimeoutCbParams p)

Definition at line 67 of file UdsOp.cc.

Referenced by setTimeout().

◆ operator=()

UdsOp & Ipc::UdsOp::operator= ( const UdsOp )

◆ RegisterWithCacheManager()

void AsyncJob::RegisterWithCacheManager ( )

Definition at line 215 of file AsyncJob.cc.

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

Referenced by mainInitialize().

◆ ReportAllJobs()

void AsyncJob::ReportAllJobs ( StoreEntry e)

Definition at line 198 of file AsyncJob.cc.

References AllJobs().

Referenced by AsyncJob::RegisterWithCacheManager().

◆ setOptions()

void Ipc::UdsOp::setOptions ( int  newOptions)

Definition at line 35 of file UdsOp.cc.

Referenced by Ipc::Port::Port().

◆ setTimeout()

void Ipc::UdsOp::setTimeout ( time_t  seconds,
const char *  handlerName 

Definition at line 54 of file UdsOp.cc.

References asyncCall(), commSetConnTimeout(), conn, handler(), and noteTimeout().

◆ start()

◆ Start()

◆ status()

◆ swanSong()

◆ timedout()

virtual void Ipc::UdsOp::timedout ( )

Reimplemented in Ipc::Strand, and Ipc::UdsSender.

Definition at line 40 of file UdsOp.h.

◆ toCbdata()

virtual void * CbdataParent::toCbdata ( )
pure virtualinherited

Member Data Documentation

◆ address

struct sockaddr_un Ipc::UdsOp::address

Definition at line 37 of file UdsOp.h.

Referenced by Ipc::UdsSender::UdsSender().

◆ conn_

Comm::ConnectionPointer Ipc::UdsOp::conn_

Definition at line 56 of file UdsOp.h.

◆ id

const InstanceId<AsyncJob> AsyncJob::id

Definition at line 75 of file AsyncJob.h.

◆ inCall

AsyncCall::Pointer AsyncJob::inCall

◆ options

int Ipc::UdsOp::options

Definition at line 55 of file UdsOp.h.

◆ started_

bool AsyncJob::started_ = false

Definition at line 88 of file AsyncJob.h.

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

◆ stopReason

const char* AsyncJob::stopReason

◆ swanSang_

bool AsyncJob::swanSang_ = false

Definition at line 89 of file AsyncJob.h.

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

◆ typeName

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






Web Site Translations