Forwarder.cc
Go to the documentation of this file.
#define JobCallback(dbgSection, dbgLevel, Dialer, job, method)
Convenience macro to create a Dialer-based job callback.
Definition: AsyncJobCalls.h:69
void CallBack(const CodeContext::Pointer &callbackContext, Fun &&callback)
Definition: CodeContext.h:116
Definition: AsyncJob.h:32
virtual void callException(const std::exception &e)
called when the job throws during an async call
Definition: AsyncJob.cc:143
Definition: CodeContext.h:53
Definition: Forwarder.h:30
void removeTimeoutEvent()
called when we are no longer waiting for Coordinator to respond
Definition: Forwarder.cc:167
std::map< RequestId::Index, AsyncCall::Pointer > RequestsMap
maps request->id to Forwarder::handleRemoteAck callback
Definition: Forwarder.h:69
Forwarder(Request::Pointer aRequest, double aTimeout)
Definition: Forwarder.cc:25
static AsyncCall::Pointer DequeueRequest(RequestId::Index)
returns and forgets the right Forwarder callback for the request
Definition: Forwarder.cc:151
void handleRemoteAck()
called when Coordinator starts processing the request
Definition: Forwarder.cc:86
void requestTimedOut()
called when Coordinator fails to start processing the request [in time]
Definition: Forwarder.cc:112
void callException(const std::exception &e) override
called when the job throws during an async call
Definition: Forwarder.cc:139
virtual void handleException(const std::exception &e)
terminate with an error
Definition: Forwarder.cc:132
static void HandleRemoteAck(RequestId)
finds and calls the right Forwarder upon Coordinator's response
Definition: Forwarder.cc:174
static void RequestTimedOut(void *param)
Ipc::Forwarder::requestTimedOut wrapper.
Definition: Forwarder.cc:98
static String CoordinatorAddr()
get the IPC message address for coordinator process
Definition: Port.cc:65
Definition: RequestId.h:23
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:35
Definition: AsyncJobCalls.h:91
void eventAdd(const char *name, EVH *func, void *arg, double when, int weight, bool cbdata)
Definition: event.cc:107
void SendMessage(const String &toAddress, const TypedMsgHdr &message)
Definition: UdsOp.cc:188
static InquirerPointer DequeueRequest(const RequestId::Index requestId)
returns and forgets the Inquirer waiting for the given requests
Definition: Inquirer.cc:43