Provides functions to implement RPC sends for function calls to a single function, identified by its compile-time "tag" or ID.
More...
|
Ret * | returnRet () |
|
RemoteInvoker & | get_invoker (std::integral_constant< FunctionTag, Tag > const *const, const Args &...) |
|
auto | serialize_one (barray) |
|
template<typename A , typename... Rest> |
auto | serialize_one (barray v, const A &a, const Rest &... rest) |
|
auto | serialize_all (barray v, const Args &... args) |
|
send_return | send (const std::function< char *(int)> &out_alloc, const std::decay_t< Args > &... remote_args) |
| Called to construct an RPC message to send that will invoke the remote- invocable function targeted by this RemoteInvoker. More...
|
|
template<typename definitely_char > |
recv_ret | receive_response (std::false_type *, mutils::DeserializationManager *dsm, const node_id_t &nid, const char *response, const std::function< definitely_char *(int)> &) |
| Specialization of receive_response for non-void functions. More...
|
|
recv_ret | receive_response (std::true_type *, mutils::DeserializationManager *, const node_id_t &nid, const char *response, const std::function< char *(int)> &) |
| Specialization of receive_response for void functions (which don't expect any response). More...
|
|
recv_ret | receive_response (mutils::RemoteDeserialization_v *rdv, const node_id_t &nid, const char *response, const std::function< char *(int)> &f) |
| Entry point for responses; called when a message is received that contains a response to this RemoteInvocable function's RPC call. More...
|
|
void | fulfill_pending_results_vector (long int invocation_id, const node_list_t &who) |
| Populates the pending-results map of a particular invocation of the remote-invocable function, given the list of nodes that will be contacted to call the function. More...
|
|
| RemoteInvoker (uint32_t class_id, uint32_t instance_id, std::map< Opcode, receive_fun_t > &receivers) |
| Constructs a RemoteInvoker that provides RPC call marshalling and response-handling for a specific function tag and function type (the one specified in the class's template parameters). More...
|
|
template<FunctionTag Tag, typename Ret, typename... Args>
struct derecho::rpc::RemoteInvoker< Tag, std::function< Ret(Args...)> >
Provides functions to implement RPC sends for function calls to a single function, identified by its compile-time "tag" or ID.
Many versions of this class will be extended by a single RemoteInvocableClass; each specific instance of this class provides a mechanism for communicating with remote sites that handles one particular function.
- Template Parameters
-
tag | The compile-time ID value associated with this function |
Ret | The function's return type |
Args | The function's argument types |
Definition at line 47 of file remote_invocable.hpp.
template<FunctionTag Tag, typename Ret , typename... Args>
Constructs a RemoteInvoker that provides RPC call marshalling and response-handling for a specific function tag and function type (the one specified in the class's template parameters).
Registers a function to handle responses for this RPC call in the given "receivers" map. (The actual function implementation is not needed, since only the remote side needs to know how to implement the RPC function.)
- Parameters
-
receivers | A map from RPC message opcodes to handler functions, which this RemoteInvoker should add its functions to. |
Definition at line 245 of file remote_invocable.hpp.
template<FunctionTag Tag, typename Ret , typename... Args>
template<typename definitely_char >
Specialization of receive_response for non-void functions.
Stores the response in the results map, or stores the exception if there was an exception.
- Returns
- An empty recv_ret, since there is no response to a response
Definition at line 147 of file remote_invocable.hpp.