Derecho  0.9
Distributed systems toolkit for RDMA
subgroup_info.hpp
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include <cstdint>
10 #include <functional>
11 #include <list>
12 #include <map>
13 #include <memory>
14 #include <typeindex>
15 #include <vector>
16 
17 #include "derecho_exception.hpp"
18 
19 namespace derecho {
20 
21 class View;
22 class SubView;
23 
32 public:
34 };
35 
43 using subgroup_shard_layout_t = std::vector<std::vector<SubView>>;
44 
60 using subgroup_allocation_map_t = std::map<std::type_index, subgroup_shard_layout_t>;
61 
81  const std::vector<std::type_index>&,
82  const std::unique_ptr<View>&,
83  View&)>;
84 
89 struct SubgroupInfo {
94 
95  SubgroupInfo(const shard_view_generator_t& subgroup_membership_function)
96  : subgroup_membership_function(subgroup_membership_function) {}
97 };
98 
99 } // namespace derecho
subgroup_provisioning_exception(const std::string &message="")
SubgroupInfo(const shard_view_generator_t &subgroup_membership_function)
std::vector< std::vector< SubView > > subgroup_shard_layout_t
The data structure used to store a subgroups-and-shards layout for a single subgroup type (i...
const shard_view_generator_t subgroup_membership_function
The function that generates all the SubViews for a View.
std::function< subgroup_allocation_map_t(const std::vector< std::type_index > &, const std::unique_ptr< View > &, View &)> shard_view_generator_t
The type of a lambda function that generates subgroup and shard views for a Derecho group...
An exception that indicates that a subgroup membership function was unable to finish executing becaus...
std::map< std::type_index, subgroup_shard_layout_t > subgroup_allocation_map_t
The data structure used to store the subgroups-and-shards layouts for all subgroup types in a Group (...
Container for whatever information is needed to describe a Group&#39;s subgroups and shards.
Base exception class for all exceptions raised by Derecho.