22 #ifndef Hypertable_Lib_RangeServerRecovery_ReceiverPlan_h
23 #define Hypertable_Lib_RangeServerRecovery_ReceiverPlan_h
40 namespace RangeServerRecovery {
64 void get_locations(
StringSet &locations)
const;
68 void get_range_specs(vector<QualifiedRangeSpec> &specs)
const;
70 void get_range_specs(
const String &location, vector<QualifiedRangeSpec> &specs)
const;
72 void get_range_specs_and_states(vector<QualifiedRangeSpec> &specs,
73 vector<RangeState> &states)
const;
75 void get_range_specs_and_states(
const String &location,
76 vector<QualifiedRangeSpec> &specs,
77 vector<RangeState> &states)
const;
82 void clear() { container.clear(); }
83 size_t size()
const {
return container.size(); }
84 bool empty()
const {
return container.empty(); }
94 uint8_t encoding_version()
const override;
99 size_t encoded_length_internal()
const override;
103 void encode_internal(uint8_t **bufp)
const override;
111 void decode_internal(uint8_t version,
const uint8_t **bufp,
112 size_t *remainp)
override;
117 auto &location_index = (
const_cast<ReceiverPlan&
>(plan)).container.get<1>();
118 os <<
"{ReceiverPlan: num_entries=" << location_index.size();
119 for (
auto & entry : location_index)
131 #endif // Hypertable_Lib_RangeServerRecovery_ReceiverPlan_h
std::set< String > StringSet
STL Set managing Strings.
std::string String
A String is simply a typedef to std::string.
Declarations for TableIdentifier and TableIdentifierManaged.
Declarations for ServerReceiverPlan.
PageArena memory allocator for STL classes.
friend ostream & operator<<(ostream &os, const ReceiverPlan &plan)
Declarations for QualifiedRangeSpec and QualifiedRangeSpecManaged.
The PageArena allocator is simple and fast, avoiding individual mallocs/frees.
ServerReceiverPlanContainer container
Declarations for RangeSpec and RangeSpecManaged.
Declarations for Serializable.
void copy(TableDumper &, CellsBuilder &)
Mixin class that provides a standard serialization interface.
void insert(const String &location, const QualifiedRangeSpec &qrs, const RangeState &state)
Qualified (with table identifier) range specification.
String extensions and helpers: sets, maps, append operators etc.
multi_index_container< ServerReceiverPlan, indexed_by< ordered_unique< tag< ServerReceiverPlanByRange >, member< ServerReceiverPlan, QualifiedRangeSpec,&ServerReceiverPlan::spec > >, ordered_non_unique< tag< ServerReceiverPlanByLocation >, member< ServerReceiverPlan, string,&ServerReceiverPlan::location > > > > ServerReceiverPlanContainer
RangeServer recovery receiver plan.