Inquirer.cc
Go to the documentation of this file.
AsyncCall * asyncCall(int aDebugSection, int aDebugLevel, const char *aName, const Dialer &aDialer)
Definition: AsyncCall.h:154
void CallBack(const CodeContext::Pointer &callbackContext, Fun &&callback)
Definition: CodeContext.h:112
virtual CallDialer * getDialer()=0
Definition: AsyncJob.h:32
virtual void callException(const std::exception &e)
called when the job throws during an async call
Definition: AsyncJob.cc:128
Definition: CodeContext.h:52
Definition: Inquirer.h:29
static void RequestTimedOut(void *param)
Ipc::Inquirer::requestTimedOut wrapper.
Definition: Inquirer.cc:179
virtual void handleException(const std::exception &e)
do specific exception handling
Definition: Inquirer.cc:122
virtual void callException(const std::exception &e)
called when the job throws during an async call
Definition: Inquirer.cc:129
static AsyncCall::Pointer DequeueRequest(RequestId::Index)
returns and forgets the right Inquirer callback for strand request
Definition: Inquirer.cc:142
std::map< RequestId::Index, AsyncCall::Pointer > RequestsMap
maps request->id to Inquirer::handleRemoteAck callback
Definition: Inquirer.h:82
Inquirer(Request::Pointer aRequest, const Ipc::StrandCoords &coords, double aTimeout)
Definition: Inquirer.cc:33
virtual const char * status() const
internal cleanup; do not call directly
Definition: Inquirer.cc:205
static void HandleRemoteAck(const Response &response)
finds and calls the right Inquirer upon strand's response
Definition: Inquirer.cc:157
void removeTimeoutEvent()
called when we are no longer waiting for the strand to respond
Definition: Inquirer.cc:171
void requestTimedOut()
called when the strand failed to respond (or finish responding) in time
Definition: Inquirer.cc:192
void handleRemoteAck(Response::Pointer response)
called when a strand is done writing its output
Definition: Inquirer.cc:88
static String MakeAddr(const char *proccessLabel, int id)
calculates IPC message address for strand id of processLabel type
Definition: Port.cc:52
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:33
Definition: MemBuf.h:24
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
Definition: Packable.h:61
Definition: AsyncJobCalls.h:108
void eventAdd(const char *name, EVH *func, void *arg, double when, int weight, bool cbdata)
Definition: event.cc:107
CBDATA_NAMESPACED_CLASS_INIT(Ipc, Inquirer)
static bool LesserStrandByKidId(const Ipc::StrandCoord &c1, const Ipc::StrandCoord &c2)
compare Ipc::StrandCoord using kidId, for std::sort() below
Definition: Inquirer.cc:28
Definition: IpcIoFile.h:24
void SendMessage(const String &toAddress, const TypedMsgHdr &message)
Definition: UdsOp.cc:188
std::vector< StrandCoord > StrandCoords
a collection of strand coordinates; the order, if any, is owner-dependent
Definition: StrandCoords.h:19