#include <cstddef>#include <exception>#include <functional>#include <future>#include <map>#include <memory>#include <set>#include <sstream>#include <string>#include <tuple>#include <type_traits>#include <typeindex>#include <utility>#include <vector>#include "../derecho_exception.hpp"#include "../derecho_type_definitions.hpp"#include "derecho_internal.hpp"#include <derecho/mutils-serialization/SerializationSupport.hpp>#include <derecho/utils/logger.hpp>#include <mutils/macro_utils.hpp>

Go to the source code of this file.
Classes | |
| struct | derecho::rpc::String< str > |
| This "compile-time String" puts a short sequence of characters into a type's template parameter, allowing it to be accessed at compile-time in a constexpr hash function. More... | |
| struct | derecho::rpc::Opcode |
| An RPC function call can be uniquely identified by the tuple (class, subgroup ID, function ID, is-reply), which is what this struct encapsulates. More... | |
| struct | derecho::rpc::remote_exception_occurred |
| Indicates that an RPC call failed because executing the RPC function on the remote node resulted in an exception. More... | |
| struct | derecho::rpc::node_removed_from_group_exception |
| Indicates that an RPC call to a node failed because the node was removed from the Replicated Object's subgroup (and possibly from the enclosing Group entirely) after the RPC message was sent but before a reply was received. More... | |
| struct | derecho::rpc::sender_removed_from_group_exception |
| Indicates that an RPC call from this node was aborted because this node was removed from its subgroup/shard (and reassigned to another one) during the view change. More... | |
| struct | derecho::rpc::recv_ret |
| Return type of all the RemoteInvocable::receive_* methods. More... | |
| class | derecho::rpc::QueryResults< Ret > |
| Data structure that (indirectly) holds a set of futures for a single RPC function call; there is one future for each node contacted to make the call, and it will eventually contain that node's reply. More... | |
| class | derecho::rpc::QueryResults< Ret >::ReplyMap |
| class | derecho::rpc::QueryResults< void > |
| Specialization of QueryResults for void functions, which do not generate replies. More... | |
| class | derecho::rpc::QueryResults< void >::ReplyMap |
| class | derecho::rpc::PendingBase |
| Abstract base type for PendingResults. More... | |
| class | derecho::rpc::PendingResults< Ret > |
| Data structure that holds a set of promises for a single RPC function call; the promises transmit one response (either a value or an exception) for each node that was called. More... | |
| class | derecho::rpc::PendingResults< void > |
| Specialization of PendingResults for void functions, which do not generate replies. More... | |
Namespaces | |
| derecho | |
| derecho::rpc | |
| derecho::rpc::remote_invocation_utilities | |
| Utility functions for manipulating the headers of RPC messages. | |
Macros | |
| #define | RPC_HEADER_FLAG_TST(f, name) ((f) & (((uint32_t)1L) << (_RPC_HEADER_FLAG_##name))) |
| #define | RPC_HEADER_FLAG_SET(f, name) ((f) |= (((uint32_t)1L) << (_RPC_HEADER_FLAG_##name))) |
| #define | RPC_HEADER_FLAG_CLR(f, name) ((f) &= ~(((uint32_t)1L) << (_RPC_HEADER_FLAG_##name))) |
| #define | _RPC_HEADER_FLAG_CASCADE (0) |
| #define | _RPC_HEADER_FLAG_RESERVED (1) |
| #define | CT_STRING(...) derecho::rpc::String<MACRO_GET_STR(#__VA_ARGS__)> |
Typedefs | |
| using | derecho::rpc::FunctionTag = unsigned long long |
| using | derecho::rpc::node_list_t = std::vector< node_id_t > |
| using | derecho::rpc::receive_fun_t = std::function< recv_ret(mutils::RemoteDeserialization_v *rdv, const node_id_t &, const char *recv_buf, const std::function< char *(int)> &out_alloc)> |
| Type signature for all the RemoteInvocable::receive_* methods. More... | |
| template<typename T > | |
| using | derecho::rpc::reply_map = std::map< node_id_t, std::future< T > > |
| The type of map contained in a QueryResults::ReplyMap. More... | |
Functions | |
| bool | derecho::rpc::operator< (const Opcode &lhs, const Opcode &rhs) |
| bool | derecho::rpc::operator== (const Opcode &lhs, const Opcode &rhs) |
| std::size_t | derecho::rpc::remote_invocation_utilities::header_space () |
| char * | derecho::rpc::remote_invocation_utilities::extra_alloc (int i) |
| void | derecho::rpc::remote_invocation_utilities::populate_header (char *reply_buf, const std::size_t &payload_size, const Opcode &op, const node_id_t &from, const uint32_t &flags) |
| void | derecho::rpc::remote_invocation_utilities::retrieve_header (mutils::RemoteDeserialization_v *rdv, const char *reply_buf, std::size_t &payload_size, Opcode &op, node_id_t &from, uint32_t &flags) |
| struct derecho::rpc::Opcode |
An RPC function call can be uniquely identified by the tuple (class, subgroup ID, function ID, is-reply), which is what this struct encapsulates.
Its comparsion operators simply inherit the ones from std::tuple.
Definition at line 62 of file rpc_utils.hpp.
| Class Members | ||
|---|---|---|
| subgroup_type_id_t | class_id | |
| FunctionTag | function_id | |
| bool | is_reply | |
| subgroup_id_t | subgroup_id | |
| struct derecho::rpc::recv_ret |
Return type of all the RemoteInvocable::receive_* methods.
If the method is receive_call, this struct contains the message to send in reply, along with its size in bytes, and a pointer to the exception generated by the function call if one was thrown.
Definition at line 122 of file rpc_utils.hpp.

| Class Members | ||
|---|---|---|
| Opcode | opcode | |
| char * | payload | |
| exception_ptr | possible_exception | |
| size_t | size | |
| #define _RPC_HEADER_FLAG_CASCADE (0) |
Definition at line 548 of file rpc_utils.hpp.
| #define _RPC_HEADER_FLAG_RESERVED (1) |
Definition at line 549 of file rpc_utils.hpp.
| #define CT_STRING | ( | ... | ) | derecho::rpc::String<MACRO_GET_STR(#__VA_ARGS__)> |
Definition at line 595 of file rpc_utils.hpp.
| #define RPC_HEADER_FLAG_CLR | ( | f, | |
| name | |||
| ) | ((f) &= ~(((uint32_t)1L) << (_RPC_HEADER_FLAG_##name))) |
Definition at line 544 of file rpc_utils.hpp.
| #define RPC_HEADER_FLAG_SET | ( | f, | |
| name | |||
| ) | ((f) |= (((uint32_t)1L) << (_RPC_HEADER_FLAG_##name))) |
Definition at line 542 of file rpc_utils.hpp.
| #define RPC_HEADER_FLAG_TST | ( | f, | |
| name | |||
| ) | ((f) & (((uint32_t)1L) << (_RPC_HEADER_FLAG_##name))) |
Definition at line 540 of file rpc_utils.hpp.
1.8.13