28 #ifndef Hypertable_Lib_RangeServerRecovery_ReplayPlan_h
29 #define Hypertable_Lib_RangeServerRecovery_ReplayPlan_h
41 namespace RangeServerRecovery {
66 void insert(int32_t fragment,
const string &location);
72 void remove_location(
const string &location);
80 void get_fragments(vector<int32_t> &fragments)
const;
89 void get_fragments(
const string &location, vector<int32_t> &fragments)
const;
97 void get_locations(
StringSet &locations)
const;
106 bool get_location(int32_t fragment,
string &location)
const;
118 uint8_t encoding_version()
const override;
123 size_t encoded_length_internal()
const override;
127 void encode_internal(uint8_t **bufp)
const override;
135 void decode_internal(uint8_t version,
const uint8_t **bufp,
136 size_t *remainp)
override;
140 auto & location_index =
141 (
const_cast<ReplayPlan&
>(plan)).container.get<1>();
142 os <<
"{ReplayPlan: num_entries=" << location_index.size();
143 for (
auto & entry : location_index)
154 #endif // Hypertable_Lib_RangeServerRecovery_ReplayPlan_h
std::set< String > StringSet
STL Set managing Strings.
friend ostream & operator<<(ostream &os, const ReplayPlan &plan)
FragmentReplayPlanContainer container
Container holding fragment replay plans.
void clear()
Clears the plan.
Declarations for Serializable.
Mixin class that provides a standard serialization interface.
Declarations for FragmentReplayPlan.
String extensions and helpers: sets, maps, append operators etc.
Holds a fragment replay plan for the recovery of a RangeServer.
boost::multi_index_container< FragmentReplayPlan, indexed_by< ordered_unique< tag< FragmentReplayPlanById >, member< FragmentReplayPlan, uint32_t,&FragmentReplayPlan::fragment > >, ordered_non_unique< tag< FragmentReplayPlanByLocation >, member< FragmentReplayPlan, string,&FragmentReplayPlan::location > > > > FragmentReplayPlanContainer