From 9deaa49e31f26116bb2efee03e2226cab428989e Mon Sep 17 00:00:00 2001 From: heyuchen Date: Thu, 23 Apr 2020 12:25:24 +0800 Subject: [PATCH 1/9] add start_bulk_load --- include/dsn/cpp/json_helper.h | 25 +- .../serialization_helper/dsn.layer2_types.h | 14 +- .../dsn/dist/replication/replication.codes.h | 1 + .../dsn/dist/replication/replication_enums.h | 14 + .../dsn/dist/replication/replication_types.h | 249 +++ src/core/core/dsn.layer2_types.cpp | 27 + .../replication/common/replication_common.cpp | 4 + .../replication/common/replication_common.h | 11 + .../replication/common/replication_types.cpp | 1616 +++++++++++------ src/dist/replication/lib/replica_context.h | 8 - .../meta_server/meta_bulk_load_service.cpp | 300 +++ .../meta_server/meta_bulk_load_service.h | 195 ++ .../replication/meta_server/meta_service.cpp | 29 + .../replication/meta_server/meta_service.h | 8 + .../replication/meta_server/server_state.h | 2 + src/dist/replication/replication.thrift | 54 + .../test/meta_test/unit_test/CMakeLists.txt | 2 +- .../unit_test/meta_bulk_load_service_test.cpp | 116 ++ .../test/meta_test/unit_test/meta_test_base.h | 8 + src/dsn.layer2.thrift | 4 + 20 files changed, 2143 insertions(+), 544 deletions(-) create mode 100644 src/dist/replication/meta_server/meta_bulk_load_service.cpp create mode 100644 src/dist/replication/meta_server/meta_bulk_load_service.h create mode 100644 src/dist/replication/test/meta_test/unit_test/meta_bulk_load_service_test.cpp diff --git a/include/dsn/cpp/json_helper.h b/include/dsn/cpp/json_helper.h index 90b51df080..4ba6434638 100644 --- a/include/dsn/cpp/json_helper.h +++ b/include/dsn/cpp/json_helper.h @@ -86,6 +86,10 @@ #define JSON_ENCODE_ENTRIES13(out, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \ JSON_ENCODE_ENTRIES12(out, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12); \ JSON_ENCODE_ENTRY(out, prefix, T13) +#define JSON_ENCODE_ENTRIES14( \ + out, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) \ + JSON_ENCODE_ENTRIES13(out, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13); \ + JSON_ENCODE_ENTRY(out, prefix, T14) #define JSON_DECODE_ENTRY(in, prefix, T) \ do { \ @@ -140,9 +144,13 @@ #define JSON_DECODE_ENTRIES13(in, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \ JSON_DECODE_ENTRIES12(in, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12); \ JSON_TRY_DECODE_ENTRY(in, prefix, T13) +#define JSON_DECODE_ENTRIES14( \ + in, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) \ + JSON_DECODE_ENTRIES13(in, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13); \ + JSON_TRY_DECODE_ENTRY(in, prefix, T14) #define JSON_ENTRIES_GET_MACRO( \ - ph1, ph2, ph3, ph4, ph5, ph6, ph7, ph8, ph9, ph10, ph11, ph12, ph13, NAME, ...) \ + ph1, ph2, ph3, ph4, ph5, ph6, ph7, ph8, ph9, ph10, ph11, ph12, ph13, ph14, NAME, ...) \ NAME // workaround due to the way VC handles "..." #define JSON_ENTRIES_GET_MACRO_(tuple) JSON_ENTRIES_GET_MACRO tuple @@ -150,6 +158,7 @@ #define JSON_ENCODE_ENTRIES(out, prefix, ...) \ out.StartObject(); \ JSON_ENTRIES_GET_MACRO_((__VA_ARGS__, \ + JSON_ENCODE_ENTRIES14, \ JSON_ENCODE_ENTRIES13, \ JSON_ENCODE_ENTRIES12, \ JSON_ENCODE_ENTRIES11, \ @@ -171,6 +180,7 @@ int arguments_count = 0; \ int parsed_count = 0; \ JSON_ENTRIES_GET_MACRO_((__VA_ARGS__, \ + JSON_DECODE_ENTRIES14, \ JSON_DECODE_ENTRIES13, \ JSON_DECODE_ENTRIES12, \ JSON_DECODE_ENTRIES11, \ @@ -325,6 +335,8 @@ UINT_TYPE_SERIALIZATION(uint64_t) ENUM_TYPE_SERIALIZATION(dsn::replication::partition_status::type, dsn::replication::partition_status::PS_INVALID) ENUM_TYPE_SERIALIZATION(dsn::app_status::type, dsn::app_status::AS_INVALID) +ENUM_TYPE_SERIALIZATION(dsn::replication::bulk_load_status::type, + dsn::replication::bulk_load_status::BLS_INVALID) // json serialization for gpid, we treat it as string: "app_id.partition_id" inline void json_encode(JsonWriter &out, const dsn::gpid &pid) @@ -357,6 +369,10 @@ inline void json_encode(JsonWriter &out, const dsn::partition_configuration &con inline bool json_decode(const JsonObject &in, dsn::partition_configuration &config); inline void json_encode(JsonWriter &out, const dsn::app_info &info); inline bool json_decode(const JsonObject &in, dsn::app_info &info); +inline void json_encode(JsonWriter &out, const dsn::replication::file_meta &f_meta); +inline bool json_decode(const JsonObject &in, dsn::replication::file_meta &f_meta); +inline void json_encode(JsonWriter &out, const dsn::replication::bulk_load_metadata &metadata); +inline bool json_decode(const JsonObject &in, dsn::replication::bulk_load_metadata &metadata); template inline void json_encode_iterable(JsonWriter &out, const T &t) @@ -620,6 +636,11 @@ NON_MEMBER_JSON_SERIALIZATION(dsn::app_info, create_second, drop_second, duplicating, - init_partition_count) + init_partition_count, + is_bulk_loading) + +NON_MEMBER_JSON_SERIALIZATION(dsn::replication::file_meta, name, size, md5) + +NON_MEMBER_JSON_SERIALIZATION(dsn::replication::bulk_load_metadata, files, file_total_size) } // namespace json } // namespace dsn diff --git a/include/dsn/cpp/serialization_helper/dsn.layer2_types.h b/include/dsn/cpp/serialization_helper/dsn.layer2_types.h index c5e594439b..6ba23da9a1 100644 --- a/include/dsn/cpp/serialization_helper/dsn.layer2_types.h +++ b/include/dsn/cpp/serialization_helper/dsn.layer2_types.h @@ -293,7 +293,8 @@ typedef struct _app_info__isset create_second(false), drop_second(false), duplicating(false), - init_partition_count(true) + init_partition_count(true), + is_bulk_loading(true) { } bool status : 1; @@ -309,6 +310,7 @@ typedef struct _app_info__isset bool drop_second : 1; bool duplicating : 1; bool init_partition_count : 1; + bool is_bulk_loading : 1; } _app_info__isset; class app_info @@ -330,7 +332,8 @@ class app_info create_second(0), drop_second(0), duplicating(0), - init_partition_count(-1) + init_partition_count(-1), + is_bulk_loading(false) { status = (app_status::type)0; } @@ -349,6 +352,7 @@ class app_info int64_t drop_second; bool duplicating; int32_t init_partition_count; + bool is_bulk_loading; _app_info__isset __isset; @@ -378,6 +382,8 @@ class app_info void __set_init_partition_count(const int32_t val); + void __set_is_bulk_loading(const bool val); + bool operator==(const app_info &rhs) const { if (!(status == rhs.status)) @@ -408,6 +414,10 @@ class app_info return false; if (!(init_partition_count == rhs.init_partition_count)) return false; + if (__isset.is_bulk_loading != rhs.__isset.is_bulk_loading) + return false; + else if (__isset.is_bulk_loading && !(is_bulk_loading == rhs.is_bulk_loading)) + return false; return true; } bool operator!=(const app_info &rhs) const { return !(*this == rhs); } diff --git a/include/dsn/dist/replication/replication.codes.h b/include/dsn/dist/replication/replication.codes.h index 2a5aa166af..aed06aad5c 100644 --- a/include/dsn/dist/replication/replication.codes.h +++ b/include/dsn/dist/replication/replication.codes.h @@ -102,6 +102,7 @@ MAKE_EVENT_CODE_RPC(RPC_CM_DUPLICATION_SYNC, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC(RPC_CM_UPDATE_APP_ENV, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC(RPC_CM_DDD_DIAGNOSE, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC(RPC_CM_APP_PARTITION_SPLIT, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE_RPC(RPC_CM_START_BULK_LOAD, TASK_PRIORITY_COMMON) #undef CURRENT_THREAD_POOL #define CURRENT_THREAD_POOL THREAD_POOL_META_STATE diff --git a/include/dsn/dist/replication/replication_enums.h b/include/dsn/dist/replication/replication_enums.h index 6f67e78f28..d692964138 100644 --- a/include/dsn/dist/replication/replication_enums.h +++ b/include/dsn/dist/replication/replication_enums.h @@ -64,4 +64,18 @@ ENUM_BEGIN2(replication::node_status::type, node_status, replication::node_statu ENUM_REG(replication::node_status::NS_ALIVE) ENUM_REG(replication::node_status::NS_UNALIVE) ENUM_END2(replication::node_status::type, node_status) + +ENUM_BEGIN2(replication::bulk_load_status::type, + bulk_load_status, + replication::bulk_load_status::BLS_INVALID) +ENUM_REG(replication::bulk_load_status::BLS_INVALID) +ENUM_REG(replication::bulk_load_status::BLS_DOWNLOADING) +ENUM_REG(replication::bulk_load_status::BLS_DOWNLOADED) +ENUM_REG(replication::bulk_load_status::BLS_INGESTING) +ENUM_REG(replication::bulk_load_status::BLS_SUCCEED) +ENUM_REG(replication::bulk_load_status::BLS_FAILED) +ENUM_REG(replication::bulk_load_status::BLS_PAUSING) +ENUM_REG(replication::bulk_load_status::BLS_PAUSED) +ENUM_REG(replication::bulk_load_status::BLS_CANCELED) +ENUM_END2(replication::bulk_load_status::type, bulk_load_status) } diff --git a/include/dsn/dist/replication/replication_types.h b/include/dsn/dist/replication/replication_types.h index 940debd47f..459fb04d00 100644 --- a/include/dsn/dist/replication/replication_types.h +++ b/include/dsn/dist/replication/replication_types.h @@ -174,6 +174,24 @@ struct duplication_fail_mode extern const std::map _duplication_fail_mode_VALUES_TO_NAMES; +struct bulk_load_status +{ + enum type + { + BLS_INVALID = 0, + BLS_DOWNLOADING = 1, + BLS_DOWNLOADED = 2, + BLS_INGESTING = 3, + BLS_SUCCEED = 4, + BLS_FAILED = 5, + BLS_PAUSING = 6, + BLS_PAUSED = 7, + BLS_CANCELED = 8 + }; +}; + +extern const std::map _bulk_load_status_VALUES_TO_NAMES; + class mutation_header; class mutation_update; @@ -312,6 +330,8 @@ class configuration_query_restore_request; class configuration_query_restore_response; +class file_meta; + class configuration_update_app_env_request; class configuration_update_app_env_response; @@ -352,6 +372,12 @@ class notify_catch_up_request; class notify_cacth_up_response; +class bulk_load_metadata; + +class start_bulk_load_request; + +class start_bulk_load_response; + typedef struct _mutation_header__isset { _mutation_header__isset() @@ -4814,6 +4840,64 @@ inline std::ostream &operator<<(std::ostream &out, const configuration_query_res return out; } +typedef struct _file_meta__isset +{ + _file_meta__isset() : name(false), size(false), md5(false) {} + bool name : 1; + bool size : 1; + bool md5 : 1; +} _file_meta__isset; + +class file_meta +{ +public: + file_meta(const file_meta &); + file_meta(file_meta &&); + file_meta &operator=(const file_meta &); + file_meta &operator=(file_meta &&); + file_meta() : name(), size(0), md5() {} + + virtual ~file_meta() throw(); + std::string name; + int64_t size; + std::string md5; + + _file_meta__isset __isset; + + void __set_name(const std::string &val); + + void __set_size(const int64_t val); + + void __set_md5(const std::string &val); + + bool operator==(const file_meta &rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(size == rhs.size)) + return false; + if (!(md5 == rhs.md5)) + return false; + return true; + } + bool operator!=(const file_meta &rhs) const { return !(*this == rhs); } + + bool operator<(const file_meta &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; +}; + +void swap(file_meta &a, file_meta &b); + +inline std::ostream &operator<<(std::ostream &out, const file_meta &obj) +{ + obj.printTo(out); + return out; +} + typedef struct _configuration_update_app_env_request__isset { _configuration_update_app_env_request__isset() @@ -6043,6 +6127,171 @@ inline std::ostream &operator<<(std::ostream &out, const notify_cacth_up_respons obj.printTo(out); return out; } + +typedef struct _bulk_load_metadata__isset +{ + _bulk_load_metadata__isset() : files(false), file_total_size(false) {} + bool files : 1; + bool file_total_size : 1; +} _bulk_load_metadata__isset; + +class bulk_load_metadata +{ +public: + bulk_load_metadata(const bulk_load_metadata &); + bulk_load_metadata(bulk_load_metadata &&); + bulk_load_metadata &operator=(const bulk_load_metadata &); + bulk_load_metadata &operator=(bulk_load_metadata &&); + bulk_load_metadata() : file_total_size(0) {} + + virtual ~bulk_load_metadata() throw(); + std::vector files; + int64_t file_total_size; + + _bulk_load_metadata__isset __isset; + + void __set_files(const std::vector &val); + + void __set_file_total_size(const int64_t val); + + bool operator==(const bulk_load_metadata &rhs) const + { + if (!(files == rhs.files)) + return false; + if (!(file_total_size == rhs.file_total_size)) + return false; + return true; + } + bool operator!=(const bulk_load_metadata &rhs) const { return !(*this == rhs); } + + bool operator<(const bulk_load_metadata &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; +}; + +void swap(bulk_load_metadata &a, bulk_load_metadata &b); + +inline std::ostream &operator<<(std::ostream &out, const bulk_load_metadata &obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _start_bulk_load_request__isset +{ + _start_bulk_load_request__isset() + : app_name(false), cluster_name(false), file_provider_type(false) + { + } + bool app_name : 1; + bool cluster_name : 1; + bool file_provider_type : 1; +} _start_bulk_load_request__isset; + +class start_bulk_load_request +{ +public: + start_bulk_load_request(const start_bulk_load_request &); + start_bulk_load_request(start_bulk_load_request &&); + start_bulk_load_request &operator=(const start_bulk_load_request &); + start_bulk_load_request &operator=(start_bulk_load_request &&); + start_bulk_load_request() : app_name(), cluster_name(), file_provider_type() {} + + virtual ~start_bulk_load_request() throw(); + std::string app_name; + std::string cluster_name; + std::string file_provider_type; + + _start_bulk_load_request__isset __isset; + + void __set_app_name(const std::string &val); + + void __set_cluster_name(const std::string &val); + + void __set_file_provider_type(const std::string &val); + + bool operator==(const start_bulk_load_request &rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(cluster_name == rhs.cluster_name)) + return false; + if (!(file_provider_type == rhs.file_provider_type)) + return false; + return true; + } + bool operator!=(const start_bulk_load_request &rhs) const { return !(*this == rhs); } + + bool operator<(const start_bulk_load_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; +}; + +void swap(start_bulk_load_request &a, start_bulk_load_request &b); + +inline std::ostream &operator<<(std::ostream &out, const start_bulk_load_request &obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _start_bulk_load_response__isset +{ + _start_bulk_load_response__isset() : err(false), hint_msg(false) {} + bool err : 1; + bool hint_msg : 1; +} _start_bulk_load_response__isset; + +class start_bulk_load_response +{ +public: + start_bulk_load_response(const start_bulk_load_response &); + start_bulk_load_response(start_bulk_load_response &&); + start_bulk_load_response &operator=(const start_bulk_load_response &); + start_bulk_load_response &operator=(start_bulk_load_response &&); + start_bulk_load_response() : hint_msg() {} + + virtual ~start_bulk_load_response() throw(); + ::dsn::error_code err; + std::string hint_msg; + + _start_bulk_load_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_hint_msg(const std::string &val); + + bool operator==(const start_bulk_load_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(hint_msg == rhs.hint_msg)) + return false; + return true; + } + bool operator!=(const start_bulk_load_response &rhs) const { return !(*this == rhs); } + + bool operator<(const start_bulk_load_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; +}; + +void swap(start_bulk_load_response &a, start_bulk_load_response &b); + +inline std::ostream &operator<<(std::ostream &out, const start_bulk_load_response &obj) +{ + obj.printTo(out); + return out; +} } } // namespace diff --git a/src/core/core/dsn.layer2_types.cpp b/src/core/core/dsn.layer2_types.cpp index d01d069936..b078062bb5 100644 --- a/src/core/core/dsn.layer2_types.cpp +++ b/src/core/core/dsn.layer2_types.cpp @@ -723,6 +723,12 @@ void app_info::__set_duplicating(const bool val) void app_info::__set_init_partition_count(const int32_t val) { this->init_partition_count = val; } +void app_info::__set_is_bulk_loading(const bool val) +{ + this->is_bulk_loading = val; + __isset.is_bulk_loading = true; +} + uint32_t app_info::read(::apache::thrift::protocol::TProtocol *iprot) { @@ -862,6 +868,14 @@ uint32_t app_info::read(::apache::thrift::protocol::TProtocol *iprot) xfer += iprot->skip(ftype); } break; + case 14: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_bulk_loading); + this->__isset.is_bulk_loading = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -943,6 +957,11 @@ uint32_t app_info::write(::apache::thrift::protocol::TProtocol *oprot) const xfer += oprot->writeI32(this->init_partition_count); xfer += oprot->writeFieldEnd(); + if (this->__isset.is_bulk_loading) { + xfer += oprot->writeFieldBegin("is_bulk_loading", ::apache::thrift::protocol::T_BOOL, 14); + xfer += oprot->writeBool(this->is_bulk_loading); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -964,6 +983,7 @@ void swap(app_info &a, app_info &b) swap(a.drop_second, b.drop_second); swap(a.duplicating, b.duplicating); swap(a.init_partition_count, b.init_partition_count); + swap(a.is_bulk_loading, b.is_bulk_loading); swap(a.__isset, b.__isset); } @@ -982,6 +1002,7 @@ app_info::app_info(const app_info &other45) drop_second = other45.drop_second; duplicating = other45.duplicating; init_partition_count = other45.init_partition_count; + is_bulk_loading = other45.is_bulk_loading; __isset = other45.__isset; } app_info::app_info(app_info &&other46) @@ -999,6 +1020,7 @@ app_info::app_info(app_info &&other46) drop_second = std::move(other46.drop_second); duplicating = std::move(other46.duplicating); init_partition_count = std::move(other46.init_partition_count); + is_bulk_loading = std::move(other46.is_bulk_loading); __isset = std::move(other46.__isset); } app_info &app_info::operator=(const app_info &other47) @@ -1016,6 +1038,7 @@ app_info &app_info::operator=(const app_info &other47) drop_second = other47.drop_second; duplicating = other47.duplicating; init_partition_count = other47.init_partition_count; + is_bulk_loading = other47.is_bulk_loading; __isset = other47.__isset; return *this; } @@ -1034,6 +1057,7 @@ app_info &app_info::operator=(app_info &&other48) drop_second = std::move(other48.drop_second); duplicating = std::move(other48.duplicating); init_partition_count = std::move(other48.init_partition_count); + is_bulk_loading = std::move(other48.is_bulk_loading); __isset = std::move(other48.__isset); return *this; } @@ -1067,6 +1091,9 @@ void app_info::printTo(std::ostream &out) const (__isset.duplicating ? (out << to_string(duplicating)) : (out << "")); out << ", " << "init_partition_count=" << to_string(init_partition_count); + out << ", " + << "is_bulk_loading="; + (__isset.is_bulk_loading ? (out << to_string(is_bulk_loading)) : (out << "")); out << ")"; } diff --git a/src/dist/replication/common/replication_common.cpp b/src/dist/replication/common/replication_common.cpp index 469486100f..925eebfe7e 100644 --- a/src/dist/replication/common/replication_common.cpp +++ b/src/dist/replication/common/replication_common.cpp @@ -514,6 +514,9 @@ void replication_options::initialize() cold_backup_checkpoint_reserve_minutes, "reserve minutes of cold backup checkpoint"); + bulk_load_root = dsn_config_get_value_string( + "replication", "bulk_load_root", "", "bulk load remote file provider path prefix"); + replica_helper::load_meta_servers(meta_servers); sanity_check(); @@ -629,6 +632,7 @@ const std::string replica_envs::ROCKSDB_CHECKPOINT_RESERVE_TIME_SECONDS( const std::string replica_envs::ROCKSDB_ITERATION_THRESHOLD_TIME_MS( "replica.rocksdb_iteration_threshold_time_ms"); const std::string replica_envs::BUSINESS_INFO("business.info"); +const std::string bulk_load_constant::BULK_LOAD_INFO("bulk_load_info"); namespace cold_backup { std::string get_policy_path(const std::string &root, const std::string &policy_name) diff --git a/src/dist/replication/common/replication_common.h b/src/dist/replication/common/replication_common.h index 4b379be83d..70ee498dba 100644 --- a/src/dist/replication/common/replication_common.h +++ b/src/dist/replication/common/replication_common.h @@ -35,6 +35,8 @@ namespace replication { typedef std::unordered_map<::dsn::rpc_address, partition_status::type> node_statuses; typedef std::unordered_map<::dsn::rpc_address, dsn::task_ptr> node_tasks; +typedef rpc_holder start_bulk_load_rpc; + class replication_options { public: @@ -114,6 +116,8 @@ class replication_options int32_t max_concurrent_uploading_file_count; int32_t cold_backup_checkpoint_reserve_minutes; + std::string bulk_load_root; + public: replication_options(); void initialize(); @@ -149,6 +153,13 @@ class backup_restore_constant static const std::string SKIP_BAD_PARTITION; }; +class bulk_load_constant +{ +public: + static const std::string BULK_LOAD_INFO; + // TODO(heyuchen): add more constant in further pr +}; + namespace cold_backup { // // Attention: when compose the path on block service, we use appname_appid, because appname_appid diff --git a/src/dist/replication/common/replication_types.cpp b/src/dist/replication/common/replication_types.cpp index 2959618858..81b1141c5a 100644 --- a/src/dist/replication/common/replication_types.cpp +++ b/src/dist/replication/common/replication_types.cpp @@ -145,6 +145,28 @@ const std::map _duplication_fail_mode_VALUES_TO_NAMES( ::apache::thrift::TEnumIterator(3, _kduplication_fail_modeValues, _kduplication_fail_modeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); +int _kbulk_load_statusValues[] = {bulk_load_status::BLS_INVALID, + bulk_load_status::BLS_DOWNLOADING, + bulk_load_status::BLS_DOWNLOADED, + bulk_load_status::BLS_INGESTING, + bulk_load_status::BLS_SUCCEED, + bulk_load_status::BLS_FAILED, + bulk_load_status::BLS_PAUSING, + bulk_load_status::BLS_PAUSED, + bulk_load_status::BLS_CANCELED}; +const char *_kbulk_load_statusNames[] = {"BLS_INVALID", + "BLS_DOWNLOADING", + "BLS_DOWNLOADED", + "BLS_INGESTING", + "BLS_SUCCEED", + "BLS_FAILED", + "BLS_PAUSING", + "BLS_PAUSED", + "BLS_CANCELED"}; +const std::map _bulk_load_status_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(9, _kbulk_load_statusValues, _kbulk_load_statusNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + mutation_header::~mutation_header() throw() {} void mutation_header::__set_pid(const ::dsn::gpid &val) { this->pid = val; } @@ -11178,6 +11200,143 @@ void configuration_query_restore_response::printTo(std::ostream &out) const out << ")"; } +file_meta::~file_meta() throw() {} + +void file_meta::__set_name(const std::string &val) { this->name = val; } + +void file_meta::__set_size(const int64_t val) { this->size = val; } + +void file_meta::__set_md5(const std::string &val) { this->md5 = val; } + +uint32_t file_meta::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->size); + this->__isset.size = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->md5); + this->__isset.md5 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t file_meta::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("file_meta"); + + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("size", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->size); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("md5", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->md5); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(file_meta &a, file_meta &b) +{ + using ::std::swap; + swap(a.name, b.name); + swap(a.size, b.size); + swap(a.md5, b.md5); + swap(a.__isset, b.__isset); +} + +file_meta::file_meta(const file_meta &other473) +{ + name = other473.name; + size = other473.size; + md5 = other473.md5; + __isset = other473.__isset; +} +file_meta::file_meta(file_meta &&other474) +{ + name = std::move(other474.name); + size = std::move(other474.size); + md5 = std::move(other474.md5); + __isset = std::move(other474.__isset); +} +file_meta &file_meta::operator=(const file_meta &other475) +{ + name = other475.name; + size = other475.size; + md5 = other475.md5; + __isset = other475.__isset; + return *this; +} +file_meta &file_meta::operator=(file_meta &&other476) +{ + name = std::move(other476.name); + size = std::move(other476.size); + md5 = std::move(other476.md5); + __isset = std::move(other476.__isset); + return *this; +} +void file_meta::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "file_meta("; + out << "name=" << to_string(name); + out << ", " + << "size=" << to_string(size); + out << ", " + << "md5=" << to_string(md5); + out << ")"; +} + configuration_update_app_env_request::~configuration_update_app_env_request() throw() {} void configuration_update_app_env_request::__set_app_name(const std::string &val) @@ -11237,9 +11396,9 @@ uint32_t configuration_update_app_env_request::read(::apache::thrift::protocol:: break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast473; - xfer += iprot->readI32(ecast473); - this->op = (app_env_operation::type)ecast473; + int32_t ecast477; + xfer += iprot->readI32(ecast477); + this->op = (app_env_operation::type)ecast477; this->__isset.op = true; } else { xfer += iprot->skip(ftype); @@ -11249,13 +11408,13 @@ uint32_t configuration_update_app_env_request::read(::apache::thrift::protocol:: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->keys.clear(); - uint32_t _size474; - ::apache::thrift::protocol::TType _etype477; - xfer += iprot->readListBegin(_etype477, _size474); - this->keys.resize(_size474); - uint32_t _i478; - for (_i478 = 0; _i478 < _size474; ++_i478) { - xfer += iprot->readString(this->keys[_i478]); + uint32_t _size478; + ::apache::thrift::protocol::TType _etype481; + xfer += iprot->readListBegin(_etype481, _size478); + this->keys.resize(_size478); + uint32_t _i482; + for (_i482 = 0; _i482 < _size478; ++_i482) { + xfer += iprot->readString(this->keys[_i482]); } xfer += iprot->readListEnd(); } @@ -11268,13 +11427,13 @@ uint32_t configuration_update_app_env_request::read(::apache::thrift::protocol:: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->values.clear(); - uint32_t _size479; - ::apache::thrift::protocol::TType _etype482; - xfer += iprot->readListBegin(_etype482, _size479); - this->values.resize(_size479); - uint32_t _i483; - for (_i483 = 0; _i483 < _size479; ++_i483) { - xfer += iprot->readString(this->values[_i483]); + uint32_t _size483; + ::apache::thrift::protocol::TType _etype486; + xfer += iprot->readListBegin(_etype486, _size483); + this->values.resize(_size483); + uint32_t _i487; + for (_i487 = 0; _i487 < _size483; ++_i487) { + xfer += iprot->readString(this->values[_i487]); } xfer += iprot->readListEnd(); } @@ -11323,9 +11482,9 @@ configuration_update_app_env_request::write(::apache::thrift::protocol::TProtoco { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->keys.size())); - std::vector::const_iterator _iter484; - for (_iter484 = this->keys.begin(); _iter484 != this->keys.end(); ++_iter484) { - xfer += oprot->writeString((*_iter484)); + std::vector::const_iterator _iter488; + for (_iter488 = this->keys.begin(); _iter488 != this->keys.end(); ++_iter488) { + xfer += oprot->writeString((*_iter488)); } xfer += oprot->writeListEnd(); } @@ -11336,9 +11495,9 @@ configuration_update_app_env_request::write(::apache::thrift::protocol::TProtoco { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->values.size())); - std::vector::const_iterator _iter485; - for (_iter485 = this->values.begin(); _iter485 != this->values.end(); ++_iter485) { - xfer += oprot->writeString((*_iter485)); + std::vector::const_iterator _iter489; + for (_iter489 = this->values.begin(); _iter489 != this->values.end(); ++_iter489) { + xfer += oprot->writeString((*_iter489)); } xfer += oprot->writeListEnd(); } @@ -11366,45 +11525,45 @@ void swap(configuration_update_app_env_request &a, configuration_update_app_env_ } configuration_update_app_env_request::configuration_update_app_env_request( - const configuration_update_app_env_request &other486) + const configuration_update_app_env_request &other490) { - app_name = other486.app_name; - op = other486.op; - keys = other486.keys; - values = other486.values; - clear_prefix = other486.clear_prefix; - __isset = other486.__isset; + app_name = other490.app_name; + op = other490.op; + keys = other490.keys; + values = other490.values; + clear_prefix = other490.clear_prefix; + __isset = other490.__isset; } configuration_update_app_env_request::configuration_update_app_env_request( - configuration_update_app_env_request &&other487) + configuration_update_app_env_request &&other491) { - app_name = std::move(other487.app_name); - op = std::move(other487.op); - keys = std::move(other487.keys); - values = std::move(other487.values); - clear_prefix = std::move(other487.clear_prefix); - __isset = std::move(other487.__isset); + app_name = std::move(other491.app_name); + op = std::move(other491.op); + keys = std::move(other491.keys); + values = std::move(other491.values); + clear_prefix = std::move(other491.clear_prefix); + __isset = std::move(other491.__isset); } configuration_update_app_env_request &configuration_update_app_env_request:: -operator=(const configuration_update_app_env_request &other488) +operator=(const configuration_update_app_env_request &other492) { - app_name = other488.app_name; - op = other488.op; - keys = other488.keys; - values = other488.values; - clear_prefix = other488.clear_prefix; - __isset = other488.__isset; + app_name = other492.app_name; + op = other492.op; + keys = other492.keys; + values = other492.values; + clear_prefix = other492.clear_prefix; + __isset = other492.__isset; return *this; } configuration_update_app_env_request &configuration_update_app_env_request:: -operator=(configuration_update_app_env_request &&other489) +operator=(configuration_update_app_env_request &&other493) { - app_name = std::move(other489.app_name); - op = std::move(other489.op); - keys = std::move(other489.keys); - values = std::move(other489.values); - clear_prefix = std::move(other489.clear_prefix); - __isset = std::move(other489.__isset); + app_name = std::move(other493.app_name); + op = std::move(other493.op); + keys = std::move(other493.keys); + values = std::move(other493.values); + clear_prefix = std::move(other493.clear_prefix); + __isset = std::move(other493.__isset); return *this; } void configuration_update_app_env_request::printTo(std::ostream &out) const @@ -11514,33 +11673,33 @@ void swap(configuration_update_app_env_response &a, configuration_update_app_env } configuration_update_app_env_response::configuration_update_app_env_response( - const configuration_update_app_env_response &other490) + const configuration_update_app_env_response &other494) { - err = other490.err; - hint_message = other490.hint_message; - __isset = other490.__isset; + err = other494.err; + hint_message = other494.hint_message; + __isset = other494.__isset; } configuration_update_app_env_response::configuration_update_app_env_response( - configuration_update_app_env_response &&other491) + configuration_update_app_env_response &&other495) { - err = std::move(other491.err); - hint_message = std::move(other491.hint_message); - __isset = std::move(other491.__isset); + err = std::move(other495.err); + hint_message = std::move(other495.hint_message); + __isset = std::move(other495.__isset); } configuration_update_app_env_response &configuration_update_app_env_response:: -operator=(const configuration_update_app_env_response &other492) +operator=(const configuration_update_app_env_response &other496) { - err = other492.err; - hint_message = other492.hint_message; - __isset = other492.__isset; + err = other496.err; + hint_message = other496.hint_message; + __isset = other496.__isset; return *this; } configuration_update_app_env_response &configuration_update_app_env_response:: -operator=(configuration_update_app_env_response &&other493) +operator=(configuration_update_app_env_response &&other497) { - err = std::move(other493.err); - hint_message = std::move(other493.hint_message); - __isset = std::move(other493.__isset); + err = std::move(other497.err); + hint_message = std::move(other497.hint_message); + __isset = std::move(other497.__isset); return *this; } void configuration_update_app_env_response::printTo(std::ostream &out) const @@ -11651,34 +11810,34 @@ void swap(duplication_add_request &a, duplication_add_request &b) swap(a.__isset, b.__isset); } -duplication_add_request::duplication_add_request(const duplication_add_request &other494) +duplication_add_request::duplication_add_request(const duplication_add_request &other498) { - app_name = other494.app_name; - remote_cluster_name = other494.remote_cluster_name; - freezed = other494.freezed; - __isset = other494.__isset; + app_name = other498.app_name; + remote_cluster_name = other498.remote_cluster_name; + freezed = other498.freezed; + __isset = other498.__isset; } -duplication_add_request::duplication_add_request(duplication_add_request &&other495) +duplication_add_request::duplication_add_request(duplication_add_request &&other499) { - app_name = std::move(other495.app_name); - remote_cluster_name = std::move(other495.remote_cluster_name); - freezed = std::move(other495.freezed); - __isset = std::move(other495.__isset); + app_name = std::move(other499.app_name); + remote_cluster_name = std::move(other499.remote_cluster_name); + freezed = std::move(other499.freezed); + __isset = std::move(other499.__isset); } -duplication_add_request &duplication_add_request::operator=(const duplication_add_request &other496) +duplication_add_request &duplication_add_request::operator=(const duplication_add_request &other500) { - app_name = other496.app_name; - remote_cluster_name = other496.remote_cluster_name; - freezed = other496.freezed; - __isset = other496.__isset; + app_name = other500.app_name; + remote_cluster_name = other500.remote_cluster_name; + freezed = other500.freezed; + __isset = other500.__isset; return *this; } -duplication_add_request &duplication_add_request::operator=(duplication_add_request &&other497) +duplication_add_request &duplication_add_request::operator=(duplication_add_request &&other501) { - app_name = std::move(other497.app_name); - remote_cluster_name = std::move(other497.remote_cluster_name); - freezed = std::move(other497.freezed); - __isset = std::move(other497.__isset); + app_name = std::move(other501.app_name); + remote_cluster_name = std::move(other501.remote_cluster_name); + freezed = std::move(other501.freezed); + __isset = std::move(other501.__isset); return *this; } void duplication_add_request::printTo(std::ostream &out) const @@ -11808,39 +11967,39 @@ void swap(duplication_add_response &a, duplication_add_response &b) swap(a.__isset, b.__isset); } -duplication_add_response::duplication_add_response(const duplication_add_response &other498) +duplication_add_response::duplication_add_response(const duplication_add_response &other502) { - err = other498.err; - appid = other498.appid; - dupid = other498.dupid; - hint = other498.hint; - __isset = other498.__isset; + err = other502.err; + appid = other502.appid; + dupid = other502.dupid; + hint = other502.hint; + __isset = other502.__isset; } -duplication_add_response::duplication_add_response(duplication_add_response &&other499) +duplication_add_response::duplication_add_response(duplication_add_response &&other503) { - err = std::move(other499.err); - appid = std::move(other499.appid); - dupid = std::move(other499.dupid); - hint = std::move(other499.hint); - __isset = std::move(other499.__isset); + err = std::move(other503.err); + appid = std::move(other503.appid); + dupid = std::move(other503.dupid); + hint = std::move(other503.hint); + __isset = std::move(other503.__isset); } duplication_add_response &duplication_add_response:: -operator=(const duplication_add_response &other500) +operator=(const duplication_add_response &other504) { - err = other500.err; - appid = other500.appid; - dupid = other500.dupid; - hint = other500.hint; - __isset = other500.__isset; + err = other504.err; + appid = other504.appid; + dupid = other504.dupid; + hint = other504.hint; + __isset = other504.__isset; return *this; } -duplication_add_response &duplication_add_response::operator=(duplication_add_response &&other501) +duplication_add_response &duplication_add_response::operator=(duplication_add_response &&other505) { - err = std::move(other501.err); - appid = std::move(other501.appid); - dupid = std::move(other501.dupid); - hint = std::move(other501.hint); - __isset = std::move(other501.__isset); + err = std::move(other505.err); + appid = std::move(other505.appid); + dupid = std::move(other505.dupid); + hint = std::move(other505.hint); + __isset = std::move(other505.__isset); return *this; } void duplication_add_response::printTo(std::ostream &out) const @@ -11913,9 +12072,9 @@ uint32_t duplication_modify_request::read(::apache::thrift::protocol::TProtocol break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast502; - xfer += iprot->readI32(ecast502); - this->status = (duplication_status::type)ecast502; + int32_t ecast506; + xfer += iprot->readI32(ecast506); + this->status = (duplication_status::type)ecast506; this->__isset.status = true; } else { xfer += iprot->skip(ftype); @@ -11923,9 +12082,9 @@ uint32_t duplication_modify_request::read(::apache::thrift::protocol::TProtocol break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast503; - xfer += iprot->readI32(ecast503); - this->fail_mode = (duplication_fail_mode::type)ecast503; + int32_t ecast507; + xfer += iprot->readI32(ecast507); + this->fail_mode = (duplication_fail_mode::type)ecast507; this->__isset.fail_mode = true; } else { xfer += iprot->skip(ftype); @@ -11982,40 +12141,40 @@ void swap(duplication_modify_request &a, duplication_modify_request &b) swap(a.__isset, b.__isset); } -duplication_modify_request::duplication_modify_request(const duplication_modify_request &other504) +duplication_modify_request::duplication_modify_request(const duplication_modify_request &other508) { - app_name = other504.app_name; - dupid = other504.dupid; - status = other504.status; - fail_mode = other504.fail_mode; - __isset = other504.__isset; + app_name = other508.app_name; + dupid = other508.dupid; + status = other508.status; + fail_mode = other508.fail_mode; + __isset = other508.__isset; } -duplication_modify_request::duplication_modify_request(duplication_modify_request &&other505) +duplication_modify_request::duplication_modify_request(duplication_modify_request &&other509) { - app_name = std::move(other505.app_name); - dupid = std::move(other505.dupid); - status = std::move(other505.status); - fail_mode = std::move(other505.fail_mode); - __isset = std::move(other505.__isset); + app_name = std::move(other509.app_name); + dupid = std::move(other509.dupid); + status = std::move(other509.status); + fail_mode = std::move(other509.fail_mode); + __isset = std::move(other509.__isset); } duplication_modify_request &duplication_modify_request:: -operator=(const duplication_modify_request &other506) +operator=(const duplication_modify_request &other510) { - app_name = other506.app_name; - dupid = other506.dupid; - status = other506.status; - fail_mode = other506.fail_mode; - __isset = other506.__isset; + app_name = other510.app_name; + dupid = other510.dupid; + status = other510.status; + fail_mode = other510.fail_mode; + __isset = other510.__isset; return *this; } duplication_modify_request &duplication_modify_request:: -operator=(duplication_modify_request &&other507) +operator=(duplication_modify_request &&other511) { - app_name = std::move(other507.app_name); - dupid = std::move(other507.dupid); - status = std::move(other507.status); - fail_mode = std::move(other507.fail_mode); - __isset = std::move(other507.__isset); + app_name = std::move(other511.app_name); + dupid = std::move(other511.dupid); + status = std::move(other511.status); + fail_mode = std::move(other511.fail_mode); + __isset = std::move(other511.__isset); return *this; } void duplication_modify_request::printTo(std::ostream &out) const @@ -12115,32 +12274,32 @@ void swap(duplication_modify_response &a, duplication_modify_response &b) } duplication_modify_response::duplication_modify_response( - const duplication_modify_response &other508) + const duplication_modify_response &other512) { - err = other508.err; - appid = other508.appid; - __isset = other508.__isset; + err = other512.err; + appid = other512.appid; + __isset = other512.__isset; } -duplication_modify_response::duplication_modify_response(duplication_modify_response &&other509) +duplication_modify_response::duplication_modify_response(duplication_modify_response &&other513) { - err = std::move(other509.err); - appid = std::move(other509.appid); - __isset = std::move(other509.__isset); + err = std::move(other513.err); + appid = std::move(other513.appid); + __isset = std::move(other513.__isset); } duplication_modify_response &duplication_modify_response:: -operator=(const duplication_modify_response &other510) +operator=(const duplication_modify_response &other514) { - err = other510.err; - appid = other510.appid; - __isset = other510.__isset; + err = other514.err; + appid = other514.appid; + __isset = other514.__isset; return *this; } duplication_modify_response &duplication_modify_response:: -operator=(duplication_modify_response &&other511) +operator=(duplication_modify_response &&other515) { - err = std::move(other511.err); - appid = std::move(other511.appid); - __isset = std::move(other511.__isset); + err = std::move(other515.err); + appid = std::move(other515.appid); + __isset = std::move(other515.__isset); return *this; } void duplication_modify_response::printTo(std::ostream &out) const @@ -12204,9 +12363,9 @@ uint32_t duplication_entry::read(::apache::thrift::protocol::TProtocol *iprot) break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast512; - xfer += iprot->readI32(ecast512); - this->status = (duplication_status::type)ecast512; + int32_t ecast516; + xfer += iprot->readI32(ecast516); + this->status = (duplication_status::type)ecast516; this->__isset.status = true; } else { xfer += iprot->skip(ftype); @@ -12232,16 +12391,16 @@ uint32_t duplication_entry::read(::apache::thrift::protocol::TProtocol *iprot) if (ftype == ::apache::thrift::protocol::T_MAP) { { this->progress.clear(); - uint32_t _size513; - ::apache::thrift::protocol::TType _ktype514; - ::apache::thrift::protocol::TType _vtype515; - xfer += iprot->readMapBegin(_ktype514, _vtype515, _size513); - uint32_t _i517; - for (_i517 = 0; _i517 < _size513; ++_i517) { - int32_t _key518; - xfer += iprot->readI32(_key518); - int64_t &_val519 = this->progress[_key518]; - xfer += iprot->readI64(_val519); + uint32_t _size517; + ::apache::thrift::protocol::TType _ktype518; + ::apache::thrift::protocol::TType _vtype519; + xfer += iprot->readMapBegin(_ktype518, _vtype519, _size517); + uint32_t _i521; + for (_i521 = 0; _i521 < _size517; ++_i521) { + int32_t _key522; + xfer += iprot->readI32(_key522); + int64_t &_val523 = this->progress[_key522]; + xfer += iprot->readI64(_val523); } xfer += iprot->readMapEnd(); } @@ -12252,9 +12411,9 @@ uint32_t duplication_entry::read(::apache::thrift::protocol::TProtocol *iprot) break; case 7: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast520; - xfer += iprot->readI32(ecast520); - this->fail_mode = (duplication_fail_mode::type)ecast520; + int32_t ecast524; + xfer += iprot->readI32(ecast524); + this->fail_mode = (duplication_fail_mode::type)ecast524; this->__isset.fail_mode = true; } else { xfer += iprot->skip(ftype); @@ -12300,10 +12459,10 @@ uint32_t duplication_entry::write(::apache::thrift::protocol::TProtocol *oprot) xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_I64, static_cast(this->progress.size())); - std::map::const_iterator _iter521; - for (_iter521 = this->progress.begin(); _iter521 != this->progress.end(); ++_iter521) { - xfer += oprot->writeI32(_iter521->first); - xfer += oprot->writeI64(_iter521->second); + std::map::const_iterator _iter525; + for (_iter525 = this->progress.begin(); _iter525 != this->progress.end(); ++_iter525) { + xfer += oprot->writeI32(_iter525->first); + xfer += oprot->writeI64(_iter525->second); } xfer += oprot->writeMapEnd(); } @@ -12331,46 +12490,46 @@ void swap(duplication_entry &a, duplication_entry &b) swap(a.__isset, b.__isset); } -duplication_entry::duplication_entry(const duplication_entry &other522) +duplication_entry::duplication_entry(const duplication_entry &other526) { - dupid = other522.dupid; - status = other522.status; - remote = other522.remote; - create_ts = other522.create_ts; - progress = other522.progress; - fail_mode = other522.fail_mode; - __isset = other522.__isset; + dupid = other526.dupid; + status = other526.status; + remote = other526.remote; + create_ts = other526.create_ts; + progress = other526.progress; + fail_mode = other526.fail_mode; + __isset = other526.__isset; } -duplication_entry::duplication_entry(duplication_entry &&other523) +duplication_entry::duplication_entry(duplication_entry &&other527) { - dupid = std::move(other523.dupid); - status = std::move(other523.status); - remote = std::move(other523.remote); - create_ts = std::move(other523.create_ts); - progress = std::move(other523.progress); - fail_mode = std::move(other523.fail_mode); - __isset = std::move(other523.__isset); + dupid = std::move(other527.dupid); + status = std::move(other527.status); + remote = std::move(other527.remote); + create_ts = std::move(other527.create_ts); + progress = std::move(other527.progress); + fail_mode = std::move(other527.fail_mode); + __isset = std::move(other527.__isset); } -duplication_entry &duplication_entry::operator=(const duplication_entry &other524) +duplication_entry &duplication_entry::operator=(const duplication_entry &other528) { - dupid = other524.dupid; - status = other524.status; - remote = other524.remote; - create_ts = other524.create_ts; - progress = other524.progress; - fail_mode = other524.fail_mode; - __isset = other524.__isset; + dupid = other528.dupid; + status = other528.status; + remote = other528.remote; + create_ts = other528.create_ts; + progress = other528.progress; + fail_mode = other528.fail_mode; + __isset = other528.__isset; return *this; } -duplication_entry &duplication_entry::operator=(duplication_entry &&other525) +duplication_entry &duplication_entry::operator=(duplication_entry &&other529) { - dupid = std::move(other525.dupid); - status = std::move(other525.status); - remote = std::move(other525.remote); - create_ts = std::move(other525.create_ts); - progress = std::move(other525.progress); - fail_mode = std::move(other525.fail_mode); - __isset = std::move(other525.__isset); + dupid = std::move(other529.dupid); + status = std::move(other529.status); + remote = std::move(other529.remote); + create_ts = std::move(other529.create_ts); + progress = std::move(other529.progress); + fail_mode = std::move(other529.fail_mode); + __isset = std::move(other529.__isset); return *this; } void duplication_entry::printTo(std::ostream &out) const @@ -12458,28 +12617,28 @@ void swap(duplication_query_request &a, duplication_query_request &b) swap(a.__isset, b.__isset); } -duplication_query_request::duplication_query_request(const duplication_query_request &other526) +duplication_query_request::duplication_query_request(const duplication_query_request &other530) { - app_name = other526.app_name; - __isset = other526.__isset; + app_name = other530.app_name; + __isset = other530.__isset; } -duplication_query_request::duplication_query_request(duplication_query_request &&other527) +duplication_query_request::duplication_query_request(duplication_query_request &&other531) { - app_name = std::move(other527.app_name); - __isset = std::move(other527.__isset); + app_name = std::move(other531.app_name); + __isset = std::move(other531.__isset); } duplication_query_request &duplication_query_request:: -operator=(const duplication_query_request &other528) +operator=(const duplication_query_request &other532) { - app_name = other528.app_name; - __isset = other528.__isset; + app_name = other532.app_name; + __isset = other532.__isset; return *this; } duplication_query_request &duplication_query_request:: -operator=(duplication_query_request &&other529) +operator=(duplication_query_request &&other533) { - app_name = std::move(other529.app_name); - __isset = std::move(other529.__isset); + app_name = std::move(other533.app_name); + __isset = std::move(other533.__isset); return *this; } void duplication_query_request::printTo(std::ostream &out) const @@ -12540,13 +12699,13 @@ uint32_t duplication_query_response::read(::apache::thrift::protocol::TProtocol if (ftype == ::apache::thrift::protocol::T_LIST) { { this->entry_list.clear(); - uint32_t _size530; - ::apache::thrift::protocol::TType _etype533; - xfer += iprot->readListBegin(_etype533, _size530); - this->entry_list.resize(_size530); - uint32_t _i534; - for (_i534 = 0; _i534 < _size530; ++_i534) { - xfer += this->entry_list[_i534].read(iprot); + uint32_t _size534; + ::apache::thrift::protocol::TType _etype537; + xfer += iprot->readListBegin(_etype537, _size534); + this->entry_list.resize(_size534); + uint32_t _i538; + for (_i538 = 0; _i538 < _size534; ++_i538) { + xfer += this->entry_list[_i538].read(iprot); } xfer += iprot->readListEnd(); } @@ -12585,9 +12744,9 @@ uint32_t duplication_query_response::write(::apache::thrift::protocol::TProtocol { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->entry_list.size())); - std::vector::const_iterator _iter535; - for (_iter535 = this->entry_list.begin(); _iter535 != this->entry_list.end(); ++_iter535) { - xfer += (*_iter535).write(oprot); + std::vector::const_iterator _iter539; + for (_iter539 = this->entry_list.begin(); _iter539 != this->entry_list.end(); ++_iter539) { + xfer += (*_iter539).write(oprot); } xfer += oprot->writeListEnd(); } @@ -12607,36 +12766,36 @@ void swap(duplication_query_response &a, duplication_query_response &b) swap(a.__isset, b.__isset); } -duplication_query_response::duplication_query_response(const duplication_query_response &other536) +duplication_query_response::duplication_query_response(const duplication_query_response &other540) { - err = other536.err; - appid = other536.appid; - entry_list = other536.entry_list; - __isset = other536.__isset; + err = other540.err; + appid = other540.appid; + entry_list = other540.entry_list; + __isset = other540.__isset; } -duplication_query_response::duplication_query_response(duplication_query_response &&other537) +duplication_query_response::duplication_query_response(duplication_query_response &&other541) { - err = std::move(other537.err); - appid = std::move(other537.appid); - entry_list = std::move(other537.entry_list); - __isset = std::move(other537.__isset); + err = std::move(other541.err); + appid = std::move(other541.appid); + entry_list = std::move(other541.entry_list); + __isset = std::move(other541.__isset); } duplication_query_response &duplication_query_response:: -operator=(const duplication_query_response &other538) +operator=(const duplication_query_response &other542) { - err = other538.err; - appid = other538.appid; - entry_list = other538.entry_list; - __isset = other538.__isset; + err = other542.err; + appid = other542.appid; + entry_list = other542.entry_list; + __isset = other542.__isset; return *this; } duplication_query_response &duplication_query_response:: -operator=(duplication_query_response &&other539) +operator=(duplication_query_response &&other543) { - err = std::move(other539.err); - appid = std::move(other539.appid); - entry_list = std::move(other539.entry_list); - __isset = std::move(other539.__isset); + err = std::move(other543.err); + appid = std::move(other543.appid); + entry_list = std::move(other543.entry_list); + __isset = std::move(other543.__isset); return *this; } void duplication_query_response::printTo(std::ostream &out) const @@ -12734,32 +12893,32 @@ void swap(duplication_confirm_entry &a, duplication_confirm_entry &b) swap(a.__isset, b.__isset); } -duplication_confirm_entry::duplication_confirm_entry(const duplication_confirm_entry &other540) +duplication_confirm_entry::duplication_confirm_entry(const duplication_confirm_entry &other544) { - dupid = other540.dupid; - confirmed_decree = other540.confirmed_decree; - __isset = other540.__isset; + dupid = other544.dupid; + confirmed_decree = other544.confirmed_decree; + __isset = other544.__isset; } -duplication_confirm_entry::duplication_confirm_entry(duplication_confirm_entry &&other541) +duplication_confirm_entry::duplication_confirm_entry(duplication_confirm_entry &&other545) { - dupid = std::move(other541.dupid); - confirmed_decree = std::move(other541.confirmed_decree); - __isset = std::move(other541.__isset); + dupid = std::move(other545.dupid); + confirmed_decree = std::move(other545.confirmed_decree); + __isset = std::move(other545.__isset); } duplication_confirm_entry &duplication_confirm_entry:: -operator=(const duplication_confirm_entry &other542) +operator=(const duplication_confirm_entry &other546) { - dupid = other542.dupid; - confirmed_decree = other542.confirmed_decree; - __isset = other542.__isset; + dupid = other546.dupid; + confirmed_decree = other546.confirmed_decree; + __isset = other546.__isset; return *this; } duplication_confirm_entry &duplication_confirm_entry:: -operator=(duplication_confirm_entry &&other543) +operator=(duplication_confirm_entry &&other547) { - dupid = std::move(other543.dupid); - confirmed_decree = std::move(other543.confirmed_decree); - __isset = std::move(other543.__isset); + dupid = std::move(other547.dupid); + confirmed_decree = std::move(other547.confirmed_decree); + __isset = std::move(other547.__isset); return *this; } void duplication_confirm_entry::printTo(std::ostream &out) const @@ -12813,25 +12972,25 @@ uint32_t duplication_sync_request::read(::apache::thrift::protocol::TProtocol *i if (ftype == ::apache::thrift::protocol::T_MAP) { { this->confirm_list.clear(); - uint32_t _size544; - ::apache::thrift::protocol::TType _ktype545; - ::apache::thrift::protocol::TType _vtype546; - xfer += iprot->readMapBegin(_ktype545, _vtype546, _size544); - uint32_t _i548; - for (_i548 = 0; _i548 < _size544; ++_i548) { - ::dsn::gpid _key549; - xfer += _key549.read(iprot); - std::vector &_val550 = - this->confirm_list[_key549]; + uint32_t _size548; + ::apache::thrift::protocol::TType _ktype549; + ::apache::thrift::protocol::TType _vtype550; + xfer += iprot->readMapBegin(_ktype549, _vtype550, _size548); + uint32_t _i552; + for (_i552 = 0; _i552 < _size548; ++_i552) { + ::dsn::gpid _key553; + xfer += _key553.read(iprot); + std::vector &_val554 = + this->confirm_list[_key553]; { - _val550.clear(); - uint32_t _size551; - ::apache::thrift::protocol::TType _etype554; - xfer += iprot->readListBegin(_etype554, _size551); - _val550.resize(_size551); - uint32_t _i555; - for (_i555 = 0; _i555 < _size551; ++_i555) { - xfer += _val550[_i555].read(iprot); + _val554.clear(); + uint32_t _size555; + ::apache::thrift::protocol::TType _etype558; + xfer += iprot->readListBegin(_etype558, _size555); + _val554.resize(_size555); + uint32_t _i559; + for (_i559 = 0; _i559 < _size555; ++_i559) { + xfer += _val554[_i559].read(iprot); } xfer += iprot->readListEnd(); } @@ -12870,17 +13029,17 @@ uint32_t duplication_sync_request::write(::apache::thrift::protocol::TProtocol * xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_LIST, static_cast(this->confirm_list.size())); - std::map<::dsn::gpid, std::vector>::const_iterator _iter556; - for (_iter556 = this->confirm_list.begin(); _iter556 != this->confirm_list.end(); - ++_iter556) { - xfer += _iter556->first.write(oprot); + std::map<::dsn::gpid, std::vector>::const_iterator _iter560; + for (_iter560 = this->confirm_list.begin(); _iter560 != this->confirm_list.end(); + ++_iter560) { + xfer += _iter560->first.write(oprot); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(_iter556->second.size())); - std::vector::const_iterator _iter557; - for (_iter557 = _iter556->second.begin(); _iter557 != _iter556->second.end(); - ++_iter557) { - xfer += (*_iter557).write(oprot); + static_cast(_iter560->second.size())); + std::vector::const_iterator _iter561; + for (_iter561 = _iter560->second.begin(); _iter561 != _iter560->second.end(); + ++_iter561) { + xfer += (*_iter561).write(oprot); } xfer += oprot->writeListEnd(); } @@ -12902,31 +13061,31 @@ void swap(duplication_sync_request &a, duplication_sync_request &b) swap(a.__isset, b.__isset); } -duplication_sync_request::duplication_sync_request(const duplication_sync_request &other558) +duplication_sync_request::duplication_sync_request(const duplication_sync_request &other562) { - node = other558.node; - confirm_list = other558.confirm_list; - __isset = other558.__isset; + node = other562.node; + confirm_list = other562.confirm_list; + __isset = other562.__isset; } -duplication_sync_request::duplication_sync_request(duplication_sync_request &&other559) +duplication_sync_request::duplication_sync_request(duplication_sync_request &&other563) { - node = std::move(other559.node); - confirm_list = std::move(other559.confirm_list); - __isset = std::move(other559.__isset); + node = std::move(other563.node); + confirm_list = std::move(other563.confirm_list); + __isset = std::move(other563.__isset); } duplication_sync_request &duplication_sync_request:: -operator=(const duplication_sync_request &other560) +operator=(const duplication_sync_request &other564) { - node = other560.node; - confirm_list = other560.confirm_list; - __isset = other560.__isset; + node = other564.node; + confirm_list = other564.confirm_list; + __isset = other564.__isset; return *this; } -duplication_sync_request &duplication_sync_request::operator=(duplication_sync_request &&other561) +duplication_sync_request &duplication_sync_request::operator=(duplication_sync_request &&other565) { - node = std::move(other561.node); - confirm_list = std::move(other561.confirm_list); - __isset = std::move(other561.__isset); + node = std::move(other565.node); + confirm_list = std::move(other565.confirm_list); + __isset = std::move(other565.__isset); return *this; } void duplication_sync_request::printTo(std::ostream &out) const @@ -12980,27 +13139,27 @@ uint32_t duplication_sync_response::read(::apache::thrift::protocol::TProtocol * if (ftype == ::apache::thrift::protocol::T_MAP) { { this->dup_map.clear(); - uint32_t _size562; - ::apache::thrift::protocol::TType _ktype563; - ::apache::thrift::protocol::TType _vtype564; - xfer += iprot->readMapBegin(_ktype563, _vtype564, _size562); - uint32_t _i566; - for (_i566 = 0; _i566 < _size562; ++_i566) { - int32_t _key567; - xfer += iprot->readI32(_key567); - std::map &_val568 = this->dup_map[_key567]; + uint32_t _size566; + ::apache::thrift::protocol::TType _ktype567; + ::apache::thrift::protocol::TType _vtype568; + xfer += iprot->readMapBegin(_ktype567, _vtype568, _size566); + uint32_t _i570; + for (_i570 = 0; _i570 < _size566; ++_i570) { + int32_t _key571; + xfer += iprot->readI32(_key571); + std::map &_val572 = this->dup_map[_key571]; { - _val568.clear(); - uint32_t _size569; - ::apache::thrift::protocol::TType _ktype570; - ::apache::thrift::protocol::TType _vtype571; - xfer += iprot->readMapBegin(_ktype570, _vtype571, _size569); - uint32_t _i573; - for (_i573 = 0; _i573 < _size569; ++_i573) { - int32_t _key574; - xfer += iprot->readI32(_key574); - duplication_entry &_val575 = _val568[_key574]; - xfer += _val575.read(iprot); + _val572.clear(); + uint32_t _size573; + ::apache::thrift::protocol::TType _ktype574; + ::apache::thrift::protocol::TType _vtype575; + xfer += iprot->readMapBegin(_ktype574, _vtype575, _size573); + uint32_t _i577; + for (_i577 = 0; _i577 < _size573; ++_i577) { + int32_t _key578; + xfer += iprot->readI32(_key578); + duplication_entry &_val579 = _val572[_key578]; + xfer += _val579.read(iprot); } xfer += iprot->readMapEnd(); } @@ -13039,18 +13198,18 @@ uint32_t duplication_sync_response::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_MAP, static_cast(this->dup_map.size())); - std::map>::const_iterator _iter576; - for (_iter576 = this->dup_map.begin(); _iter576 != this->dup_map.end(); ++_iter576) { - xfer += oprot->writeI32(_iter576->first); + std::map>::const_iterator _iter580; + for (_iter580 = this->dup_map.begin(); _iter580 != this->dup_map.end(); ++_iter580) { + xfer += oprot->writeI32(_iter580->first); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_STRUCT, - static_cast(_iter576->second.size())); - std::map::const_iterator _iter577; - for (_iter577 = _iter576->second.begin(); _iter577 != _iter576->second.end(); - ++_iter577) { - xfer += oprot->writeI32(_iter577->first); - xfer += _iter577->second.write(oprot); + static_cast(_iter580->second.size())); + std::map::const_iterator _iter581; + for (_iter581 = _iter580->second.begin(); _iter581 != _iter580->second.end(); + ++_iter581) { + xfer += oprot->writeI32(_iter581->first); + xfer += _iter581->second.write(oprot); } xfer += oprot->writeMapEnd(); } @@ -13072,32 +13231,32 @@ void swap(duplication_sync_response &a, duplication_sync_response &b) swap(a.__isset, b.__isset); } -duplication_sync_response::duplication_sync_response(const duplication_sync_response &other578) +duplication_sync_response::duplication_sync_response(const duplication_sync_response &other582) { - err = other578.err; - dup_map = other578.dup_map; - __isset = other578.__isset; + err = other582.err; + dup_map = other582.dup_map; + __isset = other582.__isset; } -duplication_sync_response::duplication_sync_response(duplication_sync_response &&other579) +duplication_sync_response::duplication_sync_response(duplication_sync_response &&other583) { - err = std::move(other579.err); - dup_map = std::move(other579.dup_map); - __isset = std::move(other579.__isset); + err = std::move(other583.err); + dup_map = std::move(other583.dup_map); + __isset = std::move(other583.__isset); } duplication_sync_response &duplication_sync_response:: -operator=(const duplication_sync_response &other580) +operator=(const duplication_sync_response &other584) { - err = other580.err; - dup_map = other580.dup_map; - __isset = other580.__isset; + err = other584.err; + dup_map = other584.dup_map; + __isset = other584.__isset; return *this; } duplication_sync_response &duplication_sync_response:: -operator=(duplication_sync_response &&other581) +operator=(duplication_sync_response &&other585) { - err = std::move(other581.err); - dup_map = std::move(other581.dup_map); - __isset = std::move(other581.__isset); + err = std::move(other585.err); + dup_map = std::move(other585.dup_map); + __isset = std::move(other585.__isset); return *this; } void duplication_sync_response::printTo(std::ostream &out) const @@ -13175,26 +13334,26 @@ void swap(ddd_diagnose_request &a, ddd_diagnose_request &b) swap(a.__isset, b.__isset); } -ddd_diagnose_request::ddd_diagnose_request(const ddd_diagnose_request &other582) +ddd_diagnose_request::ddd_diagnose_request(const ddd_diagnose_request &other586) { - pid = other582.pid; - __isset = other582.__isset; + pid = other586.pid; + __isset = other586.__isset; } -ddd_diagnose_request::ddd_diagnose_request(ddd_diagnose_request &&other583) +ddd_diagnose_request::ddd_diagnose_request(ddd_diagnose_request &&other587) { - pid = std::move(other583.pid); - __isset = std::move(other583.__isset); + pid = std::move(other587.pid); + __isset = std::move(other587.__isset); } -ddd_diagnose_request &ddd_diagnose_request::operator=(const ddd_diagnose_request &other584) +ddd_diagnose_request &ddd_diagnose_request::operator=(const ddd_diagnose_request &other588) { - pid = other584.pid; - __isset = other584.__isset; + pid = other588.pid; + __isset = other588.__isset; return *this; } -ddd_diagnose_request &ddd_diagnose_request::operator=(ddd_diagnose_request &&other585) +ddd_diagnose_request &ddd_diagnose_request::operator=(ddd_diagnose_request &&other589) { - pid = std::move(other585.pid); - __isset = std::move(other585.__isset); + pid = std::move(other589.pid); + __isset = std::move(other589.__isset); return *this; } void ddd_diagnose_request::printTo(std::ostream &out) const @@ -13366,50 +13525,50 @@ void swap(ddd_node_info &a, ddd_node_info &b) swap(a.__isset, b.__isset); } -ddd_node_info::ddd_node_info(const ddd_node_info &other586) +ddd_node_info::ddd_node_info(const ddd_node_info &other590) { - node = other586.node; - drop_time_ms = other586.drop_time_ms; - is_alive = other586.is_alive; - is_collected = other586.is_collected; - ballot = other586.ballot; - last_committed_decree = other586.last_committed_decree; - last_prepared_decree = other586.last_prepared_decree; - __isset = other586.__isset; + node = other590.node; + drop_time_ms = other590.drop_time_ms; + is_alive = other590.is_alive; + is_collected = other590.is_collected; + ballot = other590.ballot; + last_committed_decree = other590.last_committed_decree; + last_prepared_decree = other590.last_prepared_decree; + __isset = other590.__isset; } -ddd_node_info::ddd_node_info(ddd_node_info &&other587) +ddd_node_info::ddd_node_info(ddd_node_info &&other591) { - node = std::move(other587.node); - drop_time_ms = std::move(other587.drop_time_ms); - is_alive = std::move(other587.is_alive); - is_collected = std::move(other587.is_collected); - ballot = std::move(other587.ballot); - last_committed_decree = std::move(other587.last_committed_decree); - last_prepared_decree = std::move(other587.last_prepared_decree); - __isset = std::move(other587.__isset); + node = std::move(other591.node); + drop_time_ms = std::move(other591.drop_time_ms); + is_alive = std::move(other591.is_alive); + is_collected = std::move(other591.is_collected); + ballot = std::move(other591.ballot); + last_committed_decree = std::move(other591.last_committed_decree); + last_prepared_decree = std::move(other591.last_prepared_decree); + __isset = std::move(other591.__isset); } -ddd_node_info &ddd_node_info::operator=(const ddd_node_info &other588) +ddd_node_info &ddd_node_info::operator=(const ddd_node_info &other592) { - node = other588.node; - drop_time_ms = other588.drop_time_ms; - is_alive = other588.is_alive; - is_collected = other588.is_collected; - ballot = other588.ballot; - last_committed_decree = other588.last_committed_decree; - last_prepared_decree = other588.last_prepared_decree; - __isset = other588.__isset; + node = other592.node; + drop_time_ms = other592.drop_time_ms; + is_alive = other592.is_alive; + is_collected = other592.is_collected; + ballot = other592.ballot; + last_committed_decree = other592.last_committed_decree; + last_prepared_decree = other592.last_prepared_decree; + __isset = other592.__isset; return *this; } -ddd_node_info &ddd_node_info::operator=(ddd_node_info &&other589) +ddd_node_info &ddd_node_info::operator=(ddd_node_info &&other593) { - node = std::move(other589.node); - drop_time_ms = std::move(other589.drop_time_ms); - is_alive = std::move(other589.is_alive); - is_collected = std::move(other589.is_collected); - ballot = std::move(other589.ballot); - last_committed_decree = std::move(other589.last_committed_decree); - last_prepared_decree = std::move(other589.last_prepared_decree); - __isset = std::move(other589.__isset); + node = std::move(other593.node); + drop_time_ms = std::move(other593.drop_time_ms); + is_alive = std::move(other593.is_alive); + is_collected = std::move(other593.is_collected); + ballot = std::move(other593.ballot); + last_committed_decree = std::move(other593.last_committed_decree); + last_prepared_decree = std::move(other593.last_prepared_decree); + __isset = std::move(other593.__isset); return *this; } void ddd_node_info::printTo(std::ostream &out) const @@ -13477,13 +13636,13 @@ uint32_t ddd_partition_info::read(::apache::thrift::protocol::TProtocol *iprot) if (ftype == ::apache::thrift::protocol::T_LIST) { { this->dropped.clear(); - uint32_t _size590; - ::apache::thrift::protocol::TType _etype593; - xfer += iprot->readListBegin(_etype593, _size590); - this->dropped.resize(_size590); - uint32_t _i594; - for (_i594 = 0; _i594 < _size590; ++_i594) { - xfer += this->dropped[_i594].read(iprot); + uint32_t _size594; + ::apache::thrift::protocol::TType _etype597; + xfer += iprot->readListBegin(_etype597, _size594); + this->dropped.resize(_size594); + uint32_t _i598; + for (_i598 = 0; _i598 < _size594; ++_i598) { + xfer += this->dropped[_i598].read(iprot); } xfer += iprot->readListEnd(); } @@ -13526,9 +13685,9 @@ uint32_t ddd_partition_info::write(::apache::thrift::protocol::TProtocol *oprot) { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->dropped.size())); - std::vector::const_iterator _iter595; - for (_iter595 = this->dropped.begin(); _iter595 != this->dropped.end(); ++_iter595) { - xfer += (*_iter595).write(oprot); + std::vector::const_iterator _iter599; + for (_iter599 = this->dropped.begin(); _iter599 != this->dropped.end(); ++_iter599) { + xfer += (*_iter599).write(oprot); } xfer += oprot->writeListEnd(); } @@ -13552,34 +13711,34 @@ void swap(ddd_partition_info &a, ddd_partition_info &b) swap(a.__isset, b.__isset); } -ddd_partition_info::ddd_partition_info(const ddd_partition_info &other596) +ddd_partition_info::ddd_partition_info(const ddd_partition_info &other600) { - config = other596.config; - dropped = other596.dropped; - reason = other596.reason; - __isset = other596.__isset; + config = other600.config; + dropped = other600.dropped; + reason = other600.reason; + __isset = other600.__isset; } -ddd_partition_info::ddd_partition_info(ddd_partition_info &&other597) +ddd_partition_info::ddd_partition_info(ddd_partition_info &&other601) { - config = std::move(other597.config); - dropped = std::move(other597.dropped); - reason = std::move(other597.reason); - __isset = std::move(other597.__isset); + config = std::move(other601.config); + dropped = std::move(other601.dropped); + reason = std::move(other601.reason); + __isset = std::move(other601.__isset); } -ddd_partition_info &ddd_partition_info::operator=(const ddd_partition_info &other598) +ddd_partition_info &ddd_partition_info::operator=(const ddd_partition_info &other602) { - config = other598.config; - dropped = other598.dropped; - reason = other598.reason; - __isset = other598.__isset; + config = other602.config; + dropped = other602.dropped; + reason = other602.reason; + __isset = other602.__isset; return *this; } -ddd_partition_info &ddd_partition_info::operator=(ddd_partition_info &&other599) +ddd_partition_info &ddd_partition_info::operator=(ddd_partition_info &&other603) { - config = std::move(other599.config); - dropped = std::move(other599.dropped); - reason = std::move(other599.reason); - __isset = std::move(other599.__isset); + config = std::move(other603.config); + dropped = std::move(other603.dropped); + reason = std::move(other603.reason); + __isset = std::move(other603.__isset); return *this; } void ddd_partition_info::printTo(std::ostream &out) const @@ -13634,13 +13793,13 @@ uint32_t ddd_diagnose_response::read(::apache::thrift::protocol::TProtocol *ipro if (ftype == ::apache::thrift::protocol::T_LIST) { { this->partitions.clear(); - uint32_t _size600; - ::apache::thrift::protocol::TType _etype603; - xfer += iprot->readListBegin(_etype603, _size600); - this->partitions.resize(_size600); - uint32_t _i604; - for (_i604 = 0; _i604 < _size600; ++_i604) { - xfer += this->partitions[_i604].read(iprot); + uint32_t _size604; + ::apache::thrift::protocol::TType _etype607; + xfer += iprot->readListBegin(_etype607, _size604); + this->partitions.resize(_size604); + uint32_t _i608; + for (_i608 = 0; _i608 < _size604; ++_i608) { + xfer += this->partitions[_i608].read(iprot); } xfer += iprot->readListEnd(); } @@ -13675,9 +13834,9 @@ uint32_t ddd_diagnose_response::write(::apache::thrift::protocol::TProtocol *opr { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); - std::vector::const_iterator _iter605; - for (_iter605 = this->partitions.begin(); _iter605 != this->partitions.end(); ++_iter605) { - xfer += (*_iter605).write(oprot); + std::vector::const_iterator _iter609; + for (_iter609 = this->partitions.begin(); _iter609 != this->partitions.end(); ++_iter609) { + xfer += (*_iter609).write(oprot); } xfer += oprot->writeListEnd(); } @@ -13696,30 +13855,30 @@ void swap(ddd_diagnose_response &a, ddd_diagnose_response &b) swap(a.__isset, b.__isset); } -ddd_diagnose_response::ddd_diagnose_response(const ddd_diagnose_response &other606) +ddd_diagnose_response::ddd_diagnose_response(const ddd_diagnose_response &other610) { - err = other606.err; - partitions = other606.partitions; - __isset = other606.__isset; + err = other610.err; + partitions = other610.partitions; + __isset = other610.__isset; } -ddd_diagnose_response::ddd_diagnose_response(ddd_diagnose_response &&other607) +ddd_diagnose_response::ddd_diagnose_response(ddd_diagnose_response &&other611) { - err = std::move(other607.err); - partitions = std::move(other607.partitions); - __isset = std::move(other607.__isset); + err = std::move(other611.err); + partitions = std::move(other611.partitions); + __isset = std::move(other611.__isset); } -ddd_diagnose_response &ddd_diagnose_response::operator=(const ddd_diagnose_response &other608) +ddd_diagnose_response &ddd_diagnose_response::operator=(const ddd_diagnose_response &other612) { - err = other608.err; - partitions = other608.partitions; - __isset = other608.__isset; + err = other612.err; + partitions = other612.partitions; + __isset = other612.__isset; return *this; } -ddd_diagnose_response &ddd_diagnose_response::operator=(ddd_diagnose_response &&other609) +ddd_diagnose_response &ddd_diagnose_response::operator=(ddd_diagnose_response &&other613) { - err = std::move(other609.err); - partitions = std::move(other609.partitions); - __isset = std::move(other609.__isset); + err = std::move(other613.err); + partitions = std::move(other613.partitions); + __isset = std::move(other613.__isset); return *this; } void ddd_diagnose_response::printTo(std::ostream &out) const @@ -13816,32 +13975,32 @@ void swap(app_partition_split_request &a, app_partition_split_request &b) } app_partition_split_request::app_partition_split_request( - const app_partition_split_request &other610) + const app_partition_split_request &other614) { - app_name = other610.app_name; - new_partition_count = other610.new_partition_count; - __isset = other610.__isset; + app_name = other614.app_name; + new_partition_count = other614.new_partition_count; + __isset = other614.__isset; } -app_partition_split_request::app_partition_split_request(app_partition_split_request &&other611) +app_partition_split_request::app_partition_split_request(app_partition_split_request &&other615) { - app_name = std::move(other611.app_name); - new_partition_count = std::move(other611.new_partition_count); - __isset = std::move(other611.__isset); + app_name = std::move(other615.app_name); + new_partition_count = std::move(other615.new_partition_count); + __isset = std::move(other615.__isset); } app_partition_split_request &app_partition_split_request:: -operator=(const app_partition_split_request &other612) +operator=(const app_partition_split_request &other616) { - app_name = other612.app_name; - new_partition_count = other612.new_partition_count; - __isset = other612.__isset; + app_name = other616.app_name; + new_partition_count = other616.new_partition_count; + __isset = other616.__isset; return *this; } app_partition_split_request &app_partition_split_request:: -operator=(app_partition_split_request &&other613) +operator=(app_partition_split_request &&other617) { - app_name = std::move(other613.app_name); - new_partition_count = std::move(other613.new_partition_count); - __isset = std::move(other613.__isset); + app_name = std::move(other617.app_name); + new_partition_count = std::move(other617.new_partition_count); + __isset = std::move(other617.__isset); return *this; } void app_partition_split_request::printTo(std::ostream &out) const @@ -13953,36 +14112,36 @@ void swap(app_partition_split_response &a, app_partition_split_response &b) } app_partition_split_response::app_partition_split_response( - const app_partition_split_response &other614) + const app_partition_split_response &other618) { - err = other614.err; - app_id = other614.app_id; - partition_count = other614.partition_count; - __isset = other614.__isset; + err = other618.err; + app_id = other618.app_id; + partition_count = other618.partition_count; + __isset = other618.__isset; } -app_partition_split_response::app_partition_split_response(app_partition_split_response &&other615) +app_partition_split_response::app_partition_split_response(app_partition_split_response &&other619) { - err = std::move(other615.err); - app_id = std::move(other615.app_id); - partition_count = std::move(other615.partition_count); - __isset = std::move(other615.__isset); + err = std::move(other619.err); + app_id = std::move(other619.app_id); + partition_count = std::move(other619.partition_count); + __isset = std::move(other619.__isset); } app_partition_split_response &app_partition_split_response:: -operator=(const app_partition_split_response &other616) +operator=(const app_partition_split_response &other620) { - err = other616.err; - app_id = other616.app_id; - partition_count = other616.partition_count; - __isset = other616.__isset; + err = other620.err; + app_id = other620.app_id; + partition_count = other620.partition_count; + __isset = other620.__isset; return *this; } app_partition_split_response &app_partition_split_response:: -operator=(app_partition_split_response &&other617) +operator=(app_partition_split_response &&other621) { - err = std::move(other617.err); - app_id = std::move(other617.app_id); - partition_count = std::move(other617.partition_count); - __isset = std::move(other617.__isset); + err = std::move(other621.err); + app_id = std::move(other621.app_id); + partition_count = std::move(other621.partition_count); + __isset = std::move(other621.__isset); return *this; } void app_partition_split_response::printTo(std::ostream &out) const @@ -14110,38 +14269,38 @@ void swap(notify_catch_up_request &a, notify_catch_up_request &b) swap(a.__isset, b.__isset); } -notify_catch_up_request::notify_catch_up_request(const notify_catch_up_request &other618) +notify_catch_up_request::notify_catch_up_request(const notify_catch_up_request &other622) { - parent_gpid = other618.parent_gpid; - child_gpid = other618.child_gpid; - child_ballot = other618.child_ballot; - child_address = other618.child_address; - __isset = other618.__isset; + parent_gpid = other622.parent_gpid; + child_gpid = other622.child_gpid; + child_ballot = other622.child_ballot; + child_address = other622.child_address; + __isset = other622.__isset; } -notify_catch_up_request::notify_catch_up_request(notify_catch_up_request &&other619) +notify_catch_up_request::notify_catch_up_request(notify_catch_up_request &&other623) { - parent_gpid = std::move(other619.parent_gpid); - child_gpid = std::move(other619.child_gpid); - child_ballot = std::move(other619.child_ballot); - child_address = std::move(other619.child_address); - __isset = std::move(other619.__isset); + parent_gpid = std::move(other623.parent_gpid); + child_gpid = std::move(other623.child_gpid); + child_ballot = std::move(other623.child_ballot); + child_address = std::move(other623.child_address); + __isset = std::move(other623.__isset); } -notify_catch_up_request ¬ify_catch_up_request::operator=(const notify_catch_up_request &other620) +notify_catch_up_request ¬ify_catch_up_request::operator=(const notify_catch_up_request &other624) { - parent_gpid = other620.parent_gpid; - child_gpid = other620.child_gpid; - child_ballot = other620.child_ballot; - child_address = other620.child_address; - __isset = other620.__isset; + parent_gpid = other624.parent_gpid; + child_gpid = other624.child_gpid; + child_ballot = other624.child_ballot; + child_address = other624.child_address; + __isset = other624.__isset; return *this; } -notify_catch_up_request ¬ify_catch_up_request::operator=(notify_catch_up_request &&other621) +notify_catch_up_request ¬ify_catch_up_request::operator=(notify_catch_up_request &&other625) { - parent_gpid = std::move(other621.parent_gpid); - child_gpid = std::move(other621.child_gpid); - child_ballot = std::move(other621.child_ballot); - child_address = std::move(other621.child_address); - __isset = std::move(other621.__isset); + parent_gpid = std::move(other625.parent_gpid); + child_gpid = std::move(other625.child_gpid); + child_ballot = std::move(other625.child_ballot); + child_address = std::move(other625.child_address); + __isset = std::move(other625.__isset); return *this; } void notify_catch_up_request::printTo(std::ostream &out) const @@ -14223,27 +14382,27 @@ void swap(notify_cacth_up_response &a, notify_cacth_up_response &b) swap(a.__isset, b.__isset); } -notify_cacth_up_response::notify_cacth_up_response(const notify_cacth_up_response &other622) +notify_cacth_up_response::notify_cacth_up_response(const notify_cacth_up_response &other626) { - err = other622.err; - __isset = other622.__isset; + err = other626.err; + __isset = other626.__isset; } -notify_cacth_up_response::notify_cacth_up_response(notify_cacth_up_response &&other623) +notify_cacth_up_response::notify_cacth_up_response(notify_cacth_up_response &&other627) { - err = std::move(other623.err); - __isset = std::move(other623.__isset); + err = std::move(other627.err); + __isset = std::move(other627.__isset); } notify_cacth_up_response ¬ify_cacth_up_response:: -operator=(const notify_cacth_up_response &other624) +operator=(const notify_cacth_up_response &other628) { - err = other624.err; - __isset = other624.__isset; + err = other628.err; + __isset = other628.__isset; return *this; } -notify_cacth_up_response ¬ify_cacth_up_response::operator=(notify_cacth_up_response &&other625) +notify_cacth_up_response ¬ify_cacth_up_response::operator=(notify_cacth_up_response &&other629) { - err = std::move(other625.err); - __isset = std::move(other625.__isset); + err = std::move(other629.err); + __isset = std::move(other629.__isset); return *this; } void notify_cacth_up_response::printTo(std::ostream &out) const @@ -14253,5 +14412,400 @@ void notify_cacth_up_response::printTo(std::ostream &out) const out << "err=" << to_string(err); out << ")"; } + +bulk_load_metadata::~bulk_load_metadata() throw() {} + +void bulk_load_metadata::__set_files(const std::vector &val) { this->files = val; } + +void bulk_load_metadata::__set_file_total_size(const int64_t val) { this->file_total_size = val; } + +uint32_t bulk_load_metadata::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->files.clear(); + uint32_t _size630; + ::apache::thrift::protocol::TType _etype633; + xfer += iprot->readListBegin(_etype633, _size630); + this->files.resize(_size630); + uint32_t _i634; + for (_i634 = 0; _i634 < _size630; ++_i634) { + xfer += this->files[_i634].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.files = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->file_total_size); + this->__isset.file_total_size = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t bulk_load_metadata::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("bulk_load_metadata"); + + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->files.size())); + std::vector::const_iterator _iter635; + for (_iter635 = this->files.begin(); _iter635 != this->files.end(); ++_iter635) { + xfer += (*_iter635).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("file_total_size", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->file_total_size); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(bulk_load_metadata &a, bulk_load_metadata &b) +{ + using ::std::swap; + swap(a.files, b.files); + swap(a.file_total_size, b.file_total_size); + swap(a.__isset, b.__isset); +} + +bulk_load_metadata::bulk_load_metadata(const bulk_load_metadata &other636) +{ + files = other636.files; + file_total_size = other636.file_total_size; + __isset = other636.__isset; +} +bulk_load_metadata::bulk_load_metadata(bulk_load_metadata &&other637) +{ + files = std::move(other637.files); + file_total_size = std::move(other637.file_total_size); + __isset = std::move(other637.__isset); +} +bulk_load_metadata &bulk_load_metadata::operator=(const bulk_load_metadata &other638) +{ + files = other638.files; + file_total_size = other638.file_total_size; + __isset = other638.__isset; + return *this; +} +bulk_load_metadata &bulk_load_metadata::operator=(bulk_load_metadata &&other639) +{ + files = std::move(other639.files); + file_total_size = std::move(other639.file_total_size); + __isset = std::move(other639.__isset); + return *this; +} +void bulk_load_metadata::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "bulk_load_metadata("; + out << "files=" << to_string(files); + out << ", " + << "file_total_size=" << to_string(file_total_size); + out << ")"; +} + +start_bulk_load_request::~start_bulk_load_request() throw() {} + +void start_bulk_load_request::__set_app_name(const std::string &val) { this->app_name = val; } + +void start_bulk_load_request::__set_cluster_name(const std::string &val) +{ + this->cluster_name = val; +} + +void start_bulk_load_request::__set_file_provider_type(const std::string &val) +{ + this->file_provider_type = val; +} + +uint32_t start_bulk_load_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->cluster_name); + this->__isset.cluster_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->file_provider_type); + this->__isset.file_provider_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t start_bulk_load_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("start_bulk_load_request"); + + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("cluster_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->cluster_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("file_provider_type", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->file_provider_type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(start_bulk_load_request &a, start_bulk_load_request &b) +{ + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.cluster_name, b.cluster_name); + swap(a.file_provider_type, b.file_provider_type); + swap(a.__isset, b.__isset); +} + +start_bulk_load_request::start_bulk_load_request(const start_bulk_load_request &other640) +{ + app_name = other640.app_name; + cluster_name = other640.cluster_name; + file_provider_type = other640.file_provider_type; + __isset = other640.__isset; +} +start_bulk_load_request::start_bulk_load_request(start_bulk_load_request &&other641) +{ + app_name = std::move(other641.app_name); + cluster_name = std::move(other641.cluster_name); + file_provider_type = std::move(other641.file_provider_type); + __isset = std::move(other641.__isset); +} +start_bulk_load_request &start_bulk_load_request::operator=(const start_bulk_load_request &other642) +{ + app_name = other642.app_name; + cluster_name = other642.cluster_name; + file_provider_type = other642.file_provider_type; + __isset = other642.__isset; + return *this; +} +start_bulk_load_request &start_bulk_load_request::operator=(start_bulk_load_request &&other643) +{ + app_name = std::move(other643.app_name); + cluster_name = std::move(other643.cluster_name); + file_provider_type = std::move(other643.file_provider_type); + __isset = std::move(other643.__isset); + return *this; +} +void start_bulk_load_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "start_bulk_load_request("; + out << "app_name=" << to_string(app_name); + out << ", " + << "cluster_name=" << to_string(cluster_name); + out << ", " + << "file_provider_type=" << to_string(file_provider_type); + out << ")"; +} + +start_bulk_load_response::~start_bulk_load_response() throw() {} + +void start_bulk_load_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void start_bulk_load_response::__set_hint_msg(const std::string &val) { this->hint_msg = val; } + +uint32_t start_bulk_load_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint_msg); + this->__isset.hint_msg = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t start_bulk_load_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("start_bulk_load_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("hint_msg", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->hint_msg); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(start_bulk_load_response &a, start_bulk_load_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.hint_msg, b.hint_msg); + swap(a.__isset, b.__isset); +} + +start_bulk_load_response::start_bulk_load_response(const start_bulk_load_response &other644) +{ + err = other644.err; + hint_msg = other644.hint_msg; + __isset = other644.__isset; +} +start_bulk_load_response::start_bulk_load_response(start_bulk_load_response &&other645) +{ + err = std::move(other645.err); + hint_msg = std::move(other645.hint_msg); + __isset = std::move(other645.__isset); +} +start_bulk_load_response &start_bulk_load_response:: +operator=(const start_bulk_load_response &other646) +{ + err = other646.err; + hint_msg = other646.hint_msg; + __isset = other646.__isset; + return *this; +} +start_bulk_load_response &start_bulk_load_response::operator=(start_bulk_load_response &&other647) +{ + err = std::move(other647.err); + hint_msg = std::move(other647.hint_msg); + __isset = std::move(other647.__isset); + return *this; +} +void start_bulk_load_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "start_bulk_load_response("; + out << "err=" << to_string(err); + out << ", " + << "hint_msg=" << to_string(hint_msg); + out << ")"; +} } } // namespace diff --git a/src/dist/replication/lib/replica_context.h b/src/dist/replication/lib/replica_context.h index efa8f766f6..73f640c888 100644 --- a/src/dist/replication/lib/replica_context.h +++ b/src/dist/replication/lib/replica_context.h @@ -223,14 +223,6 @@ enum cold_backup_status }; const char *cold_backup_status_to_string(cold_backup_status status); -struct file_meta -{ - std::string name; - int64_t size; - std::string md5; - DEFINE_JSON_SERIALIZATION(name, size, md5) -}; - struct cold_backup_metadata { int64_t checkpoint_decree; diff --git a/src/dist/replication/meta_server/meta_bulk_load_service.cpp b/src/dist/replication/meta_server/meta_bulk_load_service.cpp new file mode 100644 index 0000000000..5dc906ef65 --- /dev/null +++ b/src/dist/replication/meta_server/meta_bulk_load_service.cpp @@ -0,0 +1,300 @@ +// Copyright (c) 2017-present, Xiaomi, Inc. All rights reserved. +// This source code is licensed under the Apache License Version 2.0, which +// can be found in the LICENSE file in the root directory of this source tree. + +#include +#include + +#include "meta_bulk_load_service.h" + +namespace dsn { +namespace replication { + +bulk_load_service::bulk_load_service(meta_service *meta_svc, const std::string &bulk_load_dir) + : _meta_svc(meta_svc), _bulk_load_root(bulk_load_dir) +{ + _state = _meta_svc->get_server_state(); +} + +// ThreadPool: THREAD_POOL_META_STATE +void bulk_load_service::initialize_bulk_load_service() +{ + task_tracker tracker; + error_code err = ERR_OK; + + create_bulk_load_root_dir(err, tracker); + tracker.wait_outstanding_tasks(); + + if (err == ERR_OK) { + try_to_continue_bulk_load(); + } +} + +// ThreadPool: THREAD_POOL_META_STATE +void bulk_load_service::on_start_bulk_load(start_bulk_load_rpc rpc) +{ + const auto &request = rpc.request(); + auto &response = rpc.response(); + response.err = ERR_OK; + + std::shared_ptr app; + { + zauto_read_lock l(app_lock()); + + app = _state->get_app(request.app_name); + if (app == nullptr || app->status != app_status::AS_AVAILABLE) { + derror_f("app({}) is not existed or not available", request.app_name); + response.err = app == nullptr ? ERR_APP_NOT_EXIST : ERR_APP_DROPPED; + response.hint_msg = fmt::format( + "app {}", response.err == ERR_APP_NOT_EXIST ? "not existed" : "dropped"); + return; + } + + if (app->is_bulk_loading) { + derror_f("app({}) is already executing bulk load, please wait", app->app_name); + response.err = ERR_BUSY; + response.hint_msg = "app is already executing bulk load"; + return; + } + } + + std::string hint_msg; + error_code e = check_bulk_load_request_params(request.app_name, + request.cluster_name, + request.file_provider_type, + app->app_id, + app->partition_count, + hint_msg); + if (e != ERR_OK) { + response.err = e; + response.hint_msg = hint_msg; + return; + } + + ddebug_f("app({}) start bulk load, cluster_name = {}, provider = {}", + request.app_name, + request.cluster_name, + request.file_provider_type); + + // avoid possible load balancing + _meta_svc->set_function_level(meta_function_level::fl_steady); + + do_start_app_bulk_load(std::move(app), std::move(rpc)); +} + +// ThreadPool: THREAD_POOL_META_STATE +error_code bulk_load_service::check_bulk_load_request_params(const std::string &app_name, + const std::string &cluster_name, + const std::string &file_provider, + const int32_t app_id, + const int32_t partition_count, + std::string &hint_msg) +{ + FAIL_POINT_INJECT_F("meta_check_bulk_load_request_params", + [](dsn::string_view) -> error_code { return ERR_OK; }); + + // check file provider + dsn::dist::block_service::block_filesystem *blk_fs = + _meta_svc->get_block_service_manager().get_block_filesystem(file_provider); + if (blk_fs == nullptr) { + derror_f("invalid remote file provider type: {}", file_provider); + hint_msg = "invalid file_provider"; + return ERR_INVALID_PARAMETERS; + } + + // sync get bulk_load_info file_handler + std::string remote_path = get_bulk_load_info_path(app_name, cluster_name); + dsn::dist::block_service::create_file_request cf_req; + cf_req.file_name = remote_path; + cf_req.ignore_metadata = true; + error_code err = ERR_OK; + dsn::dist::block_service::block_file_ptr file_handler = nullptr; + blk_fs + ->create_file( + cf_req, + TASK_CODE_EXEC_INLINED, + [&err, &file_handler](const dsn::dist::block_service::create_file_response &resp) { + err = resp.err; + file_handler = resp.file_handle; + }) + ->wait(); + + if (err != ERR_OK || file_handler == nullptr) { + derror_f( + "failed to get file({}) handler on remote provider({})", remote_path, file_provider); + hint_msg = "file_provider error"; + return ERR_FILE_OPERATION_FAILED; + } + + // sync read bulk_load_info on file provider + dsn::dist::block_service::read_response r_resp; + file_handler + ->read(dsn::dist::block_service::read_request{0, -1}, + TASK_CODE_EXEC_INLINED, + [&r_resp](const dsn::dist::block_service::read_response &resp) { r_resp = resp; }) + ->wait(); + if (r_resp.err != ERR_OK) { + derror_f("failed to read file({}) on remote provider({}), error = {}", + file_provider, + remote_path, + r_resp.err.to_string()); + hint_msg = "read bulk_load_info failed"; + return r_resp.err; + } + + bulk_load_info bl_info; + if (!::dsn::json::json_forwarder::decode(r_resp.buffer, bl_info)) { + derror_f("file({}) is damaged on remote file provider({})", remote_path, file_provider); + hint_msg = "bulk_load_info damaged"; + return ERR_INCOMPLETE_DATA; + } + + if (bl_info.app_id != app_id || bl_info.partition_count != partition_count) { + derror_f("app({}) information is inconsistent, local app_id({}) VS remote app_id({}), " + "local partition_count({}) VS remote partition_count({})", + app_name, + app_id, + bl_info.app_id, + partition_count, + bl_info.partition_count); + hint_msg = "app_id or partition_count inconsistent"; + return ERR_INCONSISTENT_STATE; + } + + return ERR_OK; +} + +// ThreadPool: THREAD_POOL_META_STATE +void bulk_load_service::do_start_app_bulk_load(std::shared_ptr app, + start_bulk_load_rpc rpc) +{ + app_info info = *app; + info.__set_is_bulk_loading(true); + + blob value = dsn::json::json_forwarder::encode(info); + _meta_svc->get_meta_storage()->set_data( + _state->get_app_path(*app), std::move(value), [app, rpc, this]() { + { + zauto_write_lock l(app_lock()); + app->is_bulk_loading = true; + } + { + zauto_write_lock l(_lock); + _bulk_load_app_id.insert(app->app_id); + _apps_in_progress_count[app->app_id] = app->partition_count; + } + create_app_bulk_load_dir( + app->app_name, app->app_id, app->partition_count, std::move(rpc)); + }); +} + +// ThreadPool: THREAD_POOL_META_STATE +void bulk_load_service::create_app_bulk_load_dir(const std::string &app_name, + int32_t app_id, + int32_t partition_count, + start_bulk_load_rpc rpc) +{ + const auto req = rpc.request(); + + app_bulk_load_info ainfo; + ainfo.app_id = app_id; + ainfo.app_name = app_name; + ainfo.partition_count = partition_count; + ainfo.status = bulk_load_status::BLS_DOWNLOADING; + ainfo.cluster_name = req.cluster_name; + ainfo.file_provider_type = req.file_provider_type; + blob value = dsn::json::json_forwarder::encode(ainfo); + + _meta_svc->get_meta_storage()->create_node( + get_app_bulk_load_path(app_id), std::move(value), [rpc, ainfo, this]() { + dinfo_f("create app({}) bulk load dir", ainfo.app_name); + { + zauto_write_lock l(_lock); + _app_bulk_load_info[ainfo.app_id] = ainfo; + _apps_pending_sync_flag[ainfo.app_id] = false; + } + for (int32_t i = 0; i < ainfo.partition_count; ++i) { + create_partition_bulk_load_dir( + ainfo.app_name, gpid(ainfo.app_id, i), ainfo.partition_count, std::move(rpc)); + } + }); +} + +// ThreadPool: THREAD_POOL_META_STATE +void bulk_load_service::create_partition_bulk_load_dir(const std::string &app_name, + const gpid &pid, + int32_t partition_count, + start_bulk_load_rpc rpc) +{ + partition_bulk_load_info pinfo; + pinfo.status = bulk_load_status::BLS_DOWNLOADING; + blob value = dsn::json::json_forwarder::encode(pinfo); + + _meta_svc->get_meta_storage()->create_node( + get_partition_bulk_load_path(pid), + std::move(value), + [app_name, pid, partition_count, rpc, pinfo, this]() { + dinfo_f("app({}) create partition({}) bulk_load_info", app_name, pid.to_string()); + { + zauto_write_lock l(_lock); + _partition_bulk_load_info[pid] = pinfo; + _partitions_pending_sync_flag[pid] = false; + if (--_apps_in_progress_count[pid.get_app_id()] == 0) { + ddebug_f("app({}) start bulk load succeed", app_name); + _apps_in_progress_count[pid.get_app_id()] = partition_count; + auto response = rpc.response(); + response.err = ERR_OK; + } + } + // start send bulk load to replica servers + partition_bulk_load(app_name, pid); + }); +} + +// ThreadPool: THREAD_POOL_META_STATE +void bulk_load_service::partition_bulk_load(const std::string &app_name, const gpid &pid) +{ + // TODO(heyuchen): TBD +} + +// ThreadPool: THREAD_POOL_META_STATE +void bulk_load_service::create_bulk_load_root_dir(error_code &err, task_tracker &tracker) +{ + blob value = blob(); + _meta_svc->get_remote_storage()->create_node( + _bulk_load_root, + LPC_META_CALLBACK, + [this, &err, &tracker](error_code ec) { + if (ERR_OK == ec || ERR_NODE_ALREADY_EXIST == ec) { + ddebug_f("create bulk load root({}) succeed", _bulk_load_root); + sync_apps_bulk_load_from_remote_stroage(err, tracker); + } else if (ERR_TIMEOUT == ec) { + dwarn_f("create bulk load root({}) failed, retry later", _bulk_load_root); + tasking::enqueue( + LPC_META_STATE_NORMAL, + nullptr, + std::bind(&bulk_load_service::create_bulk_load_root_dir, this, err, tracker), + 0, + std::chrono::milliseconds(1000)); + } else { + err = ec; + dfatal_f( + "create bulk load root({}) failed, error={}", _bulk_load_root, ec.to_string()); + } + }, + value, + &tracker); +} + +void bulk_load_service::sync_apps_bulk_load_from_remote_stroage(error_code &err, task_tracker &tracker) +{ + // TODO(heyuchen): TBD +} + +void bulk_load_service::try_to_continue_bulk_load() +{ + // TODO(heyuchen): TBD +} + +} // namespace replication +} // namespace dsn diff --git a/src/dist/replication/meta_server/meta_bulk_load_service.h b/src/dist/replication/meta_server/meta_bulk_load_service.h new file mode 100644 index 0000000000..3260f9c437 --- /dev/null +++ b/src/dist/replication/meta_server/meta_bulk_load_service.h @@ -0,0 +1,195 @@ +// Copyright (c) 2017-present, Xiaomi, Inc. All rights reserved. +// This source code is licensed under the Apache License Version 2.0, which +// can be found in the LICENSE file in the root directory of this source tree. + +#pragma once + +#include "dist/replication/meta_server/meta_service.h" +#include "dist/replication/meta_server/server_state.h" + +namespace dsn { +namespace replication { + +/// +/// bulk load path on remote storage: +/// /bulk_load/ -> app_bulk_load_info +/// /bulk_load// -> partition_bulk_load_info +/// +struct app_bulk_load_info +{ + int32_t app_id; + int32_t partition_count; + std::string app_name; + std::string cluster_name; + std::string file_provider_type; + bulk_load_status::type status; + DEFINE_JSON_SERIALIZATION( + app_id, partition_count, app_name, cluster_name, file_provider_type, status) +}; + +struct partition_bulk_load_info +{ + bulk_load_status::type status; + bulk_load_metadata metadata; + DEFINE_JSON_SERIALIZATION(status, metadata) +}; + +// Used for remote file provider +struct bulk_load_info +{ + int32_t app_id; + std::string app_name; + int32_t partition_count; + DEFINE_JSON_SERIALIZATION(app_id, app_name, partition_count) +}; + +class bulk_load_service +{ +public: + explicit bulk_load_service(meta_service *meta_svc, const std::string &bulk_load_dir); + + void initialize_bulk_load_service(); + + // client -> meta server to start bulk load + void on_start_bulk_load(start_bulk_load_rpc rpc); + +private: + /// + /// Bulk load process: + /// when client sent `start_bulk_load_rpc` to meta server to start bulk load, + /// meta server create bulk load structures on remote storage, and send `RPC_BULK_LOAD` rpc to + /// each primary replica periodically until bulk load succeed or failed. whole process below: + /// + /// start bulk load + /// | + /// v + /// is_bulk_loading = true + /// | + /// v + /// create bulk load info on remote storage + /// | + /// Err v + /// ---------Downloading <---------| + /// | | | + /// | v Err | + /// | Downloaded --------->| + /// | | | + /// | IngestErr v Err | + /// |<------- Ingesting --------->| + /// | | | + /// v v Err | + /// Failed Succeed --------->| + /// | | + /// v v + /// remove bulk load info on remote storage + /// | + /// v + /// is_bulk_loading = false + /// | + /// v + /// bulk load end + + // Called by `on_start_bulk_load`, check request params + // - ERR_OK: pass params check + // - ERR_INVALID_PARAMETERS: wrong file_provider type + // - ERR_FILE_OPERATION_FAILED: file_provider error + // - ERR_OBJECT_NOT_FOUND: bulk_load_info not exist, may wrong cluster_name or app_name + // - ERR_INCOMPLETE_DATA: bulk_load_info is damaged on file_provider + // - ERR_INCONSISTENT_STATE: app_id or partition_count inconsistent + error_code check_bulk_load_request_params(const std::string &app_name, + const std::string &cluster_name, + const std::string &file_provider, + const int32_t app_id, + const int32_t partition_count, + std::string &hint_msg); + + void do_start_app_bulk_load(std::shared_ptr app, start_bulk_load_rpc rpc); + + void partition_bulk_load(const std::string &app_name, const gpid &pid); + + /// + /// update bulk load states to remote storage functions + /// + + void create_app_bulk_load_dir(const std::string &app_name, + int32_t app_id, + int32_t partition_count, + start_bulk_load_rpc rpc); + + void create_partition_bulk_load_dir(const std::string &app_name, + const gpid &pid, + int32_t partition_count, + start_bulk_load_rpc rpc); + + /// + /// sync bulk load states from remote storage + /// called when service initialized or meta server leader switch + /// + void create_bulk_load_root_dir(error_code &err, task_tracker &tracker); + + void sync_apps_bulk_load_from_remote_stroage(error_code &err, task_tracker &tracker); + + /// + /// try to continue bulk load according to states from remote stroage + /// called when service initialized or meta server leader switch + /// + void try_to_continue_bulk_load(); + + /// + /// helper functions + /// + inline std::string get_bulk_load_info_path(const std::string &app_name, + const std::string &cluster_name) const + { + std::ostringstream oss; + oss << _meta_svc->get_options().bulk_load_root << "/" << cluster_name << "/" << app_name + << "/" << bulk_load_constant::BULK_LOAD_INFO; + return oss.str(); + } + + inline std::string get_app_bulk_load_path(int32_t app_id) const + { + std::stringstream oss; + oss << _bulk_load_root << "/" << app_id; + return oss.str(); + } + + inline std::string get_partition_bulk_load_path(const std::string &app_bulk_load_path, + int partition_id) const + { + std::stringstream oss; + oss << app_bulk_load_path << "/" << partition_id; + return oss.str(); + } + + inline std::string get_partition_bulk_load_path(const gpid &pid) const + { + std::stringstream oss; + oss << get_app_bulk_load_path(pid.get_app_id()) << "/" << pid.get_partition_index(); + return oss.str(); + } + +private: + friend class bulk_load_service_test; + + meta_service *_meta_svc; + server_state *_state; + + zrwlock_nr &app_lock() const { return _state->_lock; } + zrwlock_nr _lock; // bulk load states lock + + std::string _bulk_load_root; // /bulk_load + + /// bulk load states + std::unordered_set _bulk_load_app_id; + std::unordered_map _app_bulk_load_info; + + std::unordered_map _apps_in_progress_count; + std::unordered_map _apps_pending_sync_flag; + + std::unordered_map _partition_bulk_load_info; + std::unordered_map _partitions_pending_sync_flag; +}; + +} // namespace replication +} // namespace dsn diff --git a/src/dist/replication/meta_server/meta_service.cpp b/src/dist/replication/meta_server/meta_service.cpp index a8c29b95a7..504b4da213 100644 --- a/src/dist/replication/meta_server/meta_service.cpp +++ b/src/dist/replication/meta_server/meta_service.cpp @@ -44,6 +44,7 @@ #include "server_load_balancer.h" #include "duplication/meta_duplication_service.h" #include "meta_split_service.h" +#include "meta_bulk_load_service.h" namespace dsn { namespace replication { @@ -239,6 +240,13 @@ void meta_service::start_service() nullptr, std::bind(&backup_service::start, _backup_handler.get())); } + + if (_bulk_load_svc) { + ddebug("start bulk load service"); + tasking::enqueue(LPC_META_STATE_NORMAL, nullptr, [this]() { + _bulk_load_svc->initialize_bulk_load_service(); + }); + } } // the start function is executed in threadpool default @@ -301,6 +309,9 @@ error_code meta_service::start() [](backup_service *bs) { return std::make_shared(bs); }); } + _bulk_load_svc = make_unique( + this, meta_options::concat_path_unix_style(_cluster_root, "bulk_load")); + // initialize the server_state _state->initialize(this, meta_options::concat_path_unix_style(_cluster_root, "apps")); while ((err = _state->initialize_data_structure()) != ERR_OK) { @@ -373,6 +384,8 @@ void meta_service::register_rpc_handlers() RPC_CM_DDD_DIAGNOSE, "ddd_diagnose", &meta_service::ddd_diagnose); register_rpc_handler_with_rpc_holder( RPC_CM_APP_PARTITION_SPLIT, "app_partition_split", &meta_service::on_app_partition_split); + register_rpc_handler_with_rpc_holder( + RPC_CM_START_BULK_LOAD, "start_bulk_load", &meta_service::on_start_bulk_load); } int meta_service::check_leader(dsn::message_ex *req, dsn::rpc_address *forward_address) @@ -923,5 +936,21 @@ void meta_service::on_app_partition_split(app_partition_split_rpc rpc) server_state::sStateHash); } +void meta_service::on_start_bulk_load(start_bulk_load_rpc rpc) +{ + auto &response = rpc.response(); + RPC_CHECK_STATUS(rpc.dsn_request(), response); + + if (!_bulk_load_svc) { + derror("meta doesn't support bulk load"); + response.err = ERR_SERVICE_NOT_ACTIVE; + } else { + tasking::enqueue(LPC_META_STATE_NORMAL, + tracker(), + [this, rpc]() { _bulk_load_svc->on_start_bulk_load(std::move(rpc)); }, + server_state::sStateHash); + } +} + } // namespace replication } // namespace dsn diff --git a/src/dist/replication/meta_server/meta_service.h b/src/dist/replication/meta_server/meta_service.h index 4a1fdb65a5..206962d645 100644 --- a/src/dist/replication/meta_server/meta_service.h +++ b/src/dist/replication/meta_server/meta_service.h @@ -57,6 +57,7 @@ class server_load_balancer; class replication_checker; class meta_duplication_service; class meta_split_service; +class bulk_load_service; namespace test { class test_checker; } @@ -96,6 +97,7 @@ class meta_service : public serverlet } return level; } + void set_function_level(meta_function_level::type level) { _function_level.store(level); } template void reply_data(dsn::message_ex *request, const TResponse &data) @@ -184,6 +186,9 @@ class meta_service : public serverlet // split void on_app_partition_split(app_partition_split_rpc rpc); + // bulk load + void on_start_bulk_load(start_bulk_load_rpc rpc); + // common routines // ret: // 1. the meta is leader @@ -198,6 +203,7 @@ class meta_service : public serverlet friend class replication_checker; friend class test::test_checker; friend class meta_service_test_app; + friend class bulk_load_service_test; replication_options _opts; meta_options _meta_opts; @@ -223,6 +229,8 @@ class meta_service : public serverlet std::unique_ptr _split_svc; + std::unique_ptr _bulk_load_svc; + // handle all the block filesystems for current meta service // (in other words, current service node) block_service_manager _block_service_manager; diff --git a/src/dist/replication/meta_server/server_state.h b/src/dist/replication/meta_server/server_state.h index f4fb5fa7de..fdf1e71305 100644 --- a/src/dist/replication/meta_server/server_state.h +++ b/src/dist/replication/meta_server/server_state.h @@ -304,6 +304,8 @@ class server_state friend class meta_load_balance_test; friend class meta_duplication_service; friend class meta_split_service; + friend class bulk_load_service; + friend class bulk_load_service_test; dsn::task_tracker _tracker; diff --git a/src/dist/replication/replication.thrift b/src/dist/replication/replication.thrift index 85363ba277..f4fb396155 100644 --- a/src/dist/replication/replication.thrift +++ b/src/dist/replication/replication.thrift @@ -624,6 +624,14 @@ struct configuration_query_restore_response 3:list restore_progress; } +// Used for cold backup and bulk load +struct file_meta +{ + 1:string name; + 2:i64 size; + 3:string md5; +} + enum app_env_operation { APP_ENV_OP_INVALID, @@ -852,6 +860,52 @@ struct notify_cacth_up_response 1:dsn.error_code err; } +/////////////////// bulk-load-related structs //////////////////// + +// app partition bulk load status +enum bulk_load_status +{ + BLS_INVALID, + BLS_DOWNLOADING, + BLS_DOWNLOADED, + BLS_INGESTING, + BLS_SUCCEED, + BLS_FAILED, + BLS_PAUSING, + BLS_PAUSED, + BLS_CANCELED +} + +struct bulk_load_metadata +{ + 1:list files; + 2:i64 file_total_size; +} + +// client -> meta, start bulk load +struct start_bulk_load_request +{ + 1:string app_name; + 2:string cluster_name; + 3:string file_provider_type; +} + +struct start_bulk_load_response +{ + // Possible error: + // - ERR_OK: start bulk load succeed + // - ERR_APP_NOT_EXIST: app not exist + // - ERR_APP_DROPPED: app has been dropped + // - ERR_BUSY: app is already executing bulk load + // - ERR_INVALID_PARAMETERS: wrong file_provider type + // - ERR_FILE_OPERATION_FAILED: remote file_provider error + // - ERR_OBJECT_NOT_FOUND: bulk_load_info not exist on file_provider + // - ERR_INCOMPLETE_DATA: bulk_load_info is damaged on file_provider + // - ERR_INCONSISTENT_STATE: app_id or partition_count inconsistent + 1:dsn.error_code err; + 2:string hint_msg; +} + /* service replica_s { diff --git a/src/dist/replication/test/meta_test/unit_test/CMakeLists.txt b/src/dist/replication/test/meta_test/unit_test/CMakeLists.txt index 05b5204474..33708072fb 100644 --- a/src/dist/replication/test/meta_test/unit_test/CMakeLists.txt +++ b/src/dist/replication/test/meta_test/unit_test/CMakeLists.txt @@ -31,7 +31,7 @@ set(MY_PROJ_LIBS crypto gtest) -set(MY_BOOST_LIBS Boost::system Boost::filesystem) +set(MY_BOOST_LIBS Boost::system Boost::filesystem Boost::regex) # Extra files that will be installed set(MY_BINPLACES clear.sh run.sh config-ddl-test.ini config-test.ini suite1 suite2) diff --git a/src/dist/replication/test/meta_test/unit_test/meta_bulk_load_service_test.cpp b/src/dist/replication/test/meta_test/unit_test/meta_bulk_load_service_test.cpp new file mode 100644 index 0000000000..cdf27a97ea --- /dev/null +++ b/src/dist/replication/test/meta_test/unit_test/meta_bulk_load_service_test.cpp @@ -0,0 +1,116 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2015 Microsoft Corporation + * + * -=- Robust Distributed System Nucleus (rDSN) -=- + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include +#include +#include + +#include "meta_test_base.h" + +namespace dsn { +namespace replication { +class bulk_load_service_test : public meta_test_base +{ +public: + bulk_load_service_test() {} + + void SetUp() override + { + meta_test_base::SetUp(); + _app_root = _ss->_apps_root; + } + + void TearDown() override { meta_test_base::TearDown(); } + + /// bulk load functions + + start_bulk_load_response start_bulk_load(const std::string &app_name) + { + auto request = dsn::make_unique(); + request->app_name = app_name; + request->cluster_name = CLUSTER; + request->file_provider_type = PROVIDER; + + start_bulk_load_rpc rpc(std::move(request), RPC_CM_START_BULK_LOAD); + bulk_svc().on_start_bulk_load(rpc); + wait_all(); + return rpc.response(); + } + + error_code check_start_bulk_load_request_params(const std::string provider, + int32_t app_id, + int32_t partition_count) + { + std::string hint_msg; + return bulk_svc().check_bulk_load_request_params( + APP_NAME, CLUSTER, provider, app_id, partition_count, hint_msg); + } + + bool app_is_bulk_loading(const std::string &app_name) + { + return find_app(app_name)->is_bulk_loading; + } + +public: + int32_t APP_ID = 1; + std::string APP_NAME = "bulk_load_test"; + int32_t PARTITION_COUNT = 8; + std::string CLUSTER = "cluster"; + std::string PROVIDER = "local_service"; + int64_t BALLOT = 4; + + std::string _app_root; +}; + +/// start bulk load unit tests +TEST_F(bulk_load_service_test, start_bulk_load_with_not_existed_app) +{ + auto resp = start_bulk_load("table_not_exist"); + ASSERT_EQ(resp.err, ERR_APP_NOT_EXIST); +} + +TEST_F(bulk_load_service_test, start_bulk_load_with_wrong_provider) +{ + create_app(APP_NAME); + error_code err = check_start_bulk_load_request_params("wrong_provider", 1, PARTITION_COUNT); + ASSERT_EQ(err, ERR_INVALID_PARAMETERS); +} + +TEST_F(bulk_load_service_test, start_bulk_load_succeed) +{ + create_app(APP_NAME); + fail::setup(); + fail::cfg("meta_check_bulk_load_request_params", "return()"); + fail::cfg("meta_bulk_load_partition_bulk_load", "return()"); + + auto resp = start_bulk_load(APP_NAME); + ASSERT_EQ(resp.err, ERR_OK); + ASSERT_TRUE(app_is_bulk_loading(APP_NAME)); + + fail::teardown(); +} +} // namespace replication +} // namespace dsn diff --git a/src/dist/replication/test/meta_test/unit_test/meta_test_base.h b/src/dist/replication/test/meta_test/unit_test/meta_test_base.h index 0fc9ccecc2..8c55d86922 100644 --- a/src/dist/replication/test/meta_test/unit_test/meta_test_base.h +++ b/src/dist/replication/test/meta_test/unit_test/meta_test_base.h @@ -7,6 +7,7 @@ #include "dist/replication/meta_server/server_load_balancer.h" #include "dist/replication/meta_server/meta_server_failure_detector.h" #include "dist/replication/meta_server/meta_split_service.h" +#include "dist/replication/meta_server/meta_bulk_load_service.h" #include "dist/replication/test/meta_test/misc/misc.h" #include "meta_service_test_app.h" @@ -30,11 +31,16 @@ class meta_test_base : public testing::Test ASSERT_TRUE(_ms->_dup_svc); _ms->_split_svc = make_unique(_ms.get()); ASSERT_TRUE(_ms->_split_svc); + _ms->_bulk_load_svc = make_unique( + _ms.get(), meta_options::concat_path_unix_style(_ms->_cluster_root, "bulk_load")); + ASSERT_TRUE(_ms->_bulk_load_svc); + _ms->_bulk_load_svc->initialize_bulk_load_service(); _ss = _ms->_state; _ss->initialize(_ms.get(), _ms->_cluster_root + "/apps"); _ms->_started = true; + _ms->set_function_level(meta_function_level::fl_steady); // recover apps from meta storage ASSERT_EQ(_ss->initialize_data_structure(), ERR_OK); @@ -125,6 +131,8 @@ class meta_test_base : public testing::Test meta_split_service &split_svc() { return *(_ms->_split_svc); } + bulk_load_service &bulk_svc() { return *(_ms->_bulk_load_svc); } + std::shared_ptr _ss; std::unique_ptr _ms; }; diff --git a/src/dsn.layer2.thrift b/src/dsn.layer2.thrift index eb4f6ca9cc..2e08979dad 100644 --- a/src/dsn.layer2.thrift +++ b/src/dsn.layer2.thrift @@ -71,6 +71,10 @@ struct app_info // child partition is not existed on remote stroage, but partition count changed. // We use init_partition_count to handle those child partitions while sync_apps_from_remote_stroage 13:i32 init_partition_count = -1; + + // New fields for bulk load + // Whether this app is executing bulk load + 14:optional bool is_bulk_loading = false; } // Metadata field of the request in rDSN's thrift protocol (version 1). From b47e72caf47cfea8f65c5cf6c614dbaa1e672bed Mon Sep 17 00:00:00 2001 From: heyuchen Date: Thu, 23 Apr 2020 12:59:21 +0800 Subject: [PATCH 2/9] remove implementation --- .../meta_server/meta_bulk_load_service.cpp | 221 ------------------ .../meta_server/meta_bulk_load_service.h | 67 ------ .../replication/meta_server/meta_service.h | 1 - .../replication/meta_server/server_state.h | 1 - .../unit_test/meta_bulk_load_service_test.cpp | 116 --------- 5 files changed, 406 deletions(-) delete mode 100644 src/dist/replication/test/meta_test/unit_test/meta_bulk_load_service_test.cpp diff --git a/src/dist/replication/meta_server/meta_bulk_load_service.cpp b/src/dist/replication/meta_server/meta_bulk_load_service.cpp index 5dc906ef65..a2744224e0 100644 --- a/src/dist/replication/meta_server/meta_bulk_load_service.cpp +++ b/src/dist/replication/meta_server/meta_bulk_load_service.cpp @@ -32,227 +32,6 @@ void bulk_load_service::initialize_bulk_load_service() // ThreadPool: THREAD_POOL_META_STATE void bulk_load_service::on_start_bulk_load(start_bulk_load_rpc rpc) -{ - const auto &request = rpc.request(); - auto &response = rpc.response(); - response.err = ERR_OK; - - std::shared_ptr app; - { - zauto_read_lock l(app_lock()); - - app = _state->get_app(request.app_name); - if (app == nullptr || app->status != app_status::AS_AVAILABLE) { - derror_f("app({}) is not existed or not available", request.app_name); - response.err = app == nullptr ? ERR_APP_NOT_EXIST : ERR_APP_DROPPED; - response.hint_msg = fmt::format( - "app {}", response.err == ERR_APP_NOT_EXIST ? "not existed" : "dropped"); - return; - } - - if (app->is_bulk_loading) { - derror_f("app({}) is already executing bulk load, please wait", app->app_name); - response.err = ERR_BUSY; - response.hint_msg = "app is already executing bulk load"; - return; - } - } - - std::string hint_msg; - error_code e = check_bulk_load_request_params(request.app_name, - request.cluster_name, - request.file_provider_type, - app->app_id, - app->partition_count, - hint_msg); - if (e != ERR_OK) { - response.err = e; - response.hint_msg = hint_msg; - return; - } - - ddebug_f("app({}) start bulk load, cluster_name = {}, provider = {}", - request.app_name, - request.cluster_name, - request.file_provider_type); - - // avoid possible load balancing - _meta_svc->set_function_level(meta_function_level::fl_steady); - - do_start_app_bulk_load(std::move(app), std::move(rpc)); -} - -// ThreadPool: THREAD_POOL_META_STATE -error_code bulk_load_service::check_bulk_load_request_params(const std::string &app_name, - const std::string &cluster_name, - const std::string &file_provider, - const int32_t app_id, - const int32_t partition_count, - std::string &hint_msg) -{ - FAIL_POINT_INJECT_F("meta_check_bulk_load_request_params", - [](dsn::string_view) -> error_code { return ERR_OK; }); - - // check file provider - dsn::dist::block_service::block_filesystem *blk_fs = - _meta_svc->get_block_service_manager().get_block_filesystem(file_provider); - if (blk_fs == nullptr) { - derror_f("invalid remote file provider type: {}", file_provider); - hint_msg = "invalid file_provider"; - return ERR_INVALID_PARAMETERS; - } - - // sync get bulk_load_info file_handler - std::string remote_path = get_bulk_load_info_path(app_name, cluster_name); - dsn::dist::block_service::create_file_request cf_req; - cf_req.file_name = remote_path; - cf_req.ignore_metadata = true; - error_code err = ERR_OK; - dsn::dist::block_service::block_file_ptr file_handler = nullptr; - blk_fs - ->create_file( - cf_req, - TASK_CODE_EXEC_INLINED, - [&err, &file_handler](const dsn::dist::block_service::create_file_response &resp) { - err = resp.err; - file_handler = resp.file_handle; - }) - ->wait(); - - if (err != ERR_OK || file_handler == nullptr) { - derror_f( - "failed to get file({}) handler on remote provider({})", remote_path, file_provider); - hint_msg = "file_provider error"; - return ERR_FILE_OPERATION_FAILED; - } - - // sync read bulk_load_info on file provider - dsn::dist::block_service::read_response r_resp; - file_handler - ->read(dsn::dist::block_service::read_request{0, -1}, - TASK_CODE_EXEC_INLINED, - [&r_resp](const dsn::dist::block_service::read_response &resp) { r_resp = resp; }) - ->wait(); - if (r_resp.err != ERR_OK) { - derror_f("failed to read file({}) on remote provider({}), error = {}", - file_provider, - remote_path, - r_resp.err.to_string()); - hint_msg = "read bulk_load_info failed"; - return r_resp.err; - } - - bulk_load_info bl_info; - if (!::dsn::json::json_forwarder::decode(r_resp.buffer, bl_info)) { - derror_f("file({}) is damaged on remote file provider({})", remote_path, file_provider); - hint_msg = "bulk_load_info damaged"; - return ERR_INCOMPLETE_DATA; - } - - if (bl_info.app_id != app_id || bl_info.partition_count != partition_count) { - derror_f("app({}) information is inconsistent, local app_id({}) VS remote app_id({}), " - "local partition_count({}) VS remote partition_count({})", - app_name, - app_id, - bl_info.app_id, - partition_count, - bl_info.partition_count); - hint_msg = "app_id or partition_count inconsistent"; - return ERR_INCONSISTENT_STATE; - } - - return ERR_OK; -} - -// ThreadPool: THREAD_POOL_META_STATE -void bulk_load_service::do_start_app_bulk_load(std::shared_ptr app, - start_bulk_load_rpc rpc) -{ - app_info info = *app; - info.__set_is_bulk_loading(true); - - blob value = dsn::json::json_forwarder::encode(info); - _meta_svc->get_meta_storage()->set_data( - _state->get_app_path(*app), std::move(value), [app, rpc, this]() { - { - zauto_write_lock l(app_lock()); - app->is_bulk_loading = true; - } - { - zauto_write_lock l(_lock); - _bulk_load_app_id.insert(app->app_id); - _apps_in_progress_count[app->app_id] = app->partition_count; - } - create_app_bulk_load_dir( - app->app_name, app->app_id, app->partition_count, std::move(rpc)); - }); -} - -// ThreadPool: THREAD_POOL_META_STATE -void bulk_load_service::create_app_bulk_load_dir(const std::string &app_name, - int32_t app_id, - int32_t partition_count, - start_bulk_load_rpc rpc) -{ - const auto req = rpc.request(); - - app_bulk_load_info ainfo; - ainfo.app_id = app_id; - ainfo.app_name = app_name; - ainfo.partition_count = partition_count; - ainfo.status = bulk_load_status::BLS_DOWNLOADING; - ainfo.cluster_name = req.cluster_name; - ainfo.file_provider_type = req.file_provider_type; - blob value = dsn::json::json_forwarder::encode(ainfo); - - _meta_svc->get_meta_storage()->create_node( - get_app_bulk_load_path(app_id), std::move(value), [rpc, ainfo, this]() { - dinfo_f("create app({}) bulk load dir", ainfo.app_name); - { - zauto_write_lock l(_lock); - _app_bulk_load_info[ainfo.app_id] = ainfo; - _apps_pending_sync_flag[ainfo.app_id] = false; - } - for (int32_t i = 0; i < ainfo.partition_count; ++i) { - create_partition_bulk_load_dir( - ainfo.app_name, gpid(ainfo.app_id, i), ainfo.partition_count, std::move(rpc)); - } - }); -} - -// ThreadPool: THREAD_POOL_META_STATE -void bulk_load_service::create_partition_bulk_load_dir(const std::string &app_name, - const gpid &pid, - int32_t partition_count, - start_bulk_load_rpc rpc) -{ - partition_bulk_load_info pinfo; - pinfo.status = bulk_load_status::BLS_DOWNLOADING; - blob value = dsn::json::json_forwarder::encode(pinfo); - - _meta_svc->get_meta_storage()->create_node( - get_partition_bulk_load_path(pid), - std::move(value), - [app_name, pid, partition_count, rpc, pinfo, this]() { - dinfo_f("app({}) create partition({}) bulk_load_info", app_name, pid.to_string()); - { - zauto_write_lock l(_lock); - _partition_bulk_load_info[pid] = pinfo; - _partitions_pending_sync_flag[pid] = false; - if (--_apps_in_progress_count[pid.get_app_id()] == 0) { - ddebug_f("app({}) start bulk load succeed", app_name); - _apps_in_progress_count[pid.get_app_id()] = partition_count; - auto response = rpc.response(); - response.err = ERR_OK; - } - } - // start send bulk load to replica servers - partition_bulk_load(app_name, pid); - }); -} - -// ThreadPool: THREAD_POOL_META_STATE -void bulk_load_service::partition_bulk_load(const std::string &app_name, const gpid &pid) { // TODO(heyuchen): TBD } diff --git a/src/dist/replication/meta_server/meta_bulk_load_service.h b/src/dist/replication/meta_server/meta_bulk_load_service.h index 3260f9c437..84634bea04 100644 --- a/src/dist/replication/meta_server/meta_bulk_load_service.h +++ b/src/dist/replication/meta_server/meta_bulk_load_service.h @@ -54,73 +54,6 @@ class bulk_load_service void on_start_bulk_load(start_bulk_load_rpc rpc); private: - /// - /// Bulk load process: - /// when client sent `start_bulk_load_rpc` to meta server to start bulk load, - /// meta server create bulk load structures on remote storage, and send `RPC_BULK_LOAD` rpc to - /// each primary replica periodically until bulk load succeed or failed. whole process below: - /// - /// start bulk load - /// | - /// v - /// is_bulk_loading = true - /// | - /// v - /// create bulk load info on remote storage - /// | - /// Err v - /// ---------Downloading <---------| - /// | | | - /// | v Err | - /// | Downloaded --------->| - /// | | | - /// | IngestErr v Err | - /// |<------- Ingesting --------->| - /// | | | - /// v v Err | - /// Failed Succeed --------->| - /// | | - /// v v - /// remove bulk load info on remote storage - /// | - /// v - /// is_bulk_loading = false - /// | - /// v - /// bulk load end - - // Called by `on_start_bulk_load`, check request params - // - ERR_OK: pass params check - // - ERR_INVALID_PARAMETERS: wrong file_provider type - // - ERR_FILE_OPERATION_FAILED: file_provider error - // - ERR_OBJECT_NOT_FOUND: bulk_load_info not exist, may wrong cluster_name or app_name - // - ERR_INCOMPLETE_DATA: bulk_load_info is damaged on file_provider - // - ERR_INCONSISTENT_STATE: app_id or partition_count inconsistent - error_code check_bulk_load_request_params(const std::string &app_name, - const std::string &cluster_name, - const std::string &file_provider, - const int32_t app_id, - const int32_t partition_count, - std::string &hint_msg); - - void do_start_app_bulk_load(std::shared_ptr app, start_bulk_load_rpc rpc); - - void partition_bulk_load(const std::string &app_name, const gpid &pid); - - /// - /// update bulk load states to remote storage functions - /// - - void create_app_bulk_load_dir(const std::string &app_name, - int32_t app_id, - int32_t partition_count, - start_bulk_load_rpc rpc); - - void create_partition_bulk_load_dir(const std::string &app_name, - const gpid &pid, - int32_t partition_count, - start_bulk_load_rpc rpc); - /// /// sync bulk load states from remote storage /// called when service initialized or meta server leader switch diff --git a/src/dist/replication/meta_server/meta_service.h b/src/dist/replication/meta_server/meta_service.h index 206962d645..87011a15fa 100644 --- a/src/dist/replication/meta_server/meta_service.h +++ b/src/dist/replication/meta_server/meta_service.h @@ -203,7 +203,6 @@ class meta_service : public serverlet friend class replication_checker; friend class test::test_checker; friend class meta_service_test_app; - friend class bulk_load_service_test; replication_options _opts; meta_options _meta_opts; diff --git a/src/dist/replication/meta_server/server_state.h b/src/dist/replication/meta_server/server_state.h index fdf1e71305..6eaa6bbd04 100644 --- a/src/dist/replication/meta_server/server_state.h +++ b/src/dist/replication/meta_server/server_state.h @@ -305,7 +305,6 @@ class server_state friend class meta_duplication_service; friend class meta_split_service; friend class bulk_load_service; - friend class bulk_load_service_test; dsn::task_tracker _tracker; diff --git a/src/dist/replication/test/meta_test/unit_test/meta_bulk_load_service_test.cpp b/src/dist/replication/test/meta_test/unit_test/meta_bulk_load_service_test.cpp deleted file mode 100644 index cdf27a97ea..0000000000 --- a/src/dist/replication/test/meta_test/unit_test/meta_bulk_load_service_test.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2015 Microsoft Corporation - * - * -=- Robust Distributed System Nucleus (rDSN) -=- - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include -#include -#include - -#include "meta_test_base.h" - -namespace dsn { -namespace replication { -class bulk_load_service_test : public meta_test_base -{ -public: - bulk_load_service_test() {} - - void SetUp() override - { - meta_test_base::SetUp(); - _app_root = _ss->_apps_root; - } - - void TearDown() override { meta_test_base::TearDown(); } - - /// bulk load functions - - start_bulk_load_response start_bulk_load(const std::string &app_name) - { - auto request = dsn::make_unique(); - request->app_name = app_name; - request->cluster_name = CLUSTER; - request->file_provider_type = PROVIDER; - - start_bulk_load_rpc rpc(std::move(request), RPC_CM_START_BULK_LOAD); - bulk_svc().on_start_bulk_load(rpc); - wait_all(); - return rpc.response(); - } - - error_code check_start_bulk_load_request_params(const std::string provider, - int32_t app_id, - int32_t partition_count) - { - std::string hint_msg; - return bulk_svc().check_bulk_load_request_params( - APP_NAME, CLUSTER, provider, app_id, partition_count, hint_msg); - } - - bool app_is_bulk_loading(const std::string &app_name) - { - return find_app(app_name)->is_bulk_loading; - } - -public: - int32_t APP_ID = 1; - std::string APP_NAME = "bulk_load_test"; - int32_t PARTITION_COUNT = 8; - std::string CLUSTER = "cluster"; - std::string PROVIDER = "local_service"; - int64_t BALLOT = 4; - - std::string _app_root; -}; - -/// start bulk load unit tests -TEST_F(bulk_load_service_test, start_bulk_load_with_not_existed_app) -{ - auto resp = start_bulk_load("table_not_exist"); - ASSERT_EQ(resp.err, ERR_APP_NOT_EXIST); -} - -TEST_F(bulk_load_service_test, start_bulk_load_with_wrong_provider) -{ - create_app(APP_NAME); - error_code err = check_start_bulk_load_request_params("wrong_provider", 1, PARTITION_COUNT); - ASSERT_EQ(err, ERR_INVALID_PARAMETERS); -} - -TEST_F(bulk_load_service_test, start_bulk_load_succeed) -{ - create_app(APP_NAME); - fail::setup(); - fail::cfg("meta_check_bulk_load_request_params", "return()"); - fail::cfg("meta_bulk_load_partition_bulk_load", "return()"); - - auto resp = start_bulk_load(APP_NAME); - ASSERT_EQ(resp.err, ERR_OK); - ASSERT_TRUE(app_is_bulk_loading(APP_NAME)); - - fail::teardown(); -} -} // namespace replication -} // namespace dsn From cacbbd068e2e3a44dd686675c8e3483b2d93ee6b Mon Sep 17 00:00:00 2001 From: heyuchen Date: Thu, 23 Apr 2020 13:36:12 +0800 Subject: [PATCH 3/9] remove start_bulk_load structure --- .../serialization_helper/dsn.layer2_types.h | 854 +- include/dsn/dist/cli/cli_types.h | 73 +- include/dsn/dist/failure_detector/fd_types.h | 323 +- .../dsn/dist/replication/replication_types.h | 9326 +++--- src/core/core/dsn.layer2_types.cpp | 2237 +- .../replication/common/replication_common.cpp | 4 +- .../replication/common/replication_common.h | 4 +- .../replication/common/replication_types.cpp | 26414 ++++++++-------- .../meta_server/meta_bulk_load_service.cpp | 7 - .../meta_server/meta_bulk_load_service.h | 41 +- .../replication/meta_server/meta_service.cpp | 18 - .../replication/meta_server/meta_service.h | 3 - src/dist/replication/replication.thrift | 24 - .../test/meta_test/unit_test/CMakeLists.txt | 2 +- 14 files changed, 19063 insertions(+), 20267 deletions(-) diff --git a/include/dsn/cpp/serialization_helper/dsn.layer2_types.h b/include/dsn/cpp/serialization_helper/dsn.layer2_types.h index 6ba23da9a1..d6b581816c 100644 --- a/include/dsn/cpp/serialization_helper/dsn.layer2_types.h +++ b/include/dsn/cpp/serialization_helper/dsn.layer2_types.h @@ -17,24 +17,23 @@ #include + namespace dsn { -struct app_status -{ - enum type - { - AS_INVALID = 0, - AS_AVAILABLE = 1, - AS_CREATING = 2, - AS_CREATE_FAILED = 3, - AS_DROPPING = 4, - AS_DROP_FAILED = 5, - AS_DROPPED = 6, - AS_RECALLING = 7 - }; +struct app_status { + enum type { + AS_INVALID = 0, + AS_AVAILABLE = 1, + AS_CREATING = 2, + AS_CREATE_FAILED = 3, + AS_DROPPING = 4, + AS_DROP_FAILED = 5, + AS_DROPPED = 6, + AS_RECALLING = 7 + }; }; -extern const std::map _app_status_VALUES_TO_NAMES; +extern const std::map _app_status_VALUES_TO_NAMES; class partition_configuration; @@ -46,491 +45,434 @@ class app_info; class thrift_request_meta_v1; -typedef struct _partition_configuration__isset -{ - _partition_configuration__isset() - : pid(false), - ballot(false), - max_replica_count(false), - primary(false), - secondaries(false), - last_drops(false), - last_committed_decree(false), - partition_flags(false) - { - } - bool pid : 1; - bool ballot : 1; - bool max_replica_count : 1; - bool primary : 1; - bool secondaries : 1; - bool last_drops : 1; - bool last_committed_decree : 1; - bool partition_flags : 1; +typedef struct _partition_configuration__isset { + _partition_configuration__isset() : pid(false), ballot(false), max_replica_count(false), primary(false), secondaries(false), last_drops(false), last_committed_decree(false), partition_flags(false) {} + bool pid :1; + bool ballot :1; + bool max_replica_count :1; + bool primary :1; + bool secondaries :1; + bool last_drops :1; + bool last_committed_decree :1; + bool partition_flags :1; } _partition_configuration__isset; -class partition_configuration -{ -public: - partition_configuration(const partition_configuration &); - partition_configuration(partition_configuration &&); - partition_configuration &operator=(const partition_configuration &); - partition_configuration &operator=(partition_configuration &&); - partition_configuration() - : ballot(0), max_replica_count(0), last_committed_decree(0), partition_flags(0) - { - } - - virtual ~partition_configuration() throw(); - ::dsn::gpid pid; - int64_t ballot; - int32_t max_replica_count; - ::dsn::rpc_address primary; - std::vector<::dsn::rpc_address> secondaries; - std::vector<::dsn::rpc_address> last_drops; - int64_t last_committed_decree; - int32_t partition_flags; - - _partition_configuration__isset __isset; - - void __set_pid(const ::dsn::gpid &val); - - void __set_ballot(const int64_t val); - - void __set_max_replica_count(const int32_t val); - - void __set_primary(const ::dsn::rpc_address &val); - - void __set_secondaries(const std::vector<::dsn::rpc_address> &val); - - void __set_last_drops(const std::vector<::dsn::rpc_address> &val); - - void __set_last_committed_decree(const int64_t val); - - void __set_partition_flags(const int32_t val); - - bool operator==(const partition_configuration &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(max_replica_count == rhs.max_replica_count)) - return false; - if (!(primary == rhs.primary)) - return false; - if (!(secondaries == rhs.secondaries)) - return false; - if (!(last_drops == rhs.last_drops)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (!(partition_flags == rhs.partition_flags)) - return false; - return true; - } - bool operator!=(const partition_configuration &rhs) const { return !(*this == rhs); } - - bool operator<(const partition_configuration &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class partition_configuration { + public: + + partition_configuration(const partition_configuration&); + partition_configuration(partition_configuration&&); + partition_configuration& operator=(const partition_configuration&); + partition_configuration& operator=(partition_configuration&&); + partition_configuration() : ballot(0), max_replica_count(0), last_committed_decree(0), partition_flags(0) { + } + + virtual ~partition_configuration() throw(); + ::dsn::gpid pid; + int64_t ballot; + int32_t max_replica_count; + ::dsn::rpc_address primary; + std::vector< ::dsn::rpc_address> secondaries; + std::vector< ::dsn::rpc_address> last_drops; + int64_t last_committed_decree; + int32_t partition_flags; + + _partition_configuration__isset __isset; + + void __set_pid(const ::dsn::gpid& val); + + void __set_ballot(const int64_t val); + + void __set_max_replica_count(const int32_t val); + + void __set_primary(const ::dsn::rpc_address& val); + + void __set_secondaries(const std::vector< ::dsn::rpc_address> & val); + + void __set_last_drops(const std::vector< ::dsn::rpc_address> & val); + + void __set_last_committed_decree(const int64_t val); + + void __set_partition_flags(const int32_t val); + + bool operator == (const partition_configuration & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(max_replica_count == rhs.max_replica_count)) + return false; + if (!(primary == rhs.primary)) + return false; + if (!(secondaries == rhs.secondaries)) + return false; + if (!(last_drops == rhs.last_drops)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (!(partition_flags == rhs.partition_flags)) + return false; + return true; + } + bool operator != (const partition_configuration &rhs) const { + return !(*this == rhs); + } + + bool operator < (const partition_configuration & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(partition_configuration &a, partition_configuration &b); -inline std::ostream &operator<<(std::ostream &out, const partition_configuration &obj) +inline std::ostream& operator<<(std::ostream& out, const partition_configuration& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_by_index_request__isset -{ - _configuration_query_by_index_request__isset() : app_name(false), partition_indices(false) {} - bool app_name : 1; - bool partition_indices : 1; +typedef struct _configuration_query_by_index_request__isset { + _configuration_query_by_index_request__isset() : app_name(false), partition_indices(false) {} + bool app_name :1; + bool partition_indices :1; } _configuration_query_by_index_request__isset; -class configuration_query_by_index_request -{ -public: - configuration_query_by_index_request(const configuration_query_by_index_request &); - configuration_query_by_index_request(configuration_query_by_index_request &&); - configuration_query_by_index_request &operator=(const configuration_query_by_index_request &); - configuration_query_by_index_request &operator=(configuration_query_by_index_request &&); - configuration_query_by_index_request() : app_name() {} - - virtual ~configuration_query_by_index_request() throw(); - std::string app_name; - std::vector partition_indices; - - _configuration_query_by_index_request__isset __isset; - - void __set_app_name(const std::string &val); - - void __set_partition_indices(const std::vector &val); - - bool operator==(const configuration_query_by_index_request &rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(partition_indices == rhs.partition_indices)) - return false; - return true; - } - bool operator!=(const configuration_query_by_index_request &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_query_by_index_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_query_by_index_request { + public: + + configuration_query_by_index_request(const configuration_query_by_index_request&); + configuration_query_by_index_request(configuration_query_by_index_request&&); + configuration_query_by_index_request& operator=(const configuration_query_by_index_request&); + configuration_query_by_index_request& operator=(configuration_query_by_index_request&&); + configuration_query_by_index_request() : app_name() { + } + + virtual ~configuration_query_by_index_request() throw(); + std::string app_name; + std::vector partition_indices; + + _configuration_query_by_index_request__isset __isset; + + void __set_app_name(const std::string& val); + + void __set_partition_indices(const std::vector & val); + + bool operator == (const configuration_query_by_index_request & rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(partition_indices == rhs.partition_indices)) + return false; + return true; + } + bool operator != (const configuration_query_by_index_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_query_by_index_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_query_by_index_request &a, configuration_query_by_index_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_query_by_index_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_query_by_index_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_by_index_response__isset -{ - _configuration_query_by_index_response__isset() - : err(false), app_id(false), partition_count(false), is_stateful(false), partitions(false) - { - } - bool err : 1; - bool app_id : 1; - bool partition_count : 1; - bool is_stateful : 1; - bool partitions : 1; +typedef struct _configuration_query_by_index_response__isset { + _configuration_query_by_index_response__isset() : err(false), app_id(false), partition_count(false), is_stateful(false), partitions(false) {} + bool err :1; + bool app_id :1; + bool partition_count :1; + bool is_stateful :1; + bool partitions :1; } _configuration_query_by_index_response__isset; -class configuration_query_by_index_response -{ -public: - configuration_query_by_index_response(const configuration_query_by_index_response &); - configuration_query_by_index_response(configuration_query_by_index_response &&); - configuration_query_by_index_response &operator=(const configuration_query_by_index_response &); - configuration_query_by_index_response &operator=(configuration_query_by_index_response &&); - configuration_query_by_index_response() : app_id(0), partition_count(0), is_stateful(0) {} - - virtual ~configuration_query_by_index_response() throw(); - ::dsn::error_code err; - int32_t app_id; - int32_t partition_count; - bool is_stateful; - std::vector partitions; - - _configuration_query_by_index_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_app_id(const int32_t val); - - void __set_partition_count(const int32_t val); - - void __set_is_stateful(const bool val); - - void __set_partitions(const std::vector &val); - - bool operator==(const configuration_query_by_index_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(app_id == rhs.app_id)) - return false; - if (!(partition_count == rhs.partition_count)) - return false; - if (!(is_stateful == rhs.is_stateful)) - return false; - if (!(partitions == rhs.partitions)) - return false; - return true; - } - bool operator!=(const configuration_query_by_index_response &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_query_by_index_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_query_by_index_response { + public: + + configuration_query_by_index_response(const configuration_query_by_index_response&); + configuration_query_by_index_response(configuration_query_by_index_response&&); + configuration_query_by_index_response& operator=(const configuration_query_by_index_response&); + configuration_query_by_index_response& operator=(configuration_query_by_index_response&&); + configuration_query_by_index_response() : app_id(0), partition_count(0), is_stateful(0) { + } + + virtual ~configuration_query_by_index_response() throw(); + ::dsn::error_code err; + int32_t app_id; + int32_t partition_count; + bool is_stateful; + std::vector partitions; + + _configuration_query_by_index_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_app_id(const int32_t val); + + void __set_partition_count(const int32_t val); + + void __set_is_stateful(const bool val); + + void __set_partitions(const std::vector & val); + + bool operator == (const configuration_query_by_index_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(app_id == rhs.app_id)) + return false; + if (!(partition_count == rhs.partition_count)) + return false; + if (!(is_stateful == rhs.is_stateful)) + return false; + if (!(partitions == rhs.partitions)) + return false; + return true; + } + bool operator != (const configuration_query_by_index_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_query_by_index_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_query_by_index_response &a, configuration_query_by_index_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_query_by_index_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_query_by_index_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _app_info__isset -{ - _app_info__isset() - : status(true), - app_type(false), - app_name(false), - app_id(false), - partition_count(false), - envs(false), - is_stateful(false), - max_replica_count(false), - expire_second(false), - create_second(false), - drop_second(false), - duplicating(false), - init_partition_count(true), - is_bulk_loading(true) - { - } - bool status : 1; - bool app_type : 1; - bool app_name : 1; - bool app_id : 1; - bool partition_count : 1; - bool envs : 1; - bool is_stateful : 1; - bool max_replica_count : 1; - bool expire_second : 1; - bool create_second : 1; - bool drop_second : 1; - bool duplicating : 1; - bool init_partition_count : 1; - bool is_bulk_loading : 1; +typedef struct _app_info__isset { + _app_info__isset() : status(true), app_type(false), app_name(false), app_id(false), partition_count(false), envs(false), is_stateful(false), max_replica_count(false), expire_second(false), create_second(false), drop_second(false), duplicating(false), init_partition_count(true), is_bulk_loading(true) {} + bool status :1; + bool app_type :1; + bool app_name :1; + bool app_id :1; + bool partition_count :1; + bool envs :1; + bool is_stateful :1; + bool max_replica_count :1; + bool expire_second :1; + bool create_second :1; + bool drop_second :1; + bool duplicating :1; + bool init_partition_count :1; + bool is_bulk_loading :1; } _app_info__isset; -class app_info -{ -public: - app_info(const app_info &); - app_info(app_info &&); - app_info &operator=(const app_info &); - app_info &operator=(app_info &&); - app_info() - : status((app_status::type)0), - app_type(), - app_name(), - app_id(0), - partition_count(0), - is_stateful(0), - max_replica_count(0), - expire_second(0), - create_second(0), - drop_second(0), - duplicating(0), - init_partition_count(-1), - is_bulk_loading(false) - { - status = (app_status::type)0; - } - - virtual ~app_info() throw(); - app_status::type status; - std::string app_type; - std::string app_name; - int32_t app_id; - int32_t partition_count; - std::map envs; - bool is_stateful; - int32_t max_replica_count; - int64_t expire_second; - int64_t create_second; - int64_t drop_second; - bool duplicating; - int32_t init_partition_count; - bool is_bulk_loading; - - _app_info__isset __isset; - - void __set_status(const app_status::type val); - - void __set_app_type(const std::string &val); - - void __set_app_name(const std::string &val); - - void __set_app_id(const int32_t val); - - void __set_partition_count(const int32_t val); - - void __set_envs(const std::map &val); - - void __set_is_stateful(const bool val); - - void __set_max_replica_count(const int32_t val); - - void __set_expire_second(const int64_t val); - - void __set_create_second(const int64_t val); - - void __set_drop_second(const int64_t val); - - void __set_duplicating(const bool val); - - void __set_init_partition_count(const int32_t val); - - void __set_is_bulk_loading(const bool val); - - bool operator==(const app_info &rhs) const - { - if (!(status == rhs.status)) - return false; - if (!(app_type == rhs.app_type)) - return false; - if (!(app_name == rhs.app_name)) - return false; - if (!(app_id == rhs.app_id)) - return false; - if (!(partition_count == rhs.partition_count)) - return false; - if (!(envs == rhs.envs)) - return false; - if (!(is_stateful == rhs.is_stateful)) - return false; - if (!(max_replica_count == rhs.max_replica_count)) - return false; - if (!(expire_second == rhs.expire_second)) - return false; - if (!(create_second == rhs.create_second)) - return false; - if (!(drop_second == rhs.drop_second)) - return false; - if (__isset.duplicating != rhs.__isset.duplicating) - return false; - else if (__isset.duplicating && !(duplicating == rhs.duplicating)) - return false; - if (!(init_partition_count == rhs.init_partition_count)) - return false; - if (__isset.is_bulk_loading != rhs.__isset.is_bulk_loading) - return false; - else if (__isset.is_bulk_loading && !(is_bulk_loading == rhs.is_bulk_loading)) - return false; - return true; - } - bool operator!=(const app_info &rhs) const { return !(*this == rhs); } - - bool operator<(const app_info &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class app_info { + public: + + app_info(const app_info&); + app_info(app_info&&); + app_info& operator=(const app_info&); + app_info& operator=(app_info&&); + app_info() : status((app_status::type)0), app_type(), app_name(), app_id(0), partition_count(0), is_stateful(0), max_replica_count(0), expire_second(0), create_second(0), drop_second(0), duplicating(0), init_partition_count(-1), is_bulk_loading(false) { + status = (app_status::type)0; + + } + + virtual ~app_info() throw(); + app_status::type status; + std::string app_type; + std::string app_name; + int32_t app_id; + int32_t partition_count; + std::map envs; + bool is_stateful; + int32_t max_replica_count; + int64_t expire_second; + int64_t create_second; + int64_t drop_second; + bool duplicating; + int32_t init_partition_count; + bool is_bulk_loading; + + _app_info__isset __isset; + + void __set_status(const app_status::type val); + + void __set_app_type(const std::string& val); + + void __set_app_name(const std::string& val); + + void __set_app_id(const int32_t val); + + void __set_partition_count(const int32_t val); + + void __set_envs(const std::map & val); + + void __set_is_stateful(const bool val); + + void __set_max_replica_count(const int32_t val); + + void __set_expire_second(const int64_t val); + + void __set_create_second(const int64_t val); + + void __set_drop_second(const int64_t val); + + void __set_duplicating(const bool val); + + void __set_init_partition_count(const int32_t val); + + void __set_is_bulk_loading(const bool val); + + bool operator == (const app_info & rhs) const + { + if (!(status == rhs.status)) + return false; + if (!(app_type == rhs.app_type)) + return false; + if (!(app_name == rhs.app_name)) + return false; + if (!(app_id == rhs.app_id)) + return false; + if (!(partition_count == rhs.partition_count)) + return false; + if (!(envs == rhs.envs)) + return false; + if (!(is_stateful == rhs.is_stateful)) + return false; + if (!(max_replica_count == rhs.max_replica_count)) + return false; + if (!(expire_second == rhs.expire_second)) + return false; + if (!(create_second == rhs.create_second)) + return false; + if (!(drop_second == rhs.drop_second)) + return false; + if (__isset.duplicating != rhs.__isset.duplicating) + return false; + else if (__isset.duplicating && !(duplicating == rhs.duplicating)) + return false; + if (!(init_partition_count == rhs.init_partition_count)) + return false; + if (__isset.is_bulk_loading != rhs.__isset.is_bulk_loading) + return false; + else if (__isset.is_bulk_loading && !(is_bulk_loading == rhs.is_bulk_loading)) + return false; + return true; + } + bool operator != (const app_info &rhs) const { + return !(*this == rhs); + } + + bool operator < (const app_info & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(app_info &a, app_info &b); -inline std::ostream &operator<<(std::ostream &out, const app_info &obj) +inline std::ostream& operator<<(std::ostream& out, const app_info& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _thrift_request_meta_v1__isset -{ - _thrift_request_meta_v1__isset() - : app_id(false), - partition_index(false), - client_timeout(false), - client_partition_hash(false), - is_backup_request(false) - { - } - bool app_id : 1; - bool partition_index : 1; - bool client_timeout : 1; - bool client_partition_hash : 1; - bool is_backup_request : 1; +typedef struct _thrift_request_meta_v1__isset { + _thrift_request_meta_v1__isset() : app_id(false), partition_index(false), client_timeout(false), client_partition_hash(false), is_backup_request(false) {} + bool app_id :1; + bool partition_index :1; + bool client_timeout :1; + bool client_partition_hash :1; + bool is_backup_request :1; } _thrift_request_meta_v1__isset; -class thrift_request_meta_v1 -{ -public: - thrift_request_meta_v1(const thrift_request_meta_v1 &); - thrift_request_meta_v1(thrift_request_meta_v1 &&); - thrift_request_meta_v1 &operator=(const thrift_request_meta_v1 &); - thrift_request_meta_v1 &operator=(thrift_request_meta_v1 &&); - thrift_request_meta_v1() - : app_id(0), - partition_index(0), - client_timeout(0), - client_partition_hash(0), - is_backup_request(0) - { - } - - virtual ~thrift_request_meta_v1() throw(); - int32_t app_id; - int32_t partition_index; - int32_t client_timeout; - int64_t client_partition_hash; - bool is_backup_request; - - _thrift_request_meta_v1__isset __isset; - - void __set_app_id(const int32_t val); - - void __set_partition_index(const int32_t val); - - void __set_client_timeout(const int32_t val); - - void __set_client_partition_hash(const int64_t val); - - void __set_is_backup_request(const bool val); - - bool operator==(const thrift_request_meta_v1 &rhs) const - { - if (__isset.app_id != rhs.__isset.app_id) - return false; - else if (__isset.app_id && !(app_id == rhs.app_id)) - return false; - if (__isset.partition_index != rhs.__isset.partition_index) - return false; - else if (__isset.partition_index && !(partition_index == rhs.partition_index)) - return false; - if (__isset.client_timeout != rhs.__isset.client_timeout) - return false; - else if (__isset.client_timeout && !(client_timeout == rhs.client_timeout)) - return false; - if (__isset.client_partition_hash != rhs.__isset.client_partition_hash) - return false; - else if (__isset.client_partition_hash && - !(client_partition_hash == rhs.client_partition_hash)) - return false; - if (__isset.is_backup_request != rhs.__isset.is_backup_request) - return false; - else if (__isset.is_backup_request && !(is_backup_request == rhs.is_backup_request)) - return false; - return true; - } - bool operator!=(const thrift_request_meta_v1 &rhs) const { return !(*this == rhs); } - - bool operator<(const thrift_request_meta_v1 &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class thrift_request_meta_v1 { + public: + + thrift_request_meta_v1(const thrift_request_meta_v1&); + thrift_request_meta_v1(thrift_request_meta_v1&&); + thrift_request_meta_v1& operator=(const thrift_request_meta_v1&); + thrift_request_meta_v1& operator=(thrift_request_meta_v1&&); + thrift_request_meta_v1() : app_id(0), partition_index(0), client_timeout(0), client_partition_hash(0), is_backup_request(0) { + } + + virtual ~thrift_request_meta_v1() throw(); + int32_t app_id; + int32_t partition_index; + int32_t client_timeout; + int64_t client_partition_hash; + bool is_backup_request; + + _thrift_request_meta_v1__isset __isset; + + void __set_app_id(const int32_t val); + + void __set_partition_index(const int32_t val); + + void __set_client_timeout(const int32_t val); + + void __set_client_partition_hash(const int64_t val); + + void __set_is_backup_request(const bool val); + + bool operator == (const thrift_request_meta_v1 & rhs) const + { + if (__isset.app_id != rhs.__isset.app_id) + return false; + else if (__isset.app_id && !(app_id == rhs.app_id)) + return false; + if (__isset.partition_index != rhs.__isset.partition_index) + return false; + else if (__isset.partition_index && !(partition_index == rhs.partition_index)) + return false; + if (__isset.client_timeout != rhs.__isset.client_timeout) + return false; + else if (__isset.client_timeout && !(client_timeout == rhs.client_timeout)) + return false; + if (__isset.client_partition_hash != rhs.__isset.client_partition_hash) + return false; + else if (__isset.client_partition_hash && !(client_partition_hash == rhs.client_partition_hash)) + return false; + if (__isset.is_backup_request != rhs.__isset.is_backup_request) + return false; + else if (__isset.is_backup_request && !(is_backup_request == rhs.is_backup_request)) + return false; + return true; + } + bool operator != (const thrift_request_meta_v1 &rhs) const { + return !(*this == rhs); + } + + bool operator < (const thrift_request_meta_v1 & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(thrift_request_meta_v1 &a, thrift_request_meta_v1 &b); -inline std::ostream &operator<<(std::ostream &out, const thrift_request_meta_v1 &obj) +inline std::ostream& operator<<(std::ostream& out, const thrift_request_meta_v1& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } } // namespace diff --git a/include/dsn/dist/cli/cli_types.h b/include/dsn/dist/cli/cli_types.h index 08153ada1d..2d14406223 100644 --- a/include/dsn/dist/cli/cli_types.h +++ b/include/dsn/dist/cli/cli_types.h @@ -16,60 +16,63 @@ #include + namespace dsn { class command; -typedef struct _command__isset -{ - _command__isset() : cmd(false), arguments(false) {} - bool cmd : 1; - bool arguments : 1; +typedef struct _command__isset { + _command__isset() : cmd(false), arguments(false) {} + bool cmd :1; + bool arguments :1; } _command__isset; -class command -{ -public: - command(const command &); - command(command &&); - command &operator=(const command &); - command &operator=(command &&); - command() : cmd() {} +class command { + public: + + command(const command&); + command(command&&); + command& operator=(const command&); + command& operator=(command&&); + command() : cmd() { + } - virtual ~command() throw(); - std::string cmd; - std::vector arguments; + virtual ~command() throw(); + std::string cmd; + std::vector arguments; - _command__isset __isset; + _command__isset __isset; - void __set_cmd(const std::string &val); + void __set_cmd(const std::string& val); - void __set_arguments(const std::vector &val); + void __set_arguments(const std::vector & val); - bool operator==(const command &rhs) const - { - if (!(cmd == rhs.cmd)) - return false; - if (!(arguments == rhs.arguments)) - return false; - return true; - } - bool operator!=(const command &rhs) const { return !(*this == rhs); } + bool operator == (const command & rhs) const + { + if (!(cmd == rhs.cmd)) + return false; + if (!(arguments == rhs.arguments)) + return false; + return true; + } + bool operator != (const command &rhs) const { + return !(*this == rhs); + } - bool operator<(const command &) const; + bool operator < (const command & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(command &a, command &b); -inline std::ostream &operator<<(std::ostream &out, const command &obj) +inline std::ostream& operator<<(std::ostream& out, const command& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } } // namespace diff --git a/include/dsn/dist/failure_detector/fd_types.h b/include/dsn/dist/failure_detector/fd_types.h index 28625de849..23031a82de 100644 --- a/include/dsn/dist/failure_detector/fd_types.h +++ b/include/dsn/dist/failure_detector/fd_types.h @@ -17,8 +17,8 @@ #include -namespace dsn { -namespace fd { + +namespace dsn { namespace fd { class beacon_msg; @@ -26,197 +26,200 @@ class beacon_ack; class config_master_message; -typedef struct _beacon_msg__isset -{ - _beacon_msg__isset() : time(false), from_addr(false), to_addr(false), start_time(false) {} - bool time : 1; - bool from_addr : 1; - bool to_addr : 1; - bool start_time : 1; +typedef struct _beacon_msg__isset { + _beacon_msg__isset() : time(false), from_addr(false), to_addr(false), start_time(false) {} + bool time :1; + bool from_addr :1; + bool to_addr :1; + bool start_time :1; } _beacon_msg__isset; -class beacon_msg -{ -public: - beacon_msg(const beacon_msg &); - beacon_msg(beacon_msg &&); - beacon_msg &operator=(const beacon_msg &); - beacon_msg &operator=(beacon_msg &&); - beacon_msg() : time(0), start_time(0) {} - - virtual ~beacon_msg() throw(); - int64_t time; - ::dsn::rpc_address from_addr; - ::dsn::rpc_address to_addr; - int64_t start_time; - - _beacon_msg__isset __isset; - - void __set_time(const int64_t val); - - void __set_from_addr(const ::dsn::rpc_address &val); - - void __set_to_addr(const ::dsn::rpc_address &val); - - void __set_start_time(const int64_t val); - - bool operator==(const beacon_msg &rhs) const - { - if (!(time == rhs.time)) - return false; - if (!(from_addr == rhs.from_addr)) - return false; - if (!(to_addr == rhs.to_addr)) - return false; - if (__isset.start_time != rhs.__isset.start_time) - return false; - else if (__isset.start_time && !(start_time == rhs.start_time)) - return false; - return true; - } - bool operator!=(const beacon_msg &rhs) const { return !(*this == rhs); } - - bool operator<(const beacon_msg &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class beacon_msg { + public: + + beacon_msg(const beacon_msg&); + beacon_msg(beacon_msg&&); + beacon_msg& operator=(const beacon_msg&); + beacon_msg& operator=(beacon_msg&&); + beacon_msg() : time(0), start_time(0) { + } + + virtual ~beacon_msg() throw(); + int64_t time; + ::dsn::rpc_address from_addr; + ::dsn::rpc_address to_addr; + int64_t start_time; + + _beacon_msg__isset __isset; + + void __set_time(const int64_t val); + + void __set_from_addr(const ::dsn::rpc_address& val); + + void __set_to_addr(const ::dsn::rpc_address& val); + + void __set_start_time(const int64_t val); + + bool operator == (const beacon_msg & rhs) const + { + if (!(time == rhs.time)) + return false; + if (!(from_addr == rhs.from_addr)) + return false; + if (!(to_addr == rhs.to_addr)) + return false; + if (__isset.start_time != rhs.__isset.start_time) + return false; + else if (__isset.start_time && !(start_time == rhs.start_time)) + return false; + return true; + } + bool operator != (const beacon_msg &rhs) const { + return !(*this == rhs); + } + + bool operator < (const beacon_msg & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(beacon_msg &a, beacon_msg &b); -inline std::ostream &operator<<(std::ostream &out, const beacon_msg &obj) +inline std::ostream& operator<<(std::ostream& out, const beacon_msg& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _beacon_ack__isset -{ - _beacon_ack__isset() - : time(false), this_node(false), primary_node(false), is_master(false), allowed(false) - { - } - bool time : 1; - bool this_node : 1; - bool primary_node : 1; - bool is_master : 1; - bool allowed : 1; +typedef struct _beacon_ack__isset { + _beacon_ack__isset() : time(false), this_node(false), primary_node(false), is_master(false), allowed(false) {} + bool time :1; + bool this_node :1; + bool primary_node :1; + bool is_master :1; + bool allowed :1; } _beacon_ack__isset; -class beacon_ack -{ -public: - beacon_ack(const beacon_ack &); - beacon_ack(beacon_ack &&); - beacon_ack &operator=(const beacon_ack &); - beacon_ack &operator=(beacon_ack &&); - beacon_ack() : time(0), is_master(0), allowed(0) {} - - virtual ~beacon_ack() throw(); - int64_t time; - ::dsn::rpc_address this_node; - ::dsn::rpc_address primary_node; - bool is_master; - bool allowed; - - _beacon_ack__isset __isset; - - void __set_time(const int64_t val); - - void __set_this_node(const ::dsn::rpc_address &val); - - void __set_primary_node(const ::dsn::rpc_address &val); - - void __set_is_master(const bool val); - - void __set_allowed(const bool val); - - bool operator==(const beacon_ack &rhs) const - { - if (!(time == rhs.time)) - return false; - if (!(this_node == rhs.this_node)) - return false; - if (!(primary_node == rhs.primary_node)) - return false; - if (!(is_master == rhs.is_master)) - return false; - if (!(allowed == rhs.allowed)) - return false; - return true; - } - bool operator!=(const beacon_ack &rhs) const { return !(*this == rhs); } - - bool operator<(const beacon_ack &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class beacon_ack { + public: + + beacon_ack(const beacon_ack&); + beacon_ack(beacon_ack&&); + beacon_ack& operator=(const beacon_ack&); + beacon_ack& operator=(beacon_ack&&); + beacon_ack() : time(0), is_master(0), allowed(0) { + } + + virtual ~beacon_ack() throw(); + int64_t time; + ::dsn::rpc_address this_node; + ::dsn::rpc_address primary_node; + bool is_master; + bool allowed; + + _beacon_ack__isset __isset; + + void __set_time(const int64_t val); + + void __set_this_node(const ::dsn::rpc_address& val); + + void __set_primary_node(const ::dsn::rpc_address& val); + + void __set_is_master(const bool val); + + void __set_allowed(const bool val); + + bool operator == (const beacon_ack & rhs) const + { + if (!(time == rhs.time)) + return false; + if (!(this_node == rhs.this_node)) + return false; + if (!(primary_node == rhs.primary_node)) + return false; + if (!(is_master == rhs.is_master)) + return false; + if (!(allowed == rhs.allowed)) + return false; + return true; + } + bool operator != (const beacon_ack &rhs) const { + return !(*this == rhs); + } + + bool operator < (const beacon_ack & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(beacon_ack &a, beacon_ack &b); -inline std::ostream &operator<<(std::ostream &out, const beacon_ack &obj) +inline std::ostream& operator<<(std::ostream& out, const beacon_ack& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _config_master_message__isset -{ - _config_master_message__isset() : master(false), is_register(false) {} - bool master : 1; - bool is_register : 1; +typedef struct _config_master_message__isset { + _config_master_message__isset() : master(false), is_register(false) {} + bool master :1; + bool is_register :1; } _config_master_message__isset; -class config_master_message -{ -public: - config_master_message(const config_master_message &); - config_master_message(config_master_message &&); - config_master_message &operator=(const config_master_message &); - config_master_message &operator=(config_master_message &&); - config_master_message() : is_register(0) {} +class config_master_message { + public: + + config_master_message(const config_master_message&); + config_master_message(config_master_message&&); + config_master_message& operator=(const config_master_message&); + config_master_message& operator=(config_master_message&&); + config_master_message() : is_register(0) { + } - virtual ~config_master_message() throw(); - ::dsn::rpc_address master; - bool is_register; + virtual ~config_master_message() throw(); + ::dsn::rpc_address master; + bool is_register; - _config_master_message__isset __isset; + _config_master_message__isset __isset; - void __set_master(const ::dsn::rpc_address &val); + void __set_master(const ::dsn::rpc_address& val); - void __set_is_register(const bool val); + void __set_is_register(const bool val); - bool operator==(const config_master_message &rhs) const - { - if (!(master == rhs.master)) - return false; - if (!(is_register == rhs.is_register)) - return false; - return true; - } - bool operator!=(const config_master_message &rhs) const { return !(*this == rhs); } + bool operator == (const config_master_message & rhs) const + { + if (!(master == rhs.master)) + return false; + if (!(is_register == rhs.is_register)) + return false; + return true; + } + bool operator != (const config_master_message &rhs) const { + return !(*this == rhs); + } - bool operator<(const config_master_message &) const; + bool operator < (const config_master_message & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(config_master_message &a, config_master_message &b); -inline std::ostream &operator<<(std::ostream &out, const config_master_message &obj) +inline std::ostream& operator<<(std::ostream& out, const config_master_message& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -} -} // namespace + +}} // namespace #endif diff --git a/include/dsn/dist/replication/replication_types.h b/include/dsn/dist/replication/replication_types.h index 459fb04d00..7a45ebceaf 100644 --- a/include/dsn/dist/replication/replication_types.h +++ b/include/dsn/dist/replication/replication_types.h @@ -17,180 +17,156 @@ #include -namespace dsn { -namespace replication { -struct partition_status -{ - enum type - { - PS_INVALID = 0, - PS_INACTIVE = 1, - PS_ERROR = 2, - PS_PRIMARY = 3, - PS_SECONDARY = 4, - PS_POTENTIAL_SECONDARY = 5, - PS_PARTITION_SPLIT = 6 - }; +namespace dsn { namespace replication { + +struct partition_status { + enum type { + PS_INVALID = 0, + PS_INACTIVE = 1, + PS_ERROR = 2, + PS_PRIMARY = 3, + PS_SECONDARY = 4, + PS_POTENTIAL_SECONDARY = 5, + PS_PARTITION_SPLIT = 6 + }; }; -extern const std::map _partition_status_VALUES_TO_NAMES; +extern const std::map _partition_status_VALUES_TO_NAMES; -struct read_semantic -{ - enum type - { - ReadInvalid = 0, - ReadLastUpdate = 1, - ReadOutdated = 2, - ReadSnapshot = 3 - }; +struct read_semantic { + enum type { + ReadInvalid = 0, + ReadLastUpdate = 1, + ReadOutdated = 2, + ReadSnapshot = 3 + }; }; -extern const std::map _read_semantic_VALUES_TO_NAMES; +extern const std::map _read_semantic_VALUES_TO_NAMES; -struct learn_type -{ - enum type - { - LT_INVALID = 0, - LT_CACHE = 1, - LT_APP = 2, - LT_LOG = 3 - }; +struct learn_type { + enum type { + LT_INVALID = 0, + LT_CACHE = 1, + LT_APP = 2, + LT_LOG = 3 + }; }; -extern const std::map _learn_type_VALUES_TO_NAMES; - -struct learner_status -{ - enum type - { - LearningInvalid = 0, - LearningWithoutPrepare = 1, - LearningWithPrepareTransient = 2, - LearningWithPrepare = 3, - LearningSucceeded = 4, - LearningFailed = 5 - }; +extern const std::map _learn_type_VALUES_TO_NAMES; + +struct learner_status { + enum type { + LearningInvalid = 0, + LearningWithoutPrepare = 1, + LearningWithPrepareTransient = 2, + LearningWithPrepare = 3, + LearningSucceeded = 4, + LearningFailed = 5 + }; }; -extern const std::map _learner_status_VALUES_TO_NAMES; - -struct config_type -{ - enum type - { - CT_INVALID = 0, - CT_ASSIGN_PRIMARY = 1, - CT_UPGRADE_TO_PRIMARY = 2, - CT_ADD_SECONDARY = 3, - CT_UPGRADE_TO_SECONDARY = 4, - CT_DOWNGRADE_TO_SECONDARY = 5, - CT_DOWNGRADE_TO_INACTIVE = 6, - CT_REMOVE = 7, - CT_ADD_SECONDARY_FOR_LB = 8, - CT_PRIMARY_FORCE_UPDATE_BALLOT = 9, - CT_DROP_PARTITION = 10 - }; +extern const std::map _learner_status_VALUES_TO_NAMES; + +struct config_type { + enum type { + CT_INVALID = 0, + CT_ASSIGN_PRIMARY = 1, + CT_UPGRADE_TO_PRIMARY = 2, + CT_ADD_SECONDARY = 3, + CT_UPGRADE_TO_SECONDARY = 4, + CT_DOWNGRADE_TO_SECONDARY = 5, + CT_DOWNGRADE_TO_INACTIVE = 6, + CT_REMOVE = 7, + CT_ADD_SECONDARY_FOR_LB = 8, + CT_PRIMARY_FORCE_UPDATE_BALLOT = 9, + CT_DROP_PARTITION = 10 + }; }; -extern const std::map _config_type_VALUES_TO_NAMES; +extern const std::map _config_type_VALUES_TO_NAMES; -struct node_status -{ - enum type - { - NS_INVALID = 0, - NS_ALIVE = 1, - NS_UNALIVE = 2 - }; +struct node_status { + enum type { + NS_INVALID = 0, + NS_ALIVE = 1, + NS_UNALIVE = 2 + }; }; -extern const std::map _node_status_VALUES_TO_NAMES; - -struct meta_function_level -{ - enum type - { - fl_stopped = 100, - fl_blind = 200, - fl_freezed = 300, - fl_steady = 400, - fl_lively = 500, - fl_invalid = 10000 - }; +extern const std::map _node_status_VALUES_TO_NAMES; + +struct meta_function_level { + enum type { + fl_stopped = 100, + fl_blind = 200, + fl_freezed = 300, + fl_steady = 400, + fl_lively = 500, + fl_invalid = 10000 + }; }; -extern const std::map _meta_function_level_VALUES_TO_NAMES; +extern const std::map _meta_function_level_VALUES_TO_NAMES; -struct balancer_request_type -{ - enum type - { - move_primary = 0, - copy_primary = 1, - copy_secondary = 2 - }; +struct balancer_request_type { + enum type { + move_primary = 0, + copy_primary = 1, + copy_secondary = 2 + }; }; -extern const std::map _balancer_request_type_VALUES_TO_NAMES; +extern const std::map _balancer_request_type_VALUES_TO_NAMES; -struct app_env_operation -{ - enum type - { - APP_ENV_OP_INVALID = 0, - APP_ENV_OP_SET = 1, - APP_ENV_OP_DEL = 2, - APP_ENV_OP_CLEAR = 3 - }; +struct app_env_operation { + enum type { + APP_ENV_OP_INVALID = 0, + APP_ENV_OP_SET = 1, + APP_ENV_OP_DEL = 2, + APP_ENV_OP_CLEAR = 3 + }; }; -extern const std::map _app_env_operation_VALUES_TO_NAMES; +extern const std::map _app_env_operation_VALUES_TO_NAMES; -struct duplication_status -{ - enum type - { - DS_INIT = 0, - DS_START = 1, - DS_PAUSE = 2, - DS_REMOVED = 3 - }; +struct duplication_status { + enum type { + DS_INIT = 0, + DS_START = 1, + DS_PAUSE = 2, + DS_REMOVED = 3 + }; }; -extern const std::map _duplication_status_VALUES_TO_NAMES; +extern const std::map _duplication_status_VALUES_TO_NAMES; -struct duplication_fail_mode -{ - enum type - { - FAIL_SLOW = 0, - FAIL_SKIP = 1, - FAIL_FAST = 2 - }; +struct duplication_fail_mode { + enum type { + FAIL_SLOW = 0, + FAIL_SKIP = 1, + FAIL_FAST = 2 + }; }; -extern const std::map _duplication_fail_mode_VALUES_TO_NAMES; - -struct bulk_load_status -{ - enum type - { - BLS_INVALID = 0, - BLS_DOWNLOADING = 1, - BLS_DOWNLOADED = 2, - BLS_INGESTING = 3, - BLS_SUCCEED = 4, - BLS_FAILED = 5, - BLS_PAUSING = 6, - BLS_PAUSED = 7, - BLS_CANCELED = 8 - }; +extern const std::map _duplication_fail_mode_VALUES_TO_NAMES; + +struct bulk_load_status { + enum type { + BLS_INVALID = 0, + BLS_DOWNLOADING = 1, + BLS_DOWNLOADED = 2, + BLS_INGESTING = 3, + BLS_SUCCEED = 4, + BLS_FAILED = 5, + BLS_PAUSING = 6, + BLS_PAUSED = 7, + BLS_CANCELED = 8 + }; }; -extern const std::map _bulk_load_status_VALUES_TO_NAMES; +extern const std::map _bulk_load_status_VALUES_TO_NAMES; class mutation_header; @@ -374,5925 +350,5623 @@ class notify_cacth_up_response; class bulk_load_metadata; -class start_bulk_load_request; +typedef struct _mutation_header__isset { + _mutation_header__isset() : pid(false), ballot(false), decree(false), log_offset(false), last_committed_decree(false), timestamp(false) {} + bool pid :1; + bool ballot :1; + bool decree :1; + bool log_offset :1; + bool last_committed_decree :1; + bool timestamp :1; +} _mutation_header__isset; -class start_bulk_load_response; +class mutation_header { + public: -typedef struct _mutation_header__isset -{ - _mutation_header__isset() - : pid(false), - ballot(false), - decree(false), - log_offset(false), - last_committed_decree(false), - timestamp(false) - { - } - bool pid : 1; - bool ballot : 1; - bool decree : 1; - bool log_offset : 1; - bool last_committed_decree : 1; - bool timestamp : 1; -} _mutation_header__isset; + mutation_header(const mutation_header&); + mutation_header(mutation_header&&); + mutation_header& operator=(const mutation_header&); + mutation_header& operator=(mutation_header&&); + mutation_header() : ballot(0), decree(0), log_offset(0), last_committed_decree(0), timestamp(0) { + } -class mutation_header -{ -public: - mutation_header(const mutation_header &); - mutation_header(mutation_header &&); - mutation_header &operator=(const mutation_header &); - mutation_header &operator=(mutation_header &&); - mutation_header() : ballot(0), decree(0), log_offset(0), last_committed_decree(0), timestamp(0) - { - } - - virtual ~mutation_header() throw(); - ::dsn::gpid pid; - int64_t ballot; - int64_t decree; - int64_t log_offset; - int64_t last_committed_decree; - int64_t timestamp; - - _mutation_header__isset __isset; - - void __set_pid(const ::dsn::gpid &val); - - void __set_ballot(const int64_t val); - - void __set_decree(const int64_t val); - - void __set_log_offset(const int64_t val); - - void __set_last_committed_decree(const int64_t val); - - void __set_timestamp(const int64_t val); - - bool operator==(const mutation_header &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(decree == rhs.decree)) - return false; - if (!(log_offset == rhs.log_offset)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (!(timestamp == rhs.timestamp)) - return false; - return true; - } - bool operator!=(const mutation_header &rhs) const { return !(*this == rhs); } - - bool operator<(const mutation_header &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; + virtual ~mutation_header() throw(); + ::dsn::gpid pid; + int64_t ballot; + int64_t decree; + int64_t log_offset; + int64_t last_committed_decree; + int64_t timestamp; + + _mutation_header__isset __isset; + + void __set_pid(const ::dsn::gpid& val); + + void __set_ballot(const int64_t val); + + void __set_decree(const int64_t val); + + void __set_log_offset(const int64_t val); + + void __set_last_committed_decree(const int64_t val); + + void __set_timestamp(const int64_t val); + + bool operator == (const mutation_header & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(decree == rhs.decree)) + return false; + if (!(log_offset == rhs.log_offset)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + return true; + } + bool operator != (const mutation_header &rhs) const { + return !(*this == rhs); + } + + bool operator < (const mutation_header & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(mutation_header &a, mutation_header &b); -inline std::ostream &operator<<(std::ostream &out, const mutation_header &obj) +inline std::ostream& operator<<(std::ostream& out, const mutation_header& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _mutation_update__isset -{ - _mutation_update__isset() - : code(false), serialization_type(false), data(false), start_time_ns(false) - { - } - bool code : 1; - bool serialization_type : 1; - bool data : 1; - bool start_time_ns : 1; +typedef struct _mutation_update__isset { + _mutation_update__isset() : code(false), serialization_type(false), data(false), start_time_ns(false) {} + bool code :1; + bool serialization_type :1; + bool data :1; + bool start_time_ns :1; } _mutation_update__isset; -class mutation_update -{ -public: - mutation_update(const mutation_update &); - mutation_update(mutation_update &&); - mutation_update &operator=(const mutation_update &); - mutation_update &operator=(mutation_update &&); - mutation_update() : serialization_type(0), start_time_ns(0) {} - - virtual ~mutation_update() throw(); - ::dsn::task_code code; - int32_t serialization_type; - ::dsn::blob data; - int64_t start_time_ns; - - _mutation_update__isset __isset; - - void __set_code(const ::dsn::task_code &val); - - void __set_serialization_type(const int32_t val); - - void __set_data(const ::dsn::blob &val); - - void __set_start_time_ns(const int64_t val); - - bool operator==(const mutation_update &rhs) const - { - if (!(code == rhs.code)) - return false; - if (!(serialization_type == rhs.serialization_type)) - return false; - if (!(data == rhs.data)) - return false; - if (__isset.start_time_ns != rhs.__isset.start_time_ns) - return false; - else if (__isset.start_time_ns && !(start_time_ns == rhs.start_time_ns)) - return false; - return true; - } - bool operator!=(const mutation_update &rhs) const { return !(*this == rhs); } - - bool operator<(const mutation_update &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class mutation_update { + public: + + mutation_update(const mutation_update&); + mutation_update(mutation_update&&); + mutation_update& operator=(const mutation_update&); + mutation_update& operator=(mutation_update&&); + mutation_update() : serialization_type(0), start_time_ns(0) { + } + + virtual ~mutation_update() throw(); + ::dsn::task_code code; + int32_t serialization_type; + ::dsn::blob data; + int64_t start_time_ns; + + _mutation_update__isset __isset; + + void __set_code(const ::dsn::task_code& val); + + void __set_serialization_type(const int32_t val); + + void __set_data(const ::dsn::blob& val); + + void __set_start_time_ns(const int64_t val); + + bool operator == (const mutation_update & rhs) const + { + if (!(code == rhs.code)) + return false; + if (!(serialization_type == rhs.serialization_type)) + return false; + if (!(data == rhs.data)) + return false; + if (__isset.start_time_ns != rhs.__isset.start_time_ns) + return false; + else if (__isset.start_time_ns && !(start_time_ns == rhs.start_time_ns)) + return false; + return true; + } + bool operator != (const mutation_update &rhs) const { + return !(*this == rhs); + } + + bool operator < (const mutation_update & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(mutation_update &a, mutation_update &b); -inline std::ostream &operator<<(std::ostream &out, const mutation_update &obj) +inline std::ostream& operator<<(std::ostream& out, const mutation_update& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _mutation_data__isset -{ - _mutation_data__isset() : header(false), updates(false) {} - bool header : 1; - bool updates : 1; +typedef struct _mutation_data__isset { + _mutation_data__isset() : header(false), updates(false) {} + bool header :1; + bool updates :1; } _mutation_data__isset; -class mutation_data -{ -public: - mutation_data(const mutation_data &); - mutation_data(mutation_data &&); - mutation_data &operator=(const mutation_data &); - mutation_data &operator=(mutation_data &&); - mutation_data() {} +class mutation_data { + public: - virtual ~mutation_data() throw(); - mutation_header header; - std::vector updates; + mutation_data(const mutation_data&); + mutation_data(mutation_data&&); + mutation_data& operator=(const mutation_data&); + mutation_data& operator=(mutation_data&&); + mutation_data() { + } - _mutation_data__isset __isset; + virtual ~mutation_data() throw(); + mutation_header header; + std::vector updates; - void __set_header(const mutation_header &val); + _mutation_data__isset __isset; - void __set_updates(const std::vector &val); + void __set_header(const mutation_header& val); - bool operator==(const mutation_data &rhs) const - { - if (!(header == rhs.header)) - return false; - if (!(updates == rhs.updates)) - return false; - return true; - } - bool operator!=(const mutation_data &rhs) const { return !(*this == rhs); } + void __set_updates(const std::vector & val); - bool operator<(const mutation_data &) const; + bool operator == (const mutation_data & rhs) const + { + if (!(header == rhs.header)) + return false; + if (!(updates == rhs.updates)) + return false; + return true; + } + bool operator != (const mutation_data &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const mutation_data & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(mutation_data &a, mutation_data &b); -inline std::ostream &operator<<(std::ostream &out, const mutation_data &obj) +inline std::ostream& operator<<(std::ostream& out, const mutation_data& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _replica_configuration__isset -{ - _replica_configuration__isset() - : pid(false), ballot(false), primary(false), status(true), learner_signature(false) - { - } - bool pid : 1; - bool ballot : 1; - bool primary : 1; - bool status : 1; - bool learner_signature : 1; +typedef struct _replica_configuration__isset { + _replica_configuration__isset() : pid(false), ballot(false), primary(false), status(true), learner_signature(false) {} + bool pid :1; + bool ballot :1; + bool primary :1; + bool status :1; + bool learner_signature :1; } _replica_configuration__isset; -class replica_configuration -{ -public: - replica_configuration(const replica_configuration &); - replica_configuration(replica_configuration &&); - replica_configuration &operator=(const replica_configuration &); - replica_configuration &operator=(replica_configuration &&); - replica_configuration() : ballot(0), status((partition_status::type)0), learner_signature(0) - { - status = (partition_status::type)0; - } - - virtual ~replica_configuration() throw(); - ::dsn::gpid pid; - int64_t ballot; - ::dsn::rpc_address primary; - partition_status::type status; - int64_t learner_signature; - - _replica_configuration__isset __isset; - - void __set_pid(const ::dsn::gpid &val); - - void __set_ballot(const int64_t val); - - void __set_primary(const ::dsn::rpc_address &val); - - void __set_status(const partition_status::type val); - - void __set_learner_signature(const int64_t val); - - bool operator==(const replica_configuration &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(primary == rhs.primary)) - return false; - if (!(status == rhs.status)) - return false; - if (!(learner_signature == rhs.learner_signature)) - return false; - return true; - } - bool operator!=(const replica_configuration &rhs) const { return !(*this == rhs); } - - bool operator<(const replica_configuration &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class replica_configuration { + public: + + replica_configuration(const replica_configuration&); + replica_configuration(replica_configuration&&); + replica_configuration& operator=(const replica_configuration&); + replica_configuration& operator=(replica_configuration&&); + replica_configuration() : ballot(0), status((partition_status::type)0), learner_signature(0) { + status = (partition_status::type)0; + + } + + virtual ~replica_configuration() throw(); + ::dsn::gpid pid; + int64_t ballot; + ::dsn::rpc_address primary; + partition_status::type status; + int64_t learner_signature; + + _replica_configuration__isset __isset; + + void __set_pid(const ::dsn::gpid& val); + + void __set_ballot(const int64_t val); + + void __set_primary(const ::dsn::rpc_address& val); + + void __set_status(const partition_status::type val); + + void __set_learner_signature(const int64_t val); + + bool operator == (const replica_configuration & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(primary == rhs.primary)) + return false; + if (!(status == rhs.status)) + return false; + if (!(learner_signature == rhs.learner_signature)) + return false; + return true; + } + bool operator != (const replica_configuration &rhs) const { + return !(*this == rhs); + } + + bool operator < (const replica_configuration & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(replica_configuration &a, replica_configuration &b); -inline std::ostream &operator<<(std::ostream &out, const replica_configuration &obj) +inline std::ostream& operator<<(std::ostream& out, const replica_configuration& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _prepare_msg__isset -{ - _prepare_msg__isset() : config(false), mu(false) {} - bool config : 1; - bool mu : 1; +typedef struct _prepare_msg__isset { + _prepare_msg__isset() : config(false), mu(false) {} + bool config :1; + bool mu :1; } _prepare_msg__isset; -class prepare_msg -{ -public: - prepare_msg(const prepare_msg &); - prepare_msg(prepare_msg &&); - prepare_msg &operator=(const prepare_msg &); - prepare_msg &operator=(prepare_msg &&); - prepare_msg() {} +class prepare_msg { + public: - virtual ~prepare_msg() throw(); - replica_configuration config; - mutation_data mu; + prepare_msg(const prepare_msg&); + prepare_msg(prepare_msg&&); + prepare_msg& operator=(const prepare_msg&); + prepare_msg& operator=(prepare_msg&&); + prepare_msg() { + } - _prepare_msg__isset __isset; + virtual ~prepare_msg() throw(); + replica_configuration config; + mutation_data mu; - void __set_config(const replica_configuration &val); + _prepare_msg__isset __isset; - void __set_mu(const mutation_data &val); + void __set_config(const replica_configuration& val); - bool operator==(const prepare_msg &rhs) const - { - if (!(config == rhs.config)) - return false; - if (!(mu == rhs.mu)) - return false; - return true; - } - bool operator!=(const prepare_msg &rhs) const { return !(*this == rhs); } + void __set_mu(const mutation_data& val); - bool operator<(const prepare_msg &) const; + bool operator == (const prepare_msg & rhs) const + { + if (!(config == rhs.config)) + return false; + if (!(mu == rhs.mu)) + return false; + return true; + } + bool operator != (const prepare_msg &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const prepare_msg & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(prepare_msg &a, prepare_msg &b); -inline std::ostream &operator<<(std::ostream &out, const prepare_msg &obj) +inline std::ostream& operator<<(std::ostream& out, const prepare_msg& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _read_request_header__isset -{ - _read_request_header__isset() : pid(false), code(false), semantic(true), version_decree(true) {} - bool pid : 1; - bool code : 1; - bool semantic : 1; - bool version_decree : 1; +typedef struct _read_request_header__isset { + _read_request_header__isset() : pid(false), code(false), semantic(true), version_decree(true) {} + bool pid :1; + bool code :1; + bool semantic :1; + bool version_decree :1; } _read_request_header__isset; -class read_request_header -{ -public: - read_request_header(const read_request_header &); - read_request_header(read_request_header &&); - read_request_header &operator=(const read_request_header &); - read_request_header &operator=(read_request_header &&); - read_request_header() : semantic((read_semantic::type)1), version_decree(-1LL) - { - semantic = (read_semantic::type)1; - } - - virtual ~read_request_header() throw(); - ::dsn::gpid pid; - ::dsn::task_code code; - read_semantic::type semantic; - int64_t version_decree; - - _read_request_header__isset __isset; - - void __set_pid(const ::dsn::gpid &val); - - void __set_code(const ::dsn::task_code &val); - - void __set_semantic(const read_semantic::type val); - - void __set_version_decree(const int64_t val); - - bool operator==(const read_request_header &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(code == rhs.code)) - return false; - if (!(semantic == rhs.semantic)) - return false; - if (!(version_decree == rhs.version_decree)) - return false; - return true; - } - bool operator!=(const read_request_header &rhs) const { return !(*this == rhs); } - - bool operator<(const read_request_header &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class read_request_header { + public: + + read_request_header(const read_request_header&); + read_request_header(read_request_header&&); + read_request_header& operator=(const read_request_header&); + read_request_header& operator=(read_request_header&&); + read_request_header() : semantic((read_semantic::type)1), version_decree(-1LL) { + semantic = (read_semantic::type)1; + + } + + virtual ~read_request_header() throw(); + ::dsn::gpid pid; + ::dsn::task_code code; + read_semantic::type semantic; + int64_t version_decree; + + _read_request_header__isset __isset; + + void __set_pid(const ::dsn::gpid& val); + + void __set_code(const ::dsn::task_code& val); + + void __set_semantic(const read_semantic::type val); + + void __set_version_decree(const int64_t val); + + bool operator == (const read_request_header & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(code == rhs.code)) + return false; + if (!(semantic == rhs.semantic)) + return false; + if (!(version_decree == rhs.version_decree)) + return false; + return true; + } + bool operator != (const read_request_header &rhs) const { + return !(*this == rhs); + } + + bool operator < (const read_request_header & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(read_request_header &a, read_request_header &b); -inline std::ostream &operator<<(std::ostream &out, const read_request_header &obj) +inline std::ostream& operator<<(std::ostream& out, const read_request_header& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _write_request_header__isset -{ - _write_request_header__isset() : pid(false), code(false) {} - bool pid : 1; - bool code : 1; +typedef struct _write_request_header__isset { + _write_request_header__isset() : pid(false), code(false) {} + bool pid :1; + bool code :1; } _write_request_header__isset; -class write_request_header -{ -public: - write_request_header(const write_request_header &); - write_request_header(write_request_header &&); - write_request_header &operator=(const write_request_header &); - write_request_header &operator=(write_request_header &&); - write_request_header() {} +class write_request_header { + public: + + write_request_header(const write_request_header&); + write_request_header(write_request_header&&); + write_request_header& operator=(const write_request_header&); + write_request_header& operator=(write_request_header&&); + write_request_header() { + } - virtual ~write_request_header() throw(); - ::dsn::gpid pid; - ::dsn::task_code code; + virtual ~write_request_header() throw(); + ::dsn::gpid pid; + ::dsn::task_code code; - _write_request_header__isset __isset; + _write_request_header__isset __isset; - void __set_pid(const ::dsn::gpid &val); + void __set_pid(const ::dsn::gpid& val); - void __set_code(const ::dsn::task_code &val); + void __set_code(const ::dsn::task_code& val); - bool operator==(const write_request_header &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(code == rhs.code)) - return false; - return true; - } - bool operator!=(const write_request_header &rhs) const { return !(*this == rhs); } + bool operator == (const write_request_header & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(code == rhs.code)) + return false; + return true; + } + bool operator != (const write_request_header &rhs) const { + return !(*this == rhs); + } - bool operator<(const write_request_header &) const; + bool operator < (const write_request_header & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(write_request_header &a, write_request_header &b); -inline std::ostream &operator<<(std::ostream &out, const write_request_header &obj) +inline std::ostream& operator<<(std::ostream& out, const write_request_header& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _rw_response_header__isset -{ - _rw_response_header__isset() : err(false) {} - bool err : 1; +typedef struct _rw_response_header__isset { + _rw_response_header__isset() : err(false) {} + bool err :1; } _rw_response_header__isset; -class rw_response_header -{ -public: - rw_response_header(const rw_response_header &); - rw_response_header(rw_response_header &&); - rw_response_header &operator=(const rw_response_header &); - rw_response_header &operator=(rw_response_header &&); - rw_response_header() {} +class rw_response_header { + public: - virtual ~rw_response_header() throw(); - ::dsn::error_code err; + rw_response_header(const rw_response_header&); + rw_response_header(rw_response_header&&); + rw_response_header& operator=(const rw_response_header&); + rw_response_header& operator=(rw_response_header&&); + rw_response_header() { + } - _rw_response_header__isset __isset; + virtual ~rw_response_header() throw(); + ::dsn::error_code err; - void __set_err(const ::dsn::error_code &val); + _rw_response_header__isset __isset; - bool operator==(const rw_response_header &rhs) const - { - if (!(err == rhs.err)) - return false; - return true; - } - bool operator!=(const rw_response_header &rhs) const { return !(*this == rhs); } + void __set_err(const ::dsn::error_code& val); - bool operator<(const rw_response_header &) const; + bool operator == (const rw_response_header & rhs) const + { + if (!(err == rhs.err)) + return false; + return true; + } + bool operator != (const rw_response_header &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const rw_response_header & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(rw_response_header &a, rw_response_header &b); -inline std::ostream &operator<<(std::ostream &out, const rw_response_header &obj) +inline std::ostream& operator<<(std::ostream& out, const rw_response_header& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _prepare_ack__isset -{ - _prepare_ack__isset() - : pid(false), - err(false), - ballot(false), - decree(false), - last_committed_decree_in_app(false), - last_committed_decree_in_prepare_list(false) - { - } - bool pid : 1; - bool err : 1; - bool ballot : 1; - bool decree : 1; - bool last_committed_decree_in_app : 1; - bool last_committed_decree_in_prepare_list : 1; +typedef struct _prepare_ack__isset { + _prepare_ack__isset() : pid(false), err(false), ballot(false), decree(false), last_committed_decree_in_app(false), last_committed_decree_in_prepare_list(false) {} + bool pid :1; + bool err :1; + bool ballot :1; + bool decree :1; + bool last_committed_decree_in_app :1; + bool last_committed_decree_in_prepare_list :1; } _prepare_ack__isset; -class prepare_ack -{ -public: - prepare_ack(const prepare_ack &); - prepare_ack(prepare_ack &&); - prepare_ack &operator=(const prepare_ack &); - prepare_ack &operator=(prepare_ack &&); - prepare_ack() - : ballot(0), - decree(0), - last_committed_decree_in_app(0), - last_committed_decree_in_prepare_list(0) - { - } - - virtual ~prepare_ack() throw(); - ::dsn::gpid pid; - ::dsn::error_code err; - int64_t ballot; - int64_t decree; - int64_t last_committed_decree_in_app; - int64_t last_committed_decree_in_prepare_list; - - _prepare_ack__isset __isset; - - void __set_pid(const ::dsn::gpid &val); - - void __set_err(const ::dsn::error_code &val); - - void __set_ballot(const int64_t val); - - void __set_decree(const int64_t val); - - void __set_last_committed_decree_in_app(const int64_t val); - - void __set_last_committed_decree_in_prepare_list(const int64_t val); - - bool operator==(const prepare_ack &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(err == rhs.err)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(decree == rhs.decree)) - return false; - if (!(last_committed_decree_in_app == rhs.last_committed_decree_in_app)) - return false; - if (!(last_committed_decree_in_prepare_list == rhs.last_committed_decree_in_prepare_list)) - return false; - return true; - } - bool operator!=(const prepare_ack &rhs) const { return !(*this == rhs); } - - bool operator<(const prepare_ack &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class prepare_ack { + public: + + prepare_ack(const prepare_ack&); + prepare_ack(prepare_ack&&); + prepare_ack& operator=(const prepare_ack&); + prepare_ack& operator=(prepare_ack&&); + prepare_ack() : ballot(0), decree(0), last_committed_decree_in_app(0), last_committed_decree_in_prepare_list(0) { + } + + virtual ~prepare_ack() throw(); + ::dsn::gpid pid; + ::dsn::error_code err; + int64_t ballot; + int64_t decree; + int64_t last_committed_decree_in_app; + int64_t last_committed_decree_in_prepare_list; + + _prepare_ack__isset __isset; + + void __set_pid(const ::dsn::gpid& val); + + void __set_err(const ::dsn::error_code& val); + + void __set_ballot(const int64_t val); + + void __set_decree(const int64_t val); + + void __set_last_committed_decree_in_app(const int64_t val); + + void __set_last_committed_decree_in_prepare_list(const int64_t val); + + bool operator == (const prepare_ack & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(err == rhs.err)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(decree == rhs.decree)) + return false; + if (!(last_committed_decree_in_app == rhs.last_committed_decree_in_app)) + return false; + if (!(last_committed_decree_in_prepare_list == rhs.last_committed_decree_in_prepare_list)) + return false; + return true; + } + bool operator != (const prepare_ack &rhs) const { + return !(*this == rhs); + } + + bool operator < (const prepare_ack & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(prepare_ack &a, prepare_ack &b); -inline std::ostream &operator<<(std::ostream &out, const prepare_ack &obj) +inline std::ostream& operator<<(std::ostream& out, const prepare_ack& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _learn_state__isset -{ - _learn_state__isset() - : from_decree_excluded(false), - to_decree_included(false), - meta(false), - files(false), - learn_start_decree(false) - { - } - bool from_decree_excluded : 1; - bool to_decree_included : 1; - bool meta : 1; - bool files : 1; - bool learn_start_decree : 1; +typedef struct _learn_state__isset { + _learn_state__isset() : from_decree_excluded(false), to_decree_included(false), meta(false), files(false), learn_start_decree(false) {} + bool from_decree_excluded :1; + bool to_decree_included :1; + bool meta :1; + bool files :1; + bool learn_start_decree :1; } _learn_state__isset; -class learn_state -{ -public: - learn_state(const learn_state &); - learn_state(learn_state &&); - learn_state &operator=(const learn_state &); - learn_state &operator=(learn_state &&); - learn_state() : from_decree_excluded(0), to_decree_included(0), learn_start_decree(0) {} - - virtual ~learn_state() throw(); - int64_t from_decree_excluded; - int64_t to_decree_included; - ::dsn::blob meta; - std::vector files; - int64_t learn_start_decree; - - _learn_state__isset __isset; - - void __set_from_decree_excluded(const int64_t val); - - void __set_to_decree_included(const int64_t val); - - void __set_meta(const ::dsn::blob &val); - - void __set_files(const std::vector &val); - - void __set_learn_start_decree(const int64_t val); - - bool operator==(const learn_state &rhs) const - { - if (!(from_decree_excluded == rhs.from_decree_excluded)) - return false; - if (!(to_decree_included == rhs.to_decree_included)) - return false; - if (!(meta == rhs.meta)) - return false; - if (!(files == rhs.files)) - return false; - if (__isset.learn_start_decree != rhs.__isset.learn_start_decree) - return false; - else if (__isset.learn_start_decree && !(learn_start_decree == rhs.learn_start_decree)) - return false; - return true; - } - bool operator!=(const learn_state &rhs) const { return !(*this == rhs); } - - bool operator<(const learn_state &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class learn_state { + public: + + learn_state(const learn_state&); + learn_state(learn_state&&); + learn_state& operator=(const learn_state&); + learn_state& operator=(learn_state&&); + learn_state() : from_decree_excluded(0), to_decree_included(0), learn_start_decree(0) { + } + + virtual ~learn_state() throw(); + int64_t from_decree_excluded; + int64_t to_decree_included; + ::dsn::blob meta; + std::vector files; + int64_t learn_start_decree; + + _learn_state__isset __isset; + + void __set_from_decree_excluded(const int64_t val); + + void __set_to_decree_included(const int64_t val); + + void __set_meta(const ::dsn::blob& val); + + void __set_files(const std::vector & val); + + void __set_learn_start_decree(const int64_t val); + + bool operator == (const learn_state & rhs) const + { + if (!(from_decree_excluded == rhs.from_decree_excluded)) + return false; + if (!(to_decree_included == rhs.to_decree_included)) + return false; + if (!(meta == rhs.meta)) + return false; + if (!(files == rhs.files)) + return false; + if (__isset.learn_start_decree != rhs.__isset.learn_start_decree) + return false; + else if (__isset.learn_start_decree && !(learn_start_decree == rhs.learn_start_decree)) + return false; + return true; + } + bool operator != (const learn_state &rhs) const { + return !(*this == rhs); + } + + bool operator < (const learn_state & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(learn_state &a, learn_state &b); -inline std::ostream &operator<<(std::ostream &out, const learn_state &obj) +inline std::ostream& operator<<(std::ostream& out, const learn_state& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _learn_request__isset -{ - _learn_request__isset() - : pid(false), - learner(false), - signature(false), - last_committed_decree_in_app(false), - last_committed_decree_in_prepare_list(false), - app_specific_learn_request(false), - max_gced_decree(false) - { - } - bool pid : 1; - bool learner : 1; - bool signature : 1; - bool last_committed_decree_in_app : 1; - bool last_committed_decree_in_prepare_list : 1; - bool app_specific_learn_request : 1; - bool max_gced_decree : 1; +typedef struct _learn_request__isset { + _learn_request__isset() : pid(false), learner(false), signature(false), last_committed_decree_in_app(false), last_committed_decree_in_prepare_list(false), app_specific_learn_request(false), max_gced_decree(false) {} + bool pid :1; + bool learner :1; + bool signature :1; + bool last_committed_decree_in_app :1; + bool last_committed_decree_in_prepare_list :1; + bool app_specific_learn_request :1; + bool max_gced_decree :1; } _learn_request__isset; -class learn_request -{ -public: - learn_request(const learn_request &); - learn_request(learn_request &&); - learn_request &operator=(const learn_request &); - learn_request &operator=(learn_request &&); - learn_request() - : signature(0), - last_committed_decree_in_app(0), - last_committed_decree_in_prepare_list(0), - max_gced_decree(0) - { - } - - virtual ~learn_request() throw(); - ::dsn::gpid pid; - ::dsn::rpc_address learner; - int64_t signature; - int64_t last_committed_decree_in_app; - int64_t last_committed_decree_in_prepare_list; - ::dsn::blob app_specific_learn_request; - int64_t max_gced_decree; - - _learn_request__isset __isset; - - void __set_pid(const ::dsn::gpid &val); - - void __set_learner(const ::dsn::rpc_address &val); - - void __set_signature(const int64_t val); - - void __set_last_committed_decree_in_app(const int64_t val); - - void __set_last_committed_decree_in_prepare_list(const int64_t val); - - void __set_app_specific_learn_request(const ::dsn::blob &val); - - void __set_max_gced_decree(const int64_t val); - - bool operator==(const learn_request &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(learner == rhs.learner)) - return false; - if (!(signature == rhs.signature)) - return false; - if (!(last_committed_decree_in_app == rhs.last_committed_decree_in_app)) - return false; - if (!(last_committed_decree_in_prepare_list == rhs.last_committed_decree_in_prepare_list)) - return false; - if (!(app_specific_learn_request == rhs.app_specific_learn_request)) - return false; - if (__isset.max_gced_decree != rhs.__isset.max_gced_decree) - return false; - else if (__isset.max_gced_decree && !(max_gced_decree == rhs.max_gced_decree)) - return false; - return true; - } - bool operator!=(const learn_request &rhs) const { return !(*this == rhs); } - - bool operator<(const learn_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class learn_request { + public: + + learn_request(const learn_request&); + learn_request(learn_request&&); + learn_request& operator=(const learn_request&); + learn_request& operator=(learn_request&&); + learn_request() : signature(0), last_committed_decree_in_app(0), last_committed_decree_in_prepare_list(0), max_gced_decree(0) { + } + + virtual ~learn_request() throw(); + ::dsn::gpid pid; + ::dsn::rpc_address learner; + int64_t signature; + int64_t last_committed_decree_in_app; + int64_t last_committed_decree_in_prepare_list; + ::dsn::blob app_specific_learn_request; + int64_t max_gced_decree; + + _learn_request__isset __isset; + + void __set_pid(const ::dsn::gpid& val); + + void __set_learner(const ::dsn::rpc_address& val); + + void __set_signature(const int64_t val); + + void __set_last_committed_decree_in_app(const int64_t val); + + void __set_last_committed_decree_in_prepare_list(const int64_t val); + + void __set_app_specific_learn_request(const ::dsn::blob& val); + + void __set_max_gced_decree(const int64_t val); + + bool operator == (const learn_request & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(learner == rhs.learner)) + return false; + if (!(signature == rhs.signature)) + return false; + if (!(last_committed_decree_in_app == rhs.last_committed_decree_in_app)) + return false; + if (!(last_committed_decree_in_prepare_list == rhs.last_committed_decree_in_prepare_list)) + return false; + if (!(app_specific_learn_request == rhs.app_specific_learn_request)) + return false; + if (__isset.max_gced_decree != rhs.__isset.max_gced_decree) + return false; + else if (__isset.max_gced_decree && !(max_gced_decree == rhs.max_gced_decree)) + return false; + return true; + } + bool operator != (const learn_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const learn_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(learn_request &a, learn_request &b); -inline std::ostream &operator<<(std::ostream &out, const learn_request &obj) +inline std::ostream& operator<<(std::ostream& out, const learn_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _learn_response__isset -{ - _learn_response__isset() - : err(false), - config(false), - last_committed_decree(false), - prepare_start_decree(false), - type(true), - state(false), - address(false), - base_local_dir(false) - { - } - bool err : 1; - bool config : 1; - bool last_committed_decree : 1; - bool prepare_start_decree : 1; - bool type : 1; - bool state : 1; - bool address : 1; - bool base_local_dir : 1; +typedef struct _learn_response__isset { + _learn_response__isset() : err(false), config(false), last_committed_decree(false), prepare_start_decree(false), type(true), state(false), address(false), base_local_dir(false) {} + bool err :1; + bool config :1; + bool last_committed_decree :1; + bool prepare_start_decree :1; + bool type :1; + bool state :1; + bool address :1; + bool base_local_dir :1; } _learn_response__isset; -class learn_response -{ -public: - learn_response(const learn_response &); - learn_response(learn_response &&); - learn_response &operator=(const learn_response &); - learn_response &operator=(learn_response &&); - learn_response() - : last_committed_decree(0), - prepare_start_decree(0), - type((learn_type::type)0), - base_local_dir() - { - type = (learn_type::type)0; - } - - virtual ~learn_response() throw(); - ::dsn::error_code err; - replica_configuration config; - int64_t last_committed_decree; - int64_t prepare_start_decree; - learn_type::type type; - learn_state state; - ::dsn::rpc_address address; - std::string base_local_dir; - - _learn_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_config(const replica_configuration &val); - - void __set_last_committed_decree(const int64_t val); - - void __set_prepare_start_decree(const int64_t val); - - void __set_type(const learn_type::type val); - - void __set_state(const learn_state &val); - - void __set_address(const ::dsn::rpc_address &val); - - void __set_base_local_dir(const std::string &val); - - bool operator==(const learn_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(config == rhs.config)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (!(prepare_start_decree == rhs.prepare_start_decree)) - return false; - if (!(type == rhs.type)) - return false; - if (!(state == rhs.state)) - return false; - if (!(address == rhs.address)) - return false; - if (!(base_local_dir == rhs.base_local_dir)) - return false; - return true; - } - bool operator!=(const learn_response &rhs) const { return !(*this == rhs); } - - bool operator<(const learn_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class learn_response { + public: + + learn_response(const learn_response&); + learn_response(learn_response&&); + learn_response& operator=(const learn_response&); + learn_response& operator=(learn_response&&); + learn_response() : last_committed_decree(0), prepare_start_decree(0), type((learn_type::type)0), base_local_dir() { + type = (learn_type::type)0; + + } + + virtual ~learn_response() throw(); + ::dsn::error_code err; + replica_configuration config; + int64_t last_committed_decree; + int64_t prepare_start_decree; + learn_type::type type; + learn_state state; + ::dsn::rpc_address address; + std::string base_local_dir; + + _learn_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_config(const replica_configuration& val); + + void __set_last_committed_decree(const int64_t val); + + void __set_prepare_start_decree(const int64_t val); + + void __set_type(const learn_type::type val); + + void __set_state(const learn_state& val); + + void __set_address(const ::dsn::rpc_address& val); + + void __set_base_local_dir(const std::string& val); + + bool operator == (const learn_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(config == rhs.config)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (!(prepare_start_decree == rhs.prepare_start_decree)) + return false; + if (!(type == rhs.type)) + return false; + if (!(state == rhs.state)) + return false; + if (!(address == rhs.address)) + return false; + if (!(base_local_dir == rhs.base_local_dir)) + return false; + return true; + } + bool operator != (const learn_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const learn_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(learn_response &a, learn_response &b); -inline std::ostream &operator<<(std::ostream &out, const learn_response &obj) +inline std::ostream& operator<<(std::ostream& out, const learn_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _learn_notify_response__isset -{ - _learn_notify_response__isset() : pid(false), err(false), signature(false) {} - bool pid : 1; - bool err : 1; - bool signature : 1; +typedef struct _learn_notify_response__isset { + _learn_notify_response__isset() : pid(false), err(false), signature(false) {} + bool pid :1; + bool err :1; + bool signature :1; } _learn_notify_response__isset; -class learn_notify_response -{ -public: - learn_notify_response(const learn_notify_response &); - learn_notify_response(learn_notify_response &&); - learn_notify_response &operator=(const learn_notify_response &); - learn_notify_response &operator=(learn_notify_response &&); - learn_notify_response() : signature(0) {} +class learn_notify_response { + public: - virtual ~learn_notify_response() throw(); - ::dsn::gpid pid; - ::dsn::error_code err; - int64_t signature; + learn_notify_response(const learn_notify_response&); + learn_notify_response(learn_notify_response&&); + learn_notify_response& operator=(const learn_notify_response&); + learn_notify_response& operator=(learn_notify_response&&); + learn_notify_response() : signature(0) { + } - _learn_notify_response__isset __isset; + virtual ~learn_notify_response() throw(); + ::dsn::gpid pid; + ::dsn::error_code err; + int64_t signature; - void __set_pid(const ::dsn::gpid &val); + _learn_notify_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_pid(const ::dsn::gpid& val); - void __set_signature(const int64_t val); + void __set_err(const ::dsn::error_code& val); - bool operator==(const learn_notify_response &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(err == rhs.err)) - return false; - if (!(signature == rhs.signature)) - return false; - return true; - } - bool operator!=(const learn_notify_response &rhs) const { return !(*this == rhs); } + void __set_signature(const int64_t val); - bool operator<(const learn_notify_response &) const; + bool operator == (const learn_notify_response & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(err == rhs.err)) + return false; + if (!(signature == rhs.signature)) + return false; + return true; + } + bool operator != (const learn_notify_response &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const learn_notify_response & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(learn_notify_response &a, learn_notify_response &b); -inline std::ostream &operator<<(std::ostream &out, const learn_notify_response &obj) +inline std::ostream& operator<<(std::ostream& out, const learn_notify_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _group_check_request__isset -{ - _group_check_request__isset() - : app(false), - node(false), - config(false), - last_committed_decree(false), - confirmed_decree(false), - child_gpid(false) - { - } - bool app : 1; - bool node : 1; - bool config : 1; - bool last_committed_decree : 1; - bool confirmed_decree : 1; - bool child_gpid : 1; +typedef struct _group_check_request__isset { + _group_check_request__isset() : app(false), node(false), config(false), last_committed_decree(false), confirmed_decree(false), child_gpid(false) {} + bool app :1; + bool node :1; + bool config :1; + bool last_committed_decree :1; + bool confirmed_decree :1; + bool child_gpid :1; } _group_check_request__isset; -class group_check_request -{ -public: - group_check_request(const group_check_request &); - group_check_request(group_check_request &&); - group_check_request &operator=(const group_check_request &); - group_check_request &operator=(group_check_request &&); - group_check_request() : last_committed_decree(0), confirmed_decree(0) {} - - virtual ~group_check_request() throw(); - ::dsn::app_info app; - ::dsn::rpc_address node; - replica_configuration config; - int64_t last_committed_decree; - int64_t confirmed_decree; - ::dsn::gpid child_gpid; - - _group_check_request__isset __isset; - - void __set_app(const ::dsn::app_info &val); - - void __set_node(const ::dsn::rpc_address &val); - - void __set_config(const replica_configuration &val); - - void __set_last_committed_decree(const int64_t val); - - void __set_confirmed_decree(const int64_t val); - - void __set_child_gpid(const ::dsn::gpid &val); - - bool operator==(const group_check_request &rhs) const - { - if (!(app == rhs.app)) - return false; - if (!(node == rhs.node)) - return false; - if (!(config == rhs.config)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (__isset.confirmed_decree != rhs.__isset.confirmed_decree) - return false; - else if (__isset.confirmed_decree && !(confirmed_decree == rhs.confirmed_decree)) - return false; - if (__isset.child_gpid != rhs.__isset.child_gpid) - return false; - else if (__isset.child_gpid && !(child_gpid == rhs.child_gpid)) - return false; - return true; - } - bool operator!=(const group_check_request &rhs) const { return !(*this == rhs); } - - bool operator<(const group_check_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class group_check_request { + public: + + group_check_request(const group_check_request&); + group_check_request(group_check_request&&); + group_check_request& operator=(const group_check_request&); + group_check_request& operator=(group_check_request&&); + group_check_request() : last_committed_decree(0), confirmed_decree(0) { + } + + virtual ~group_check_request() throw(); + ::dsn::app_info app; + ::dsn::rpc_address node; + replica_configuration config; + int64_t last_committed_decree; + int64_t confirmed_decree; + ::dsn::gpid child_gpid; + + _group_check_request__isset __isset; + + void __set_app(const ::dsn::app_info& val); + + void __set_node(const ::dsn::rpc_address& val); + + void __set_config(const replica_configuration& val); + + void __set_last_committed_decree(const int64_t val); + + void __set_confirmed_decree(const int64_t val); + + void __set_child_gpid(const ::dsn::gpid& val); + + bool operator == (const group_check_request & rhs) const + { + if (!(app == rhs.app)) + return false; + if (!(node == rhs.node)) + return false; + if (!(config == rhs.config)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (__isset.confirmed_decree != rhs.__isset.confirmed_decree) + return false; + else if (__isset.confirmed_decree && !(confirmed_decree == rhs.confirmed_decree)) + return false; + if (__isset.child_gpid != rhs.__isset.child_gpid) + return false; + else if (__isset.child_gpid && !(child_gpid == rhs.child_gpid)) + return false; + return true; + } + bool operator != (const group_check_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const group_check_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(group_check_request &a, group_check_request &b); -inline std::ostream &operator<<(std::ostream &out, const group_check_request &obj) +inline std::ostream& operator<<(std::ostream& out, const group_check_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _group_check_response__isset -{ - _group_check_response__isset() - : pid(false), - err(false), - last_committed_decree_in_app(false), - last_committed_decree_in_prepare_list(false), - learner_status_(true), - learner_signature(false), - node(false) - { - } - bool pid : 1; - bool err : 1; - bool last_committed_decree_in_app : 1; - bool last_committed_decree_in_prepare_list : 1; - bool learner_status_ : 1; - bool learner_signature : 1; - bool node : 1; +typedef struct _group_check_response__isset { + _group_check_response__isset() : pid(false), err(false), last_committed_decree_in_app(false), last_committed_decree_in_prepare_list(false), learner_status_(true), learner_signature(false), node(false) {} + bool pid :1; + bool err :1; + bool last_committed_decree_in_app :1; + bool last_committed_decree_in_prepare_list :1; + bool learner_status_ :1; + bool learner_signature :1; + bool node :1; } _group_check_response__isset; -class group_check_response -{ -public: - group_check_response(const group_check_response &); - group_check_response(group_check_response &&); - group_check_response &operator=(const group_check_response &); - group_check_response &operator=(group_check_response &&); - group_check_response() - : last_committed_decree_in_app(0), - last_committed_decree_in_prepare_list(0), - learner_status_((learner_status::type)0), - learner_signature(0) - { - learner_status_ = (learner_status::type)0; - } - - virtual ~group_check_response() throw(); - ::dsn::gpid pid; - ::dsn::error_code err; - int64_t last_committed_decree_in_app; - int64_t last_committed_decree_in_prepare_list; - learner_status::type learner_status_; - int64_t learner_signature; - ::dsn::rpc_address node; - - _group_check_response__isset __isset; - - void __set_pid(const ::dsn::gpid &val); - - void __set_err(const ::dsn::error_code &val); - - void __set_last_committed_decree_in_app(const int64_t val); - - void __set_last_committed_decree_in_prepare_list(const int64_t val); - - void __set_learner_status_(const learner_status::type val); - - void __set_learner_signature(const int64_t val); - - void __set_node(const ::dsn::rpc_address &val); - - bool operator==(const group_check_response &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(err == rhs.err)) - return false; - if (!(last_committed_decree_in_app == rhs.last_committed_decree_in_app)) - return false; - if (!(last_committed_decree_in_prepare_list == rhs.last_committed_decree_in_prepare_list)) - return false; - if (!(learner_status_ == rhs.learner_status_)) - return false; - if (!(learner_signature == rhs.learner_signature)) - return false; - if (!(node == rhs.node)) - return false; - return true; - } - bool operator!=(const group_check_response &rhs) const { return !(*this == rhs); } - - bool operator<(const group_check_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class group_check_response { + public: + + group_check_response(const group_check_response&); + group_check_response(group_check_response&&); + group_check_response& operator=(const group_check_response&); + group_check_response& operator=(group_check_response&&); + group_check_response() : last_committed_decree_in_app(0), last_committed_decree_in_prepare_list(0), learner_status_((learner_status::type)0), learner_signature(0) { + learner_status_ = (learner_status::type)0; + + } + + virtual ~group_check_response() throw(); + ::dsn::gpid pid; + ::dsn::error_code err; + int64_t last_committed_decree_in_app; + int64_t last_committed_decree_in_prepare_list; + learner_status::type learner_status_; + int64_t learner_signature; + ::dsn::rpc_address node; + + _group_check_response__isset __isset; + + void __set_pid(const ::dsn::gpid& val); + + void __set_err(const ::dsn::error_code& val); + + void __set_last_committed_decree_in_app(const int64_t val); + + void __set_last_committed_decree_in_prepare_list(const int64_t val); + + void __set_learner_status_(const learner_status::type val); + + void __set_learner_signature(const int64_t val); + + void __set_node(const ::dsn::rpc_address& val); + + bool operator == (const group_check_response & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(err == rhs.err)) + return false; + if (!(last_committed_decree_in_app == rhs.last_committed_decree_in_app)) + return false; + if (!(last_committed_decree_in_prepare_list == rhs.last_committed_decree_in_prepare_list)) + return false; + if (!(learner_status_ == rhs.learner_status_)) + return false; + if (!(learner_signature == rhs.learner_signature)) + return false; + if (!(node == rhs.node)) + return false; + return true; + } + bool operator != (const group_check_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const group_check_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(group_check_response &a, group_check_response &b); -inline std::ostream &operator<<(std::ostream &out, const group_check_response &obj) +inline std::ostream& operator<<(std::ostream& out, const group_check_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _node_info__isset -{ - _node_info__isset() : status(true), address(false) {} - bool status : 1; - bool address : 1; +typedef struct _node_info__isset { + _node_info__isset() : status(true), address(false) {} + bool status :1; + bool address :1; } _node_info__isset; -class node_info -{ -public: - node_info(const node_info &); - node_info(node_info &&); - node_info &operator=(const node_info &); - node_info &operator=(node_info &&); - node_info() : status((node_status::type)0) { status = (node_status::type)0; } +class node_info { + public: + + node_info(const node_info&); + node_info(node_info&&); + node_info& operator=(const node_info&); + node_info& operator=(node_info&&); + node_info() : status((node_status::type)0) { + status = (node_status::type)0; + + } - virtual ~node_info() throw(); - node_status::type status; - ::dsn::rpc_address address; + virtual ~node_info() throw(); + node_status::type status; + ::dsn::rpc_address address; - _node_info__isset __isset; + _node_info__isset __isset; - void __set_status(const node_status::type val); + void __set_status(const node_status::type val); - void __set_address(const ::dsn::rpc_address &val); + void __set_address(const ::dsn::rpc_address& val); - bool operator==(const node_info &rhs) const - { - if (!(status == rhs.status)) - return false; - if (!(address == rhs.address)) - return false; - return true; - } - bool operator!=(const node_info &rhs) const { return !(*this == rhs); } + bool operator == (const node_info & rhs) const + { + if (!(status == rhs.status)) + return false; + if (!(address == rhs.address)) + return false; + return true; + } + bool operator != (const node_info &rhs) const { + return !(*this == rhs); + } - bool operator<(const node_info &) const; + bool operator < (const node_info & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(node_info &a, node_info &b); -inline std::ostream &operator<<(std::ostream &out, const node_info &obj) +inline std::ostream& operator<<(std::ostream& out, const node_info& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_update_request__isset -{ - _configuration_update_request__isset() - : info(false), config(false), type(true), node(false), host_node(false) - { - } - bool info : 1; - bool config : 1; - bool type : 1; - bool node : 1; - bool host_node : 1; +typedef struct _configuration_update_request__isset { + _configuration_update_request__isset() : info(false), config(false), type(true), node(false), host_node(false) {} + bool info :1; + bool config :1; + bool type :1; + bool node :1; + bool host_node :1; } _configuration_update_request__isset; -class configuration_update_request -{ -public: - configuration_update_request(const configuration_update_request &); - configuration_update_request(configuration_update_request &&); - configuration_update_request &operator=(const configuration_update_request &); - configuration_update_request &operator=(configuration_update_request &&); - configuration_update_request() : type((config_type::type)0) { type = (config_type::type)0; } - - virtual ~configuration_update_request() throw(); - ::dsn::app_info info; - ::dsn::partition_configuration config; - config_type::type type; - ::dsn::rpc_address node; - ::dsn::rpc_address host_node; - - _configuration_update_request__isset __isset; - - void __set_info(const ::dsn::app_info &val); - - void __set_config(const ::dsn::partition_configuration &val); - - void __set_type(const config_type::type val); - - void __set_node(const ::dsn::rpc_address &val); - - void __set_host_node(const ::dsn::rpc_address &val); - - bool operator==(const configuration_update_request &rhs) const - { - if (!(info == rhs.info)) - return false; - if (!(config == rhs.config)) - return false; - if (!(type == rhs.type)) - return false; - if (!(node == rhs.node)) - return false; - if (!(host_node == rhs.host_node)) - return false; - return true; - } - bool operator!=(const configuration_update_request &rhs) const { return !(*this == rhs); } - - bool operator<(const configuration_update_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_update_request { + public: + + configuration_update_request(const configuration_update_request&); + configuration_update_request(configuration_update_request&&); + configuration_update_request& operator=(const configuration_update_request&); + configuration_update_request& operator=(configuration_update_request&&); + configuration_update_request() : type((config_type::type)0) { + type = (config_type::type)0; + + } + + virtual ~configuration_update_request() throw(); + ::dsn::app_info info; + ::dsn::partition_configuration config; + config_type::type type; + ::dsn::rpc_address node; + ::dsn::rpc_address host_node; + + _configuration_update_request__isset __isset; + + void __set_info(const ::dsn::app_info& val); + + void __set_config(const ::dsn::partition_configuration& val); + + void __set_type(const config_type::type val); + + void __set_node(const ::dsn::rpc_address& val); + + void __set_host_node(const ::dsn::rpc_address& val); + + bool operator == (const configuration_update_request & rhs) const + { + if (!(info == rhs.info)) + return false; + if (!(config == rhs.config)) + return false; + if (!(type == rhs.type)) + return false; + if (!(node == rhs.node)) + return false; + if (!(host_node == rhs.host_node)) + return false; + return true; + } + bool operator != (const configuration_update_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_update_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_update_request &a, configuration_update_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_update_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_update_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_update_response__isset -{ - _configuration_update_response__isset() : err(false), config(false) {} - bool err : 1; - bool config : 1; +typedef struct _configuration_update_response__isset { + _configuration_update_response__isset() : err(false), config(false) {} + bool err :1; + bool config :1; } _configuration_update_response__isset; -class configuration_update_response -{ -public: - configuration_update_response(const configuration_update_response &); - configuration_update_response(configuration_update_response &&); - configuration_update_response &operator=(const configuration_update_response &); - configuration_update_response &operator=(configuration_update_response &&); - configuration_update_response() {} +class configuration_update_response { + public: + + configuration_update_response(const configuration_update_response&); + configuration_update_response(configuration_update_response&&); + configuration_update_response& operator=(const configuration_update_response&); + configuration_update_response& operator=(configuration_update_response&&); + configuration_update_response() { + } - virtual ~configuration_update_response() throw(); - ::dsn::error_code err; - ::dsn::partition_configuration config; + virtual ~configuration_update_response() throw(); + ::dsn::error_code err; + ::dsn::partition_configuration config; - _configuration_update_response__isset __isset; + _configuration_update_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - void __set_config(const ::dsn::partition_configuration &val); + void __set_config(const ::dsn::partition_configuration& val); - bool operator==(const configuration_update_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(config == rhs.config)) - return false; - return true; - } - bool operator!=(const configuration_update_response &rhs) const { return !(*this == rhs); } + bool operator == (const configuration_update_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(config == rhs.config)) + return false; + return true; + } + bool operator != (const configuration_update_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const configuration_update_response &) const; + bool operator < (const configuration_update_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(configuration_update_response &a, configuration_update_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_update_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_update_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _replica_server_info__isset -{ - _replica_server_info__isset() : geo_tags(false), total_capacity_mb(false) {} - bool geo_tags : 1; - bool total_capacity_mb : 1; +typedef struct _replica_server_info__isset { + _replica_server_info__isset() : geo_tags(false), total_capacity_mb(false) {} + bool geo_tags :1; + bool total_capacity_mb :1; } _replica_server_info__isset; -class replica_server_info -{ -public: - replica_server_info(const replica_server_info &); - replica_server_info(replica_server_info &&); - replica_server_info &operator=(const replica_server_info &); - replica_server_info &operator=(replica_server_info &&); - replica_server_info() : total_capacity_mb(0) {} +class replica_server_info { + public: - virtual ~replica_server_info() throw(); - std::map geo_tags; - int64_t total_capacity_mb; + replica_server_info(const replica_server_info&); + replica_server_info(replica_server_info&&); + replica_server_info& operator=(const replica_server_info&); + replica_server_info& operator=(replica_server_info&&); + replica_server_info() : total_capacity_mb(0) { + } - _replica_server_info__isset __isset; + virtual ~replica_server_info() throw(); + std::map geo_tags; + int64_t total_capacity_mb; - void __set_geo_tags(const std::map &val); + _replica_server_info__isset __isset; - void __set_total_capacity_mb(const int64_t val); + void __set_geo_tags(const std::map & val); - bool operator==(const replica_server_info &rhs) const - { - if (!(geo_tags == rhs.geo_tags)) - return false; - if (!(total_capacity_mb == rhs.total_capacity_mb)) - return false; - return true; - } - bool operator!=(const replica_server_info &rhs) const { return !(*this == rhs); } + void __set_total_capacity_mb(const int64_t val); - bool operator<(const replica_server_info &) const; + bool operator == (const replica_server_info & rhs) const + { + if (!(geo_tags == rhs.geo_tags)) + return false; + if (!(total_capacity_mb == rhs.total_capacity_mb)) + return false; + return true; + } + bool operator != (const replica_server_info &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const replica_server_info & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(replica_server_info &a, replica_server_info &b); -inline std::ostream &operator<<(std::ostream &out, const replica_server_info &obj) +inline std::ostream& operator<<(std::ostream& out, const replica_server_info& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_by_node_request__isset -{ - _configuration_query_by_node_request__isset() : node(false), stored_replicas(false), info(false) - { - } - bool node : 1; - bool stored_replicas : 1; - bool info : 1; +typedef struct _configuration_query_by_node_request__isset { + _configuration_query_by_node_request__isset() : node(false), stored_replicas(false), info(false) {} + bool node :1; + bool stored_replicas :1; + bool info :1; } _configuration_query_by_node_request__isset; -class configuration_query_by_node_request -{ -public: - configuration_query_by_node_request(const configuration_query_by_node_request &); - configuration_query_by_node_request(configuration_query_by_node_request &&); - configuration_query_by_node_request &operator=(const configuration_query_by_node_request &); - configuration_query_by_node_request &operator=(configuration_query_by_node_request &&); - configuration_query_by_node_request() {} - - virtual ~configuration_query_by_node_request() throw(); - ::dsn::rpc_address node; - std::vector stored_replicas; - replica_server_info info; - - _configuration_query_by_node_request__isset __isset; - - void __set_node(const ::dsn::rpc_address &val); - - void __set_stored_replicas(const std::vector &val); - - void __set_info(const replica_server_info &val); - - bool operator==(const configuration_query_by_node_request &rhs) const - { - if (!(node == rhs.node)) - return false; - if (__isset.stored_replicas != rhs.__isset.stored_replicas) - return false; - else if (__isset.stored_replicas && !(stored_replicas == rhs.stored_replicas)) - return false; - if (__isset.info != rhs.__isset.info) - return false; - else if (__isset.info && !(info == rhs.info)) - return false; - return true; - } - bool operator!=(const configuration_query_by_node_request &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_query_by_node_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_query_by_node_request { + public: + + configuration_query_by_node_request(const configuration_query_by_node_request&); + configuration_query_by_node_request(configuration_query_by_node_request&&); + configuration_query_by_node_request& operator=(const configuration_query_by_node_request&); + configuration_query_by_node_request& operator=(configuration_query_by_node_request&&); + configuration_query_by_node_request() { + } + + virtual ~configuration_query_by_node_request() throw(); + ::dsn::rpc_address node; + std::vector stored_replicas; + replica_server_info info; + + _configuration_query_by_node_request__isset __isset; + + void __set_node(const ::dsn::rpc_address& val); + + void __set_stored_replicas(const std::vector & val); + + void __set_info(const replica_server_info& val); + + bool operator == (const configuration_query_by_node_request & rhs) const + { + if (!(node == rhs.node)) + return false; + if (__isset.stored_replicas != rhs.__isset.stored_replicas) + return false; + else if (__isset.stored_replicas && !(stored_replicas == rhs.stored_replicas)) + return false; + if (__isset.info != rhs.__isset.info) + return false; + else if (__isset.info && !(info == rhs.info)) + return false; + return true; + } + bool operator != (const configuration_query_by_node_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_query_by_node_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_query_by_node_request &a, configuration_query_by_node_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_query_by_node_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_query_by_node_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_by_node_response__isset -{ - _configuration_query_by_node_response__isset() - : err(false), partitions(false), gc_replicas(false) - { - } - bool err : 1; - bool partitions : 1; - bool gc_replicas : 1; +typedef struct _configuration_query_by_node_response__isset { + _configuration_query_by_node_response__isset() : err(false), partitions(false), gc_replicas(false) {} + bool err :1; + bool partitions :1; + bool gc_replicas :1; } _configuration_query_by_node_response__isset; -class configuration_query_by_node_response -{ -public: - configuration_query_by_node_response(const configuration_query_by_node_response &); - configuration_query_by_node_response(configuration_query_by_node_response &&); - configuration_query_by_node_response &operator=(const configuration_query_by_node_response &); - configuration_query_by_node_response &operator=(configuration_query_by_node_response &&); - configuration_query_by_node_response() {} - - virtual ~configuration_query_by_node_response() throw(); - ::dsn::error_code err; - std::vector partitions; - std::vector gc_replicas; - - _configuration_query_by_node_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_partitions(const std::vector &val); - - void __set_gc_replicas(const std::vector &val); - - bool operator==(const configuration_query_by_node_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(partitions == rhs.partitions)) - return false; - if (__isset.gc_replicas != rhs.__isset.gc_replicas) - return false; - else if (__isset.gc_replicas && !(gc_replicas == rhs.gc_replicas)) - return false; - return true; - } - bool operator!=(const configuration_query_by_node_response &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_query_by_node_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_query_by_node_response { + public: + + configuration_query_by_node_response(const configuration_query_by_node_response&); + configuration_query_by_node_response(configuration_query_by_node_response&&); + configuration_query_by_node_response& operator=(const configuration_query_by_node_response&); + configuration_query_by_node_response& operator=(configuration_query_by_node_response&&); + configuration_query_by_node_response() { + } + + virtual ~configuration_query_by_node_response() throw(); + ::dsn::error_code err; + std::vector partitions; + std::vector gc_replicas; + + _configuration_query_by_node_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_partitions(const std::vector & val); + + void __set_gc_replicas(const std::vector & val); + + bool operator == (const configuration_query_by_node_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(partitions == rhs.partitions)) + return false; + if (__isset.gc_replicas != rhs.__isset.gc_replicas) + return false; + else if (__isset.gc_replicas && !(gc_replicas == rhs.gc_replicas)) + return false; + return true; + } + bool operator != (const configuration_query_by_node_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_query_by_node_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_query_by_node_response &a, configuration_query_by_node_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_query_by_node_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_query_by_node_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _create_app_options__isset -{ - _create_app_options__isset() - : partition_count(false), - replica_count(false), - success_if_exist(false), - app_type(false), - is_stateful(false), - envs(false) - { - } - bool partition_count : 1; - bool replica_count : 1; - bool success_if_exist : 1; - bool app_type : 1; - bool is_stateful : 1; - bool envs : 1; +typedef struct _create_app_options__isset { + _create_app_options__isset() : partition_count(false), replica_count(false), success_if_exist(false), app_type(false), is_stateful(false), envs(false) {} + bool partition_count :1; + bool replica_count :1; + bool success_if_exist :1; + bool app_type :1; + bool is_stateful :1; + bool envs :1; } _create_app_options__isset; -class create_app_options -{ -public: - create_app_options(const create_app_options &); - create_app_options(create_app_options &&); - create_app_options &operator=(const create_app_options &); - create_app_options &operator=(create_app_options &&); - create_app_options() - : partition_count(0), replica_count(0), success_if_exist(0), app_type(), is_stateful(0) - { - } - - virtual ~create_app_options() throw(); - int32_t partition_count; - int32_t replica_count; - bool success_if_exist; - std::string app_type; - bool is_stateful; - std::map envs; - - _create_app_options__isset __isset; - - void __set_partition_count(const int32_t val); - - void __set_replica_count(const int32_t val); - - void __set_success_if_exist(const bool val); - - void __set_app_type(const std::string &val); - - void __set_is_stateful(const bool val); - - void __set_envs(const std::map &val); - - bool operator==(const create_app_options &rhs) const - { - if (!(partition_count == rhs.partition_count)) - return false; - if (!(replica_count == rhs.replica_count)) - return false; - if (!(success_if_exist == rhs.success_if_exist)) - return false; - if (!(app_type == rhs.app_type)) - return false; - if (!(is_stateful == rhs.is_stateful)) - return false; - if (!(envs == rhs.envs)) - return false; - return true; - } - bool operator!=(const create_app_options &rhs) const { return !(*this == rhs); } - - bool operator<(const create_app_options &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class create_app_options { + public: + + create_app_options(const create_app_options&); + create_app_options(create_app_options&&); + create_app_options& operator=(const create_app_options&); + create_app_options& operator=(create_app_options&&); + create_app_options() : partition_count(0), replica_count(0), success_if_exist(0), app_type(), is_stateful(0) { + } + + virtual ~create_app_options() throw(); + int32_t partition_count; + int32_t replica_count; + bool success_if_exist; + std::string app_type; + bool is_stateful; + std::map envs; + + _create_app_options__isset __isset; + + void __set_partition_count(const int32_t val); + + void __set_replica_count(const int32_t val); + + void __set_success_if_exist(const bool val); + + void __set_app_type(const std::string& val); + + void __set_is_stateful(const bool val); + + void __set_envs(const std::map & val); + + bool operator == (const create_app_options & rhs) const + { + if (!(partition_count == rhs.partition_count)) + return false; + if (!(replica_count == rhs.replica_count)) + return false; + if (!(success_if_exist == rhs.success_if_exist)) + return false; + if (!(app_type == rhs.app_type)) + return false; + if (!(is_stateful == rhs.is_stateful)) + return false; + if (!(envs == rhs.envs)) + return false; + return true; + } + bool operator != (const create_app_options &rhs) const { + return !(*this == rhs); + } + + bool operator < (const create_app_options & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(create_app_options &a, create_app_options &b); -inline std::ostream &operator<<(std::ostream &out, const create_app_options &obj) +inline std::ostream& operator<<(std::ostream& out, const create_app_options& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_create_app_request__isset -{ - _configuration_create_app_request__isset() : app_name(false), options(false) {} - bool app_name : 1; - bool options : 1; +typedef struct _configuration_create_app_request__isset { + _configuration_create_app_request__isset() : app_name(false), options(false) {} + bool app_name :1; + bool options :1; } _configuration_create_app_request__isset; -class configuration_create_app_request -{ -public: - configuration_create_app_request(const configuration_create_app_request &); - configuration_create_app_request(configuration_create_app_request &&); - configuration_create_app_request &operator=(const configuration_create_app_request &); - configuration_create_app_request &operator=(configuration_create_app_request &&); - configuration_create_app_request() : app_name() {} +class configuration_create_app_request { + public: - virtual ~configuration_create_app_request() throw(); - std::string app_name; - create_app_options options; + configuration_create_app_request(const configuration_create_app_request&); + configuration_create_app_request(configuration_create_app_request&&); + configuration_create_app_request& operator=(const configuration_create_app_request&); + configuration_create_app_request& operator=(configuration_create_app_request&&); + configuration_create_app_request() : app_name() { + } - _configuration_create_app_request__isset __isset; + virtual ~configuration_create_app_request() throw(); + std::string app_name; + create_app_options options; - void __set_app_name(const std::string &val); + _configuration_create_app_request__isset __isset; - void __set_options(const create_app_options &val); + void __set_app_name(const std::string& val); - bool operator==(const configuration_create_app_request &rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(options == rhs.options)) - return false; - return true; - } - bool operator!=(const configuration_create_app_request &rhs) const { return !(*this == rhs); } + void __set_options(const create_app_options& val); - bool operator<(const configuration_create_app_request &) const; + bool operator == (const configuration_create_app_request & rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(options == rhs.options)) + return false; + return true; + } + bool operator != (const configuration_create_app_request &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const configuration_create_app_request & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_create_app_request &a, configuration_create_app_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_create_app_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_create_app_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _drop_app_options__isset -{ - _drop_app_options__isset() : success_if_not_exist(false), reserve_seconds(false) {} - bool success_if_not_exist : 1; - bool reserve_seconds : 1; +typedef struct _drop_app_options__isset { + _drop_app_options__isset() : success_if_not_exist(false), reserve_seconds(false) {} + bool success_if_not_exist :1; + bool reserve_seconds :1; } _drop_app_options__isset; -class drop_app_options -{ -public: - drop_app_options(const drop_app_options &); - drop_app_options(drop_app_options &&); - drop_app_options &operator=(const drop_app_options &); - drop_app_options &operator=(drop_app_options &&); - drop_app_options() : success_if_not_exist(0), reserve_seconds(0) {} +class drop_app_options { + public: + + drop_app_options(const drop_app_options&); + drop_app_options(drop_app_options&&); + drop_app_options& operator=(const drop_app_options&); + drop_app_options& operator=(drop_app_options&&); + drop_app_options() : success_if_not_exist(0), reserve_seconds(0) { + } - virtual ~drop_app_options() throw(); - bool success_if_not_exist; - int64_t reserve_seconds; + virtual ~drop_app_options() throw(); + bool success_if_not_exist; + int64_t reserve_seconds; - _drop_app_options__isset __isset; + _drop_app_options__isset __isset; - void __set_success_if_not_exist(const bool val); + void __set_success_if_not_exist(const bool val); - void __set_reserve_seconds(const int64_t val); + void __set_reserve_seconds(const int64_t val); - bool operator==(const drop_app_options &rhs) const - { - if (!(success_if_not_exist == rhs.success_if_not_exist)) - return false; - if (__isset.reserve_seconds != rhs.__isset.reserve_seconds) - return false; - else if (__isset.reserve_seconds && !(reserve_seconds == rhs.reserve_seconds)) - return false; - return true; - } - bool operator!=(const drop_app_options &rhs) const { return !(*this == rhs); } + bool operator == (const drop_app_options & rhs) const + { + if (!(success_if_not_exist == rhs.success_if_not_exist)) + return false; + if (__isset.reserve_seconds != rhs.__isset.reserve_seconds) + return false; + else if (__isset.reserve_seconds && !(reserve_seconds == rhs.reserve_seconds)) + return false; + return true; + } + bool operator != (const drop_app_options &rhs) const { + return !(*this == rhs); + } - bool operator<(const drop_app_options &) const; + bool operator < (const drop_app_options & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(drop_app_options &a, drop_app_options &b); -inline std::ostream &operator<<(std::ostream &out, const drop_app_options &obj) +inline std::ostream& operator<<(std::ostream& out, const drop_app_options& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_drop_app_request__isset -{ - _configuration_drop_app_request__isset() : app_name(false), options(false) {} - bool app_name : 1; - bool options : 1; +typedef struct _configuration_drop_app_request__isset { + _configuration_drop_app_request__isset() : app_name(false), options(false) {} + bool app_name :1; + bool options :1; } _configuration_drop_app_request__isset; -class configuration_drop_app_request -{ -public: - configuration_drop_app_request(const configuration_drop_app_request &); - configuration_drop_app_request(configuration_drop_app_request &&); - configuration_drop_app_request &operator=(const configuration_drop_app_request &); - configuration_drop_app_request &operator=(configuration_drop_app_request &&); - configuration_drop_app_request() : app_name() {} +class configuration_drop_app_request { + public: - virtual ~configuration_drop_app_request() throw(); - std::string app_name; - drop_app_options options; + configuration_drop_app_request(const configuration_drop_app_request&); + configuration_drop_app_request(configuration_drop_app_request&&); + configuration_drop_app_request& operator=(const configuration_drop_app_request&); + configuration_drop_app_request& operator=(configuration_drop_app_request&&); + configuration_drop_app_request() : app_name() { + } - _configuration_drop_app_request__isset __isset; + virtual ~configuration_drop_app_request() throw(); + std::string app_name; + drop_app_options options; - void __set_app_name(const std::string &val); + _configuration_drop_app_request__isset __isset; - void __set_options(const drop_app_options &val); + void __set_app_name(const std::string& val); - bool operator==(const configuration_drop_app_request &rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(options == rhs.options)) - return false; - return true; - } - bool operator!=(const configuration_drop_app_request &rhs) const { return !(*this == rhs); } + void __set_options(const drop_app_options& val); - bool operator<(const configuration_drop_app_request &) const; + bool operator == (const configuration_drop_app_request & rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(options == rhs.options)) + return false; + return true; + } + bool operator != (const configuration_drop_app_request &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const configuration_drop_app_request & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_drop_app_request &a, configuration_drop_app_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_drop_app_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_drop_app_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_list_apps_request__isset -{ - _configuration_list_apps_request__isset() : status(true) {} - bool status : 1; +typedef struct _configuration_list_apps_request__isset { + _configuration_list_apps_request__isset() : status(true) {} + bool status :1; } _configuration_list_apps_request__isset; -class configuration_list_apps_request -{ -public: - configuration_list_apps_request(const configuration_list_apps_request &); - configuration_list_apps_request(configuration_list_apps_request &&); - configuration_list_apps_request &operator=(const configuration_list_apps_request &); - configuration_list_apps_request &operator=(configuration_list_apps_request &&); - configuration_list_apps_request() : status((::dsn::app_status::type)0) - { - status = (::dsn::app_status::type)0; - } +class configuration_list_apps_request { + public: + + configuration_list_apps_request(const configuration_list_apps_request&); + configuration_list_apps_request(configuration_list_apps_request&&); + configuration_list_apps_request& operator=(const configuration_list_apps_request&); + configuration_list_apps_request& operator=(configuration_list_apps_request&&); + configuration_list_apps_request() : status(( ::dsn::app_status::type)0) { + status = ( ::dsn::app_status::type)0; - virtual ~configuration_list_apps_request() throw(); - ::dsn::app_status::type status; + } - _configuration_list_apps_request__isset __isset; + virtual ~configuration_list_apps_request() throw(); + ::dsn::app_status::type status; - void __set_status(const ::dsn::app_status::type val); + _configuration_list_apps_request__isset __isset; - bool operator==(const configuration_list_apps_request &rhs) const - { - if (!(status == rhs.status)) - return false; - return true; - } - bool operator!=(const configuration_list_apps_request &rhs) const { return !(*this == rhs); } + void __set_status(const ::dsn::app_status::type val); - bool operator<(const configuration_list_apps_request &) const; + bool operator == (const configuration_list_apps_request & rhs) const + { + if (!(status == rhs.status)) + return false; + return true; + } + bool operator != (const configuration_list_apps_request &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const configuration_list_apps_request & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_list_apps_request &a, configuration_list_apps_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_list_apps_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_list_apps_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_list_nodes_request__isset -{ - _configuration_list_nodes_request__isset() : status(true) {} - bool status : 1; +typedef struct _configuration_list_nodes_request__isset { + _configuration_list_nodes_request__isset() : status(true) {} + bool status :1; } _configuration_list_nodes_request__isset; -class configuration_list_nodes_request -{ -public: - configuration_list_nodes_request(const configuration_list_nodes_request &); - configuration_list_nodes_request(configuration_list_nodes_request &&); - configuration_list_nodes_request &operator=(const configuration_list_nodes_request &); - configuration_list_nodes_request &operator=(configuration_list_nodes_request &&); - configuration_list_nodes_request() : status((node_status::type)0) - { - status = (node_status::type)0; - } +class configuration_list_nodes_request { + public: + + configuration_list_nodes_request(const configuration_list_nodes_request&); + configuration_list_nodes_request(configuration_list_nodes_request&&); + configuration_list_nodes_request& operator=(const configuration_list_nodes_request&); + configuration_list_nodes_request& operator=(configuration_list_nodes_request&&); + configuration_list_nodes_request() : status((node_status::type)0) { + status = (node_status::type)0; - virtual ~configuration_list_nodes_request() throw(); - node_status::type status; + } - _configuration_list_nodes_request__isset __isset; + virtual ~configuration_list_nodes_request() throw(); + node_status::type status; - void __set_status(const node_status::type val); + _configuration_list_nodes_request__isset __isset; - bool operator==(const configuration_list_nodes_request &rhs) const - { - if (!(status == rhs.status)) - return false; - return true; - } - bool operator!=(const configuration_list_nodes_request &rhs) const { return !(*this == rhs); } + void __set_status(const node_status::type val); - bool operator<(const configuration_list_nodes_request &) const; + bool operator == (const configuration_list_nodes_request & rhs) const + { + if (!(status == rhs.status)) + return false; + return true; + } + bool operator != (const configuration_list_nodes_request &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const configuration_list_nodes_request & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_list_nodes_request &a, configuration_list_nodes_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_list_nodes_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_list_nodes_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -class configuration_cluster_info_request -{ -public: - configuration_cluster_info_request(const configuration_cluster_info_request &); - configuration_cluster_info_request(configuration_cluster_info_request &&); - configuration_cluster_info_request &operator=(const configuration_cluster_info_request &); - configuration_cluster_info_request &operator=(configuration_cluster_info_request &&); - configuration_cluster_info_request() {} - virtual ~configuration_cluster_info_request() throw(); +class configuration_cluster_info_request { + public: - bool operator==(const configuration_cluster_info_request & /* rhs */) const { return true; } - bool operator!=(const configuration_cluster_info_request &rhs) const { return !(*this == rhs); } + configuration_cluster_info_request(const configuration_cluster_info_request&); + configuration_cluster_info_request(configuration_cluster_info_request&&); + configuration_cluster_info_request& operator=(const configuration_cluster_info_request&); + configuration_cluster_info_request& operator=(configuration_cluster_info_request&&); + configuration_cluster_info_request() { + } - bool operator<(const configuration_cluster_info_request &) const; + virtual ~configuration_cluster_info_request() throw(); - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator == (const configuration_cluster_info_request & /* rhs */) const + { + return true; + } + bool operator != (const configuration_cluster_info_request &rhs) const { + return !(*this == rhs); + } - virtual void printTo(std::ostream &out) const; + bool operator < (const configuration_cluster_info_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_cluster_info_request &a, configuration_cluster_info_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_cluster_info_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_cluster_info_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_recall_app_request__isset -{ - _configuration_recall_app_request__isset() : app_id(false), new_app_name(false) {} - bool app_id : 1; - bool new_app_name : 1; +typedef struct _configuration_recall_app_request__isset { + _configuration_recall_app_request__isset() : app_id(false), new_app_name(false) {} + bool app_id :1; + bool new_app_name :1; } _configuration_recall_app_request__isset; -class configuration_recall_app_request -{ -public: - configuration_recall_app_request(const configuration_recall_app_request &); - configuration_recall_app_request(configuration_recall_app_request &&); - configuration_recall_app_request &operator=(const configuration_recall_app_request &); - configuration_recall_app_request &operator=(configuration_recall_app_request &&); - configuration_recall_app_request() : app_id(0), new_app_name() {} +class configuration_recall_app_request { + public: - virtual ~configuration_recall_app_request() throw(); - int32_t app_id; - std::string new_app_name; + configuration_recall_app_request(const configuration_recall_app_request&); + configuration_recall_app_request(configuration_recall_app_request&&); + configuration_recall_app_request& operator=(const configuration_recall_app_request&); + configuration_recall_app_request& operator=(configuration_recall_app_request&&); + configuration_recall_app_request() : app_id(0), new_app_name() { + } - _configuration_recall_app_request__isset __isset; + virtual ~configuration_recall_app_request() throw(); + int32_t app_id; + std::string new_app_name; - void __set_app_id(const int32_t val); + _configuration_recall_app_request__isset __isset; - void __set_new_app_name(const std::string &val); + void __set_app_id(const int32_t val); - bool operator==(const configuration_recall_app_request &rhs) const - { - if (!(app_id == rhs.app_id)) - return false; - if (!(new_app_name == rhs.new_app_name)) - return false; - return true; - } - bool operator!=(const configuration_recall_app_request &rhs) const { return !(*this == rhs); } + void __set_new_app_name(const std::string& val); - bool operator<(const configuration_recall_app_request &) const; + bool operator == (const configuration_recall_app_request & rhs) const + { + if (!(app_id == rhs.app_id)) + return false; + if (!(new_app_name == rhs.new_app_name)) + return false; + return true; + } + bool operator != (const configuration_recall_app_request &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const configuration_recall_app_request & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_recall_app_request &a, configuration_recall_app_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_recall_app_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_recall_app_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_create_app_response__isset -{ - _configuration_create_app_response__isset() : err(false), appid(false) {} - bool err : 1; - bool appid : 1; +typedef struct _configuration_create_app_response__isset { + _configuration_create_app_response__isset() : err(false), appid(false) {} + bool err :1; + bool appid :1; } _configuration_create_app_response__isset; -class configuration_create_app_response -{ -public: - configuration_create_app_response(const configuration_create_app_response &); - configuration_create_app_response(configuration_create_app_response &&); - configuration_create_app_response &operator=(const configuration_create_app_response &); - configuration_create_app_response &operator=(configuration_create_app_response &&); - configuration_create_app_response() : appid(0) {} +class configuration_create_app_response { + public: + + configuration_create_app_response(const configuration_create_app_response&); + configuration_create_app_response(configuration_create_app_response&&); + configuration_create_app_response& operator=(const configuration_create_app_response&); + configuration_create_app_response& operator=(configuration_create_app_response&&); + configuration_create_app_response() : appid(0) { + } - virtual ~configuration_create_app_response() throw(); - ::dsn::error_code err; - int32_t appid; + virtual ~configuration_create_app_response() throw(); + ::dsn::error_code err; + int32_t appid; - _configuration_create_app_response__isset __isset; + _configuration_create_app_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - void __set_appid(const int32_t val); + void __set_appid(const int32_t val); - bool operator==(const configuration_create_app_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(appid == rhs.appid)) - return false; - return true; - } - bool operator!=(const configuration_create_app_response &rhs) const { return !(*this == rhs); } + bool operator == (const configuration_create_app_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(appid == rhs.appid)) + return false; + return true; + } + bool operator != (const configuration_create_app_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const configuration_create_app_response &) const; + bool operator < (const configuration_create_app_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(configuration_create_app_response &a, configuration_create_app_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_create_app_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_create_app_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_meta_control_request__isset -{ - _configuration_meta_control_request__isset() : level(false) {} - bool level : 1; +typedef struct _configuration_meta_control_request__isset { + _configuration_meta_control_request__isset() : level(false) {} + bool level :1; } _configuration_meta_control_request__isset; -class configuration_meta_control_request -{ -public: - configuration_meta_control_request(const configuration_meta_control_request &); - configuration_meta_control_request(configuration_meta_control_request &&); - configuration_meta_control_request &operator=(const configuration_meta_control_request &); - configuration_meta_control_request &operator=(configuration_meta_control_request &&); - configuration_meta_control_request() : level((meta_function_level::type)0) {} +class configuration_meta_control_request { + public: - virtual ~configuration_meta_control_request() throw(); - meta_function_level::type level; + configuration_meta_control_request(const configuration_meta_control_request&); + configuration_meta_control_request(configuration_meta_control_request&&); + configuration_meta_control_request& operator=(const configuration_meta_control_request&); + configuration_meta_control_request& operator=(configuration_meta_control_request&&); + configuration_meta_control_request() : level((meta_function_level::type)0) { + } - _configuration_meta_control_request__isset __isset; + virtual ~configuration_meta_control_request() throw(); + meta_function_level::type level; - void __set_level(const meta_function_level::type val); + _configuration_meta_control_request__isset __isset; - bool operator==(const configuration_meta_control_request &rhs) const - { - if (!(level == rhs.level)) - return false; - return true; - } - bool operator!=(const configuration_meta_control_request &rhs) const { return !(*this == rhs); } + void __set_level(const meta_function_level::type val); - bool operator<(const configuration_meta_control_request &) const; + bool operator == (const configuration_meta_control_request & rhs) const + { + if (!(level == rhs.level)) + return false; + return true; + } + bool operator != (const configuration_meta_control_request &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const configuration_meta_control_request & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_meta_control_request &a, configuration_meta_control_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_meta_control_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_meta_control_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_meta_control_response__isset -{ - _configuration_meta_control_response__isset() : err(false), old_level(false) {} - bool err : 1; - bool old_level : 1; +typedef struct _configuration_meta_control_response__isset { + _configuration_meta_control_response__isset() : err(false), old_level(false) {} + bool err :1; + bool old_level :1; } _configuration_meta_control_response__isset; -class configuration_meta_control_response -{ -public: - configuration_meta_control_response(const configuration_meta_control_response &); - configuration_meta_control_response(configuration_meta_control_response &&); - configuration_meta_control_response &operator=(const configuration_meta_control_response &); - configuration_meta_control_response &operator=(configuration_meta_control_response &&); - configuration_meta_control_response() : old_level((meta_function_level::type)0) {} - - virtual ~configuration_meta_control_response() throw(); - ::dsn::error_code err; - meta_function_level::type old_level; - - _configuration_meta_control_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_old_level(const meta_function_level::type val); - - bool operator==(const configuration_meta_control_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(old_level == rhs.old_level)) - return false; - return true; - } - bool operator!=(const configuration_meta_control_response &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_meta_control_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_meta_control_response { + public: + + configuration_meta_control_response(const configuration_meta_control_response&); + configuration_meta_control_response(configuration_meta_control_response&&); + configuration_meta_control_response& operator=(const configuration_meta_control_response&); + configuration_meta_control_response& operator=(configuration_meta_control_response&&); + configuration_meta_control_response() : old_level((meta_function_level::type)0) { + } + + virtual ~configuration_meta_control_response() throw(); + ::dsn::error_code err; + meta_function_level::type old_level; + + _configuration_meta_control_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_old_level(const meta_function_level::type val); + + bool operator == (const configuration_meta_control_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(old_level == rhs.old_level)) + return false; + return true; + } + bool operator != (const configuration_meta_control_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_meta_control_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_meta_control_response &a, configuration_meta_control_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_meta_control_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_meta_control_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_proposal_action__isset -{ - _configuration_proposal_action__isset() : target(false), node(false), type(false) {} - bool target : 1; - bool node : 1; - bool type : 1; +typedef struct _configuration_proposal_action__isset { + _configuration_proposal_action__isset() : target(false), node(false), type(false) {} + bool target :1; + bool node :1; + bool type :1; } _configuration_proposal_action__isset; -class configuration_proposal_action -{ -public: - configuration_proposal_action(::dsn::rpc_address t, ::dsn::rpc_address n, config_type::type tp) - : target(t), node(n), type(tp) - { - } - - configuration_proposal_action(const configuration_proposal_action &); - configuration_proposal_action(configuration_proposal_action &&); - configuration_proposal_action &operator=(const configuration_proposal_action &); - configuration_proposal_action &operator=(configuration_proposal_action &&); - configuration_proposal_action() : type((config_type::type)0) {} - - virtual ~configuration_proposal_action() throw(); - ::dsn::rpc_address target; - ::dsn::rpc_address node; - config_type::type type; - - _configuration_proposal_action__isset __isset; - - void __set_target(const ::dsn::rpc_address &val); - - void __set_node(const ::dsn::rpc_address &val); - - void __set_type(const config_type::type val); - - bool operator==(const configuration_proposal_action &rhs) const - { - if (!(target == rhs.target)) - return false; - if (!(node == rhs.node)) - return false; - if (!(type == rhs.type)) - return false; - return true; - } - bool operator!=(const configuration_proposal_action &rhs) const { return !(*this == rhs); } - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_proposal_action { + public: + configuration_proposal_action(::dsn::rpc_address t, ::dsn::rpc_address n, config_type::type tp): target(t), node(n), type(tp) {} + + configuration_proposal_action(const configuration_proposal_action&); + configuration_proposal_action(configuration_proposal_action&&); + configuration_proposal_action& operator=(const configuration_proposal_action&); + configuration_proposal_action& operator=(configuration_proposal_action&&); + configuration_proposal_action() : type((config_type::type)0) { + } + + virtual ~configuration_proposal_action() throw(); + ::dsn::rpc_address target; + ::dsn::rpc_address node; + config_type::type type; + + _configuration_proposal_action__isset __isset; + + void __set_target(const ::dsn::rpc_address& val); + + void __set_node(const ::dsn::rpc_address& val); + + void __set_type(const config_type::type val); + + bool operator == (const configuration_proposal_action & rhs) const + { + if (!(target == rhs.target)) + return false; + if (!(node == rhs.node)) + return false; + if (!(type == rhs.type)) + return false; + return true; + } + bool operator != (const configuration_proposal_action &rhs) const { + return !(*this == rhs); + } + + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_proposal_action &a, configuration_proposal_action &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_proposal_action &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_proposal_action& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_balancer_request__isset -{ - _configuration_balancer_request__isset() - : gpid(false), action_list(false), force(true), balance_type(false) - { - } - bool gpid : 1; - bool action_list : 1; - bool force : 1; - bool balance_type : 1; +typedef struct _configuration_balancer_request__isset { + _configuration_balancer_request__isset() : gpid(false), action_list(false), force(true), balance_type(false) {} + bool gpid :1; + bool action_list :1; + bool force :1; + bool balance_type :1; } _configuration_balancer_request__isset; -class configuration_balancer_request -{ -public: - configuration_balancer_request(const configuration_balancer_request &); - configuration_balancer_request(configuration_balancer_request &&); - configuration_balancer_request &operator=(const configuration_balancer_request &); - configuration_balancer_request &operator=(configuration_balancer_request &&); - configuration_balancer_request() : force(false), balance_type((balancer_request_type::type)0) {} - - virtual ~configuration_balancer_request() throw(); - ::dsn::gpid gpid; - std::vector action_list; - bool force; - balancer_request_type::type balance_type; - - _configuration_balancer_request__isset __isset; - - void __set_gpid(const ::dsn::gpid &val); - - void __set_action_list(const std::vector &val); - - void __set_force(const bool val); - - void __set_balance_type(const balancer_request_type::type val); - - bool operator==(const configuration_balancer_request &rhs) const - { - if (!(gpid == rhs.gpid)) - return false; - if (!(action_list == rhs.action_list)) - return false; - if (__isset.force != rhs.__isset.force) - return false; - else if (__isset.force && !(force == rhs.force)) - return false; - if (__isset.balance_type != rhs.__isset.balance_type) - return false; - else if (__isset.balance_type && !(balance_type == rhs.balance_type)) - return false; - return true; - } - bool operator!=(const configuration_balancer_request &rhs) const { return !(*this == rhs); } - - bool operator<(const configuration_balancer_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_balancer_request { + public: + + configuration_balancer_request(const configuration_balancer_request&); + configuration_balancer_request(configuration_balancer_request&&); + configuration_balancer_request& operator=(const configuration_balancer_request&); + configuration_balancer_request& operator=(configuration_balancer_request&&); + configuration_balancer_request() : force(false), balance_type((balancer_request_type::type)0) { + } + + virtual ~configuration_balancer_request() throw(); + ::dsn::gpid gpid; + std::vector action_list; + bool force; + balancer_request_type::type balance_type; + + _configuration_balancer_request__isset __isset; + + void __set_gpid(const ::dsn::gpid& val); + + void __set_action_list(const std::vector & val); + + void __set_force(const bool val); + + void __set_balance_type(const balancer_request_type::type val); + + bool operator == (const configuration_balancer_request & rhs) const + { + if (!(gpid == rhs.gpid)) + return false; + if (!(action_list == rhs.action_list)) + return false; + if (__isset.force != rhs.__isset.force) + return false; + else if (__isset.force && !(force == rhs.force)) + return false; + if (__isset.balance_type != rhs.__isset.balance_type) + return false; + else if (__isset.balance_type && !(balance_type == rhs.balance_type)) + return false; + return true; + } + bool operator != (const configuration_balancer_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_balancer_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_balancer_request &a, configuration_balancer_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_balancer_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_balancer_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_balancer_response__isset -{ - _configuration_balancer_response__isset() : err(false) {} - bool err : 1; +typedef struct _configuration_balancer_response__isset { + _configuration_balancer_response__isset() : err(false) {} + bool err :1; } _configuration_balancer_response__isset; -class configuration_balancer_response -{ -public: - configuration_balancer_response(const configuration_balancer_response &); - configuration_balancer_response(configuration_balancer_response &&); - configuration_balancer_response &operator=(const configuration_balancer_response &); - configuration_balancer_response &operator=(configuration_balancer_response &&); - configuration_balancer_response() {} +class configuration_balancer_response { + public: - virtual ~configuration_balancer_response() throw(); - ::dsn::error_code err; + configuration_balancer_response(const configuration_balancer_response&); + configuration_balancer_response(configuration_balancer_response&&); + configuration_balancer_response& operator=(const configuration_balancer_response&); + configuration_balancer_response& operator=(configuration_balancer_response&&); + configuration_balancer_response() { + } - _configuration_balancer_response__isset __isset; + virtual ~configuration_balancer_response() throw(); + ::dsn::error_code err; - void __set_err(const ::dsn::error_code &val); + _configuration_balancer_response__isset __isset; - bool operator==(const configuration_balancer_response &rhs) const - { - if (!(err == rhs.err)) - return false; - return true; - } - bool operator!=(const configuration_balancer_response &rhs) const { return !(*this == rhs); } + void __set_err(const ::dsn::error_code& val); - bool operator<(const configuration_balancer_response &) const; + bool operator == (const configuration_balancer_response & rhs) const + { + if (!(err == rhs.err)) + return false; + return true; + } + bool operator != (const configuration_balancer_response &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const configuration_balancer_response & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_balancer_response &a, configuration_balancer_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_balancer_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_balancer_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_drop_app_response__isset -{ - _configuration_drop_app_response__isset() : err(false) {} - bool err : 1; +typedef struct _configuration_drop_app_response__isset { + _configuration_drop_app_response__isset() : err(false) {} + bool err :1; } _configuration_drop_app_response__isset; -class configuration_drop_app_response -{ -public: - configuration_drop_app_response(const configuration_drop_app_response &); - configuration_drop_app_response(configuration_drop_app_response &&); - configuration_drop_app_response &operator=(const configuration_drop_app_response &); - configuration_drop_app_response &operator=(configuration_drop_app_response &&); - configuration_drop_app_response() {} +class configuration_drop_app_response { + public: + + configuration_drop_app_response(const configuration_drop_app_response&); + configuration_drop_app_response(configuration_drop_app_response&&); + configuration_drop_app_response& operator=(const configuration_drop_app_response&); + configuration_drop_app_response& operator=(configuration_drop_app_response&&); + configuration_drop_app_response() { + } - virtual ~configuration_drop_app_response() throw(); - ::dsn::error_code err; + virtual ~configuration_drop_app_response() throw(); + ::dsn::error_code err; - _configuration_drop_app_response__isset __isset; + _configuration_drop_app_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - bool operator==(const configuration_drop_app_response &rhs) const - { - if (!(err == rhs.err)) - return false; - return true; - } - bool operator!=(const configuration_drop_app_response &rhs) const { return !(*this == rhs); } + bool operator == (const configuration_drop_app_response & rhs) const + { + if (!(err == rhs.err)) + return false; + return true; + } + bool operator != (const configuration_drop_app_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const configuration_drop_app_response &) const; + bool operator < (const configuration_drop_app_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(configuration_drop_app_response &a, configuration_drop_app_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_drop_app_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_drop_app_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_list_apps_response__isset -{ - _configuration_list_apps_response__isset() : err(false), infos(false) {} - bool err : 1; - bool infos : 1; +typedef struct _configuration_list_apps_response__isset { + _configuration_list_apps_response__isset() : err(false), infos(false) {} + bool err :1; + bool infos :1; } _configuration_list_apps_response__isset; -class configuration_list_apps_response -{ -public: - configuration_list_apps_response(const configuration_list_apps_response &); - configuration_list_apps_response(configuration_list_apps_response &&); - configuration_list_apps_response &operator=(const configuration_list_apps_response &); - configuration_list_apps_response &operator=(configuration_list_apps_response &&); - configuration_list_apps_response() {} +class configuration_list_apps_response { + public: + + configuration_list_apps_response(const configuration_list_apps_response&); + configuration_list_apps_response(configuration_list_apps_response&&); + configuration_list_apps_response& operator=(const configuration_list_apps_response&); + configuration_list_apps_response& operator=(configuration_list_apps_response&&); + configuration_list_apps_response() { + } - virtual ~configuration_list_apps_response() throw(); - ::dsn::error_code err; - std::vector<::dsn::app_info> infos; + virtual ~configuration_list_apps_response() throw(); + ::dsn::error_code err; + std::vector< ::dsn::app_info> infos; - _configuration_list_apps_response__isset __isset; + _configuration_list_apps_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - void __set_infos(const std::vector<::dsn::app_info> &val); + void __set_infos(const std::vector< ::dsn::app_info> & val); - bool operator==(const configuration_list_apps_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(infos == rhs.infos)) - return false; - return true; - } - bool operator!=(const configuration_list_apps_response &rhs) const { return !(*this == rhs); } + bool operator == (const configuration_list_apps_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(infos == rhs.infos)) + return false; + return true; + } + bool operator != (const configuration_list_apps_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const configuration_list_apps_response &) const; + bool operator < (const configuration_list_apps_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(configuration_list_apps_response &a, configuration_list_apps_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_list_apps_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_list_apps_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_list_nodes_response__isset -{ - _configuration_list_nodes_response__isset() : err(false), infos(false) {} - bool err : 1; - bool infos : 1; +typedef struct _configuration_list_nodes_response__isset { + _configuration_list_nodes_response__isset() : err(false), infos(false) {} + bool err :1; + bool infos :1; } _configuration_list_nodes_response__isset; -class configuration_list_nodes_response -{ -public: - configuration_list_nodes_response(const configuration_list_nodes_response &); - configuration_list_nodes_response(configuration_list_nodes_response &&); - configuration_list_nodes_response &operator=(const configuration_list_nodes_response &); - configuration_list_nodes_response &operator=(configuration_list_nodes_response &&); - configuration_list_nodes_response() {} +class configuration_list_nodes_response { + public: + + configuration_list_nodes_response(const configuration_list_nodes_response&); + configuration_list_nodes_response(configuration_list_nodes_response&&); + configuration_list_nodes_response& operator=(const configuration_list_nodes_response&); + configuration_list_nodes_response& operator=(configuration_list_nodes_response&&); + configuration_list_nodes_response() { + } - virtual ~configuration_list_nodes_response() throw(); - ::dsn::error_code err; - std::vector infos; + virtual ~configuration_list_nodes_response() throw(); + ::dsn::error_code err; + std::vector infos; - _configuration_list_nodes_response__isset __isset; + _configuration_list_nodes_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - void __set_infos(const std::vector &val); + void __set_infos(const std::vector & val); - bool operator==(const configuration_list_nodes_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(infos == rhs.infos)) - return false; - return true; - } - bool operator!=(const configuration_list_nodes_response &rhs) const { return !(*this == rhs); } + bool operator == (const configuration_list_nodes_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(infos == rhs.infos)) + return false; + return true; + } + bool operator != (const configuration_list_nodes_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const configuration_list_nodes_response &) const; + bool operator < (const configuration_list_nodes_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(configuration_list_nodes_response &a, configuration_list_nodes_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_list_nodes_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_list_nodes_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_cluster_info_response__isset -{ - _configuration_cluster_info_response__isset() : err(false), keys(false), values(false) {} - bool err : 1; - bool keys : 1; - bool values : 1; +typedef struct _configuration_cluster_info_response__isset { + _configuration_cluster_info_response__isset() : err(false), keys(false), values(false) {} + bool err :1; + bool keys :1; + bool values :1; } _configuration_cluster_info_response__isset; -class configuration_cluster_info_response -{ -public: - configuration_cluster_info_response(const configuration_cluster_info_response &); - configuration_cluster_info_response(configuration_cluster_info_response &&); - configuration_cluster_info_response &operator=(const configuration_cluster_info_response &); - configuration_cluster_info_response &operator=(configuration_cluster_info_response &&); - configuration_cluster_info_response() {} - - virtual ~configuration_cluster_info_response() throw(); - ::dsn::error_code err; - std::vector keys; - std::vector values; - - _configuration_cluster_info_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_keys(const std::vector &val); - - void __set_values(const std::vector &val); - - bool operator==(const configuration_cluster_info_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(keys == rhs.keys)) - return false; - if (!(values == rhs.values)) - return false; - return true; - } - bool operator!=(const configuration_cluster_info_response &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_cluster_info_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_cluster_info_response { + public: + + configuration_cluster_info_response(const configuration_cluster_info_response&); + configuration_cluster_info_response(configuration_cluster_info_response&&); + configuration_cluster_info_response& operator=(const configuration_cluster_info_response&); + configuration_cluster_info_response& operator=(configuration_cluster_info_response&&); + configuration_cluster_info_response() { + } + + virtual ~configuration_cluster_info_response() throw(); + ::dsn::error_code err; + std::vector keys; + std::vector values; + + _configuration_cluster_info_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_keys(const std::vector & val); + + void __set_values(const std::vector & val); + + bool operator == (const configuration_cluster_info_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(keys == rhs.keys)) + return false; + if (!(values == rhs.values)) + return false; + return true; + } + bool operator != (const configuration_cluster_info_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_cluster_info_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_cluster_info_response &a, configuration_cluster_info_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_cluster_info_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_cluster_info_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_recall_app_response__isset -{ - _configuration_recall_app_response__isset() : err(false), info(false) {} - bool err : 1; - bool info : 1; +typedef struct _configuration_recall_app_response__isset { + _configuration_recall_app_response__isset() : err(false), info(false) {} + bool err :1; + bool info :1; } _configuration_recall_app_response__isset; -class configuration_recall_app_response -{ -public: - configuration_recall_app_response(const configuration_recall_app_response &); - configuration_recall_app_response(configuration_recall_app_response &&); - configuration_recall_app_response &operator=(const configuration_recall_app_response &); - configuration_recall_app_response &operator=(configuration_recall_app_response &&); - configuration_recall_app_response() {} +class configuration_recall_app_response { + public: + + configuration_recall_app_response(const configuration_recall_app_response&); + configuration_recall_app_response(configuration_recall_app_response&&); + configuration_recall_app_response& operator=(const configuration_recall_app_response&); + configuration_recall_app_response& operator=(configuration_recall_app_response&&); + configuration_recall_app_response() { + } - virtual ~configuration_recall_app_response() throw(); - ::dsn::error_code err; - ::dsn::app_info info; + virtual ~configuration_recall_app_response() throw(); + ::dsn::error_code err; + ::dsn::app_info info; - _configuration_recall_app_response__isset __isset; + _configuration_recall_app_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - void __set_info(const ::dsn::app_info &val); + void __set_info(const ::dsn::app_info& val); - bool operator==(const configuration_recall_app_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(info == rhs.info)) - return false; - return true; - } - bool operator!=(const configuration_recall_app_response &rhs) const { return !(*this == rhs); } + bool operator == (const configuration_recall_app_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(info == rhs.info)) + return false; + return true; + } + bool operator != (const configuration_recall_app_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const configuration_recall_app_response &) const; + bool operator < (const configuration_recall_app_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(configuration_recall_app_response &a, configuration_recall_app_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_recall_app_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_recall_app_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_replica_decree_request__isset -{ - _query_replica_decree_request__isset() : pid(false), node(false) {} - bool pid : 1; - bool node : 1; +typedef struct _query_replica_decree_request__isset { + _query_replica_decree_request__isset() : pid(false), node(false) {} + bool pid :1; + bool node :1; } _query_replica_decree_request__isset; -class query_replica_decree_request -{ -public: - query_replica_decree_request(const query_replica_decree_request &); - query_replica_decree_request(query_replica_decree_request &&); - query_replica_decree_request &operator=(const query_replica_decree_request &); - query_replica_decree_request &operator=(query_replica_decree_request &&); - query_replica_decree_request() {} +class query_replica_decree_request { + public: - virtual ~query_replica_decree_request() throw(); - ::dsn::gpid pid; - ::dsn::rpc_address node; + query_replica_decree_request(const query_replica_decree_request&); + query_replica_decree_request(query_replica_decree_request&&); + query_replica_decree_request& operator=(const query_replica_decree_request&); + query_replica_decree_request& operator=(query_replica_decree_request&&); + query_replica_decree_request() { + } - _query_replica_decree_request__isset __isset; + virtual ~query_replica_decree_request() throw(); + ::dsn::gpid pid; + ::dsn::rpc_address node; - void __set_pid(const ::dsn::gpid &val); + _query_replica_decree_request__isset __isset; - void __set_node(const ::dsn::rpc_address &val); + void __set_pid(const ::dsn::gpid& val); - bool operator==(const query_replica_decree_request &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(node == rhs.node)) - return false; - return true; - } - bool operator!=(const query_replica_decree_request &rhs) const { return !(*this == rhs); } + void __set_node(const ::dsn::rpc_address& val); - bool operator<(const query_replica_decree_request &) const; + bool operator == (const query_replica_decree_request & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(node == rhs.node)) + return false; + return true; + } + bool operator != (const query_replica_decree_request &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const query_replica_decree_request & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(query_replica_decree_request &a, query_replica_decree_request &b); -inline std::ostream &operator<<(std::ostream &out, const query_replica_decree_request &obj) +inline std::ostream& operator<<(std::ostream& out, const query_replica_decree_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_replica_decree_response__isset -{ - _query_replica_decree_response__isset() : err(false), last_decree(false) {} - bool err : 1; - bool last_decree : 1; +typedef struct _query_replica_decree_response__isset { + _query_replica_decree_response__isset() : err(false), last_decree(false) {} + bool err :1; + bool last_decree :1; } _query_replica_decree_response__isset; -class query_replica_decree_response -{ -public: - query_replica_decree_response(const query_replica_decree_response &); - query_replica_decree_response(query_replica_decree_response &&); - query_replica_decree_response &operator=(const query_replica_decree_response &); - query_replica_decree_response &operator=(query_replica_decree_response &&); - query_replica_decree_response() : last_decree(0) {} +class query_replica_decree_response { + public: - virtual ~query_replica_decree_response() throw(); - ::dsn::error_code err; - int64_t last_decree; + query_replica_decree_response(const query_replica_decree_response&); + query_replica_decree_response(query_replica_decree_response&&); + query_replica_decree_response& operator=(const query_replica_decree_response&); + query_replica_decree_response& operator=(query_replica_decree_response&&); + query_replica_decree_response() : last_decree(0) { + } - _query_replica_decree_response__isset __isset; + virtual ~query_replica_decree_response() throw(); + ::dsn::error_code err; + int64_t last_decree; - void __set_err(const ::dsn::error_code &val); + _query_replica_decree_response__isset __isset; - void __set_last_decree(const int64_t val); + void __set_err(const ::dsn::error_code& val); - bool operator==(const query_replica_decree_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(last_decree == rhs.last_decree)) - return false; - return true; - } - bool operator!=(const query_replica_decree_response &rhs) const { return !(*this == rhs); } + void __set_last_decree(const int64_t val); - bool operator<(const query_replica_decree_response &) const; + bool operator == (const query_replica_decree_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(last_decree == rhs.last_decree)) + return false; + return true; + } + bool operator != (const query_replica_decree_response &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const query_replica_decree_response & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(query_replica_decree_response &a, query_replica_decree_response &b); -inline std::ostream &operator<<(std::ostream &out, const query_replica_decree_response &obj) +inline std::ostream& operator<<(std::ostream& out, const query_replica_decree_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _replica_info__isset -{ - _replica_info__isset() - : pid(false), - ballot(false), - status(false), - last_committed_decree(false), - last_prepared_decree(false), - last_durable_decree(false), - app_type(false), - disk_tag(false) - { - } - bool pid : 1; - bool ballot : 1; - bool status : 1; - bool last_committed_decree : 1; - bool last_prepared_decree : 1; - bool last_durable_decree : 1; - bool app_type : 1; - bool disk_tag : 1; +typedef struct _replica_info__isset { + _replica_info__isset() : pid(false), ballot(false), status(false), last_committed_decree(false), last_prepared_decree(false), last_durable_decree(false), app_type(false), disk_tag(false) {} + bool pid :1; + bool ballot :1; + bool status :1; + bool last_committed_decree :1; + bool last_prepared_decree :1; + bool last_durable_decree :1; + bool app_type :1; + bool disk_tag :1; } _replica_info__isset; -class replica_info -{ -public: - replica_info(const replica_info &); - replica_info(replica_info &&); - replica_info &operator=(const replica_info &); - replica_info &operator=(replica_info &&); - replica_info() - : ballot(0), - status((partition_status::type)0), - last_committed_decree(0), - last_prepared_decree(0), - last_durable_decree(0), - app_type(), - disk_tag() - { - } - - virtual ~replica_info() throw(); - ::dsn::gpid pid; - int64_t ballot; - partition_status::type status; - int64_t last_committed_decree; - int64_t last_prepared_decree; - int64_t last_durable_decree; - std::string app_type; - std::string disk_tag; - - _replica_info__isset __isset; - - void __set_pid(const ::dsn::gpid &val); - - void __set_ballot(const int64_t val); - - void __set_status(const partition_status::type val); - - void __set_last_committed_decree(const int64_t val); - - void __set_last_prepared_decree(const int64_t val); - - void __set_last_durable_decree(const int64_t val); - - void __set_app_type(const std::string &val); - - void __set_disk_tag(const std::string &val); - - bool operator==(const replica_info &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(status == rhs.status)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (!(last_prepared_decree == rhs.last_prepared_decree)) - return false; - if (!(last_durable_decree == rhs.last_durable_decree)) - return false; - if (!(app_type == rhs.app_type)) - return false; - if (!(disk_tag == rhs.disk_tag)) - return false; - return true; - } - bool operator!=(const replica_info &rhs) const { return !(*this == rhs); } - - bool operator<(const replica_info &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class replica_info { + public: + + replica_info(const replica_info&); + replica_info(replica_info&&); + replica_info& operator=(const replica_info&); + replica_info& operator=(replica_info&&); + replica_info() : ballot(0), status((partition_status::type)0), last_committed_decree(0), last_prepared_decree(0), last_durable_decree(0), app_type(), disk_tag() { + } + + virtual ~replica_info() throw(); + ::dsn::gpid pid; + int64_t ballot; + partition_status::type status; + int64_t last_committed_decree; + int64_t last_prepared_decree; + int64_t last_durable_decree; + std::string app_type; + std::string disk_tag; + + _replica_info__isset __isset; + + void __set_pid(const ::dsn::gpid& val); + + void __set_ballot(const int64_t val); + + void __set_status(const partition_status::type val); + + void __set_last_committed_decree(const int64_t val); + + void __set_last_prepared_decree(const int64_t val); + + void __set_last_durable_decree(const int64_t val); + + void __set_app_type(const std::string& val); + + void __set_disk_tag(const std::string& val); + + bool operator == (const replica_info & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(status == rhs.status)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (!(last_prepared_decree == rhs.last_prepared_decree)) + return false; + if (!(last_durable_decree == rhs.last_durable_decree)) + return false; + if (!(app_type == rhs.app_type)) + return false; + if (!(disk_tag == rhs.disk_tag)) + return false; + return true; + } + bool operator != (const replica_info &rhs) const { + return !(*this == rhs); + } + + bool operator < (const replica_info & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(replica_info &a, replica_info &b); -inline std::ostream &operator<<(std::ostream &out, const replica_info &obj) +inline std::ostream& operator<<(std::ostream& out, const replica_info& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_replica_info_request__isset -{ - _query_replica_info_request__isset() : node(false) {} - bool node : 1; +typedef struct _query_replica_info_request__isset { + _query_replica_info_request__isset() : node(false) {} + bool node :1; } _query_replica_info_request__isset; -class query_replica_info_request -{ -public: - query_replica_info_request(const query_replica_info_request &); - query_replica_info_request(query_replica_info_request &&); - query_replica_info_request &operator=(const query_replica_info_request &); - query_replica_info_request &operator=(query_replica_info_request &&); - query_replica_info_request() {} +class query_replica_info_request { + public: - virtual ~query_replica_info_request() throw(); - ::dsn::rpc_address node; + query_replica_info_request(const query_replica_info_request&); + query_replica_info_request(query_replica_info_request&&); + query_replica_info_request& operator=(const query_replica_info_request&); + query_replica_info_request& operator=(query_replica_info_request&&); + query_replica_info_request() { + } - _query_replica_info_request__isset __isset; + virtual ~query_replica_info_request() throw(); + ::dsn::rpc_address node; - void __set_node(const ::dsn::rpc_address &val); + _query_replica_info_request__isset __isset; - bool operator==(const query_replica_info_request &rhs) const - { - if (!(node == rhs.node)) - return false; - return true; - } - bool operator!=(const query_replica_info_request &rhs) const { return !(*this == rhs); } + void __set_node(const ::dsn::rpc_address& val); - bool operator<(const query_replica_info_request &) const; + bool operator == (const query_replica_info_request & rhs) const + { + if (!(node == rhs.node)) + return false; + return true; + } + bool operator != (const query_replica_info_request &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const query_replica_info_request & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(query_replica_info_request &a, query_replica_info_request &b); -inline std::ostream &operator<<(std::ostream &out, const query_replica_info_request &obj) +inline std::ostream& operator<<(std::ostream& out, const query_replica_info_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_replica_info_response__isset -{ - _query_replica_info_response__isset() : err(false), replicas(false) {} - bool err : 1; - bool replicas : 1; +typedef struct _query_replica_info_response__isset { + _query_replica_info_response__isset() : err(false), replicas(false) {} + bool err :1; + bool replicas :1; } _query_replica_info_response__isset; -class query_replica_info_response -{ -public: - query_replica_info_response(const query_replica_info_response &); - query_replica_info_response(query_replica_info_response &&); - query_replica_info_response &operator=(const query_replica_info_response &); - query_replica_info_response &operator=(query_replica_info_response &&); - query_replica_info_response() {} +class query_replica_info_response { + public: + + query_replica_info_response(const query_replica_info_response&); + query_replica_info_response(query_replica_info_response&&); + query_replica_info_response& operator=(const query_replica_info_response&); + query_replica_info_response& operator=(query_replica_info_response&&); + query_replica_info_response() { + } - virtual ~query_replica_info_response() throw(); - ::dsn::error_code err; - std::vector replicas; + virtual ~query_replica_info_response() throw(); + ::dsn::error_code err; + std::vector replicas; - _query_replica_info_response__isset __isset; + _query_replica_info_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - void __set_replicas(const std::vector &val); + void __set_replicas(const std::vector & val); - bool operator==(const query_replica_info_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(replicas == rhs.replicas)) - return false; - return true; - } - bool operator!=(const query_replica_info_response &rhs) const { return !(*this == rhs); } + bool operator == (const query_replica_info_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(replicas == rhs.replicas)) + return false; + return true; + } + bool operator != (const query_replica_info_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const query_replica_info_response &) const; + bool operator < (const query_replica_info_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(query_replica_info_response &a, query_replica_info_response &b); -inline std::ostream &operator<<(std::ostream &out, const query_replica_info_response &obj) +inline std::ostream& operator<<(std::ostream& out, const query_replica_info_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _disk_info__isset -{ - _disk_info__isset() - : tag(false), - full_dir(false), - disk_capacity_mb(false), - disk_available_mb(false), - holding_primary_replica_counts(false), - holding_secondary_replica_counts(false) - { - } - bool tag : 1; - bool full_dir : 1; - bool disk_capacity_mb : 1; - bool disk_available_mb : 1; - bool holding_primary_replica_counts : 1; - bool holding_secondary_replica_counts : 1; +typedef struct _disk_info__isset { + _disk_info__isset() : tag(false), full_dir(false), disk_capacity_mb(false), disk_available_mb(false), holding_primary_replica_counts(false), holding_secondary_replica_counts(false) {} + bool tag :1; + bool full_dir :1; + bool disk_capacity_mb :1; + bool disk_available_mb :1; + bool holding_primary_replica_counts :1; + bool holding_secondary_replica_counts :1; } _disk_info__isset; -class disk_info -{ -public: - disk_info(const disk_info &); - disk_info(disk_info &&); - disk_info &operator=(const disk_info &); - disk_info &operator=(disk_info &&); - disk_info() : tag(), full_dir(), disk_capacity_mb(0), disk_available_mb(0) {} - - virtual ~disk_info() throw(); - std::string tag; - std::string full_dir; - int64_t disk_capacity_mb; - int64_t disk_available_mb; - std::map holding_primary_replica_counts; - std::map holding_secondary_replica_counts; - - _disk_info__isset __isset; - - void __set_tag(const std::string &val); - - void __set_full_dir(const std::string &val); - - void __set_disk_capacity_mb(const int64_t val); - - void __set_disk_available_mb(const int64_t val); - - void __set_holding_primary_replica_counts(const std::map &val); - - void __set_holding_secondary_replica_counts(const std::map &val); - - bool operator==(const disk_info &rhs) const - { - if (!(tag == rhs.tag)) - return false; - if (!(full_dir == rhs.full_dir)) - return false; - if (!(disk_capacity_mb == rhs.disk_capacity_mb)) - return false; - if (!(disk_available_mb == rhs.disk_available_mb)) - return false; - if (!(holding_primary_replica_counts == rhs.holding_primary_replica_counts)) - return false; - if (!(holding_secondary_replica_counts == rhs.holding_secondary_replica_counts)) - return false; - return true; - } - bool operator!=(const disk_info &rhs) const { return !(*this == rhs); } - - bool operator<(const disk_info &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class disk_info { + public: + + disk_info(const disk_info&); + disk_info(disk_info&&); + disk_info& operator=(const disk_info&); + disk_info& operator=(disk_info&&); + disk_info() : tag(), full_dir(), disk_capacity_mb(0), disk_available_mb(0) { + } + + virtual ~disk_info() throw(); + std::string tag; + std::string full_dir; + int64_t disk_capacity_mb; + int64_t disk_available_mb; + std::map holding_primary_replica_counts; + std::map holding_secondary_replica_counts; + + _disk_info__isset __isset; + + void __set_tag(const std::string& val); + + void __set_full_dir(const std::string& val); + + void __set_disk_capacity_mb(const int64_t val); + + void __set_disk_available_mb(const int64_t val); + + void __set_holding_primary_replica_counts(const std::map & val); + + void __set_holding_secondary_replica_counts(const std::map & val); + + bool operator == (const disk_info & rhs) const + { + if (!(tag == rhs.tag)) + return false; + if (!(full_dir == rhs.full_dir)) + return false; + if (!(disk_capacity_mb == rhs.disk_capacity_mb)) + return false; + if (!(disk_available_mb == rhs.disk_available_mb)) + return false; + if (!(holding_primary_replica_counts == rhs.holding_primary_replica_counts)) + return false; + if (!(holding_secondary_replica_counts == rhs.holding_secondary_replica_counts)) + return false; + return true; + } + bool operator != (const disk_info &rhs) const { + return !(*this == rhs); + } + + bool operator < (const disk_info & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(disk_info &a, disk_info &b); -inline std::ostream &operator<<(std::ostream &out, const disk_info &obj) +inline std::ostream& operator<<(std::ostream& out, const disk_info& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_disk_info_request__isset -{ - _query_disk_info_request__isset() : node(false), app_name(false) {} - bool node : 1; - bool app_name : 1; +typedef struct _query_disk_info_request__isset { + _query_disk_info_request__isset() : node(false), app_name(false) {} + bool node :1; + bool app_name :1; } _query_disk_info_request__isset; -class query_disk_info_request -{ -public: - query_disk_info_request(const query_disk_info_request &); - query_disk_info_request(query_disk_info_request &&); - query_disk_info_request &operator=(const query_disk_info_request &); - query_disk_info_request &operator=(query_disk_info_request &&); - query_disk_info_request() : app_name() {} +class query_disk_info_request { + public: + + query_disk_info_request(const query_disk_info_request&); + query_disk_info_request(query_disk_info_request&&); + query_disk_info_request& operator=(const query_disk_info_request&); + query_disk_info_request& operator=(query_disk_info_request&&); + query_disk_info_request() : app_name() { + } - virtual ~query_disk_info_request() throw(); - ::dsn::rpc_address node; - std::string app_name; + virtual ~query_disk_info_request() throw(); + ::dsn::rpc_address node; + std::string app_name; - _query_disk_info_request__isset __isset; + _query_disk_info_request__isset __isset; - void __set_node(const ::dsn::rpc_address &val); + void __set_node(const ::dsn::rpc_address& val); - void __set_app_name(const std::string &val); + void __set_app_name(const std::string& val); - bool operator==(const query_disk_info_request &rhs) const - { - if (!(node == rhs.node)) - return false; - if (!(app_name == rhs.app_name)) - return false; - return true; - } - bool operator!=(const query_disk_info_request &rhs) const { return !(*this == rhs); } + bool operator == (const query_disk_info_request & rhs) const + { + if (!(node == rhs.node)) + return false; + if (!(app_name == rhs.app_name)) + return false; + return true; + } + bool operator != (const query_disk_info_request &rhs) const { + return !(*this == rhs); + } - bool operator<(const query_disk_info_request &) const; + bool operator < (const query_disk_info_request & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(query_disk_info_request &a, query_disk_info_request &b); -inline std::ostream &operator<<(std::ostream &out, const query_disk_info_request &obj) +inline std::ostream& operator<<(std::ostream& out, const query_disk_info_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_disk_info_response__isset -{ - _query_disk_info_response__isset() - : err(false), total_capacity_mb(false), total_available_mb(false), disk_infos(false) - { - } - bool err : 1; - bool total_capacity_mb : 1; - bool total_available_mb : 1; - bool disk_infos : 1; +typedef struct _query_disk_info_response__isset { + _query_disk_info_response__isset() : err(false), total_capacity_mb(false), total_available_mb(false), disk_infos(false) {} + bool err :1; + bool total_capacity_mb :1; + bool total_available_mb :1; + bool disk_infos :1; } _query_disk_info_response__isset; -class query_disk_info_response -{ -public: - query_disk_info_response(const query_disk_info_response &); - query_disk_info_response(query_disk_info_response &&); - query_disk_info_response &operator=(const query_disk_info_response &); - query_disk_info_response &operator=(query_disk_info_response &&); - query_disk_info_response() : total_capacity_mb(0), total_available_mb(0) {} +class query_disk_info_response { + public: + + query_disk_info_response(const query_disk_info_response&); + query_disk_info_response(query_disk_info_response&&); + query_disk_info_response& operator=(const query_disk_info_response&); + query_disk_info_response& operator=(query_disk_info_response&&); + query_disk_info_response() : total_capacity_mb(0), total_available_mb(0) { + } - virtual ~query_disk_info_response() throw(); - ::dsn::error_code err; - int64_t total_capacity_mb; - int64_t total_available_mb; - std::vector disk_infos; + virtual ~query_disk_info_response() throw(); + ::dsn::error_code err; + int64_t total_capacity_mb; + int64_t total_available_mb; + std::vector disk_infos; - _query_disk_info_response__isset __isset; + _query_disk_info_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - void __set_total_capacity_mb(const int64_t val); + void __set_total_capacity_mb(const int64_t val); - void __set_total_available_mb(const int64_t val); + void __set_total_available_mb(const int64_t val); - void __set_disk_infos(const std::vector &val); + void __set_disk_infos(const std::vector & val); - bool operator==(const query_disk_info_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(total_capacity_mb == rhs.total_capacity_mb)) - return false; - if (!(total_available_mb == rhs.total_available_mb)) - return false; - if (!(disk_infos == rhs.disk_infos)) - return false; - return true; - } - bool operator!=(const query_disk_info_response &rhs) const { return !(*this == rhs); } + bool operator == (const query_disk_info_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(total_capacity_mb == rhs.total_capacity_mb)) + return false; + if (!(total_available_mb == rhs.total_available_mb)) + return false; + if (!(disk_infos == rhs.disk_infos)) + return false; + return true; + } + bool operator != (const query_disk_info_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const query_disk_info_response &) const; + bool operator < (const query_disk_info_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(query_disk_info_response &a, query_disk_info_response &b); -inline std::ostream &operator<<(std::ostream &out, const query_disk_info_response &obj) +inline std::ostream& operator<<(std::ostream& out, const query_disk_info_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_app_info_request__isset -{ - _query_app_info_request__isset() : meta_server(false) {} - bool meta_server : 1; +typedef struct _query_app_info_request__isset { + _query_app_info_request__isset() : meta_server(false) {} + bool meta_server :1; } _query_app_info_request__isset; -class query_app_info_request -{ -public: - query_app_info_request(const query_app_info_request &); - query_app_info_request(query_app_info_request &&); - query_app_info_request &operator=(const query_app_info_request &); - query_app_info_request &operator=(query_app_info_request &&); - query_app_info_request() {} +class query_app_info_request { + public: - virtual ~query_app_info_request() throw(); - ::dsn::rpc_address meta_server; + query_app_info_request(const query_app_info_request&); + query_app_info_request(query_app_info_request&&); + query_app_info_request& operator=(const query_app_info_request&); + query_app_info_request& operator=(query_app_info_request&&); + query_app_info_request() { + } - _query_app_info_request__isset __isset; + virtual ~query_app_info_request() throw(); + ::dsn::rpc_address meta_server; - void __set_meta_server(const ::dsn::rpc_address &val); + _query_app_info_request__isset __isset; - bool operator==(const query_app_info_request &rhs) const - { - if (!(meta_server == rhs.meta_server)) - return false; - return true; - } - bool operator!=(const query_app_info_request &rhs) const { return !(*this == rhs); } + void __set_meta_server(const ::dsn::rpc_address& val); - bool operator<(const query_app_info_request &) const; + bool operator == (const query_app_info_request & rhs) const + { + if (!(meta_server == rhs.meta_server)) + return false; + return true; + } + bool operator != (const query_app_info_request &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const query_app_info_request & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(query_app_info_request &a, query_app_info_request &b); -inline std::ostream &operator<<(std::ostream &out, const query_app_info_request &obj) +inline std::ostream& operator<<(std::ostream& out, const query_app_info_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_app_info_response__isset -{ - _query_app_info_response__isset() : err(false), apps(false) {} - bool err : 1; - bool apps : 1; +typedef struct _query_app_info_response__isset { + _query_app_info_response__isset() : err(false), apps(false) {} + bool err :1; + bool apps :1; } _query_app_info_response__isset; -class query_app_info_response -{ -public: - query_app_info_response(const query_app_info_response &); - query_app_info_response(query_app_info_response &&); - query_app_info_response &operator=(const query_app_info_response &); - query_app_info_response &operator=(query_app_info_response &&); - query_app_info_response() {} +class query_app_info_response { + public: - virtual ~query_app_info_response() throw(); - ::dsn::error_code err; - std::vector<::dsn::app_info> apps; + query_app_info_response(const query_app_info_response&); + query_app_info_response(query_app_info_response&&); + query_app_info_response& operator=(const query_app_info_response&); + query_app_info_response& operator=(query_app_info_response&&); + query_app_info_response() { + } - _query_app_info_response__isset __isset; + virtual ~query_app_info_response() throw(); + ::dsn::error_code err; + std::vector< ::dsn::app_info> apps; - void __set_err(const ::dsn::error_code &val); + _query_app_info_response__isset __isset; - void __set_apps(const std::vector<::dsn::app_info> &val); + void __set_err(const ::dsn::error_code& val); - bool operator==(const query_app_info_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(apps == rhs.apps)) - return false; - return true; - } - bool operator!=(const query_app_info_response &rhs) const { return !(*this == rhs); } + void __set_apps(const std::vector< ::dsn::app_info> & val); - bool operator<(const query_app_info_response &) const; + bool operator == (const query_app_info_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(apps == rhs.apps)) + return false; + return true; + } + bool operator != (const query_app_info_response &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const query_app_info_response & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(query_app_info_response &a, query_app_info_response &b); -inline std::ostream &operator<<(std::ostream &out, const query_app_info_response &obj) +inline std::ostream& operator<<(std::ostream& out, const query_app_info_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_recovery_request__isset -{ - _configuration_recovery_request__isset() - : recovery_set(false), skip_bad_nodes(false), skip_lost_partitions(false) - { - } - bool recovery_set : 1; - bool skip_bad_nodes : 1; - bool skip_lost_partitions : 1; +typedef struct _configuration_recovery_request__isset { + _configuration_recovery_request__isset() : recovery_set(false), skip_bad_nodes(false), skip_lost_partitions(false) {} + bool recovery_set :1; + bool skip_bad_nodes :1; + bool skip_lost_partitions :1; } _configuration_recovery_request__isset; -class configuration_recovery_request -{ -public: - configuration_recovery_request(const configuration_recovery_request &); - configuration_recovery_request(configuration_recovery_request &&); - configuration_recovery_request &operator=(const configuration_recovery_request &); - configuration_recovery_request &operator=(configuration_recovery_request &&); - configuration_recovery_request() : skip_bad_nodes(0), skip_lost_partitions(0) {} +class configuration_recovery_request { + public: + + configuration_recovery_request(const configuration_recovery_request&); + configuration_recovery_request(configuration_recovery_request&&); + configuration_recovery_request& operator=(const configuration_recovery_request&); + configuration_recovery_request& operator=(configuration_recovery_request&&); + configuration_recovery_request() : skip_bad_nodes(0), skip_lost_partitions(0) { + } - virtual ~configuration_recovery_request() throw(); - std::vector<::dsn::rpc_address> recovery_set; - bool skip_bad_nodes; - bool skip_lost_partitions; + virtual ~configuration_recovery_request() throw(); + std::vector< ::dsn::rpc_address> recovery_set; + bool skip_bad_nodes; + bool skip_lost_partitions; - _configuration_recovery_request__isset __isset; + _configuration_recovery_request__isset __isset; - void __set_recovery_set(const std::vector<::dsn::rpc_address> &val); + void __set_recovery_set(const std::vector< ::dsn::rpc_address> & val); - void __set_skip_bad_nodes(const bool val); + void __set_skip_bad_nodes(const bool val); - void __set_skip_lost_partitions(const bool val); + void __set_skip_lost_partitions(const bool val); - bool operator==(const configuration_recovery_request &rhs) const - { - if (!(recovery_set == rhs.recovery_set)) - return false; - if (!(skip_bad_nodes == rhs.skip_bad_nodes)) - return false; - if (!(skip_lost_partitions == rhs.skip_lost_partitions)) - return false; - return true; - } - bool operator!=(const configuration_recovery_request &rhs) const { return !(*this == rhs); } + bool operator == (const configuration_recovery_request & rhs) const + { + if (!(recovery_set == rhs.recovery_set)) + return false; + if (!(skip_bad_nodes == rhs.skip_bad_nodes)) + return false; + if (!(skip_lost_partitions == rhs.skip_lost_partitions)) + return false; + return true; + } + bool operator != (const configuration_recovery_request &rhs) const { + return !(*this == rhs); + } - bool operator<(const configuration_recovery_request &) const; + bool operator < (const configuration_recovery_request & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(configuration_recovery_request &a, configuration_recovery_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_recovery_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_recovery_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_recovery_response__isset -{ - _configuration_recovery_response__isset() : err(false), hint_message(false) {} - bool err : 1; - bool hint_message : 1; +typedef struct _configuration_recovery_response__isset { + _configuration_recovery_response__isset() : err(false), hint_message(false) {} + bool err :1; + bool hint_message :1; } _configuration_recovery_response__isset; -class configuration_recovery_response -{ -public: - configuration_recovery_response(const configuration_recovery_response &); - configuration_recovery_response(configuration_recovery_response &&); - configuration_recovery_response &operator=(const configuration_recovery_response &); - configuration_recovery_response &operator=(configuration_recovery_response &&); - configuration_recovery_response() : hint_message() {} +class configuration_recovery_response { + public: + + configuration_recovery_response(const configuration_recovery_response&); + configuration_recovery_response(configuration_recovery_response&&); + configuration_recovery_response& operator=(const configuration_recovery_response&); + configuration_recovery_response& operator=(configuration_recovery_response&&); + configuration_recovery_response() : hint_message() { + } - virtual ~configuration_recovery_response() throw(); - ::dsn::error_code err; - std::string hint_message; + virtual ~configuration_recovery_response() throw(); + ::dsn::error_code err; + std::string hint_message; - _configuration_recovery_response__isset __isset; + _configuration_recovery_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - void __set_hint_message(const std::string &val); + void __set_hint_message(const std::string& val); - bool operator==(const configuration_recovery_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(hint_message == rhs.hint_message)) - return false; - return true; - } - bool operator!=(const configuration_recovery_response &rhs) const { return !(*this == rhs); } + bool operator == (const configuration_recovery_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(hint_message == rhs.hint_message)) + return false; + return true; + } + bool operator != (const configuration_recovery_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const configuration_recovery_response &) const; + bool operator < (const configuration_recovery_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(configuration_recovery_response &a, configuration_recovery_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_recovery_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_recovery_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _policy_info__isset -{ - _policy_info__isset() : policy_name(false), backup_provider_type(false) {} - bool policy_name : 1; - bool backup_provider_type : 1; +typedef struct _policy_info__isset { + _policy_info__isset() : policy_name(false), backup_provider_type(false) {} + bool policy_name :1; + bool backup_provider_type :1; } _policy_info__isset; -class policy_info -{ -public: - policy_info(const policy_info &); - policy_info(policy_info &&); - policy_info &operator=(const policy_info &); - policy_info &operator=(policy_info &&); - policy_info() : policy_name(), backup_provider_type() {} +class policy_info { + public: + + policy_info(const policy_info&); + policy_info(policy_info&&); + policy_info& operator=(const policy_info&); + policy_info& operator=(policy_info&&); + policy_info() : policy_name(), backup_provider_type() { + } - virtual ~policy_info() throw(); - std::string policy_name; - std::string backup_provider_type; + virtual ~policy_info() throw(); + std::string policy_name; + std::string backup_provider_type; - _policy_info__isset __isset; + _policy_info__isset __isset; - void __set_policy_name(const std::string &val); + void __set_policy_name(const std::string& val); - void __set_backup_provider_type(const std::string &val); + void __set_backup_provider_type(const std::string& val); - bool operator==(const policy_info &rhs) const - { - if (!(policy_name == rhs.policy_name)) - return false; - if (!(backup_provider_type == rhs.backup_provider_type)) - return false; - return true; - } - bool operator!=(const policy_info &rhs) const { return !(*this == rhs); } + bool operator == (const policy_info & rhs) const + { + if (!(policy_name == rhs.policy_name)) + return false; + if (!(backup_provider_type == rhs.backup_provider_type)) + return false; + return true; + } + bool operator != (const policy_info &rhs) const { + return !(*this == rhs); + } - bool operator<(const policy_info &) const; + bool operator < (const policy_info & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(policy_info &a, policy_info &b); -inline std::ostream &operator<<(std::ostream &out, const policy_info &obj) +inline std::ostream& operator<<(std::ostream& out, const policy_info& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_restore_request__isset -{ - _configuration_restore_request__isset() - : cluster_name(false), - policy_name(false), - time_stamp(false), - app_name(false), - app_id(false), - new_app_name(false), - backup_provider_name(false), - skip_bad_partition(false) - { - } - bool cluster_name : 1; - bool policy_name : 1; - bool time_stamp : 1; - bool app_name : 1; - bool app_id : 1; - bool new_app_name : 1; - bool backup_provider_name : 1; - bool skip_bad_partition : 1; +typedef struct _configuration_restore_request__isset { + _configuration_restore_request__isset() : cluster_name(false), policy_name(false), time_stamp(false), app_name(false), app_id(false), new_app_name(false), backup_provider_name(false), skip_bad_partition(false) {} + bool cluster_name :1; + bool policy_name :1; + bool time_stamp :1; + bool app_name :1; + bool app_id :1; + bool new_app_name :1; + bool backup_provider_name :1; + bool skip_bad_partition :1; } _configuration_restore_request__isset; -class configuration_restore_request -{ -public: - configuration_restore_request(const configuration_restore_request &); - configuration_restore_request(configuration_restore_request &&); - configuration_restore_request &operator=(const configuration_restore_request &); - configuration_restore_request &operator=(configuration_restore_request &&); - configuration_restore_request() - : cluster_name(), - policy_name(), - time_stamp(0), - app_name(), - app_id(0), - new_app_name(), - backup_provider_name(), - skip_bad_partition(0) - { - } - - virtual ~configuration_restore_request() throw(); - std::string cluster_name; - std::string policy_name; - int64_t time_stamp; - std::string app_name; - int32_t app_id; - std::string new_app_name; - std::string backup_provider_name; - bool skip_bad_partition; - - _configuration_restore_request__isset __isset; - - void __set_cluster_name(const std::string &val); - - void __set_policy_name(const std::string &val); - - void __set_time_stamp(const int64_t val); - - void __set_app_name(const std::string &val); - - void __set_app_id(const int32_t val); - - void __set_new_app_name(const std::string &val); - - void __set_backup_provider_name(const std::string &val); - - void __set_skip_bad_partition(const bool val); - - bool operator==(const configuration_restore_request &rhs) const - { - if (!(cluster_name == rhs.cluster_name)) - return false; - if (!(policy_name == rhs.policy_name)) - return false; - if (!(time_stamp == rhs.time_stamp)) - return false; - if (!(app_name == rhs.app_name)) - return false; - if (!(app_id == rhs.app_id)) - return false; - if (!(new_app_name == rhs.new_app_name)) - return false; - if (!(backup_provider_name == rhs.backup_provider_name)) - return false; - if (!(skip_bad_partition == rhs.skip_bad_partition)) - return false; - return true; - } - bool operator!=(const configuration_restore_request &rhs) const { return !(*this == rhs); } - - bool operator<(const configuration_restore_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_restore_request { + public: + + configuration_restore_request(const configuration_restore_request&); + configuration_restore_request(configuration_restore_request&&); + configuration_restore_request& operator=(const configuration_restore_request&); + configuration_restore_request& operator=(configuration_restore_request&&); + configuration_restore_request() : cluster_name(), policy_name(), time_stamp(0), app_name(), app_id(0), new_app_name(), backup_provider_name(), skip_bad_partition(0) { + } + + virtual ~configuration_restore_request() throw(); + std::string cluster_name; + std::string policy_name; + int64_t time_stamp; + std::string app_name; + int32_t app_id; + std::string new_app_name; + std::string backup_provider_name; + bool skip_bad_partition; + + _configuration_restore_request__isset __isset; + + void __set_cluster_name(const std::string& val); + + void __set_policy_name(const std::string& val); + + void __set_time_stamp(const int64_t val); + + void __set_app_name(const std::string& val); + + void __set_app_id(const int32_t val); + + void __set_new_app_name(const std::string& val); + + void __set_backup_provider_name(const std::string& val); + + void __set_skip_bad_partition(const bool val); + + bool operator == (const configuration_restore_request & rhs) const + { + if (!(cluster_name == rhs.cluster_name)) + return false; + if (!(policy_name == rhs.policy_name)) + return false; + if (!(time_stamp == rhs.time_stamp)) + return false; + if (!(app_name == rhs.app_name)) + return false; + if (!(app_id == rhs.app_id)) + return false; + if (!(new_app_name == rhs.new_app_name)) + return false; + if (!(backup_provider_name == rhs.backup_provider_name)) + return false; + if (!(skip_bad_partition == rhs.skip_bad_partition)) + return false; + return true; + } + bool operator != (const configuration_restore_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_restore_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_restore_request &a, configuration_restore_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_restore_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_restore_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _backup_request__isset -{ - _backup_request__isset() : pid(false), policy(false), app_name(false), backup_id(false) {} - bool pid : 1; - bool policy : 1; - bool app_name : 1; - bool backup_id : 1; +typedef struct _backup_request__isset { + _backup_request__isset() : pid(false), policy(false), app_name(false), backup_id(false) {} + bool pid :1; + bool policy :1; + bool app_name :1; + bool backup_id :1; } _backup_request__isset; -class backup_request -{ -public: - backup_request(const backup_request &); - backup_request(backup_request &&); - backup_request &operator=(const backup_request &); - backup_request &operator=(backup_request &&); - backup_request() : app_name(), backup_id(0) {} +class backup_request { + public: - virtual ~backup_request() throw(); - ::dsn::gpid pid; - policy_info policy; - std::string app_name; - int64_t backup_id; + backup_request(const backup_request&); + backup_request(backup_request&&); + backup_request& operator=(const backup_request&); + backup_request& operator=(backup_request&&); + backup_request() : app_name(), backup_id(0) { + } - _backup_request__isset __isset; + virtual ~backup_request() throw(); + ::dsn::gpid pid; + policy_info policy; + std::string app_name; + int64_t backup_id; - void __set_pid(const ::dsn::gpid &val); + _backup_request__isset __isset; - void __set_policy(const policy_info &val); + void __set_pid(const ::dsn::gpid& val); - void __set_app_name(const std::string &val); + void __set_policy(const policy_info& val); - void __set_backup_id(const int64_t val); + void __set_app_name(const std::string& val); - bool operator==(const backup_request &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(policy == rhs.policy)) - return false; - if (!(app_name == rhs.app_name)) - return false; - if (!(backup_id == rhs.backup_id)) - return false; - return true; - } - bool operator!=(const backup_request &rhs) const { return !(*this == rhs); } + void __set_backup_id(const int64_t val); - bool operator<(const backup_request &) const; + bool operator == (const backup_request & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(policy == rhs.policy)) + return false; + if (!(app_name == rhs.app_name)) + return false; + if (!(backup_id == rhs.backup_id)) + return false; + return true; + } + bool operator != (const backup_request &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const backup_request & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(backup_request &a, backup_request &b); -inline std::ostream &operator<<(std::ostream &out, const backup_request &obj) +inline std::ostream& operator<<(std::ostream& out, const backup_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _backup_response__isset -{ - _backup_response__isset() - : err(false), - pid(false), - progress(false), - policy_name(false), - backup_id(false), - checkpoint_total_size(false) - { - } - bool err : 1; - bool pid : 1; - bool progress : 1; - bool policy_name : 1; - bool backup_id : 1; - bool checkpoint_total_size : 1; +typedef struct _backup_response__isset { + _backup_response__isset() : err(false), pid(false), progress(false), policy_name(false), backup_id(false), checkpoint_total_size(false) {} + bool err :1; + bool pid :1; + bool progress :1; + bool policy_name :1; + bool backup_id :1; + bool checkpoint_total_size :1; } _backup_response__isset; -class backup_response -{ -public: - backup_response(const backup_response &); - backup_response(backup_response &&); - backup_response &operator=(const backup_response &); - backup_response &operator=(backup_response &&); - backup_response() : progress(0), policy_name(), backup_id(0), checkpoint_total_size(0) {} - - virtual ~backup_response() throw(); - ::dsn::error_code err; - ::dsn::gpid pid; - int32_t progress; - std::string policy_name; - int64_t backup_id; - int64_t checkpoint_total_size; - - _backup_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_pid(const ::dsn::gpid &val); - - void __set_progress(const int32_t val); - - void __set_policy_name(const std::string &val); - - void __set_backup_id(const int64_t val); - - void __set_checkpoint_total_size(const int64_t val); - - bool operator==(const backup_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(pid == rhs.pid)) - return false; - if (!(progress == rhs.progress)) - return false; - if (!(policy_name == rhs.policy_name)) - return false; - if (!(backup_id == rhs.backup_id)) - return false; - if (!(checkpoint_total_size == rhs.checkpoint_total_size)) - return false; - return true; - } - bool operator!=(const backup_response &rhs) const { return !(*this == rhs); } - - bool operator<(const backup_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class backup_response { + public: + + backup_response(const backup_response&); + backup_response(backup_response&&); + backup_response& operator=(const backup_response&); + backup_response& operator=(backup_response&&); + backup_response() : progress(0), policy_name(), backup_id(0), checkpoint_total_size(0) { + } + + virtual ~backup_response() throw(); + ::dsn::error_code err; + ::dsn::gpid pid; + int32_t progress; + std::string policy_name; + int64_t backup_id; + int64_t checkpoint_total_size; + + _backup_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_pid(const ::dsn::gpid& val); + + void __set_progress(const int32_t val); + + void __set_policy_name(const std::string& val); + + void __set_backup_id(const int64_t val); + + void __set_checkpoint_total_size(const int64_t val); + + bool operator == (const backup_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(pid == rhs.pid)) + return false; + if (!(progress == rhs.progress)) + return false; + if (!(policy_name == rhs.policy_name)) + return false; + if (!(backup_id == rhs.backup_id)) + return false; + if (!(checkpoint_total_size == rhs.checkpoint_total_size)) + return false; + return true; + } + bool operator != (const backup_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const backup_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(backup_response &a, backup_response &b); -inline std::ostream &operator<<(std::ostream &out, const backup_response &obj) +inline std::ostream& operator<<(std::ostream& out, const backup_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _backup_clear_request__isset -{ - _backup_clear_request__isset() : pid(false), policy_name(false) {} - bool pid : 1; - bool policy_name : 1; +typedef struct _backup_clear_request__isset { + _backup_clear_request__isset() : pid(false), policy_name(false) {} + bool pid :1; + bool policy_name :1; } _backup_clear_request__isset; -class backup_clear_request -{ -public: - backup_clear_request(const backup_clear_request &); - backup_clear_request(backup_clear_request &&); - backup_clear_request &operator=(const backup_clear_request &); - backup_clear_request &operator=(backup_clear_request &&); - backup_clear_request() : policy_name() {} +class backup_clear_request { + public: + + backup_clear_request(const backup_clear_request&); + backup_clear_request(backup_clear_request&&); + backup_clear_request& operator=(const backup_clear_request&); + backup_clear_request& operator=(backup_clear_request&&); + backup_clear_request() : policy_name() { + } - virtual ~backup_clear_request() throw(); - ::dsn::gpid pid; - std::string policy_name; + virtual ~backup_clear_request() throw(); + ::dsn::gpid pid; + std::string policy_name; - _backup_clear_request__isset __isset; + _backup_clear_request__isset __isset; - void __set_pid(const ::dsn::gpid &val); + void __set_pid(const ::dsn::gpid& val); - void __set_policy_name(const std::string &val); + void __set_policy_name(const std::string& val); - bool operator==(const backup_clear_request &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(policy_name == rhs.policy_name)) - return false; - return true; - } - bool operator!=(const backup_clear_request &rhs) const { return !(*this == rhs); } + bool operator == (const backup_clear_request & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(policy_name == rhs.policy_name)) + return false; + return true; + } + bool operator != (const backup_clear_request &rhs) const { + return !(*this == rhs); + } - bool operator<(const backup_clear_request &) const; + bool operator < (const backup_clear_request & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(backup_clear_request &a, backup_clear_request &b); -inline std::ostream &operator<<(std::ostream &out, const backup_clear_request &obj) +inline std::ostream& operator<<(std::ostream& out, const backup_clear_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_modify_backup_policy_request__isset -{ - _configuration_modify_backup_policy_request__isset() - : policy_name(false), - add_appids(false), - removal_appids(false), - new_backup_interval_sec(false), - backup_history_count_to_keep(false), - is_disable(false), - start_time(false) - { - } - bool policy_name : 1; - bool add_appids : 1; - bool removal_appids : 1; - bool new_backup_interval_sec : 1; - bool backup_history_count_to_keep : 1; - bool is_disable : 1; - bool start_time : 1; +typedef struct _configuration_modify_backup_policy_request__isset { + _configuration_modify_backup_policy_request__isset() : policy_name(false), add_appids(false), removal_appids(false), new_backup_interval_sec(false), backup_history_count_to_keep(false), is_disable(false), start_time(false) {} + bool policy_name :1; + bool add_appids :1; + bool removal_appids :1; + bool new_backup_interval_sec :1; + bool backup_history_count_to_keep :1; + bool is_disable :1; + bool start_time :1; } _configuration_modify_backup_policy_request__isset; -class configuration_modify_backup_policy_request -{ -public: - configuration_modify_backup_policy_request(const configuration_modify_backup_policy_request &); - configuration_modify_backup_policy_request(configuration_modify_backup_policy_request &&); - configuration_modify_backup_policy_request & - operator=(const configuration_modify_backup_policy_request &); - configuration_modify_backup_policy_request & - operator=(configuration_modify_backup_policy_request &&); - configuration_modify_backup_policy_request() - : policy_name(), - new_backup_interval_sec(0), - backup_history_count_to_keep(0), - is_disable(0), - start_time() - { - } - - virtual ~configuration_modify_backup_policy_request() throw(); - std::string policy_name; - std::vector add_appids; - std::vector removal_appids; - int64_t new_backup_interval_sec; - int32_t backup_history_count_to_keep; - bool is_disable; - std::string start_time; - - _configuration_modify_backup_policy_request__isset __isset; - - void __set_policy_name(const std::string &val); - - void __set_add_appids(const std::vector &val); - - void __set_removal_appids(const std::vector &val); - - void __set_new_backup_interval_sec(const int64_t val); - - void __set_backup_history_count_to_keep(const int32_t val); - - void __set_is_disable(const bool val); - - void __set_start_time(const std::string &val); - - bool operator==(const configuration_modify_backup_policy_request &rhs) const - { - if (!(policy_name == rhs.policy_name)) - return false; - if (__isset.add_appids != rhs.__isset.add_appids) - return false; - else if (__isset.add_appids && !(add_appids == rhs.add_appids)) - return false; - if (__isset.removal_appids != rhs.__isset.removal_appids) - return false; - else if (__isset.removal_appids && !(removal_appids == rhs.removal_appids)) - return false; - if (__isset.new_backup_interval_sec != rhs.__isset.new_backup_interval_sec) - return false; - else if (__isset.new_backup_interval_sec && - !(new_backup_interval_sec == rhs.new_backup_interval_sec)) - return false; - if (__isset.backup_history_count_to_keep != rhs.__isset.backup_history_count_to_keep) - return false; - else if (__isset.backup_history_count_to_keep && - !(backup_history_count_to_keep == rhs.backup_history_count_to_keep)) - return false; - if (__isset.is_disable != rhs.__isset.is_disable) - return false; - else if (__isset.is_disable && !(is_disable == rhs.is_disable)) - return false; - if (__isset.start_time != rhs.__isset.start_time) - return false; - else if (__isset.start_time && !(start_time == rhs.start_time)) - return false; - return true; - } - bool operator!=(const configuration_modify_backup_policy_request &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_modify_backup_policy_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_modify_backup_policy_request { + public: + + configuration_modify_backup_policy_request(const configuration_modify_backup_policy_request&); + configuration_modify_backup_policy_request(configuration_modify_backup_policy_request&&); + configuration_modify_backup_policy_request& operator=(const configuration_modify_backup_policy_request&); + configuration_modify_backup_policy_request& operator=(configuration_modify_backup_policy_request&&); + configuration_modify_backup_policy_request() : policy_name(), new_backup_interval_sec(0), backup_history_count_to_keep(0), is_disable(0), start_time() { + } + + virtual ~configuration_modify_backup_policy_request() throw(); + std::string policy_name; + std::vector add_appids; + std::vector removal_appids; + int64_t new_backup_interval_sec; + int32_t backup_history_count_to_keep; + bool is_disable; + std::string start_time; + + _configuration_modify_backup_policy_request__isset __isset; + + void __set_policy_name(const std::string& val); + + void __set_add_appids(const std::vector & val); + + void __set_removal_appids(const std::vector & val); + + void __set_new_backup_interval_sec(const int64_t val); + + void __set_backup_history_count_to_keep(const int32_t val); + + void __set_is_disable(const bool val); + + void __set_start_time(const std::string& val); + + bool operator == (const configuration_modify_backup_policy_request & rhs) const + { + if (!(policy_name == rhs.policy_name)) + return false; + if (__isset.add_appids != rhs.__isset.add_appids) + return false; + else if (__isset.add_appids && !(add_appids == rhs.add_appids)) + return false; + if (__isset.removal_appids != rhs.__isset.removal_appids) + return false; + else if (__isset.removal_appids && !(removal_appids == rhs.removal_appids)) + return false; + if (__isset.new_backup_interval_sec != rhs.__isset.new_backup_interval_sec) + return false; + else if (__isset.new_backup_interval_sec && !(new_backup_interval_sec == rhs.new_backup_interval_sec)) + return false; + if (__isset.backup_history_count_to_keep != rhs.__isset.backup_history_count_to_keep) + return false; + else if (__isset.backup_history_count_to_keep && !(backup_history_count_to_keep == rhs.backup_history_count_to_keep)) + return false; + if (__isset.is_disable != rhs.__isset.is_disable) + return false; + else if (__isset.is_disable && !(is_disable == rhs.is_disable)) + return false; + if (__isset.start_time != rhs.__isset.start_time) + return false; + else if (__isset.start_time && !(start_time == rhs.start_time)) + return false; + return true; + } + bool operator != (const configuration_modify_backup_policy_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_modify_backup_policy_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; -void swap(configuration_modify_backup_policy_request &a, - configuration_modify_backup_policy_request &b); +void swap(configuration_modify_backup_policy_request &a, configuration_modify_backup_policy_request &b); -inline std::ostream &operator<<(std::ostream &out, - const configuration_modify_backup_policy_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_modify_backup_policy_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_modify_backup_policy_response__isset -{ - _configuration_modify_backup_policy_response__isset() : err(false), hint_message(false) {} - bool err : 1; - bool hint_message : 1; +typedef struct _configuration_modify_backup_policy_response__isset { + _configuration_modify_backup_policy_response__isset() : err(false), hint_message(false) {} + bool err :1; + bool hint_message :1; } _configuration_modify_backup_policy_response__isset; -class configuration_modify_backup_policy_response -{ -public: - configuration_modify_backup_policy_response( - const configuration_modify_backup_policy_response &); - configuration_modify_backup_policy_response(configuration_modify_backup_policy_response &&); - configuration_modify_backup_policy_response & - operator=(const configuration_modify_backup_policy_response &); - configuration_modify_backup_policy_response & - operator=(configuration_modify_backup_policy_response &&); - configuration_modify_backup_policy_response() : hint_message() {} - - virtual ~configuration_modify_backup_policy_response() throw(); - ::dsn::error_code err; - std::string hint_message; - - _configuration_modify_backup_policy_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_hint_message(const std::string &val); - - bool operator==(const configuration_modify_backup_policy_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(hint_message == rhs.hint_message)) - return false; - return true; - } - bool operator!=(const configuration_modify_backup_policy_response &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_modify_backup_policy_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_modify_backup_policy_response { + public: + + configuration_modify_backup_policy_response(const configuration_modify_backup_policy_response&); + configuration_modify_backup_policy_response(configuration_modify_backup_policy_response&&); + configuration_modify_backup_policy_response& operator=(const configuration_modify_backup_policy_response&); + configuration_modify_backup_policy_response& operator=(configuration_modify_backup_policy_response&&); + configuration_modify_backup_policy_response() : hint_message() { + } + + virtual ~configuration_modify_backup_policy_response() throw(); + ::dsn::error_code err; + std::string hint_message; + + _configuration_modify_backup_policy_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_hint_message(const std::string& val); + + bool operator == (const configuration_modify_backup_policy_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(hint_message == rhs.hint_message)) + return false; + return true; + } + bool operator != (const configuration_modify_backup_policy_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_modify_backup_policy_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; -void swap(configuration_modify_backup_policy_response &a, - configuration_modify_backup_policy_response &b); +void swap(configuration_modify_backup_policy_response &a, configuration_modify_backup_policy_response &b); -inline std::ostream &operator<<(std::ostream &out, - const configuration_modify_backup_policy_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_modify_backup_policy_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_add_backup_policy_request__isset -{ - _configuration_add_backup_policy_request__isset() - : backup_provider_type(false), - policy_name(false), - app_ids(false), - backup_interval_seconds(false), - backup_history_count_to_keep(false), - start_time(false) - { - } - bool backup_provider_type : 1; - bool policy_name : 1; - bool app_ids : 1; - bool backup_interval_seconds : 1; - bool backup_history_count_to_keep : 1; - bool start_time : 1; +typedef struct _configuration_add_backup_policy_request__isset { + _configuration_add_backup_policy_request__isset() : backup_provider_type(false), policy_name(false), app_ids(false), backup_interval_seconds(false), backup_history_count_to_keep(false), start_time(false) {} + bool backup_provider_type :1; + bool policy_name :1; + bool app_ids :1; + bool backup_interval_seconds :1; + bool backup_history_count_to_keep :1; + bool start_time :1; } _configuration_add_backup_policy_request__isset; -class configuration_add_backup_policy_request -{ -public: - configuration_add_backup_policy_request(const configuration_add_backup_policy_request &); - configuration_add_backup_policy_request(configuration_add_backup_policy_request &&); - configuration_add_backup_policy_request & - operator=(const configuration_add_backup_policy_request &); - configuration_add_backup_policy_request &operator=(configuration_add_backup_policy_request &&); - configuration_add_backup_policy_request() - : backup_provider_type(), - policy_name(), - backup_interval_seconds(0), - backup_history_count_to_keep(0), - start_time() - { - } - - virtual ~configuration_add_backup_policy_request() throw(); - std::string backup_provider_type; - std::string policy_name; - std::vector app_ids; - int64_t backup_interval_seconds; - int32_t backup_history_count_to_keep; - std::string start_time; - - _configuration_add_backup_policy_request__isset __isset; - - void __set_backup_provider_type(const std::string &val); - - void __set_policy_name(const std::string &val); - - void __set_app_ids(const std::vector &val); - - void __set_backup_interval_seconds(const int64_t val); - - void __set_backup_history_count_to_keep(const int32_t val); - - void __set_start_time(const std::string &val); - - bool operator==(const configuration_add_backup_policy_request &rhs) const - { - if (!(backup_provider_type == rhs.backup_provider_type)) - return false; - if (!(policy_name == rhs.policy_name)) - return false; - if (!(app_ids == rhs.app_ids)) - return false; - if (!(backup_interval_seconds == rhs.backup_interval_seconds)) - return false; - if (!(backup_history_count_to_keep == rhs.backup_history_count_to_keep)) - return false; - if (!(start_time == rhs.start_time)) - return false; - return true; - } - bool operator!=(const configuration_add_backup_policy_request &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_add_backup_policy_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_add_backup_policy_request { + public: + + configuration_add_backup_policy_request(const configuration_add_backup_policy_request&); + configuration_add_backup_policy_request(configuration_add_backup_policy_request&&); + configuration_add_backup_policy_request& operator=(const configuration_add_backup_policy_request&); + configuration_add_backup_policy_request& operator=(configuration_add_backup_policy_request&&); + configuration_add_backup_policy_request() : backup_provider_type(), policy_name(), backup_interval_seconds(0), backup_history_count_to_keep(0), start_time() { + } + + virtual ~configuration_add_backup_policy_request() throw(); + std::string backup_provider_type; + std::string policy_name; + std::vector app_ids; + int64_t backup_interval_seconds; + int32_t backup_history_count_to_keep; + std::string start_time; + + _configuration_add_backup_policy_request__isset __isset; + + void __set_backup_provider_type(const std::string& val); + + void __set_policy_name(const std::string& val); + + void __set_app_ids(const std::vector & val); + + void __set_backup_interval_seconds(const int64_t val); + + void __set_backup_history_count_to_keep(const int32_t val); + + void __set_start_time(const std::string& val); + + bool operator == (const configuration_add_backup_policy_request & rhs) const + { + if (!(backup_provider_type == rhs.backup_provider_type)) + return false; + if (!(policy_name == rhs.policy_name)) + return false; + if (!(app_ids == rhs.app_ids)) + return false; + if (!(backup_interval_seconds == rhs.backup_interval_seconds)) + return false; + if (!(backup_history_count_to_keep == rhs.backup_history_count_to_keep)) + return false; + if (!(start_time == rhs.start_time)) + return false; + return true; + } + bool operator != (const configuration_add_backup_policy_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_add_backup_policy_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_add_backup_policy_request &a, configuration_add_backup_policy_request &b); -inline std::ostream &operator<<(std::ostream &out, - const configuration_add_backup_policy_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_add_backup_policy_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_add_backup_policy_response__isset -{ - _configuration_add_backup_policy_response__isset() : err(false), hint_message(false) {} - bool err : 1; - bool hint_message : 1; +typedef struct _configuration_add_backup_policy_response__isset { + _configuration_add_backup_policy_response__isset() : err(false), hint_message(false) {} + bool err :1; + bool hint_message :1; } _configuration_add_backup_policy_response__isset; -class configuration_add_backup_policy_response -{ -public: - configuration_add_backup_policy_response(const configuration_add_backup_policy_response &); - configuration_add_backup_policy_response(configuration_add_backup_policy_response &&); - configuration_add_backup_policy_response & - operator=(const configuration_add_backup_policy_response &); - configuration_add_backup_policy_response & - operator=(configuration_add_backup_policy_response &&); - configuration_add_backup_policy_response() : hint_message() {} - - virtual ~configuration_add_backup_policy_response() throw(); - ::dsn::error_code err; - std::string hint_message; - - _configuration_add_backup_policy_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_hint_message(const std::string &val); - - bool operator==(const configuration_add_backup_policy_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(hint_message == rhs.hint_message)) - return false; - return true; - } - bool operator!=(const configuration_add_backup_policy_response &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_add_backup_policy_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_add_backup_policy_response { + public: + + configuration_add_backup_policy_response(const configuration_add_backup_policy_response&); + configuration_add_backup_policy_response(configuration_add_backup_policy_response&&); + configuration_add_backup_policy_response& operator=(const configuration_add_backup_policy_response&); + configuration_add_backup_policy_response& operator=(configuration_add_backup_policy_response&&); + configuration_add_backup_policy_response() : hint_message() { + } + + virtual ~configuration_add_backup_policy_response() throw(); + ::dsn::error_code err; + std::string hint_message; + + _configuration_add_backup_policy_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_hint_message(const std::string& val); + + bool operator == (const configuration_add_backup_policy_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(hint_message == rhs.hint_message)) + return false; + return true; + } + bool operator != (const configuration_add_backup_policy_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_add_backup_policy_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_add_backup_policy_response &a, configuration_add_backup_policy_response &b); -inline std::ostream &operator<<(std::ostream &out, - const configuration_add_backup_policy_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_add_backup_policy_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _policy_entry__isset -{ - _policy_entry__isset() - : policy_name(false), - backup_provider_type(false), - backup_interval_seconds(false), - app_ids(false), - backup_history_count_to_keep(false), - start_time(false), - is_disable(false) - { - } - bool policy_name : 1; - bool backup_provider_type : 1; - bool backup_interval_seconds : 1; - bool app_ids : 1; - bool backup_history_count_to_keep : 1; - bool start_time : 1; - bool is_disable : 1; +typedef struct _policy_entry__isset { + _policy_entry__isset() : policy_name(false), backup_provider_type(false), backup_interval_seconds(false), app_ids(false), backup_history_count_to_keep(false), start_time(false), is_disable(false) {} + bool policy_name :1; + bool backup_provider_type :1; + bool backup_interval_seconds :1; + bool app_ids :1; + bool backup_history_count_to_keep :1; + bool start_time :1; + bool is_disable :1; } _policy_entry__isset; -class policy_entry -{ -public: - policy_entry(const policy_entry &); - policy_entry(policy_entry &&); - policy_entry &operator=(const policy_entry &); - policy_entry &operator=(policy_entry &&); - policy_entry() - : policy_name(), - backup_provider_type(), - backup_interval_seconds(), - backup_history_count_to_keep(0), - start_time(), - is_disable(0) - { - } - - virtual ~policy_entry() throw(); - std::string policy_name; - std::string backup_provider_type; - std::string backup_interval_seconds; - std::set app_ids; - int32_t backup_history_count_to_keep; - std::string start_time; - bool is_disable; - - _policy_entry__isset __isset; - - void __set_policy_name(const std::string &val); - - void __set_backup_provider_type(const std::string &val); - - void __set_backup_interval_seconds(const std::string &val); - - void __set_app_ids(const std::set &val); - - void __set_backup_history_count_to_keep(const int32_t val); - - void __set_start_time(const std::string &val); - - void __set_is_disable(const bool val); - - bool operator==(const policy_entry &rhs) const - { - if (!(policy_name == rhs.policy_name)) - return false; - if (!(backup_provider_type == rhs.backup_provider_type)) - return false; - if (!(backup_interval_seconds == rhs.backup_interval_seconds)) - return false; - if (!(app_ids == rhs.app_ids)) - return false; - if (!(backup_history_count_to_keep == rhs.backup_history_count_to_keep)) - return false; - if (!(start_time == rhs.start_time)) - return false; - if (!(is_disable == rhs.is_disable)) - return false; - return true; - } - bool operator!=(const policy_entry &rhs) const { return !(*this == rhs); } - - bool operator<(const policy_entry &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class policy_entry { + public: + + policy_entry(const policy_entry&); + policy_entry(policy_entry&&); + policy_entry& operator=(const policy_entry&); + policy_entry& operator=(policy_entry&&); + policy_entry() : policy_name(), backup_provider_type(), backup_interval_seconds(), backup_history_count_to_keep(0), start_time(), is_disable(0) { + } + + virtual ~policy_entry() throw(); + std::string policy_name; + std::string backup_provider_type; + std::string backup_interval_seconds; + std::set app_ids; + int32_t backup_history_count_to_keep; + std::string start_time; + bool is_disable; + + _policy_entry__isset __isset; + + void __set_policy_name(const std::string& val); + + void __set_backup_provider_type(const std::string& val); + + void __set_backup_interval_seconds(const std::string& val); + + void __set_app_ids(const std::set & val); + + void __set_backup_history_count_to_keep(const int32_t val); + + void __set_start_time(const std::string& val); + + void __set_is_disable(const bool val); + + bool operator == (const policy_entry & rhs) const + { + if (!(policy_name == rhs.policy_name)) + return false; + if (!(backup_provider_type == rhs.backup_provider_type)) + return false; + if (!(backup_interval_seconds == rhs.backup_interval_seconds)) + return false; + if (!(app_ids == rhs.app_ids)) + return false; + if (!(backup_history_count_to_keep == rhs.backup_history_count_to_keep)) + return false; + if (!(start_time == rhs.start_time)) + return false; + if (!(is_disable == rhs.is_disable)) + return false; + return true; + } + bool operator != (const policy_entry &rhs) const { + return !(*this == rhs); + } + + bool operator < (const policy_entry & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(policy_entry &a, policy_entry &b); -inline std::ostream &operator<<(std::ostream &out, const policy_entry &obj) +inline std::ostream& operator<<(std::ostream& out, const policy_entry& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _backup_entry__isset -{ - _backup_entry__isset() - : backup_id(false), start_time_ms(false), end_time_ms(false), app_ids(false) - { - } - bool backup_id : 1; - bool start_time_ms : 1; - bool end_time_ms : 1; - bool app_ids : 1; +typedef struct _backup_entry__isset { + _backup_entry__isset() : backup_id(false), start_time_ms(false), end_time_ms(false), app_ids(false) {} + bool backup_id :1; + bool start_time_ms :1; + bool end_time_ms :1; + bool app_ids :1; } _backup_entry__isset; -class backup_entry -{ -public: - backup_entry(const backup_entry &); - backup_entry(backup_entry &&); - backup_entry &operator=(const backup_entry &); - backup_entry &operator=(backup_entry &&); - backup_entry() : backup_id(0), start_time_ms(0), end_time_ms(0) {} +class backup_entry { + public: - virtual ~backup_entry() throw(); - int64_t backup_id; - int64_t start_time_ms; - int64_t end_time_ms; - std::set app_ids; + backup_entry(const backup_entry&); + backup_entry(backup_entry&&); + backup_entry& operator=(const backup_entry&); + backup_entry& operator=(backup_entry&&); + backup_entry() : backup_id(0), start_time_ms(0), end_time_ms(0) { + } - _backup_entry__isset __isset; + virtual ~backup_entry() throw(); + int64_t backup_id; + int64_t start_time_ms; + int64_t end_time_ms; + std::set app_ids; - void __set_backup_id(const int64_t val); + _backup_entry__isset __isset; - void __set_start_time_ms(const int64_t val); + void __set_backup_id(const int64_t val); - void __set_end_time_ms(const int64_t val); + void __set_start_time_ms(const int64_t val); - void __set_app_ids(const std::set &val); + void __set_end_time_ms(const int64_t val); - bool operator==(const backup_entry &rhs) const - { - if (!(backup_id == rhs.backup_id)) - return false; - if (!(start_time_ms == rhs.start_time_ms)) - return false; - if (!(end_time_ms == rhs.end_time_ms)) - return false; - if (!(app_ids == rhs.app_ids)) - return false; - return true; - } - bool operator!=(const backup_entry &rhs) const { return !(*this == rhs); } + void __set_app_ids(const std::set & val); - bool operator<(const backup_entry &) const; + bool operator == (const backup_entry & rhs) const + { + if (!(backup_id == rhs.backup_id)) + return false; + if (!(start_time_ms == rhs.start_time_ms)) + return false; + if (!(end_time_ms == rhs.end_time_ms)) + return false; + if (!(app_ids == rhs.app_ids)) + return false; + return true; + } + bool operator != (const backup_entry &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const backup_entry & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(backup_entry &a, backup_entry &b); -inline std::ostream &operator<<(std::ostream &out, const backup_entry &obj) +inline std::ostream& operator<<(std::ostream& out, const backup_entry& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_backup_policy_request__isset -{ - _configuration_query_backup_policy_request__isset() - : policy_names(false), backup_info_count(false) - { - } - bool policy_names : 1; - bool backup_info_count : 1; +typedef struct _configuration_query_backup_policy_request__isset { + _configuration_query_backup_policy_request__isset() : policy_names(false), backup_info_count(false) {} + bool policy_names :1; + bool backup_info_count :1; } _configuration_query_backup_policy_request__isset; -class configuration_query_backup_policy_request -{ -public: - configuration_query_backup_policy_request(const configuration_query_backup_policy_request &); - configuration_query_backup_policy_request(configuration_query_backup_policy_request &&); - configuration_query_backup_policy_request & - operator=(const configuration_query_backup_policy_request &); - configuration_query_backup_policy_request & - operator=(configuration_query_backup_policy_request &&); - configuration_query_backup_policy_request() : backup_info_count(0) {} - - virtual ~configuration_query_backup_policy_request() throw(); - std::vector policy_names; - int32_t backup_info_count; - - _configuration_query_backup_policy_request__isset __isset; - - void __set_policy_names(const std::vector &val); - - void __set_backup_info_count(const int32_t val); - - bool operator==(const configuration_query_backup_policy_request &rhs) const - { - if (!(policy_names == rhs.policy_names)) - return false; - if (!(backup_info_count == rhs.backup_info_count)) - return false; - return true; - } - bool operator!=(const configuration_query_backup_policy_request &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_query_backup_policy_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_query_backup_policy_request { + public: + + configuration_query_backup_policy_request(const configuration_query_backup_policy_request&); + configuration_query_backup_policy_request(configuration_query_backup_policy_request&&); + configuration_query_backup_policy_request& operator=(const configuration_query_backup_policy_request&); + configuration_query_backup_policy_request& operator=(configuration_query_backup_policy_request&&); + configuration_query_backup_policy_request() : backup_info_count(0) { + } + + virtual ~configuration_query_backup_policy_request() throw(); + std::vector policy_names; + int32_t backup_info_count; + + _configuration_query_backup_policy_request__isset __isset; + + void __set_policy_names(const std::vector & val); + + void __set_backup_info_count(const int32_t val); + + bool operator == (const configuration_query_backup_policy_request & rhs) const + { + if (!(policy_names == rhs.policy_names)) + return false; + if (!(backup_info_count == rhs.backup_info_count)) + return false; + return true; + } + bool operator != (const configuration_query_backup_policy_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_query_backup_policy_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; -void swap(configuration_query_backup_policy_request &a, - configuration_query_backup_policy_request &b); +void swap(configuration_query_backup_policy_request &a, configuration_query_backup_policy_request &b); -inline std::ostream &operator<<(std::ostream &out, - const configuration_query_backup_policy_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_query_backup_policy_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_backup_policy_response__isset -{ - _configuration_query_backup_policy_response__isset() - : err(false), policys(false), backup_infos(false), hint_msg(false) - { - } - bool err : 1; - bool policys : 1; - bool backup_infos : 1; - bool hint_msg : 1; +typedef struct _configuration_query_backup_policy_response__isset { + _configuration_query_backup_policy_response__isset() : err(false), policys(false), backup_infos(false), hint_msg(false) {} + bool err :1; + bool policys :1; + bool backup_infos :1; + bool hint_msg :1; } _configuration_query_backup_policy_response__isset; -class configuration_query_backup_policy_response -{ -public: - configuration_query_backup_policy_response(const configuration_query_backup_policy_response &); - configuration_query_backup_policy_response(configuration_query_backup_policy_response &&); - configuration_query_backup_policy_response & - operator=(const configuration_query_backup_policy_response &); - configuration_query_backup_policy_response & - operator=(configuration_query_backup_policy_response &&); - configuration_query_backup_policy_response() : hint_msg() {} - - virtual ~configuration_query_backup_policy_response() throw(); - ::dsn::error_code err; - std::vector policys; - std::vector> backup_infos; - std::string hint_msg; - - _configuration_query_backup_policy_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_policys(const std::vector &val); - - void __set_backup_infos(const std::vector> &val); - - void __set_hint_msg(const std::string &val); - - bool operator==(const configuration_query_backup_policy_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(policys == rhs.policys)) - return false; - if (!(backup_infos == rhs.backup_infos)) - return false; - if (__isset.hint_msg != rhs.__isset.hint_msg) - return false; - else if (__isset.hint_msg && !(hint_msg == rhs.hint_msg)) - return false; - return true; - } - bool operator!=(const configuration_query_backup_policy_response &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_query_backup_policy_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_query_backup_policy_response { + public: + + configuration_query_backup_policy_response(const configuration_query_backup_policy_response&); + configuration_query_backup_policy_response(configuration_query_backup_policy_response&&); + configuration_query_backup_policy_response& operator=(const configuration_query_backup_policy_response&); + configuration_query_backup_policy_response& operator=(configuration_query_backup_policy_response&&); + configuration_query_backup_policy_response() : hint_msg() { + } + + virtual ~configuration_query_backup_policy_response() throw(); + ::dsn::error_code err; + std::vector policys; + std::vector > backup_infos; + std::string hint_msg; + + _configuration_query_backup_policy_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_policys(const std::vector & val); + + void __set_backup_infos(const std::vector > & val); + + void __set_hint_msg(const std::string& val); + + bool operator == (const configuration_query_backup_policy_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(policys == rhs.policys)) + return false; + if (!(backup_infos == rhs.backup_infos)) + return false; + if (__isset.hint_msg != rhs.__isset.hint_msg) + return false; + else if (__isset.hint_msg && !(hint_msg == rhs.hint_msg)) + return false; + return true; + } + bool operator != (const configuration_query_backup_policy_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_query_backup_policy_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; -void swap(configuration_query_backup_policy_response &a, - configuration_query_backup_policy_response &b); +void swap(configuration_query_backup_policy_response &a, configuration_query_backup_policy_response &b); -inline std::ostream &operator<<(std::ostream &out, - const configuration_query_backup_policy_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_query_backup_policy_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_report_restore_status_request__isset -{ - _configuration_report_restore_status_request__isset() - : pid(false), restore_status(false), progress(false), reason(false) - { - } - bool pid : 1; - bool restore_status : 1; - bool progress : 1; - bool reason : 1; +typedef struct _configuration_report_restore_status_request__isset { + _configuration_report_restore_status_request__isset() : pid(false), restore_status(false), progress(false), reason(false) {} + bool pid :1; + bool restore_status :1; + bool progress :1; + bool reason :1; } _configuration_report_restore_status_request__isset; -class configuration_report_restore_status_request -{ -public: - configuration_report_restore_status_request( - const configuration_report_restore_status_request &); - configuration_report_restore_status_request(configuration_report_restore_status_request &&); - configuration_report_restore_status_request & - operator=(const configuration_report_restore_status_request &); - configuration_report_restore_status_request & - operator=(configuration_report_restore_status_request &&); - configuration_report_restore_status_request() : progress(0), reason() {} - - virtual ~configuration_report_restore_status_request() throw(); - ::dsn::gpid pid; - ::dsn::error_code restore_status; - int32_t progress; - std::string reason; - - _configuration_report_restore_status_request__isset __isset; - - void __set_pid(const ::dsn::gpid &val); - - void __set_restore_status(const ::dsn::error_code &val); - - void __set_progress(const int32_t val); - - void __set_reason(const std::string &val); - - bool operator==(const configuration_report_restore_status_request &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(restore_status == rhs.restore_status)) - return false; - if (!(progress == rhs.progress)) - return false; - if (__isset.reason != rhs.__isset.reason) - return false; - else if (__isset.reason && !(reason == rhs.reason)) - return false; - return true; - } - bool operator!=(const configuration_report_restore_status_request &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_report_restore_status_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_report_restore_status_request { + public: + + configuration_report_restore_status_request(const configuration_report_restore_status_request&); + configuration_report_restore_status_request(configuration_report_restore_status_request&&); + configuration_report_restore_status_request& operator=(const configuration_report_restore_status_request&); + configuration_report_restore_status_request& operator=(configuration_report_restore_status_request&&); + configuration_report_restore_status_request() : progress(0), reason() { + } + + virtual ~configuration_report_restore_status_request() throw(); + ::dsn::gpid pid; + ::dsn::error_code restore_status; + int32_t progress; + std::string reason; + + _configuration_report_restore_status_request__isset __isset; + + void __set_pid(const ::dsn::gpid& val); + + void __set_restore_status(const ::dsn::error_code& val); + + void __set_progress(const int32_t val); + + void __set_reason(const std::string& val); + + bool operator == (const configuration_report_restore_status_request & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(restore_status == rhs.restore_status)) + return false; + if (!(progress == rhs.progress)) + return false; + if (__isset.reason != rhs.__isset.reason) + return false; + else if (__isset.reason && !(reason == rhs.reason)) + return false; + return true; + } + bool operator != (const configuration_report_restore_status_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_report_restore_status_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; -void swap(configuration_report_restore_status_request &a, - configuration_report_restore_status_request &b); +void swap(configuration_report_restore_status_request &a, configuration_report_restore_status_request &b); -inline std::ostream &operator<<(std::ostream &out, - const configuration_report_restore_status_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_report_restore_status_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_report_restore_status_response__isset -{ - _configuration_report_restore_status_response__isset() : err(false) {} - bool err : 1; +typedef struct _configuration_report_restore_status_response__isset { + _configuration_report_restore_status_response__isset() : err(false) {} + bool err :1; } _configuration_report_restore_status_response__isset; -class configuration_report_restore_status_response -{ -public: - configuration_report_restore_status_response( - const configuration_report_restore_status_response &); - configuration_report_restore_status_response(configuration_report_restore_status_response &&); - configuration_report_restore_status_response & - operator=(const configuration_report_restore_status_response &); - configuration_report_restore_status_response & - operator=(configuration_report_restore_status_response &&); - configuration_report_restore_status_response() {} - - virtual ~configuration_report_restore_status_response() throw(); - ::dsn::error_code err; - - _configuration_report_restore_status_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - bool operator==(const configuration_report_restore_status_response &rhs) const - { - if (!(err == rhs.err)) - return false; - return true; - } - bool operator!=(const configuration_report_restore_status_response &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_report_restore_status_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_report_restore_status_response { + public: + + configuration_report_restore_status_response(const configuration_report_restore_status_response&); + configuration_report_restore_status_response(configuration_report_restore_status_response&&); + configuration_report_restore_status_response& operator=(const configuration_report_restore_status_response&); + configuration_report_restore_status_response& operator=(configuration_report_restore_status_response&&); + configuration_report_restore_status_response() { + } + + virtual ~configuration_report_restore_status_response() throw(); + ::dsn::error_code err; + + _configuration_report_restore_status_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + bool operator == (const configuration_report_restore_status_response & rhs) const + { + if (!(err == rhs.err)) + return false; + return true; + } + bool operator != (const configuration_report_restore_status_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_report_restore_status_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; -void swap(configuration_report_restore_status_response &a, - configuration_report_restore_status_response &b); +void swap(configuration_report_restore_status_response &a, configuration_report_restore_status_response &b); -inline std::ostream &operator<<(std::ostream &out, - const configuration_report_restore_status_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_report_restore_status_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_restore_request__isset -{ - _configuration_query_restore_request__isset() : restore_app_id(false) {} - bool restore_app_id : 1; +typedef struct _configuration_query_restore_request__isset { + _configuration_query_restore_request__isset() : restore_app_id(false) {} + bool restore_app_id :1; } _configuration_query_restore_request__isset; -class configuration_query_restore_request -{ -public: - configuration_query_restore_request(const configuration_query_restore_request &); - configuration_query_restore_request(configuration_query_restore_request &&); - configuration_query_restore_request &operator=(const configuration_query_restore_request &); - configuration_query_restore_request &operator=(configuration_query_restore_request &&); - configuration_query_restore_request() : restore_app_id(0) {} +class configuration_query_restore_request { + public: + + configuration_query_restore_request(const configuration_query_restore_request&); + configuration_query_restore_request(configuration_query_restore_request&&); + configuration_query_restore_request& operator=(const configuration_query_restore_request&); + configuration_query_restore_request& operator=(configuration_query_restore_request&&); + configuration_query_restore_request() : restore_app_id(0) { + } - virtual ~configuration_query_restore_request() throw(); - int32_t restore_app_id; + virtual ~configuration_query_restore_request() throw(); + int32_t restore_app_id; - _configuration_query_restore_request__isset __isset; + _configuration_query_restore_request__isset __isset; - void __set_restore_app_id(const int32_t val); + void __set_restore_app_id(const int32_t val); - bool operator==(const configuration_query_restore_request &rhs) const - { - if (!(restore_app_id == rhs.restore_app_id)) - return false; - return true; - } - bool operator!=(const configuration_query_restore_request &rhs) const - { - return !(*this == rhs); - } + bool operator == (const configuration_query_restore_request & rhs) const + { + if (!(restore_app_id == rhs.restore_app_id)) + return false; + return true; + } + bool operator != (const configuration_query_restore_request &rhs) const { + return !(*this == rhs); + } - bool operator<(const configuration_query_restore_request &) const; + bool operator < (const configuration_query_restore_request & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(configuration_query_restore_request &a, configuration_query_restore_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_query_restore_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_query_restore_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_restore_response__isset -{ - _configuration_query_restore_response__isset() - : err(false), restore_status(false), restore_progress(false) - { - } - bool err : 1; - bool restore_status : 1; - bool restore_progress : 1; +typedef struct _configuration_query_restore_response__isset { + _configuration_query_restore_response__isset() : err(false), restore_status(false), restore_progress(false) {} + bool err :1; + bool restore_status :1; + bool restore_progress :1; } _configuration_query_restore_response__isset; -class configuration_query_restore_response -{ -public: - configuration_query_restore_response(const configuration_query_restore_response &); - configuration_query_restore_response(configuration_query_restore_response &&); - configuration_query_restore_response &operator=(const configuration_query_restore_response &); - configuration_query_restore_response &operator=(configuration_query_restore_response &&); - configuration_query_restore_response() {} - - virtual ~configuration_query_restore_response() throw(); - ::dsn::error_code err; - std::vector<::dsn::error_code> restore_status; - std::vector restore_progress; - - _configuration_query_restore_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_restore_status(const std::vector<::dsn::error_code> &val); - - void __set_restore_progress(const std::vector &val); - - bool operator==(const configuration_query_restore_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(restore_status == rhs.restore_status)) - return false; - if (!(restore_progress == rhs.restore_progress)) - return false; - return true; - } - bool operator!=(const configuration_query_restore_response &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_query_restore_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_query_restore_response { + public: + + configuration_query_restore_response(const configuration_query_restore_response&); + configuration_query_restore_response(configuration_query_restore_response&&); + configuration_query_restore_response& operator=(const configuration_query_restore_response&); + configuration_query_restore_response& operator=(configuration_query_restore_response&&); + configuration_query_restore_response() { + } + + virtual ~configuration_query_restore_response() throw(); + ::dsn::error_code err; + std::vector< ::dsn::error_code> restore_status; + std::vector restore_progress; + + _configuration_query_restore_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_restore_status(const std::vector< ::dsn::error_code> & val); + + void __set_restore_progress(const std::vector & val); + + bool operator == (const configuration_query_restore_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(restore_status == rhs.restore_status)) + return false; + if (!(restore_progress == rhs.restore_progress)) + return false; + return true; + } + bool operator != (const configuration_query_restore_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_query_restore_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_query_restore_response &a, configuration_query_restore_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_query_restore_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_query_restore_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _file_meta__isset -{ - _file_meta__isset() : name(false), size(false), md5(false) {} - bool name : 1; - bool size : 1; - bool md5 : 1; +typedef struct _file_meta__isset { + _file_meta__isset() : name(false), size(false), md5(false) {} + bool name :1; + bool size :1; + bool md5 :1; } _file_meta__isset; -class file_meta -{ -public: - file_meta(const file_meta &); - file_meta(file_meta &&); - file_meta &operator=(const file_meta &); - file_meta &operator=(file_meta &&); - file_meta() : name(), size(0), md5() {} +class file_meta { + public: + + file_meta(const file_meta&); + file_meta(file_meta&&); + file_meta& operator=(const file_meta&); + file_meta& operator=(file_meta&&); + file_meta() : name(), size(0), md5() { + } - virtual ~file_meta() throw(); - std::string name; - int64_t size; - std::string md5; + virtual ~file_meta() throw(); + std::string name; + int64_t size; + std::string md5; - _file_meta__isset __isset; + _file_meta__isset __isset; - void __set_name(const std::string &val); + void __set_name(const std::string& val); - void __set_size(const int64_t val); + void __set_size(const int64_t val); - void __set_md5(const std::string &val); + void __set_md5(const std::string& val); - bool operator==(const file_meta &rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(size == rhs.size)) - return false; - if (!(md5 == rhs.md5)) - return false; - return true; - } - bool operator!=(const file_meta &rhs) const { return !(*this == rhs); } + bool operator == (const file_meta & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(size == rhs.size)) + return false; + if (!(md5 == rhs.md5)) + return false; + return true; + } + bool operator != (const file_meta &rhs) const { + return !(*this == rhs); + } - bool operator<(const file_meta &) const; + bool operator < (const file_meta & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(file_meta &a, file_meta &b); -inline std::ostream &operator<<(std::ostream &out, const file_meta &obj) +inline std::ostream& operator<<(std::ostream& out, const file_meta& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_update_app_env_request__isset -{ - _configuration_update_app_env_request__isset() - : app_name(false), op(true), keys(false), values(false), clear_prefix(false) - { - } - bool app_name : 1; - bool op : 1; - bool keys : 1; - bool values : 1; - bool clear_prefix : 1; +typedef struct _configuration_update_app_env_request__isset { + _configuration_update_app_env_request__isset() : app_name(false), op(true), keys(false), values(false), clear_prefix(false) {} + bool app_name :1; + bool op :1; + bool keys :1; + bool values :1; + bool clear_prefix :1; } _configuration_update_app_env_request__isset; -class configuration_update_app_env_request -{ -public: - configuration_update_app_env_request(const configuration_update_app_env_request &); - configuration_update_app_env_request(configuration_update_app_env_request &&); - configuration_update_app_env_request &operator=(const configuration_update_app_env_request &); - configuration_update_app_env_request &operator=(configuration_update_app_env_request &&); - configuration_update_app_env_request() - : app_name(), op((app_env_operation::type)0), clear_prefix() - { - op = (app_env_operation::type)0; - } - - virtual ~configuration_update_app_env_request() throw(); - std::string app_name; - app_env_operation::type op; - std::vector keys; - std::vector values; - std::string clear_prefix; - - _configuration_update_app_env_request__isset __isset; - - void __set_app_name(const std::string &val); - - void __set_op(const app_env_operation::type val); - - void __set_keys(const std::vector &val); - - void __set_values(const std::vector &val); - - void __set_clear_prefix(const std::string &val); - - bool operator==(const configuration_update_app_env_request &rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(op == rhs.op)) - return false; - if (__isset.keys != rhs.__isset.keys) - return false; - else if (__isset.keys && !(keys == rhs.keys)) - return false; - if (__isset.values != rhs.__isset.values) - return false; - else if (__isset.values && !(values == rhs.values)) - return false; - if (__isset.clear_prefix != rhs.__isset.clear_prefix) - return false; - else if (__isset.clear_prefix && !(clear_prefix == rhs.clear_prefix)) - return false; - return true; - } - bool operator!=(const configuration_update_app_env_request &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_update_app_env_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_update_app_env_request { + public: + + configuration_update_app_env_request(const configuration_update_app_env_request&); + configuration_update_app_env_request(configuration_update_app_env_request&&); + configuration_update_app_env_request& operator=(const configuration_update_app_env_request&); + configuration_update_app_env_request& operator=(configuration_update_app_env_request&&); + configuration_update_app_env_request() : app_name(), op((app_env_operation::type)0), clear_prefix() { + op = (app_env_operation::type)0; + + } + + virtual ~configuration_update_app_env_request() throw(); + std::string app_name; + app_env_operation::type op; + std::vector keys; + std::vector values; + std::string clear_prefix; + + _configuration_update_app_env_request__isset __isset; + + void __set_app_name(const std::string& val); + + void __set_op(const app_env_operation::type val); + + void __set_keys(const std::vector & val); + + void __set_values(const std::vector & val); + + void __set_clear_prefix(const std::string& val); + + bool operator == (const configuration_update_app_env_request & rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(op == rhs.op)) + return false; + if (__isset.keys != rhs.__isset.keys) + return false; + else if (__isset.keys && !(keys == rhs.keys)) + return false; + if (__isset.values != rhs.__isset.values) + return false; + else if (__isset.values && !(values == rhs.values)) + return false; + if (__isset.clear_prefix != rhs.__isset.clear_prefix) + return false; + else if (__isset.clear_prefix && !(clear_prefix == rhs.clear_prefix)) + return false; + return true; + } + bool operator != (const configuration_update_app_env_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_update_app_env_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_update_app_env_request &a, configuration_update_app_env_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_update_app_env_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_update_app_env_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_update_app_env_response__isset -{ - _configuration_update_app_env_response__isset() : err(false), hint_message(false) {} - bool err : 1; - bool hint_message : 1; +typedef struct _configuration_update_app_env_response__isset { + _configuration_update_app_env_response__isset() : err(false), hint_message(false) {} + bool err :1; + bool hint_message :1; } _configuration_update_app_env_response__isset; -class configuration_update_app_env_response -{ -public: - configuration_update_app_env_response(const configuration_update_app_env_response &); - configuration_update_app_env_response(configuration_update_app_env_response &&); - configuration_update_app_env_response &operator=(const configuration_update_app_env_response &); - configuration_update_app_env_response &operator=(configuration_update_app_env_response &&); - configuration_update_app_env_response() : hint_message() {} - - virtual ~configuration_update_app_env_response() throw(); - ::dsn::error_code err; - std::string hint_message; - - _configuration_update_app_env_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_hint_message(const std::string &val); - - bool operator==(const configuration_update_app_env_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(hint_message == rhs.hint_message)) - return false; - return true; - } - bool operator!=(const configuration_update_app_env_response &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_update_app_env_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_update_app_env_response { + public: + + configuration_update_app_env_response(const configuration_update_app_env_response&); + configuration_update_app_env_response(configuration_update_app_env_response&&); + configuration_update_app_env_response& operator=(const configuration_update_app_env_response&); + configuration_update_app_env_response& operator=(configuration_update_app_env_response&&); + configuration_update_app_env_response() : hint_message() { + } + + virtual ~configuration_update_app_env_response() throw(); + ::dsn::error_code err; + std::string hint_message; + + _configuration_update_app_env_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_hint_message(const std::string& val); + + bool operator == (const configuration_update_app_env_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(hint_message == rhs.hint_message)) + return false; + return true; + } + bool operator != (const configuration_update_app_env_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_update_app_env_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_update_app_env_response &a, configuration_update_app_env_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_update_app_env_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_update_app_env_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_add_request__isset -{ - _duplication_add_request__isset() : app_name(false), remote_cluster_name(false), freezed(false) - { - } - bool app_name : 1; - bool remote_cluster_name : 1; - bool freezed : 1; +typedef struct _duplication_add_request__isset { + _duplication_add_request__isset() : app_name(false), remote_cluster_name(false), freezed(false) {} + bool app_name :1; + bool remote_cluster_name :1; + bool freezed :1; } _duplication_add_request__isset; -class duplication_add_request -{ -public: - duplication_add_request(const duplication_add_request &); - duplication_add_request(duplication_add_request &&); - duplication_add_request &operator=(const duplication_add_request &); - duplication_add_request &operator=(duplication_add_request &&); - duplication_add_request() : app_name(), remote_cluster_name(), freezed(0) {} +class duplication_add_request { + public: + + duplication_add_request(const duplication_add_request&); + duplication_add_request(duplication_add_request&&); + duplication_add_request& operator=(const duplication_add_request&); + duplication_add_request& operator=(duplication_add_request&&); + duplication_add_request() : app_name(), remote_cluster_name(), freezed(0) { + } - virtual ~duplication_add_request() throw(); - std::string app_name; - std::string remote_cluster_name; - bool freezed; + virtual ~duplication_add_request() throw(); + std::string app_name; + std::string remote_cluster_name; + bool freezed; - _duplication_add_request__isset __isset; + _duplication_add_request__isset __isset; - void __set_app_name(const std::string &val); + void __set_app_name(const std::string& val); - void __set_remote_cluster_name(const std::string &val); + void __set_remote_cluster_name(const std::string& val); - void __set_freezed(const bool val); + void __set_freezed(const bool val); - bool operator==(const duplication_add_request &rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(remote_cluster_name == rhs.remote_cluster_name)) - return false; - if (!(freezed == rhs.freezed)) - return false; - return true; - } - bool operator!=(const duplication_add_request &rhs) const { return !(*this == rhs); } + bool operator == (const duplication_add_request & rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(remote_cluster_name == rhs.remote_cluster_name)) + return false; + if (!(freezed == rhs.freezed)) + return false; + return true; + } + bool operator != (const duplication_add_request &rhs) const { + return !(*this == rhs); + } - bool operator<(const duplication_add_request &) const; + bool operator < (const duplication_add_request & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(duplication_add_request &a, duplication_add_request &b); -inline std::ostream &operator<<(std::ostream &out, const duplication_add_request &obj) +inline std::ostream& operator<<(std::ostream& out, const duplication_add_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_add_response__isset -{ - _duplication_add_response__isset() : err(false), appid(false), dupid(false), hint(false) {} - bool err : 1; - bool appid : 1; - bool dupid : 1; - bool hint : 1; +typedef struct _duplication_add_response__isset { + _duplication_add_response__isset() : err(false), appid(false), dupid(false), hint(false) {} + bool err :1; + bool appid :1; + bool dupid :1; + bool hint :1; } _duplication_add_response__isset; -class duplication_add_response -{ -public: - duplication_add_response(const duplication_add_response &); - duplication_add_response(duplication_add_response &&); - duplication_add_response &operator=(const duplication_add_response &); - duplication_add_response &operator=(duplication_add_response &&); - duplication_add_response() : appid(0), dupid(0), hint() {} - - virtual ~duplication_add_response() throw(); - ::dsn::error_code err; - int32_t appid; - int32_t dupid; - std::string hint; - - _duplication_add_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_appid(const int32_t val); - - void __set_dupid(const int32_t val); - - void __set_hint(const std::string &val); - - bool operator==(const duplication_add_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(appid == rhs.appid)) - return false; - if (!(dupid == rhs.dupid)) - return false; - if (__isset.hint != rhs.__isset.hint) - return false; - else if (__isset.hint && !(hint == rhs.hint)) - return false; - return true; - } - bool operator!=(const duplication_add_response &rhs) const { return !(*this == rhs); } - - bool operator<(const duplication_add_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class duplication_add_response { + public: + + duplication_add_response(const duplication_add_response&); + duplication_add_response(duplication_add_response&&); + duplication_add_response& operator=(const duplication_add_response&); + duplication_add_response& operator=(duplication_add_response&&); + duplication_add_response() : appid(0), dupid(0), hint() { + } + + virtual ~duplication_add_response() throw(); + ::dsn::error_code err; + int32_t appid; + int32_t dupid; + std::string hint; + + _duplication_add_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_appid(const int32_t val); + + void __set_dupid(const int32_t val); + + void __set_hint(const std::string& val); + + bool operator == (const duplication_add_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(appid == rhs.appid)) + return false; + if (!(dupid == rhs.dupid)) + return false; + if (__isset.hint != rhs.__isset.hint) + return false; + else if (__isset.hint && !(hint == rhs.hint)) + return false; + return true; + } + bool operator != (const duplication_add_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const duplication_add_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(duplication_add_response &a, duplication_add_response &b); -inline std::ostream &operator<<(std::ostream &out, const duplication_add_response &obj) +inline std::ostream& operator<<(std::ostream& out, const duplication_add_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_modify_request__isset -{ - _duplication_modify_request__isset() - : app_name(false), dupid(false), status(false), fail_mode(false) - { - } - bool app_name : 1; - bool dupid : 1; - bool status : 1; - bool fail_mode : 1; +typedef struct _duplication_modify_request__isset { + _duplication_modify_request__isset() : app_name(false), dupid(false), status(false), fail_mode(false) {} + bool app_name :1; + bool dupid :1; + bool status :1; + bool fail_mode :1; } _duplication_modify_request__isset; -class duplication_modify_request -{ -public: - duplication_modify_request(const duplication_modify_request &); - duplication_modify_request(duplication_modify_request &&); - duplication_modify_request &operator=(const duplication_modify_request &); - duplication_modify_request &operator=(duplication_modify_request &&); - duplication_modify_request() - : app_name(), - dupid(0), - status((duplication_status::type)0), - fail_mode((duplication_fail_mode::type)0) - { - } - - virtual ~duplication_modify_request() throw(); - std::string app_name; - int32_t dupid; - duplication_status::type status; - duplication_fail_mode::type fail_mode; - - _duplication_modify_request__isset __isset; - - void __set_app_name(const std::string &val); - - void __set_dupid(const int32_t val); - - void __set_status(const duplication_status::type val); - - void __set_fail_mode(const duplication_fail_mode::type val); - - bool operator==(const duplication_modify_request &rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(dupid == rhs.dupid)) - return false; - if (__isset.status != rhs.__isset.status) - return false; - else if (__isset.status && !(status == rhs.status)) - return false; - if (__isset.fail_mode != rhs.__isset.fail_mode) - return false; - else if (__isset.fail_mode && !(fail_mode == rhs.fail_mode)) - return false; - return true; - } - bool operator!=(const duplication_modify_request &rhs) const { return !(*this == rhs); } - - bool operator<(const duplication_modify_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class duplication_modify_request { + public: + + duplication_modify_request(const duplication_modify_request&); + duplication_modify_request(duplication_modify_request&&); + duplication_modify_request& operator=(const duplication_modify_request&); + duplication_modify_request& operator=(duplication_modify_request&&); + duplication_modify_request() : app_name(), dupid(0), status((duplication_status::type)0), fail_mode((duplication_fail_mode::type)0) { + } + + virtual ~duplication_modify_request() throw(); + std::string app_name; + int32_t dupid; + duplication_status::type status; + duplication_fail_mode::type fail_mode; + + _duplication_modify_request__isset __isset; + + void __set_app_name(const std::string& val); + + void __set_dupid(const int32_t val); + + void __set_status(const duplication_status::type val); + + void __set_fail_mode(const duplication_fail_mode::type val); + + bool operator == (const duplication_modify_request & rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(dupid == rhs.dupid)) + return false; + if (__isset.status != rhs.__isset.status) + return false; + else if (__isset.status && !(status == rhs.status)) + return false; + if (__isset.fail_mode != rhs.__isset.fail_mode) + return false; + else if (__isset.fail_mode && !(fail_mode == rhs.fail_mode)) + return false; + return true; + } + bool operator != (const duplication_modify_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const duplication_modify_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(duplication_modify_request &a, duplication_modify_request &b); -inline std::ostream &operator<<(std::ostream &out, const duplication_modify_request &obj) +inline std::ostream& operator<<(std::ostream& out, const duplication_modify_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_modify_response__isset -{ - _duplication_modify_response__isset() : err(false), appid(false) {} - bool err : 1; - bool appid : 1; +typedef struct _duplication_modify_response__isset { + _duplication_modify_response__isset() : err(false), appid(false) {} + bool err :1; + bool appid :1; } _duplication_modify_response__isset; -class duplication_modify_response -{ -public: - duplication_modify_response(const duplication_modify_response &); - duplication_modify_response(duplication_modify_response &&); - duplication_modify_response &operator=(const duplication_modify_response &); - duplication_modify_response &operator=(duplication_modify_response &&); - duplication_modify_response() : appid(0) {} +class duplication_modify_response { + public: + + duplication_modify_response(const duplication_modify_response&); + duplication_modify_response(duplication_modify_response&&); + duplication_modify_response& operator=(const duplication_modify_response&); + duplication_modify_response& operator=(duplication_modify_response&&); + duplication_modify_response() : appid(0) { + } - virtual ~duplication_modify_response() throw(); - ::dsn::error_code err; - int32_t appid; + virtual ~duplication_modify_response() throw(); + ::dsn::error_code err; + int32_t appid; - _duplication_modify_response__isset __isset; + _duplication_modify_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - void __set_appid(const int32_t val); + void __set_appid(const int32_t val); - bool operator==(const duplication_modify_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(appid == rhs.appid)) - return false; - return true; - } - bool operator!=(const duplication_modify_response &rhs) const { return !(*this == rhs); } + bool operator == (const duplication_modify_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(appid == rhs.appid)) + return false; + return true; + } + bool operator != (const duplication_modify_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const duplication_modify_response &) const; + bool operator < (const duplication_modify_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(duplication_modify_response &a, duplication_modify_response &b); -inline std::ostream &operator<<(std::ostream &out, const duplication_modify_response &obj) +inline std::ostream& operator<<(std::ostream& out, const duplication_modify_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_entry__isset -{ - _duplication_entry__isset() - : dupid(false), - status(false), - remote(false), - create_ts(false), - progress(false), - fail_mode(false) - { - } - bool dupid : 1; - bool status : 1; - bool remote : 1; - bool create_ts : 1; - bool progress : 1; - bool fail_mode : 1; +typedef struct _duplication_entry__isset { + _duplication_entry__isset() : dupid(false), status(false), remote(false), create_ts(false), progress(false), fail_mode(false) {} + bool dupid :1; + bool status :1; + bool remote :1; + bool create_ts :1; + bool progress :1; + bool fail_mode :1; } _duplication_entry__isset; -class duplication_entry -{ -public: - duplication_entry(const duplication_entry &); - duplication_entry(duplication_entry &&); - duplication_entry &operator=(const duplication_entry &); - duplication_entry &operator=(duplication_entry &&); - duplication_entry() - : dupid(0), - status((duplication_status::type)0), - remote(), - create_ts(0), - fail_mode((duplication_fail_mode::type)0) - { - } - - virtual ~duplication_entry() throw(); - int32_t dupid; - duplication_status::type status; - std::string remote; - int64_t create_ts; - std::map progress; - duplication_fail_mode::type fail_mode; - - _duplication_entry__isset __isset; - - void __set_dupid(const int32_t val); - - void __set_status(const duplication_status::type val); - - void __set_remote(const std::string &val); - - void __set_create_ts(const int64_t val); - - void __set_progress(const std::map &val); - - void __set_fail_mode(const duplication_fail_mode::type val); - - bool operator==(const duplication_entry &rhs) const - { - if (!(dupid == rhs.dupid)) - return false; - if (!(status == rhs.status)) - return false; - if (!(remote == rhs.remote)) - return false; - if (!(create_ts == rhs.create_ts)) - return false; - if (__isset.progress != rhs.__isset.progress) - return false; - else if (__isset.progress && !(progress == rhs.progress)) - return false; - if (__isset.fail_mode != rhs.__isset.fail_mode) - return false; - else if (__isset.fail_mode && !(fail_mode == rhs.fail_mode)) - return false; - return true; - } - bool operator!=(const duplication_entry &rhs) const { return !(*this == rhs); } - - bool operator<(const duplication_entry &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class duplication_entry { + public: + + duplication_entry(const duplication_entry&); + duplication_entry(duplication_entry&&); + duplication_entry& operator=(const duplication_entry&); + duplication_entry& operator=(duplication_entry&&); + duplication_entry() : dupid(0), status((duplication_status::type)0), remote(), create_ts(0), fail_mode((duplication_fail_mode::type)0) { + } + + virtual ~duplication_entry() throw(); + int32_t dupid; + duplication_status::type status; + std::string remote; + int64_t create_ts; + std::map progress; + duplication_fail_mode::type fail_mode; + + _duplication_entry__isset __isset; + + void __set_dupid(const int32_t val); + + void __set_status(const duplication_status::type val); + + void __set_remote(const std::string& val); + + void __set_create_ts(const int64_t val); + + void __set_progress(const std::map & val); + + void __set_fail_mode(const duplication_fail_mode::type val); + + bool operator == (const duplication_entry & rhs) const + { + if (!(dupid == rhs.dupid)) + return false; + if (!(status == rhs.status)) + return false; + if (!(remote == rhs.remote)) + return false; + if (!(create_ts == rhs.create_ts)) + return false; + if (__isset.progress != rhs.__isset.progress) + return false; + else if (__isset.progress && !(progress == rhs.progress)) + return false; + if (__isset.fail_mode != rhs.__isset.fail_mode) + return false; + else if (__isset.fail_mode && !(fail_mode == rhs.fail_mode)) + return false; + return true; + } + bool operator != (const duplication_entry &rhs) const { + return !(*this == rhs); + } + + bool operator < (const duplication_entry & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(duplication_entry &a, duplication_entry &b); -inline std::ostream &operator<<(std::ostream &out, const duplication_entry &obj) +inline std::ostream& operator<<(std::ostream& out, const duplication_entry& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_query_request__isset -{ - _duplication_query_request__isset() : app_name(false) {} - bool app_name : 1; +typedef struct _duplication_query_request__isset { + _duplication_query_request__isset() : app_name(false) {} + bool app_name :1; } _duplication_query_request__isset; -class duplication_query_request -{ -public: - duplication_query_request(const duplication_query_request &); - duplication_query_request(duplication_query_request &&); - duplication_query_request &operator=(const duplication_query_request &); - duplication_query_request &operator=(duplication_query_request &&); - duplication_query_request() : app_name() {} +class duplication_query_request { + public: + + duplication_query_request(const duplication_query_request&); + duplication_query_request(duplication_query_request&&); + duplication_query_request& operator=(const duplication_query_request&); + duplication_query_request& operator=(duplication_query_request&&); + duplication_query_request() : app_name() { + } - virtual ~duplication_query_request() throw(); - std::string app_name; + virtual ~duplication_query_request() throw(); + std::string app_name; - _duplication_query_request__isset __isset; + _duplication_query_request__isset __isset; - void __set_app_name(const std::string &val); + void __set_app_name(const std::string& val); - bool operator==(const duplication_query_request &rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - return true; - } - bool operator!=(const duplication_query_request &rhs) const { return !(*this == rhs); } + bool operator == (const duplication_query_request & rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + return true; + } + bool operator != (const duplication_query_request &rhs) const { + return !(*this == rhs); + } - bool operator<(const duplication_query_request &) const; + bool operator < (const duplication_query_request & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(duplication_query_request &a, duplication_query_request &b); -inline std::ostream &operator<<(std::ostream &out, const duplication_query_request &obj) +inline std::ostream& operator<<(std::ostream& out, const duplication_query_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_query_response__isset -{ - _duplication_query_response__isset() : err(false), appid(false), entry_list(false) {} - bool err : 1; - bool appid : 1; - bool entry_list : 1; +typedef struct _duplication_query_response__isset { + _duplication_query_response__isset() : err(false), appid(false), entry_list(false) {} + bool err :1; + bool appid :1; + bool entry_list :1; } _duplication_query_response__isset; -class duplication_query_response -{ -public: - duplication_query_response(const duplication_query_response &); - duplication_query_response(duplication_query_response &&); - duplication_query_response &operator=(const duplication_query_response &); - duplication_query_response &operator=(duplication_query_response &&); - duplication_query_response() : appid(0) {} +class duplication_query_response { + public: + + duplication_query_response(const duplication_query_response&); + duplication_query_response(duplication_query_response&&); + duplication_query_response& operator=(const duplication_query_response&); + duplication_query_response& operator=(duplication_query_response&&); + duplication_query_response() : appid(0) { + } - virtual ~duplication_query_response() throw(); - ::dsn::error_code err; - int32_t appid; - std::vector entry_list; + virtual ~duplication_query_response() throw(); + ::dsn::error_code err; + int32_t appid; + std::vector entry_list; - _duplication_query_response__isset __isset; + _duplication_query_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - void __set_appid(const int32_t val); + void __set_appid(const int32_t val); - void __set_entry_list(const std::vector &val); + void __set_entry_list(const std::vector & val); - bool operator==(const duplication_query_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(appid == rhs.appid)) - return false; - if (!(entry_list == rhs.entry_list)) - return false; - return true; - } - bool operator!=(const duplication_query_response &rhs) const { return !(*this == rhs); } + bool operator == (const duplication_query_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(appid == rhs.appid)) + return false; + if (!(entry_list == rhs.entry_list)) + return false; + return true; + } + bool operator != (const duplication_query_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const duplication_query_response &) const; + bool operator < (const duplication_query_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(duplication_query_response &a, duplication_query_response &b); -inline std::ostream &operator<<(std::ostream &out, const duplication_query_response &obj) +inline std::ostream& operator<<(std::ostream& out, const duplication_query_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_confirm_entry__isset -{ - _duplication_confirm_entry__isset() : dupid(false), confirmed_decree(false) {} - bool dupid : 1; - bool confirmed_decree : 1; +typedef struct _duplication_confirm_entry__isset { + _duplication_confirm_entry__isset() : dupid(false), confirmed_decree(false) {} + bool dupid :1; + bool confirmed_decree :1; } _duplication_confirm_entry__isset; -class duplication_confirm_entry -{ -public: - duplication_confirm_entry(const duplication_confirm_entry &); - duplication_confirm_entry(duplication_confirm_entry &&); - duplication_confirm_entry &operator=(const duplication_confirm_entry &); - duplication_confirm_entry &operator=(duplication_confirm_entry &&); - duplication_confirm_entry() : dupid(0), confirmed_decree(0) {} +class duplication_confirm_entry { + public: + + duplication_confirm_entry(const duplication_confirm_entry&); + duplication_confirm_entry(duplication_confirm_entry&&); + duplication_confirm_entry& operator=(const duplication_confirm_entry&); + duplication_confirm_entry& operator=(duplication_confirm_entry&&); + duplication_confirm_entry() : dupid(0), confirmed_decree(0) { + } - virtual ~duplication_confirm_entry() throw(); - int32_t dupid; - int64_t confirmed_decree; + virtual ~duplication_confirm_entry() throw(); + int32_t dupid; + int64_t confirmed_decree; - _duplication_confirm_entry__isset __isset; + _duplication_confirm_entry__isset __isset; - void __set_dupid(const int32_t val); + void __set_dupid(const int32_t val); - void __set_confirmed_decree(const int64_t val); + void __set_confirmed_decree(const int64_t val); - bool operator==(const duplication_confirm_entry &rhs) const - { - if (!(dupid == rhs.dupid)) - return false; - if (!(confirmed_decree == rhs.confirmed_decree)) - return false; - return true; - } - bool operator!=(const duplication_confirm_entry &rhs) const { return !(*this == rhs); } + bool operator == (const duplication_confirm_entry & rhs) const + { + if (!(dupid == rhs.dupid)) + return false; + if (!(confirmed_decree == rhs.confirmed_decree)) + return false; + return true; + } + bool operator != (const duplication_confirm_entry &rhs) const { + return !(*this == rhs); + } - bool operator<(const duplication_confirm_entry &) const; + bool operator < (const duplication_confirm_entry & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(duplication_confirm_entry &a, duplication_confirm_entry &b); -inline std::ostream &operator<<(std::ostream &out, const duplication_confirm_entry &obj) +inline std::ostream& operator<<(std::ostream& out, const duplication_confirm_entry& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_sync_request__isset -{ - _duplication_sync_request__isset() : node(false), confirm_list(false) {} - bool node : 1; - bool confirm_list : 1; +typedef struct _duplication_sync_request__isset { + _duplication_sync_request__isset() : node(false), confirm_list(false) {} + bool node :1; + bool confirm_list :1; } _duplication_sync_request__isset; -class duplication_sync_request -{ -public: - duplication_sync_request(const duplication_sync_request &); - duplication_sync_request(duplication_sync_request &&); - duplication_sync_request &operator=(const duplication_sync_request &); - duplication_sync_request &operator=(duplication_sync_request &&); - duplication_sync_request() {} +class duplication_sync_request { + public: - virtual ~duplication_sync_request() throw(); - ::dsn::rpc_address node; - std::map<::dsn::gpid, std::vector> confirm_list; + duplication_sync_request(const duplication_sync_request&); + duplication_sync_request(duplication_sync_request&&); + duplication_sync_request& operator=(const duplication_sync_request&); + duplication_sync_request& operator=(duplication_sync_request&&); + duplication_sync_request() { + } - _duplication_sync_request__isset __isset; + virtual ~duplication_sync_request() throw(); + ::dsn::rpc_address node; + std::map< ::dsn::gpid, std::vector > confirm_list; - void __set_node(const ::dsn::rpc_address &val); + _duplication_sync_request__isset __isset; - void - __set_confirm_list(const std::map<::dsn::gpid, std::vector> &val); + void __set_node(const ::dsn::rpc_address& val); - bool operator==(const duplication_sync_request &rhs) const - { - if (!(node == rhs.node)) - return false; - if (!(confirm_list == rhs.confirm_list)) - return false; - return true; - } - bool operator!=(const duplication_sync_request &rhs) const { return !(*this == rhs); } + void __set_confirm_list(const std::map< ::dsn::gpid, std::vector > & val); - bool operator<(const duplication_sync_request &) const; + bool operator == (const duplication_sync_request & rhs) const + { + if (!(node == rhs.node)) + return false; + if (!(confirm_list == rhs.confirm_list)) + return false; + return true; + } + bool operator != (const duplication_sync_request &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const duplication_sync_request & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(duplication_sync_request &a, duplication_sync_request &b); -inline std::ostream &operator<<(std::ostream &out, const duplication_sync_request &obj) +inline std::ostream& operator<<(std::ostream& out, const duplication_sync_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_sync_response__isset -{ - _duplication_sync_response__isset() : err(false), dup_map(false) {} - bool err : 1; - bool dup_map : 1; +typedef struct _duplication_sync_response__isset { + _duplication_sync_response__isset() : err(false), dup_map(false) {} + bool err :1; + bool dup_map :1; } _duplication_sync_response__isset; -class duplication_sync_response -{ -public: - duplication_sync_response(const duplication_sync_response &); - duplication_sync_response(duplication_sync_response &&); - duplication_sync_response &operator=(const duplication_sync_response &); - duplication_sync_response &operator=(duplication_sync_response &&); - duplication_sync_response() {} +class duplication_sync_response { + public: - virtual ~duplication_sync_response() throw(); - ::dsn::error_code err; - std::map> dup_map; + duplication_sync_response(const duplication_sync_response&); + duplication_sync_response(duplication_sync_response&&); + duplication_sync_response& operator=(const duplication_sync_response&); + duplication_sync_response& operator=(duplication_sync_response&&); + duplication_sync_response() { + } - _duplication_sync_response__isset __isset; + virtual ~duplication_sync_response() throw(); + ::dsn::error_code err; + std::map > dup_map; - void __set_err(const ::dsn::error_code &val); + _duplication_sync_response__isset __isset; - void __set_dup_map(const std::map> &val); + void __set_err(const ::dsn::error_code& val); - bool operator==(const duplication_sync_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(dup_map == rhs.dup_map)) - return false; - return true; - } - bool operator!=(const duplication_sync_response &rhs) const { return !(*this == rhs); } + void __set_dup_map(const std::map > & val); - bool operator<(const duplication_sync_response &) const; + bool operator == (const duplication_sync_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(dup_map == rhs.dup_map)) + return false; + return true; + } + bool operator != (const duplication_sync_response &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const duplication_sync_response & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(duplication_sync_response &a, duplication_sync_response &b); -inline std::ostream &operator<<(std::ostream &out, const duplication_sync_response &obj) +inline std::ostream& operator<<(std::ostream& out, const duplication_sync_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _ddd_diagnose_request__isset -{ - _ddd_diagnose_request__isset() : pid(false) {} - bool pid : 1; +typedef struct _ddd_diagnose_request__isset { + _ddd_diagnose_request__isset() : pid(false) {} + bool pid :1; } _ddd_diagnose_request__isset; -class ddd_diagnose_request -{ -public: - ddd_diagnose_request(const ddd_diagnose_request &); - ddd_diagnose_request(ddd_diagnose_request &&); - ddd_diagnose_request &operator=(const ddd_diagnose_request &); - ddd_diagnose_request &operator=(ddd_diagnose_request &&); - ddd_diagnose_request() {} +class ddd_diagnose_request { + public: + + ddd_diagnose_request(const ddd_diagnose_request&); + ddd_diagnose_request(ddd_diagnose_request&&); + ddd_diagnose_request& operator=(const ddd_diagnose_request&); + ddd_diagnose_request& operator=(ddd_diagnose_request&&); + ddd_diagnose_request() { + } - virtual ~ddd_diagnose_request() throw(); - ::dsn::gpid pid; + virtual ~ddd_diagnose_request() throw(); + ::dsn::gpid pid; - _ddd_diagnose_request__isset __isset; + _ddd_diagnose_request__isset __isset; - void __set_pid(const ::dsn::gpid &val); + void __set_pid(const ::dsn::gpid& val); - bool operator==(const ddd_diagnose_request &rhs) const - { - if (!(pid == rhs.pid)) - return false; - return true; - } - bool operator!=(const ddd_diagnose_request &rhs) const { return !(*this == rhs); } + bool operator == (const ddd_diagnose_request & rhs) const + { + if (!(pid == rhs.pid)) + return false; + return true; + } + bool operator != (const ddd_diagnose_request &rhs) const { + return !(*this == rhs); + } - bool operator<(const ddd_diagnose_request &) const; + bool operator < (const ddd_diagnose_request & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(ddd_diagnose_request &a, ddd_diagnose_request &b); -inline std::ostream &operator<<(std::ostream &out, const ddd_diagnose_request &obj) +inline std::ostream& operator<<(std::ostream& out, const ddd_diagnose_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _ddd_node_info__isset -{ - _ddd_node_info__isset() - : node(false), - drop_time_ms(false), - is_alive(false), - is_collected(false), - ballot(false), - last_committed_decree(false), - last_prepared_decree(false) - { - } - bool node : 1; - bool drop_time_ms : 1; - bool is_alive : 1; - bool is_collected : 1; - bool ballot : 1; - bool last_committed_decree : 1; - bool last_prepared_decree : 1; +typedef struct _ddd_node_info__isset { + _ddd_node_info__isset() : node(false), drop_time_ms(false), is_alive(false), is_collected(false), ballot(false), last_committed_decree(false), last_prepared_decree(false) {} + bool node :1; + bool drop_time_ms :1; + bool is_alive :1; + bool is_collected :1; + bool ballot :1; + bool last_committed_decree :1; + bool last_prepared_decree :1; } _ddd_node_info__isset; -class ddd_node_info -{ -public: - ddd_node_info(const ddd_node_info &); - ddd_node_info(ddd_node_info &&); - ddd_node_info &operator=(const ddd_node_info &); - ddd_node_info &operator=(ddd_node_info &&); - ddd_node_info() - : drop_time_ms(0), - is_alive(0), - is_collected(0), - ballot(0), - last_committed_decree(0), - last_prepared_decree(0) - { - } - - virtual ~ddd_node_info() throw(); - ::dsn::rpc_address node; - int64_t drop_time_ms; - bool is_alive; - bool is_collected; - int64_t ballot; - int64_t last_committed_decree; - int64_t last_prepared_decree; - - _ddd_node_info__isset __isset; - - void __set_node(const ::dsn::rpc_address &val); - - void __set_drop_time_ms(const int64_t val); - - void __set_is_alive(const bool val); - - void __set_is_collected(const bool val); - - void __set_ballot(const int64_t val); - - void __set_last_committed_decree(const int64_t val); - - void __set_last_prepared_decree(const int64_t val); - - bool operator==(const ddd_node_info &rhs) const - { - if (!(node == rhs.node)) - return false; - if (!(drop_time_ms == rhs.drop_time_ms)) - return false; - if (!(is_alive == rhs.is_alive)) - return false; - if (!(is_collected == rhs.is_collected)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (!(last_prepared_decree == rhs.last_prepared_decree)) - return false; - return true; - } - bool operator!=(const ddd_node_info &rhs) const { return !(*this == rhs); } - - bool operator<(const ddd_node_info &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class ddd_node_info { + public: + + ddd_node_info(const ddd_node_info&); + ddd_node_info(ddd_node_info&&); + ddd_node_info& operator=(const ddd_node_info&); + ddd_node_info& operator=(ddd_node_info&&); + ddd_node_info() : drop_time_ms(0), is_alive(0), is_collected(0), ballot(0), last_committed_decree(0), last_prepared_decree(0) { + } + + virtual ~ddd_node_info() throw(); + ::dsn::rpc_address node; + int64_t drop_time_ms; + bool is_alive; + bool is_collected; + int64_t ballot; + int64_t last_committed_decree; + int64_t last_prepared_decree; + + _ddd_node_info__isset __isset; + + void __set_node(const ::dsn::rpc_address& val); + + void __set_drop_time_ms(const int64_t val); + + void __set_is_alive(const bool val); + + void __set_is_collected(const bool val); + + void __set_ballot(const int64_t val); + + void __set_last_committed_decree(const int64_t val); + + void __set_last_prepared_decree(const int64_t val); + + bool operator == (const ddd_node_info & rhs) const + { + if (!(node == rhs.node)) + return false; + if (!(drop_time_ms == rhs.drop_time_ms)) + return false; + if (!(is_alive == rhs.is_alive)) + return false; + if (!(is_collected == rhs.is_collected)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (!(last_prepared_decree == rhs.last_prepared_decree)) + return false; + return true; + } + bool operator != (const ddd_node_info &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ddd_node_info & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(ddd_node_info &a, ddd_node_info &b); -inline std::ostream &operator<<(std::ostream &out, const ddd_node_info &obj) +inline std::ostream& operator<<(std::ostream& out, const ddd_node_info& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _ddd_partition_info__isset -{ - _ddd_partition_info__isset() : config(false), dropped(false), reason(false) {} - bool config : 1; - bool dropped : 1; - bool reason : 1; +typedef struct _ddd_partition_info__isset { + _ddd_partition_info__isset() : config(false), dropped(false), reason(false) {} + bool config :1; + bool dropped :1; + bool reason :1; } _ddd_partition_info__isset; -class ddd_partition_info -{ -public: - ddd_partition_info(const ddd_partition_info &); - ddd_partition_info(ddd_partition_info &&); - ddd_partition_info &operator=(const ddd_partition_info &); - ddd_partition_info &operator=(ddd_partition_info &&); - ddd_partition_info() : reason() {} +class ddd_partition_info { + public: + + ddd_partition_info(const ddd_partition_info&); + ddd_partition_info(ddd_partition_info&&); + ddd_partition_info& operator=(const ddd_partition_info&); + ddd_partition_info& operator=(ddd_partition_info&&); + ddd_partition_info() : reason() { + } - virtual ~ddd_partition_info() throw(); - ::dsn::partition_configuration config; - std::vector dropped; - std::string reason; + virtual ~ddd_partition_info() throw(); + ::dsn::partition_configuration config; + std::vector dropped; + std::string reason; - _ddd_partition_info__isset __isset; + _ddd_partition_info__isset __isset; - void __set_config(const ::dsn::partition_configuration &val); + void __set_config(const ::dsn::partition_configuration& val); - void __set_dropped(const std::vector &val); + void __set_dropped(const std::vector & val); - void __set_reason(const std::string &val); + void __set_reason(const std::string& val); - bool operator==(const ddd_partition_info &rhs) const - { - if (!(config == rhs.config)) - return false; - if (!(dropped == rhs.dropped)) - return false; - if (!(reason == rhs.reason)) - return false; - return true; - } - bool operator!=(const ddd_partition_info &rhs) const { return !(*this == rhs); } + bool operator == (const ddd_partition_info & rhs) const + { + if (!(config == rhs.config)) + return false; + if (!(dropped == rhs.dropped)) + return false; + if (!(reason == rhs.reason)) + return false; + return true; + } + bool operator != (const ddd_partition_info &rhs) const { + return !(*this == rhs); + } - bool operator<(const ddd_partition_info &) const; + bool operator < (const ddd_partition_info & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(ddd_partition_info &a, ddd_partition_info &b); -inline std::ostream &operator<<(std::ostream &out, const ddd_partition_info &obj) +inline std::ostream& operator<<(std::ostream& out, const ddd_partition_info& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _ddd_diagnose_response__isset -{ - _ddd_diagnose_response__isset() : err(false), partitions(false) {} - bool err : 1; - bool partitions : 1; +typedef struct _ddd_diagnose_response__isset { + _ddd_diagnose_response__isset() : err(false), partitions(false) {} + bool err :1; + bool partitions :1; } _ddd_diagnose_response__isset; -class ddd_diagnose_response -{ -public: - ddd_diagnose_response(const ddd_diagnose_response &); - ddd_diagnose_response(ddd_diagnose_response &&); - ddd_diagnose_response &operator=(const ddd_diagnose_response &); - ddd_diagnose_response &operator=(ddd_diagnose_response &&); - ddd_diagnose_response() {} +class ddd_diagnose_response { + public: + + ddd_diagnose_response(const ddd_diagnose_response&); + ddd_diagnose_response(ddd_diagnose_response&&); + ddd_diagnose_response& operator=(const ddd_diagnose_response&); + ddd_diagnose_response& operator=(ddd_diagnose_response&&); + ddd_diagnose_response() { + } - virtual ~ddd_diagnose_response() throw(); - ::dsn::error_code err; - std::vector partitions; + virtual ~ddd_diagnose_response() throw(); + ::dsn::error_code err; + std::vector partitions; - _ddd_diagnose_response__isset __isset; + _ddd_diagnose_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - void __set_partitions(const std::vector &val); + void __set_partitions(const std::vector & val); - bool operator==(const ddd_diagnose_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(partitions == rhs.partitions)) - return false; - return true; - } - bool operator!=(const ddd_diagnose_response &rhs) const { return !(*this == rhs); } + bool operator == (const ddd_diagnose_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(partitions == rhs.partitions)) + return false; + return true; + } + bool operator != (const ddd_diagnose_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const ddd_diagnose_response &) const; + bool operator < (const ddd_diagnose_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(ddd_diagnose_response &a, ddd_diagnose_response &b); -inline std::ostream &operator<<(std::ostream &out, const ddd_diagnose_response &obj) +inline std::ostream& operator<<(std::ostream& out, const ddd_diagnose_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _app_partition_split_request__isset -{ - _app_partition_split_request__isset() : app_name(false), new_partition_count(false) {} - bool app_name : 1; - bool new_partition_count : 1; +typedef struct _app_partition_split_request__isset { + _app_partition_split_request__isset() : app_name(false), new_partition_count(false) {} + bool app_name :1; + bool new_partition_count :1; } _app_partition_split_request__isset; -class app_partition_split_request -{ -public: - app_partition_split_request(const app_partition_split_request &); - app_partition_split_request(app_partition_split_request &&); - app_partition_split_request &operator=(const app_partition_split_request &); - app_partition_split_request &operator=(app_partition_split_request &&); - app_partition_split_request() : app_name(), new_partition_count(0) {} +class app_partition_split_request { + public: + + app_partition_split_request(const app_partition_split_request&); + app_partition_split_request(app_partition_split_request&&); + app_partition_split_request& operator=(const app_partition_split_request&); + app_partition_split_request& operator=(app_partition_split_request&&); + app_partition_split_request() : app_name(), new_partition_count(0) { + } - virtual ~app_partition_split_request() throw(); - std::string app_name; - int32_t new_partition_count; + virtual ~app_partition_split_request() throw(); + std::string app_name; + int32_t new_partition_count; - _app_partition_split_request__isset __isset; + _app_partition_split_request__isset __isset; - void __set_app_name(const std::string &val); + void __set_app_name(const std::string& val); - void __set_new_partition_count(const int32_t val); + void __set_new_partition_count(const int32_t val); - bool operator==(const app_partition_split_request &rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(new_partition_count == rhs.new_partition_count)) - return false; - return true; - } - bool operator!=(const app_partition_split_request &rhs) const { return !(*this == rhs); } + bool operator == (const app_partition_split_request & rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(new_partition_count == rhs.new_partition_count)) + return false; + return true; + } + bool operator != (const app_partition_split_request &rhs) const { + return !(*this == rhs); + } - bool operator<(const app_partition_split_request &) const; + bool operator < (const app_partition_split_request & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(app_partition_split_request &a, app_partition_split_request &b); -inline std::ostream &operator<<(std::ostream &out, const app_partition_split_request &obj) +inline std::ostream& operator<<(std::ostream& out, const app_partition_split_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _app_partition_split_response__isset -{ - _app_partition_split_response__isset() : err(false), app_id(false), partition_count(false) {} - bool err : 1; - bool app_id : 1; - bool partition_count : 1; +typedef struct _app_partition_split_response__isset { + _app_partition_split_response__isset() : err(false), app_id(false), partition_count(false) {} + bool err :1; + bool app_id :1; + bool partition_count :1; } _app_partition_split_response__isset; -class app_partition_split_response -{ -public: - app_partition_split_response(const app_partition_split_response &); - app_partition_split_response(app_partition_split_response &&); - app_partition_split_response &operator=(const app_partition_split_response &); - app_partition_split_response &operator=(app_partition_split_response &&); - app_partition_split_response() : app_id(0), partition_count(0) {} +class app_partition_split_response { + public: - virtual ~app_partition_split_response() throw(); - ::dsn::error_code err; - int32_t app_id; - int32_t partition_count; + app_partition_split_response(const app_partition_split_response&); + app_partition_split_response(app_partition_split_response&&); + app_partition_split_response& operator=(const app_partition_split_response&); + app_partition_split_response& operator=(app_partition_split_response&&); + app_partition_split_response() : app_id(0), partition_count(0) { + } - _app_partition_split_response__isset __isset; + virtual ~app_partition_split_response() throw(); + ::dsn::error_code err; + int32_t app_id; + int32_t partition_count; - void __set_err(const ::dsn::error_code &val); + _app_partition_split_response__isset __isset; - void __set_app_id(const int32_t val); + void __set_err(const ::dsn::error_code& val); - void __set_partition_count(const int32_t val); + void __set_app_id(const int32_t val); - bool operator==(const app_partition_split_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(app_id == rhs.app_id)) - return false; - if (!(partition_count == rhs.partition_count)) - return false; - return true; - } - bool operator!=(const app_partition_split_response &rhs) const { return !(*this == rhs); } + void __set_partition_count(const int32_t val); - bool operator<(const app_partition_split_response &) const; + bool operator == (const app_partition_split_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(app_id == rhs.app_id)) + return false; + if (!(partition_count == rhs.partition_count)) + return false; + return true; + } + bool operator != (const app_partition_split_response &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const app_partition_split_response & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(app_partition_split_response &a, app_partition_split_response &b); -inline std::ostream &operator<<(std::ostream &out, const app_partition_split_response &obj) +inline std::ostream& operator<<(std::ostream& out, const app_partition_split_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _notify_catch_up_request__isset -{ - _notify_catch_up_request__isset() - : parent_gpid(false), child_gpid(false), child_ballot(false), child_address(false) - { - } - bool parent_gpid : 1; - bool child_gpid : 1; - bool child_ballot : 1; - bool child_address : 1; +typedef struct _notify_catch_up_request__isset { + _notify_catch_up_request__isset() : parent_gpid(false), child_gpid(false), child_ballot(false), child_address(false) {} + bool parent_gpid :1; + bool child_gpid :1; + bool child_ballot :1; + bool child_address :1; } _notify_catch_up_request__isset; -class notify_catch_up_request -{ -public: - notify_catch_up_request(const notify_catch_up_request &); - notify_catch_up_request(notify_catch_up_request &&); - notify_catch_up_request &operator=(const notify_catch_up_request &); - notify_catch_up_request &operator=(notify_catch_up_request &&); - notify_catch_up_request() : child_ballot(0) {} +class notify_catch_up_request { + public: - virtual ~notify_catch_up_request() throw(); - ::dsn::gpid parent_gpid; - ::dsn::gpid child_gpid; - int64_t child_ballot; - ::dsn::rpc_address child_address; + notify_catch_up_request(const notify_catch_up_request&); + notify_catch_up_request(notify_catch_up_request&&); + notify_catch_up_request& operator=(const notify_catch_up_request&); + notify_catch_up_request& operator=(notify_catch_up_request&&); + notify_catch_up_request() : child_ballot(0) { + } - _notify_catch_up_request__isset __isset; + virtual ~notify_catch_up_request() throw(); + ::dsn::gpid parent_gpid; + ::dsn::gpid child_gpid; + int64_t child_ballot; + ::dsn::rpc_address child_address; - void __set_parent_gpid(const ::dsn::gpid &val); + _notify_catch_up_request__isset __isset; - void __set_child_gpid(const ::dsn::gpid &val); + void __set_parent_gpid(const ::dsn::gpid& val); - void __set_child_ballot(const int64_t val); + void __set_child_gpid(const ::dsn::gpid& val); - void __set_child_address(const ::dsn::rpc_address &val); + void __set_child_ballot(const int64_t val); - bool operator==(const notify_catch_up_request &rhs) const - { - if (!(parent_gpid == rhs.parent_gpid)) - return false; - if (!(child_gpid == rhs.child_gpid)) - return false; - if (!(child_ballot == rhs.child_ballot)) - return false; - if (!(child_address == rhs.child_address)) - return false; - return true; - } - bool operator!=(const notify_catch_up_request &rhs) const { return !(*this == rhs); } + void __set_child_address(const ::dsn::rpc_address& val); - bool operator<(const notify_catch_up_request &) const; + bool operator == (const notify_catch_up_request & rhs) const + { + if (!(parent_gpid == rhs.parent_gpid)) + return false; + if (!(child_gpid == rhs.child_gpid)) + return false; + if (!(child_ballot == rhs.child_ballot)) + return false; + if (!(child_address == rhs.child_address)) + return false; + return true; + } + bool operator != (const notify_catch_up_request &rhs) const { + return !(*this == rhs); + } - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + bool operator < (const notify_catch_up_request & ) const; - virtual void printTo(std::ostream &out) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(notify_catch_up_request &a, notify_catch_up_request &b); -inline std::ostream &operator<<(std::ostream &out, const notify_catch_up_request &obj) +inline std::ostream& operator<<(std::ostream& out, const notify_catch_up_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _notify_cacth_up_response__isset -{ - _notify_cacth_up_response__isset() : err(false) {} - bool err : 1; +typedef struct _notify_cacth_up_response__isset { + _notify_cacth_up_response__isset() : err(false) {} + bool err :1; } _notify_cacth_up_response__isset; -class notify_cacth_up_response -{ -public: - notify_cacth_up_response(const notify_cacth_up_response &); - notify_cacth_up_response(notify_cacth_up_response &&); - notify_cacth_up_response &operator=(const notify_cacth_up_response &); - notify_cacth_up_response &operator=(notify_cacth_up_response &&); - notify_cacth_up_response() {} +class notify_cacth_up_response { + public: + + notify_cacth_up_response(const notify_cacth_up_response&); + notify_cacth_up_response(notify_cacth_up_response&&); + notify_cacth_up_response& operator=(const notify_cacth_up_response&); + notify_cacth_up_response& operator=(notify_cacth_up_response&&); + notify_cacth_up_response() { + } - virtual ~notify_cacth_up_response() throw(); - ::dsn::error_code err; + virtual ~notify_cacth_up_response() throw(); + ::dsn::error_code err; - _notify_cacth_up_response__isset __isset; + _notify_cacth_up_response__isset __isset; - void __set_err(const ::dsn::error_code &val); + void __set_err(const ::dsn::error_code& val); - bool operator==(const notify_cacth_up_response &rhs) const - { - if (!(err == rhs.err)) - return false; - return true; - } - bool operator!=(const notify_cacth_up_response &rhs) const { return !(*this == rhs); } + bool operator == (const notify_cacth_up_response & rhs) const + { + if (!(err == rhs.err)) + return false; + return true; + } + bool operator != (const notify_cacth_up_response &rhs) const { + return !(*this == rhs); + } - bool operator<(const notify_cacth_up_response &) const; + bool operator < (const notify_cacth_up_response & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; void swap(notify_cacth_up_response &a, notify_cacth_up_response &b); -inline std::ostream &operator<<(std::ostream &out, const notify_cacth_up_response &obj) +inline std::ostream& operator<<(std::ostream& out, const notify_cacth_up_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _bulk_load_metadata__isset -{ - _bulk_load_metadata__isset() : files(false), file_total_size(false) {} - bool files : 1; - bool file_total_size : 1; +typedef struct _bulk_load_metadata__isset { + _bulk_load_metadata__isset() : files(false), file_total_size(false) {} + bool files :1; + bool file_total_size :1; } _bulk_load_metadata__isset; -class bulk_load_metadata -{ -public: - bulk_load_metadata(const bulk_load_metadata &); - bulk_load_metadata(bulk_load_metadata &&); - bulk_load_metadata &operator=(const bulk_load_metadata &); - bulk_load_metadata &operator=(bulk_load_metadata &&); - bulk_load_metadata() : file_total_size(0) {} - - virtual ~bulk_load_metadata() throw(); - std::vector files; - int64_t file_total_size; - - _bulk_load_metadata__isset __isset; - - void __set_files(const std::vector &val); - - void __set_file_total_size(const int64_t val); - - bool operator==(const bulk_load_metadata &rhs) const - { - if (!(files == rhs.files)) - return false; - if (!(file_total_size == rhs.file_total_size)) - return false; - return true; - } - bool operator!=(const bulk_load_metadata &rhs) const { return !(*this == rhs); } - - bool operator<(const bulk_load_metadata &) const; +class bulk_load_metadata { + public: - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; -}; - -void swap(bulk_load_metadata &a, bulk_load_metadata &b); - -inline std::ostream &operator<<(std::ostream &out, const bulk_load_metadata &obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _start_bulk_load_request__isset -{ - _start_bulk_load_request__isset() - : app_name(false), cluster_name(false), file_provider_type(false) - { - } - bool app_name : 1; - bool cluster_name : 1; - bool file_provider_type : 1; -} _start_bulk_load_request__isset; - -class start_bulk_load_request -{ -public: - start_bulk_load_request(const start_bulk_load_request &); - start_bulk_load_request(start_bulk_load_request &&); - start_bulk_load_request &operator=(const start_bulk_load_request &); - start_bulk_load_request &operator=(start_bulk_load_request &&); - start_bulk_load_request() : app_name(), cluster_name(), file_provider_type() {} + bulk_load_metadata(const bulk_load_metadata&); + bulk_load_metadata(bulk_load_metadata&&); + bulk_load_metadata& operator=(const bulk_load_metadata&); + bulk_load_metadata& operator=(bulk_load_metadata&&); + bulk_load_metadata() : file_total_size(0) { + } - virtual ~start_bulk_load_request() throw(); - std::string app_name; - std::string cluster_name; - std::string file_provider_type; + virtual ~bulk_load_metadata() throw(); + std::vector files; + int64_t file_total_size; - _start_bulk_load_request__isset __isset; + _bulk_load_metadata__isset __isset; - void __set_app_name(const std::string &val); + void __set_files(const std::vector & val); - void __set_cluster_name(const std::string &val); + void __set_file_total_size(const int64_t val); - void __set_file_provider_type(const std::string &val); + bool operator == (const bulk_load_metadata & rhs) const + { + if (!(files == rhs.files)) + return false; + if (!(file_total_size == rhs.file_total_size)) + return false; + return true; + } + bool operator != (const bulk_load_metadata &rhs) const { + return !(*this == rhs); + } - bool operator==(const start_bulk_load_request &rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(cluster_name == rhs.cluster_name)) - return false; - if (!(file_provider_type == rhs.file_provider_type)) - return false; - return true; - } - bool operator!=(const start_bulk_load_request &rhs) const { return !(*this == rhs); } + bool operator < (const bulk_load_metadata & ) const; - bool operator<(const start_bulk_load_request &) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; + virtual void printTo(std::ostream& out) const; }; -void swap(start_bulk_load_request &a, start_bulk_load_request &b); +void swap(bulk_load_metadata &a, bulk_load_metadata &b); -inline std::ostream &operator<<(std::ostream &out, const start_bulk_load_request &obj) +inline std::ostream& operator<<(std::ostream& out, const bulk_load_metadata& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _start_bulk_load_response__isset -{ - _start_bulk_load_response__isset() : err(false), hint_msg(false) {} - bool err : 1; - bool hint_msg : 1; -} _start_bulk_load_response__isset; - -class start_bulk_load_response -{ -public: - start_bulk_load_response(const start_bulk_load_response &); - start_bulk_load_response(start_bulk_load_response &&); - start_bulk_load_response &operator=(const start_bulk_load_response &); - start_bulk_load_response &operator=(start_bulk_load_response &&); - start_bulk_load_response() : hint_msg() {} - - virtual ~start_bulk_load_response() throw(); - ::dsn::error_code err; - std::string hint_msg; - - _start_bulk_load_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_hint_msg(const std::string &val); - - bool operator==(const start_bulk_load_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(hint_msg == rhs.hint_msg)) - return false; - return true; - } - bool operator!=(const start_bulk_load_response &rhs) const { return !(*this == rhs); } - - bool operator<(const start_bulk_load_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; -}; - -void swap(start_bulk_load_response &a, start_bulk_load_response &b); - -inline std::ostream &operator<<(std::ostream &out, const start_bulk_load_response &obj) -{ - obj.printTo(out); - return out; -} -} -} // namespace +}} // namespace #endif diff --git a/src/core/core/dsn.layer2_types.cpp b/src/core/core/dsn.layer2_types.cpp index b078062bb5..5a4582a4db 100644 --- a/src/core/core/dsn.layer2_types.cpp +++ b/src/core/core/dsn.layer2_types.cpp @@ -13,1298 +13,1259 @@ namespace dsn { -int _kapp_statusValues[] = {app_status::AS_INVALID, - app_status::AS_AVAILABLE, - app_status::AS_CREATING, - app_status::AS_CREATE_FAILED, - app_status::AS_DROPPING, - app_status::AS_DROP_FAILED, - app_status::AS_DROPPED, - app_status::AS_RECALLING}; -const char *_kapp_statusNames[] = {"AS_INVALID", - "AS_AVAILABLE", - "AS_CREATING", - "AS_CREATE_FAILED", - "AS_DROPPING", - "AS_DROP_FAILED", - "AS_DROPPED", - "AS_RECALLING"}; -const std::map _app_status_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(8, _kapp_statusValues, _kapp_statusNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); +int _kapp_statusValues[] = { + app_status::AS_INVALID, + app_status::AS_AVAILABLE, + app_status::AS_CREATING, + app_status::AS_CREATE_FAILED, + app_status::AS_DROPPING, + app_status::AS_DROP_FAILED, + app_status::AS_DROPPED, + app_status::AS_RECALLING +}; +const char* _kapp_statusNames[] = { + "AS_INVALID", + "AS_AVAILABLE", + "AS_CREATING", + "AS_CREATE_FAILED", + "AS_DROPPING", + "AS_DROP_FAILED", + "AS_DROPPED", + "AS_RECALLING" +}; +const std::map _app_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(8, _kapp_statusValues, _kapp_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + + +partition_configuration::~partition_configuration() throw() { +} -partition_configuration::~partition_configuration() throw() {} -void partition_configuration::__set_pid(const ::dsn::gpid &val) { this->pid = val; } +void partition_configuration::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} -void partition_configuration::__set_ballot(const int64_t val) { this->ballot = val; } +void partition_configuration::__set_ballot(const int64_t val) { + this->ballot = val; +} -void partition_configuration::__set_max_replica_count(const int32_t val) -{ - this->max_replica_count = val; +void partition_configuration::__set_max_replica_count(const int32_t val) { + this->max_replica_count = val; } -void partition_configuration::__set_primary(const ::dsn::rpc_address &val) { this->primary = val; } +void partition_configuration::__set_primary(const ::dsn::rpc_address& val) { + this->primary = val; +} -void partition_configuration::__set_secondaries(const std::vector<::dsn::rpc_address> &val) -{ - this->secondaries = val; +void partition_configuration::__set_secondaries(const std::vector< ::dsn::rpc_address> & val) { + this->secondaries = val; } -void partition_configuration::__set_last_drops(const std::vector<::dsn::rpc_address> &val) -{ - this->last_drops = val; +void partition_configuration::__set_last_drops(const std::vector< ::dsn::rpc_address> & val) { + this->last_drops = val; } -void partition_configuration::__set_last_committed_decree(const int64_t val) -{ - this->last_committed_decree = val; +void partition_configuration::__set_last_committed_decree(const int64_t val) { + this->last_committed_decree = val; } -void partition_configuration::__set_partition_flags(const int32_t val) -{ - this->partition_flags = val; +void partition_configuration::__set_partition_flags(const int32_t val) { + this->partition_flags = val; } -uint32_t partition_configuration::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t partition_configuration::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->max_replica_count); - this->__isset.max_replica_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->primary.read(iprot); - this->__isset.primary = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->secondaries.clear(); - uint32_t _size0; - ::apache::thrift::protocol::TType _etype3; - xfer += iprot->readListBegin(_etype3, _size0); - this->secondaries.resize(_size0); - uint32_t _i4; - for (_i4 = 0; _i4 < _size0; ++_i4) { - xfer += this->secondaries[_i4].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.secondaries = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->last_drops.clear(); - uint32_t _size5; - ::apache::thrift::protocol::TType _etype8; - xfer += iprot->readListBegin(_etype8, _size5); - this->last_drops.resize(_size5); - uint32_t _i9; - for (_i9 = 0; _i9 < _size5; ++_i9) { - xfer += this->last_drops[_i9].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.last_drops = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->max_replica_count); + this->__isset.max_replica_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->primary.read(iprot); + this->__isset.primary = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->secondaries.clear(); + uint32_t _size0; + ::apache::thrift::protocol::TType _etype3; + xfer += iprot->readListBegin(_etype3, _size0); + this->secondaries.resize(_size0); + uint32_t _i4; + for (_i4 = 0; _i4 < _size0; ++_i4) + { + xfer += this->secondaries[_i4].read(iprot); } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_flags); - this->__isset.partition_flags = true; - } else { - xfer += iprot->skip(ftype); + xfer += iprot->readListEnd(); + } + this->__isset.secondaries = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->last_drops.clear(); + uint32_t _size5; + ::apache::thrift::protocol::TType _etype8; + xfer += iprot->readListBegin(_etype8, _size5); + this->last_drops.resize(_size5); + uint32_t _i9; + for (_i9 = 0; _i9 < _size5; ++_i9) + { + xfer += this->last_drops[_i9].read(iprot); } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readListEnd(); + } + this->__isset.last_drops = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_flags); + this->__isset.partition_flags = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t partition_configuration::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("partition_configuration"); +uint32_t partition_configuration::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("partition_configuration"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_replica_count", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->max_replica_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_replica_count", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->max_replica_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("primary", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->primary.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("primary", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->primary.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("secondaries", ::apache::thrift::protocol::T_LIST, 5); + xfer += oprot->writeFieldBegin("secondaries", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->secondaries.size())); + std::vector< ::dsn::rpc_address> ::const_iterator _iter10; + for (_iter10 = this->secondaries.begin(); _iter10 != this->secondaries.end(); ++_iter10) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->secondaries.size())); - std::vector<::dsn::rpc_address>::const_iterator _iter10; - for (_iter10 = this->secondaries.begin(); _iter10 != this->secondaries.end(); ++_iter10) { - xfer += (*_iter10).write(oprot); - } - xfer += oprot->writeListEnd(); + xfer += (*_iter10).write(oprot); } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_drops", ::apache::thrift::protocol::T_LIST, 6); + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("last_drops", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->last_drops.size())); + std::vector< ::dsn::rpc_address> ::const_iterator _iter11; + for (_iter11 = this->last_drops.begin(); _iter11 != this->last_drops.end(); ++_iter11) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->last_drops.size())); - std::vector<::dsn::rpc_address>::const_iterator _iter11; - for (_iter11 = this->last_drops.begin(); _iter11 != this->last_drops.end(); ++_iter11) { - xfer += (*_iter11).write(oprot); - } - xfer += oprot->writeListEnd(); + xfer += (*_iter11).write(oprot); } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 7); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partition_flags", ::apache::thrift::protocol::T_I32, 8); - xfer += oprot->writeI32(this->partition_flags); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition_flags", ::apache::thrift::protocol::T_I32, 8); + xfer += oprot->writeI32(this->partition_flags); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(partition_configuration &a, partition_configuration &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.ballot, b.ballot); + swap(a.max_replica_count, b.max_replica_count); + swap(a.primary, b.primary); + swap(a.secondaries, b.secondaries); + swap(a.last_drops, b.last_drops); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.partition_flags, b.partition_flags); + swap(a.__isset, b.__isset); +} + +partition_configuration::partition_configuration(const partition_configuration& other12) { + pid = other12.pid; + ballot = other12.ballot; + max_replica_count = other12.max_replica_count; + primary = other12.primary; + secondaries = other12.secondaries; + last_drops = other12.last_drops; + last_committed_decree = other12.last_committed_decree; + partition_flags = other12.partition_flags; + __isset = other12.__isset; +} +partition_configuration::partition_configuration( partition_configuration&& other13) { + pid = std::move(other13.pid); + ballot = std::move(other13.ballot); + max_replica_count = std::move(other13.max_replica_count); + primary = std::move(other13.primary); + secondaries = std::move(other13.secondaries); + last_drops = std::move(other13.last_drops); + last_committed_decree = std::move(other13.last_committed_decree); + partition_flags = std::move(other13.partition_flags); + __isset = std::move(other13.__isset); +} +partition_configuration& partition_configuration::operator=(const partition_configuration& other14) { + pid = other14.pid; + ballot = other14.ballot; + max_replica_count = other14.max_replica_count; + primary = other14.primary; + secondaries = other14.secondaries; + last_drops = other14.last_drops; + last_committed_decree = other14.last_committed_decree; + partition_flags = other14.partition_flags; + __isset = other14.__isset; + return *this; +} +partition_configuration& partition_configuration::operator=(partition_configuration&& other15) { + pid = std::move(other15.pid); + ballot = std::move(other15.ballot); + max_replica_count = std::move(other15.max_replica_count); + primary = std::move(other15.primary); + secondaries = std::move(other15.secondaries); + last_drops = std::move(other15.last_drops); + last_committed_decree = std::move(other15.last_committed_decree); + partition_flags = std::move(other15.partition_flags); + __isset = std::move(other15.__isset); + return *this; +} +void partition_configuration::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "partition_configuration("; + out << "pid=" << to_string(pid); + out << ", " << "ballot=" << to_string(ballot); + out << ", " << "max_replica_count=" << to_string(max_replica_count); + out << ", " << "primary=" << to_string(primary); + out << ", " << "secondaries=" << to_string(secondaries); + out << ", " << "last_drops=" << to_string(last_drops); + out << ", " << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " << "partition_flags=" << to_string(partition_flags); + out << ")"; +} + + +configuration_query_by_index_request::~configuration_query_by_index_request() throw() { +} + + +void configuration_query_by_index_request::__set_app_name(const std::string& val) { + this->app_name = val; +} + +void configuration_query_by_index_request::__set_partition_indices(const std::vector & val) { + this->partition_indices = val; +} + +uint32_t configuration_query_by_index_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(partition_configuration &a, partition_configuration &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.ballot, b.ballot); - swap(a.max_replica_count, b.max_replica_count); - swap(a.primary, b.primary); - swap(a.secondaries, b.secondaries); - swap(a.last_drops, b.last_drops); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.partition_flags, b.partition_flags); - swap(a.__isset, b.__isset); -} - -partition_configuration::partition_configuration(const partition_configuration &other12) -{ - pid = other12.pid; - ballot = other12.ballot; - max_replica_count = other12.max_replica_count; - primary = other12.primary; - secondaries = other12.secondaries; - last_drops = other12.last_drops; - last_committed_decree = other12.last_committed_decree; - partition_flags = other12.partition_flags; - __isset = other12.__isset; -} -partition_configuration::partition_configuration(partition_configuration &&other13) -{ - pid = std::move(other13.pid); - ballot = std::move(other13.ballot); - max_replica_count = std::move(other13.max_replica_count); - primary = std::move(other13.primary); - secondaries = std::move(other13.secondaries); - last_drops = std::move(other13.last_drops); - last_committed_decree = std::move(other13.last_committed_decree); - partition_flags = std::move(other13.partition_flags); - __isset = std::move(other13.__isset); -} -partition_configuration &partition_configuration::operator=(const partition_configuration &other14) -{ - pid = other14.pid; - ballot = other14.ballot; - max_replica_count = other14.max_replica_count; - primary = other14.primary; - secondaries = other14.secondaries; - last_drops = other14.last_drops; - last_committed_decree = other14.last_committed_decree; - partition_flags = other14.partition_flags; - __isset = other14.__isset; - return *this; -} -partition_configuration &partition_configuration::operator=(partition_configuration &&other15) -{ - pid = std::move(other15.pid); - ballot = std::move(other15.ballot); - max_replica_count = std::move(other15.max_replica_count); - primary = std::move(other15.primary); - secondaries = std::move(other15.secondaries); - last_drops = std::move(other15.last_drops); - last_committed_decree = std::move(other15.last_committed_decree); - partition_flags = std::move(other15.partition_flags); - __isset = std::move(other15.__isset); - return *this; -} -void partition_configuration::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "partition_configuration("; - out << "pid=" << to_string(pid); - out << ", " - << "ballot=" << to_string(ballot); - out << ", " - << "max_replica_count=" << to_string(max_replica_count); - out << ", " - << "primary=" << to_string(primary); - out << ", " - << "secondaries=" << to_string(secondaries); - out << ", " - << "last_drops=" << to_string(last_drops); - out << ", " - << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " - << "partition_flags=" << to_string(partition_flags); - out << ")"; -} - -configuration_query_by_index_request::~configuration_query_by_index_request() throw() {} - -void configuration_query_by_index_request::__set_app_name(const std::string &val) -{ - this->app_name = val; -} - -void configuration_query_by_index_request::__set_partition_indices(const std::vector &val) -{ - this->partition_indices = val; -} - -uint32_t configuration_query_by_index_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partition_indices.clear(); - uint32_t _size16; - ::apache::thrift::protocol::TType _etype19; - xfer += iprot->readListBegin(_etype19, _size16); - this->partition_indices.resize(_size16); - uint32_t _i20; - for (_i20 = 0; _i20 < _size16; ++_i20) { - xfer += iprot->readI32(this->partition_indices[_i20]); - } - xfer += iprot->readListEnd(); - } - this->__isset.partition_indices = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partition_indices.clear(); + uint32_t _size16; + ::apache::thrift::protocol::TType _etype19; + xfer += iprot->readListBegin(_etype19, _size16); + this->partition_indices.resize(_size16); + uint32_t _i20; + for (_i20 = 0; _i20 < _size16; ++_i20) + { + xfer += iprot->readI32(this->partition_indices[_i20]); } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readListEnd(); + } + this->__isset.partition_indices = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t -configuration_query_by_index_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_by_index_request"); +uint32_t configuration_query_by_index_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_by_index_request"); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partition_indices", ::apache::thrift::protocol::T_LIST, 2); + xfer += oprot->writeFieldBegin("partition_indices", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->partition_indices.size())); + std::vector ::const_iterator _iter21; + for (_iter21 = this->partition_indices.begin(); _iter21 != this->partition_indices.end(); ++_iter21) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, - static_cast(this->partition_indices.size())); - std::vector::const_iterator _iter21; - for (_iter21 = this->partition_indices.begin(); _iter21 != this->partition_indices.end(); - ++_iter21) { - xfer += oprot->writeI32((*_iter21)); - } - xfer += oprot->writeListEnd(); + xfer += oprot->writeI32((*_iter21)); } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_query_by_index_request &a, configuration_query_by_index_request &b) -{ - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.partition_indices, b.partition_indices); - swap(a.__isset, b.__isset); +void swap(configuration_query_by_index_request &a, configuration_query_by_index_request &b) { + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.partition_indices, b.partition_indices); + swap(a.__isset, b.__isset); } -configuration_query_by_index_request::configuration_query_by_index_request( - const configuration_query_by_index_request &other22) -{ - app_name = other22.app_name; - partition_indices = other22.partition_indices; - __isset = other22.__isset; +configuration_query_by_index_request::configuration_query_by_index_request(const configuration_query_by_index_request& other22) { + app_name = other22.app_name; + partition_indices = other22.partition_indices; + __isset = other22.__isset; +} +configuration_query_by_index_request::configuration_query_by_index_request( configuration_query_by_index_request&& other23) { + app_name = std::move(other23.app_name); + partition_indices = std::move(other23.partition_indices); + __isset = std::move(other23.__isset); } -configuration_query_by_index_request::configuration_query_by_index_request( - configuration_query_by_index_request &&other23) -{ - app_name = std::move(other23.app_name); - partition_indices = std::move(other23.partition_indices); - __isset = std::move(other23.__isset); +configuration_query_by_index_request& configuration_query_by_index_request::operator=(const configuration_query_by_index_request& other24) { + app_name = other24.app_name; + partition_indices = other24.partition_indices; + __isset = other24.__isset; + return *this; } -configuration_query_by_index_request &configuration_query_by_index_request:: -operator=(const configuration_query_by_index_request &other24) -{ - app_name = other24.app_name; - partition_indices = other24.partition_indices; - __isset = other24.__isset; - return *this; +configuration_query_by_index_request& configuration_query_by_index_request::operator=(configuration_query_by_index_request&& other25) { + app_name = std::move(other25.app_name); + partition_indices = std::move(other25.partition_indices); + __isset = std::move(other25.__isset); + return *this; } -configuration_query_by_index_request &configuration_query_by_index_request:: -operator=(configuration_query_by_index_request &&other25) -{ - app_name = std::move(other25.app_name); - partition_indices = std::move(other25.partition_indices); - __isset = std::move(other25.__isset); - return *this; +void configuration_query_by_index_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_query_by_index_request("; + out << "app_name=" << to_string(app_name); + out << ", " << "partition_indices=" << to_string(partition_indices); + out << ")"; } -void configuration_query_by_index_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_query_by_index_request("; - out << "app_name=" << to_string(app_name); - out << ", " - << "partition_indices=" << to_string(partition_indices); - out << ")"; + + +configuration_query_by_index_response::~configuration_query_by_index_response() throw() { } -configuration_query_by_index_response::~configuration_query_by_index_response() throw() {} -void configuration_query_by_index_response::__set_err(const ::dsn::error_code &val) -{ - this->err = val; +void configuration_query_by_index_response::__set_err(const ::dsn::error_code& val) { + this->err = val; } -void configuration_query_by_index_response::__set_app_id(const int32_t val) { this->app_id = val; } +void configuration_query_by_index_response::__set_app_id(const int32_t val) { + this->app_id = val; +} -void configuration_query_by_index_response::__set_partition_count(const int32_t val) -{ - this->partition_count = val; +void configuration_query_by_index_response::__set_partition_count(const int32_t val) { + this->partition_count = val; } -void configuration_query_by_index_response::__set_is_stateful(const bool val) -{ - this->is_stateful = val; +void configuration_query_by_index_response::__set_is_stateful(const bool val) { + this->is_stateful = val; } -void configuration_query_by_index_response::__set_partitions( - const std::vector &val) -{ - this->partitions = val; +void configuration_query_by_index_response::__set_partitions(const std::vector & val) { + this->partitions = val; } -uint32_t configuration_query_by_index_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t configuration_query_by_index_response::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_count); - this->__isset.partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_stateful); - this->__isset.is_stateful = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitions.clear(); - uint32_t _size26; - ::apache::thrift::protocol::TType _etype29; - xfer += iprot->readListBegin(_etype29, _size26); - this->partitions.resize(_size26); - uint32_t _i30; - for (_i30 = 0; _i30 < _size26; ++_i30) { - xfer += this->partitions[_i30].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.partitions = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_count); + this->__isset.partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_stateful); + this->__isset.is_stateful = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitions.clear(); + uint32_t _size26; + ::apache::thrift::protocol::TType _etype29; + xfer += iprot->readListBegin(_etype29, _size26); + this->partitions.resize(_size26); + uint32_t _i30; + for (_i30 = 0; _i30 < _size26; ++_i30) + { + xfer += this->partitions[_i30].read(iprot); } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readListEnd(); + } + this->__isset.partitions = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t -configuration_query_by_index_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_by_index_response"); +uint32_t configuration_query_by_index_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_by_index_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->partition_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->partition_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->is_stateful); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->is_stateful); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 5); + xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); + std::vector ::const_iterator _iter31; + for (_iter31 = this->partitions.begin(); _iter31 != this->partitions.end(); ++_iter31) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->partitions.size())); - std::vector::const_iterator _iter31; - for (_iter31 = this->partitions.begin(); _iter31 != this->partitions.end(); ++_iter31) { - xfer += (*_iter31).write(oprot); - } - xfer += oprot->writeListEnd(); + xfer += (*_iter31).write(oprot); } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_query_by_index_response &a, configuration_query_by_index_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.app_id, b.app_id); - swap(a.partition_count, b.partition_count); - swap(a.is_stateful, b.is_stateful); - swap(a.partitions, b.partitions); - swap(a.__isset, b.__isset); +void swap(configuration_query_by_index_response &a, configuration_query_by_index_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.app_id, b.app_id); + swap(a.partition_count, b.partition_count); + swap(a.is_stateful, b.is_stateful); + swap(a.partitions, b.partitions); + swap(a.__isset, b.__isset); } -configuration_query_by_index_response::configuration_query_by_index_response( - const configuration_query_by_index_response &other32) -{ - err = other32.err; - app_id = other32.app_id; - partition_count = other32.partition_count; - is_stateful = other32.is_stateful; - partitions = other32.partitions; - __isset = other32.__isset; +configuration_query_by_index_response::configuration_query_by_index_response(const configuration_query_by_index_response& other32) { + err = other32.err; + app_id = other32.app_id; + partition_count = other32.partition_count; + is_stateful = other32.is_stateful; + partitions = other32.partitions; + __isset = other32.__isset; +} +configuration_query_by_index_response::configuration_query_by_index_response( configuration_query_by_index_response&& other33) { + err = std::move(other33.err); + app_id = std::move(other33.app_id); + partition_count = std::move(other33.partition_count); + is_stateful = std::move(other33.is_stateful); + partitions = std::move(other33.partitions); + __isset = std::move(other33.__isset); } -configuration_query_by_index_response::configuration_query_by_index_response( - configuration_query_by_index_response &&other33) -{ - err = std::move(other33.err); - app_id = std::move(other33.app_id); - partition_count = std::move(other33.partition_count); - is_stateful = std::move(other33.is_stateful); - partitions = std::move(other33.partitions); - __isset = std::move(other33.__isset); +configuration_query_by_index_response& configuration_query_by_index_response::operator=(const configuration_query_by_index_response& other34) { + err = other34.err; + app_id = other34.app_id; + partition_count = other34.partition_count; + is_stateful = other34.is_stateful; + partitions = other34.partitions; + __isset = other34.__isset; + return *this; } -configuration_query_by_index_response &configuration_query_by_index_response:: -operator=(const configuration_query_by_index_response &other34) -{ - err = other34.err; - app_id = other34.app_id; - partition_count = other34.partition_count; - is_stateful = other34.is_stateful; - partitions = other34.partitions; - __isset = other34.__isset; - return *this; +configuration_query_by_index_response& configuration_query_by_index_response::operator=(configuration_query_by_index_response&& other35) { + err = std::move(other35.err); + app_id = std::move(other35.app_id); + partition_count = std::move(other35.partition_count); + is_stateful = std::move(other35.is_stateful); + partitions = std::move(other35.partitions); + __isset = std::move(other35.__isset); + return *this; } -configuration_query_by_index_response &configuration_query_by_index_response:: -operator=(configuration_query_by_index_response &&other35) -{ - err = std::move(other35.err); - app_id = std::move(other35.app_id); - partition_count = std::move(other35.partition_count); - is_stateful = std::move(other35.is_stateful); - partitions = std::move(other35.partitions); - __isset = std::move(other35.__isset); - return *this; +void configuration_query_by_index_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_query_by_index_response("; + out << "err=" << to_string(err); + out << ", " << "app_id=" << to_string(app_id); + out << ", " << "partition_count=" << to_string(partition_count); + out << ", " << "is_stateful=" << to_string(is_stateful); + out << ", " << "partitions=" << to_string(partitions); + out << ")"; } -void configuration_query_by_index_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_query_by_index_response("; - out << "err=" << to_string(err); - out << ", " - << "app_id=" << to_string(app_id); - out << ", " - << "partition_count=" << to_string(partition_count); - out << ", " - << "is_stateful=" << to_string(is_stateful); - out << ", " - << "partitions=" << to_string(partitions); - out << ")"; + + +app_info::~app_info() throw() { } -app_info::~app_info() throw() {} -void app_info::__set_status(const app_status::type val) { this->status = val; } +void app_info::__set_status(const app_status::type val) { + this->status = val; +} + +void app_info::__set_app_type(const std::string& val) { + this->app_type = val; +} -void app_info::__set_app_type(const std::string &val) { this->app_type = val; } +void app_info::__set_app_name(const std::string& val) { + this->app_name = val; +} -void app_info::__set_app_name(const std::string &val) { this->app_name = val; } +void app_info::__set_app_id(const int32_t val) { + this->app_id = val; +} -void app_info::__set_app_id(const int32_t val) { this->app_id = val; } +void app_info::__set_partition_count(const int32_t val) { + this->partition_count = val; +} -void app_info::__set_partition_count(const int32_t val) { this->partition_count = val; } +void app_info::__set_envs(const std::map & val) { + this->envs = val; +} -void app_info::__set_envs(const std::map &val) { this->envs = val; } +void app_info::__set_is_stateful(const bool val) { + this->is_stateful = val; +} -void app_info::__set_is_stateful(const bool val) { this->is_stateful = val; } +void app_info::__set_max_replica_count(const int32_t val) { + this->max_replica_count = val; +} -void app_info::__set_max_replica_count(const int32_t val) { this->max_replica_count = val; } +void app_info::__set_expire_second(const int64_t val) { + this->expire_second = val; +} -void app_info::__set_expire_second(const int64_t val) { this->expire_second = val; } +void app_info::__set_create_second(const int64_t val) { + this->create_second = val; +} -void app_info::__set_create_second(const int64_t val) { this->create_second = val; } +void app_info::__set_drop_second(const int64_t val) { + this->drop_second = val; +} -void app_info::__set_drop_second(const int64_t val) { this->drop_second = val; } +void app_info::__set_duplicating(const bool val) { + this->duplicating = val; +__isset.duplicating = true; +} -void app_info::__set_duplicating(const bool val) -{ - this->duplicating = val; - __isset.duplicating = true; +void app_info::__set_init_partition_count(const int32_t val) { + this->init_partition_count = val; } -void app_info::__set_init_partition_count(const int32_t val) { this->init_partition_count = val; } - -void app_info::__set_is_bulk_loading(const bool val) -{ - this->is_bulk_loading = val; - __isset.is_bulk_loading = true; +void app_info::__set_is_bulk_loading(const bool val) { + this->is_bulk_loading = val; +__isset.is_bulk_loading = true; } -uint32_t app_info::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t app_info::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += iprot->readStructBegin(fname); - xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast36; + xfer += iprot->readI32(ecast36); + this->status = (app_status::type)ecast36; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast36; - xfer += iprot->readI32(ecast36); - this->status = (app_status::type)ecast36; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_type); - this->__isset.app_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_count); - this->__isset.partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->envs.clear(); - uint32_t _size37; - ::apache::thrift::protocol::TType _ktype38; - ::apache::thrift::protocol::TType _vtype39; - xfer += iprot->readMapBegin(_ktype38, _vtype39, _size37); - uint32_t _i41; - for (_i41 = 0; _i41 < _size37; ++_i41) { - std::string _key42; - xfer += iprot->readString(_key42); - std::string &_val43 = this->envs[_key42]; - xfer += iprot->readString(_val43); - } - xfer += iprot->readMapEnd(); - } - this->__isset.envs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_stateful); - this->__isset.is_stateful = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->max_replica_count); - this->__isset.max_replica_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->expire_second); - this->__isset.expire_second = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->create_second); - this->__isset.create_second = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 11: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->drop_second); - this->__isset.drop_second = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 12: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->duplicating); - this->__isset.duplicating = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 13: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->init_partition_count); - this->__isset.init_partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 14: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_bulk_loading); - this->__isset.is_bulk_loading = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_type); + this->__isset.app_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_count); + this->__isset.partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->envs.clear(); + uint32_t _size37; + ::apache::thrift::protocol::TType _ktype38; + ::apache::thrift::protocol::TType _vtype39; + xfer += iprot->readMapBegin(_ktype38, _vtype39, _size37); + uint32_t _i41; + for (_i41 = 0; _i41 < _size37; ++_i41) + { + std::string _key42; + xfer += iprot->readString(_key42); + std::string& _val43 = this->envs[_key42]; + xfer += iprot->readString(_val43); } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readMapEnd(); + } + this->__isset.envs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_stateful); + this->__isset.is_stateful = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->max_replica_count); + this->__isset.max_replica_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->expire_second); + this->__isset.expire_second = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->create_second); + this->__isset.create_second = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->drop_second); + this->__isset.drop_second = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->duplicating); + this->__isset.duplicating = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + case 13: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->init_partition_count); + this->__isset.init_partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 14: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_bulk_loading); + this->__isset.is_bulk_loading = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t app_info::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("app_info"); +uint32_t app_info::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("app_info"); - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->app_type); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->app_type); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32(this->partition_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->partition_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("envs", ::apache::thrift::protocol::T_MAP, 6); + xfer += oprot->writeFieldBegin("envs", ::apache::thrift::protocol::T_MAP, 6); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->envs.size())); + std::map ::const_iterator _iter44; + for (_iter44 = this->envs.begin(); _iter44 != this->envs.end(); ++_iter44) { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, - ::apache::thrift::protocol::T_STRING, - static_cast(this->envs.size())); - std::map::const_iterator _iter44; - for (_iter44 = this->envs.begin(); _iter44 != this->envs.end(); ++_iter44) { - xfer += oprot->writeString(_iter44->first); - xfer += oprot->writeString(_iter44->second); - } - xfer += oprot->writeMapEnd(); + xfer += oprot->writeString(_iter44->first); + xfer += oprot->writeString(_iter44->second); } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 7); - xfer += oprot->writeBool(this->is_stateful); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->is_stateful); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_replica_count", ::apache::thrift::protocol::T_I32, 8); - xfer += oprot->writeI32(this->max_replica_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_replica_count", ::apache::thrift::protocol::T_I32, 8); + xfer += oprot->writeI32(this->max_replica_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("expire_second", ::apache::thrift::protocol::T_I64, 9); - xfer += oprot->writeI64(this->expire_second); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("expire_second", ::apache::thrift::protocol::T_I64, 9); + xfer += oprot->writeI64(this->expire_second); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("create_second", ::apache::thrift::protocol::T_I64, 10); - xfer += oprot->writeI64(this->create_second); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("create_second", ::apache::thrift::protocol::T_I64, 10); + xfer += oprot->writeI64(this->create_second); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("drop_second", ::apache::thrift::protocol::T_I64, 11); - xfer += oprot->writeI64(this->drop_second); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("drop_second", ::apache::thrift::protocol::T_I64, 11); + xfer += oprot->writeI64(this->drop_second); + xfer += oprot->writeFieldEnd(); - if (this->__isset.duplicating) { - xfer += oprot->writeFieldBegin("duplicating", ::apache::thrift::protocol::T_BOOL, 12); - xfer += oprot->writeBool(this->duplicating); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("init_partition_count", ::apache::thrift::protocol::T_I32, 13); - xfer += oprot->writeI32(this->init_partition_count); + if (this->__isset.duplicating) { + xfer += oprot->writeFieldBegin("duplicating", ::apache::thrift::protocol::T_BOOL, 12); + xfer += oprot->writeBool(this->duplicating); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("init_partition_count", ::apache::thrift::protocol::T_I32, 13); + xfer += oprot->writeI32(this->init_partition_count); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.is_bulk_loading) { + xfer += oprot->writeFieldBegin("is_bulk_loading", ::apache::thrift::protocol::T_BOOL, 14); + xfer += oprot->writeBool(this->is_bulk_loading); xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(app_info &a, app_info &b) { + using ::std::swap; + swap(a.status, b.status); + swap(a.app_type, b.app_type); + swap(a.app_name, b.app_name); + swap(a.app_id, b.app_id); + swap(a.partition_count, b.partition_count); + swap(a.envs, b.envs); + swap(a.is_stateful, b.is_stateful); + swap(a.max_replica_count, b.max_replica_count); + swap(a.expire_second, b.expire_second); + swap(a.create_second, b.create_second); + swap(a.drop_second, b.drop_second); + swap(a.duplicating, b.duplicating); + swap(a.init_partition_count, b.init_partition_count); + swap(a.is_bulk_loading, b.is_bulk_loading); + swap(a.__isset, b.__isset); +} + +app_info::app_info(const app_info& other45) { + status = other45.status; + app_type = other45.app_type; + app_name = other45.app_name; + app_id = other45.app_id; + partition_count = other45.partition_count; + envs = other45.envs; + is_stateful = other45.is_stateful; + max_replica_count = other45.max_replica_count; + expire_second = other45.expire_second; + create_second = other45.create_second; + drop_second = other45.drop_second; + duplicating = other45.duplicating; + init_partition_count = other45.init_partition_count; + is_bulk_loading = other45.is_bulk_loading; + __isset = other45.__isset; +} +app_info::app_info( app_info&& other46) { + status = std::move(other46.status); + app_type = std::move(other46.app_type); + app_name = std::move(other46.app_name); + app_id = std::move(other46.app_id); + partition_count = std::move(other46.partition_count); + envs = std::move(other46.envs); + is_stateful = std::move(other46.is_stateful); + max_replica_count = std::move(other46.max_replica_count); + expire_second = std::move(other46.expire_second); + create_second = std::move(other46.create_second); + drop_second = std::move(other46.drop_second); + duplicating = std::move(other46.duplicating); + init_partition_count = std::move(other46.init_partition_count); + is_bulk_loading = std::move(other46.is_bulk_loading); + __isset = std::move(other46.__isset); +} +app_info& app_info::operator=(const app_info& other47) { + status = other47.status; + app_type = other47.app_type; + app_name = other47.app_name; + app_id = other47.app_id; + partition_count = other47.partition_count; + envs = other47.envs; + is_stateful = other47.is_stateful; + max_replica_count = other47.max_replica_count; + expire_second = other47.expire_second; + create_second = other47.create_second; + drop_second = other47.drop_second; + duplicating = other47.duplicating; + init_partition_count = other47.init_partition_count; + is_bulk_loading = other47.is_bulk_loading; + __isset = other47.__isset; + return *this; +} +app_info& app_info::operator=(app_info&& other48) { + status = std::move(other48.status); + app_type = std::move(other48.app_type); + app_name = std::move(other48.app_name); + app_id = std::move(other48.app_id); + partition_count = std::move(other48.partition_count); + envs = std::move(other48.envs); + is_stateful = std::move(other48.is_stateful); + max_replica_count = std::move(other48.max_replica_count); + expire_second = std::move(other48.expire_second); + create_second = std::move(other48.create_second); + drop_second = std::move(other48.drop_second); + duplicating = std::move(other48.duplicating); + init_partition_count = std::move(other48.init_partition_count); + is_bulk_loading = std::move(other48.is_bulk_loading); + __isset = std::move(other48.__isset); + return *this; +} +void app_info::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "app_info("; + out << "status=" << to_string(status); + out << ", " << "app_type=" << to_string(app_type); + out << ", " << "app_name=" << to_string(app_name); + out << ", " << "app_id=" << to_string(app_id); + out << ", " << "partition_count=" << to_string(partition_count); + out << ", " << "envs=" << to_string(envs); + out << ", " << "is_stateful=" << to_string(is_stateful); + out << ", " << "max_replica_count=" << to_string(max_replica_count); + out << ", " << "expire_second=" << to_string(expire_second); + out << ", " << "create_second=" << to_string(create_second); + out << ", " << "drop_second=" << to_string(drop_second); + out << ", " << "duplicating="; (__isset.duplicating ? (out << to_string(duplicating)) : (out << "")); + out << ", " << "init_partition_count=" << to_string(init_partition_count); + out << ", " << "is_bulk_loading="; (__isset.is_bulk_loading ? (out << to_string(is_bulk_loading)) : (out << "")); + out << ")"; +} - if (this->__isset.is_bulk_loading) { - xfer += oprot->writeFieldBegin("is_bulk_loading", ::apache::thrift::protocol::T_BOOL, 14); - xfer += oprot->writeBool(this->is_bulk_loading); - xfer += oprot->writeFieldEnd(); + +thrift_request_meta_v1::~thrift_request_meta_v1() throw() { +} + + +void thrift_request_meta_v1::__set_app_id(const int32_t val) { + this->app_id = val; +__isset.app_id = true; +} + +void thrift_request_meta_v1::__set_partition_index(const int32_t val) { + this->partition_index = val; +__isset.partition_index = true; +} + +void thrift_request_meta_v1::__set_client_timeout(const int32_t val) { + this->client_timeout = val; +__isset.client_timeout = true; +} + +void thrift_request_meta_v1::__set_client_partition_hash(const int64_t val) { + this->client_partition_hash = val; +__isset.client_partition_hash = true; +} + +void thrift_request_meta_v1::__set_is_backup_request(const bool val) { + this->is_backup_request = val; +__isset.is_backup_request = true; +} + +uint32_t thrift_request_meta_v1::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(app_info &a, app_info &b) -{ - using ::std::swap; - swap(a.status, b.status); - swap(a.app_type, b.app_type); - swap(a.app_name, b.app_name); - swap(a.app_id, b.app_id); - swap(a.partition_count, b.partition_count); - swap(a.envs, b.envs); - swap(a.is_stateful, b.is_stateful); - swap(a.max_replica_count, b.max_replica_count); - swap(a.expire_second, b.expire_second); - swap(a.create_second, b.create_second); - swap(a.drop_second, b.drop_second); - swap(a.duplicating, b.duplicating); - swap(a.init_partition_count, b.init_partition_count); - swap(a.is_bulk_loading, b.is_bulk_loading); - swap(a.__isset, b.__isset); -} - -app_info::app_info(const app_info &other45) -{ - status = other45.status; - app_type = other45.app_type; - app_name = other45.app_name; - app_id = other45.app_id; - partition_count = other45.partition_count; - envs = other45.envs; - is_stateful = other45.is_stateful; - max_replica_count = other45.max_replica_count; - expire_second = other45.expire_second; - create_second = other45.create_second; - drop_second = other45.drop_second; - duplicating = other45.duplicating; - init_partition_count = other45.init_partition_count; - is_bulk_loading = other45.is_bulk_loading; - __isset = other45.__isset; -} -app_info::app_info(app_info &&other46) -{ - status = std::move(other46.status); - app_type = std::move(other46.app_type); - app_name = std::move(other46.app_name); - app_id = std::move(other46.app_id); - partition_count = std::move(other46.partition_count); - envs = std::move(other46.envs); - is_stateful = std::move(other46.is_stateful); - max_replica_count = std::move(other46.max_replica_count); - expire_second = std::move(other46.expire_second); - create_second = std::move(other46.create_second); - drop_second = std::move(other46.drop_second); - duplicating = std::move(other46.duplicating); - init_partition_count = std::move(other46.init_partition_count); - is_bulk_loading = std::move(other46.is_bulk_loading); - __isset = std::move(other46.__isset); -} -app_info &app_info::operator=(const app_info &other47) -{ - status = other47.status; - app_type = other47.app_type; - app_name = other47.app_name; - app_id = other47.app_id; - partition_count = other47.partition_count; - envs = other47.envs; - is_stateful = other47.is_stateful; - max_replica_count = other47.max_replica_count; - expire_second = other47.expire_second; - create_second = other47.create_second; - drop_second = other47.drop_second; - duplicating = other47.duplicating; - init_partition_count = other47.init_partition_count; - is_bulk_loading = other47.is_bulk_loading; - __isset = other47.__isset; - return *this; -} -app_info &app_info::operator=(app_info &&other48) -{ - status = std::move(other48.status); - app_type = std::move(other48.app_type); - app_name = std::move(other48.app_name); - app_id = std::move(other48.app_id); - partition_count = std::move(other48.partition_count); - envs = std::move(other48.envs); - is_stateful = std::move(other48.is_stateful); - max_replica_count = std::move(other48.max_replica_count); - expire_second = std::move(other48.expire_second); - create_second = std::move(other48.create_second); - drop_second = std::move(other48.drop_second); - duplicating = std::move(other48.duplicating); - init_partition_count = std::move(other48.init_partition_count); - is_bulk_loading = std::move(other48.is_bulk_loading); - __isset = std::move(other48.__isset); - return *this; -} -void app_info::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "app_info("; - out << "status=" << to_string(status); - out << ", " - << "app_type=" << to_string(app_type); - out << ", " - << "app_name=" << to_string(app_name); - out << ", " - << "app_id=" << to_string(app_id); - out << ", " - << "partition_count=" << to_string(partition_count); - out << ", " - << "envs=" << to_string(envs); - out << ", " - << "is_stateful=" << to_string(is_stateful); - out << ", " - << "max_replica_count=" << to_string(max_replica_count); - out << ", " - << "expire_second=" << to_string(expire_second); - out << ", " - << "create_second=" << to_string(create_second); - out << ", " - << "drop_second=" << to_string(drop_second); - out << ", " - << "duplicating="; - (__isset.duplicating ? (out << to_string(duplicating)) : (out << "")); - out << ", " - << "init_partition_count=" << to_string(init_partition_count); - out << ", " - << "is_bulk_loading="; - (__isset.is_bulk_loading ? (out << to_string(is_bulk_loading)) : (out << "")); - out << ")"; -} - -thrift_request_meta_v1::~thrift_request_meta_v1() throw() {} - -void thrift_request_meta_v1::__set_app_id(const int32_t val) -{ - this->app_id = val; - __isset.app_id = true; -} - -void thrift_request_meta_v1::__set_partition_index(const int32_t val) -{ - this->partition_index = val; - __isset.partition_index = true; -} - -void thrift_request_meta_v1::__set_client_timeout(const int32_t val) -{ - this->client_timeout = val; - __isset.client_timeout = true; -} - -void thrift_request_meta_v1::__set_client_partition_hash(const int64_t val) -{ - this->client_partition_hash = val; - __isset.client_partition_hash = true; -} - -void thrift_request_meta_v1::__set_is_backup_request(const bool val) -{ - this->is_backup_request = val; - __isset.is_backup_request = true; -} - -uint32_t thrift_request_meta_v1::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_index); - this->__isset.partition_index = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->client_timeout); - this->__isset.client_timeout = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->client_partition_hash); - this->__isset.client_partition_hash = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_backup_request); - this->__isset.is_backup_request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_index); + this->__isset.partition_index = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->client_timeout); + this->__isset.client_timeout = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->client_partition_hash); + this->__isset.client_partition_hash = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_backup_request); + this->__isset.is_backup_request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t thrift_request_meta_v1::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("thrift_request_meta_v1"); +uint32_t thrift_request_meta_v1::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("thrift_request_meta_v1"); - if (this->__isset.app_id) { - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.partition_index) { - xfer += oprot->writeFieldBegin("partition_index", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->partition_index); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.client_timeout) { - xfer += oprot->writeFieldBegin("client_timeout", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->client_timeout); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.client_partition_hash) { - xfer += - oprot->writeFieldBegin("client_partition_hash", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->client_partition_hash); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.is_backup_request) { - xfer += oprot->writeFieldBegin("is_backup_request", ::apache::thrift::protocol::T_BOOL, 5); - xfer += oprot->writeBool(this->is_backup_request); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(thrift_request_meta_v1 &a, thrift_request_meta_v1 &b) -{ - using ::std::swap; - swap(a.app_id, b.app_id); - swap(a.partition_index, b.partition_index); - swap(a.client_timeout, b.client_timeout); - swap(a.client_partition_hash, b.client_partition_hash); - swap(a.is_backup_request, b.is_backup_request); - swap(a.__isset, b.__isset); -} - -thrift_request_meta_v1::thrift_request_meta_v1(const thrift_request_meta_v1 &other49) -{ - app_id = other49.app_id; - partition_index = other49.partition_index; - client_timeout = other49.client_timeout; - client_partition_hash = other49.client_partition_hash; - is_backup_request = other49.is_backup_request; - __isset = other49.__isset; -} -thrift_request_meta_v1::thrift_request_meta_v1(thrift_request_meta_v1 &&other50) -{ - app_id = std::move(other50.app_id); - partition_index = std::move(other50.partition_index); - client_timeout = std::move(other50.client_timeout); - client_partition_hash = std::move(other50.client_partition_hash); - is_backup_request = std::move(other50.is_backup_request); - __isset = std::move(other50.__isset); -} -thrift_request_meta_v1 &thrift_request_meta_v1::operator=(const thrift_request_meta_v1 &other51) -{ - app_id = other51.app_id; - partition_index = other51.partition_index; - client_timeout = other51.client_timeout; - client_partition_hash = other51.client_partition_hash; - is_backup_request = other51.is_backup_request; - __isset = other51.__isset; - return *this; -} -thrift_request_meta_v1 &thrift_request_meta_v1::operator=(thrift_request_meta_v1 &&other52) -{ - app_id = std::move(other52.app_id); - partition_index = std::move(other52.partition_index); - client_timeout = std::move(other52.client_timeout); - client_partition_hash = std::move(other52.client_partition_hash); - is_backup_request = std::move(other52.is_backup_request); - __isset = std::move(other52.__isset); - return *this; -} -void thrift_request_meta_v1::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "thrift_request_meta_v1("; - out << "app_id="; - (__isset.app_id ? (out << to_string(app_id)) : (out << "")); - out << ", " - << "partition_index="; - (__isset.partition_index ? (out << to_string(partition_index)) : (out << "")); - out << ", " - << "client_timeout="; - (__isset.client_timeout ? (out << to_string(client_timeout)) : (out << "")); - out << ", " - << "client_partition_hash="; - (__isset.client_partition_hash ? (out << to_string(client_partition_hash)) : (out << "")); - out << ", " - << "is_backup_request="; - (__isset.is_backup_request ? (out << to_string(is_backup_request)) : (out << "")); - out << ")"; + if (this->__isset.app_id) { + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.partition_index) { + xfer += oprot->writeFieldBegin("partition_index", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->partition_index); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.client_timeout) { + xfer += oprot->writeFieldBegin("client_timeout", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->client_timeout); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.client_partition_hash) { + xfer += oprot->writeFieldBegin("client_partition_hash", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->client_partition_hash); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.is_backup_request) { + xfer += oprot->writeFieldBegin("is_backup_request", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->is_backup_request); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(thrift_request_meta_v1 &a, thrift_request_meta_v1 &b) { + using ::std::swap; + swap(a.app_id, b.app_id); + swap(a.partition_index, b.partition_index); + swap(a.client_timeout, b.client_timeout); + swap(a.client_partition_hash, b.client_partition_hash); + swap(a.is_backup_request, b.is_backup_request); + swap(a.__isset, b.__isset); +} + +thrift_request_meta_v1::thrift_request_meta_v1(const thrift_request_meta_v1& other49) { + app_id = other49.app_id; + partition_index = other49.partition_index; + client_timeout = other49.client_timeout; + client_partition_hash = other49.client_partition_hash; + is_backup_request = other49.is_backup_request; + __isset = other49.__isset; +} +thrift_request_meta_v1::thrift_request_meta_v1( thrift_request_meta_v1&& other50) { + app_id = std::move(other50.app_id); + partition_index = std::move(other50.partition_index); + client_timeout = std::move(other50.client_timeout); + client_partition_hash = std::move(other50.client_partition_hash); + is_backup_request = std::move(other50.is_backup_request); + __isset = std::move(other50.__isset); +} +thrift_request_meta_v1& thrift_request_meta_v1::operator=(const thrift_request_meta_v1& other51) { + app_id = other51.app_id; + partition_index = other51.partition_index; + client_timeout = other51.client_timeout; + client_partition_hash = other51.client_partition_hash; + is_backup_request = other51.is_backup_request; + __isset = other51.__isset; + return *this; +} +thrift_request_meta_v1& thrift_request_meta_v1::operator=(thrift_request_meta_v1&& other52) { + app_id = std::move(other52.app_id); + partition_index = std::move(other52.partition_index); + client_timeout = std::move(other52.client_timeout); + client_partition_hash = std::move(other52.client_partition_hash); + is_backup_request = std::move(other52.is_backup_request); + __isset = std::move(other52.__isset); + return *this; +} +void thrift_request_meta_v1::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "thrift_request_meta_v1("; + out << "app_id="; (__isset.app_id ? (out << to_string(app_id)) : (out << "")); + out << ", " << "partition_index="; (__isset.partition_index ? (out << to_string(partition_index)) : (out << "")); + out << ", " << "client_timeout="; (__isset.client_timeout ? (out << to_string(client_timeout)) : (out << "")); + out << ", " << "client_partition_hash="; (__isset.client_partition_hash ? (out << to_string(client_partition_hash)) : (out << "")); + out << ", " << "is_backup_request="; (__isset.is_backup_request ? (out << to_string(is_backup_request)) : (out << "")); + out << ")"; } } // namespace diff --git a/src/dist/replication/common/replication_common.cpp b/src/dist/replication/common/replication_common.cpp index 925eebfe7e..5f852e37af 100644 --- a/src/dist/replication/common/replication_common.cpp +++ b/src/dist/replication/common/replication_common.cpp @@ -514,8 +514,8 @@ void replication_options::initialize() cold_backup_checkpoint_reserve_minutes, "reserve minutes of cold backup checkpoint"); - bulk_load_root = dsn_config_get_value_string( - "replication", "bulk_load_root", "", "bulk load remote file provider path prefix"); + bulk_load_provider_root = dsn_config_get_value_string( + "replication", "bulk_load_provider_root", "", "bulk load root on remote file provider"); replica_helper::load_meta_servers(meta_servers); diff --git a/src/dist/replication/common/replication_common.h b/src/dist/replication/common/replication_common.h index 70ee498dba..52bfcbb708 100644 --- a/src/dist/replication/common/replication_common.h +++ b/src/dist/replication/common/replication_common.h @@ -35,8 +35,6 @@ namespace replication { typedef std::unordered_map<::dsn::rpc_address, partition_status::type> node_statuses; typedef std::unordered_map<::dsn::rpc_address, dsn::task_ptr> node_tasks; -typedef rpc_holder start_bulk_load_rpc; - class replication_options { public: @@ -116,7 +114,7 @@ class replication_options int32_t max_concurrent_uploading_file_count; int32_t cold_backup_checkpoint_reserve_minutes; - std::string bulk_load_root; + std::string bulk_load_provider_root; public: replication_options(); diff --git a/src/dist/replication/common/replication_types.cpp b/src/dist/replication/common/replication_types.cpp index 81b1141c5a..2d88dc247d 100644 --- a/src/dist/replication/common/replication_types.cpp +++ b/src/dist/replication/common/replication_types.cpp @@ -11,14801 +11,14105 @@ #include -namespace dsn { -namespace replication { - -int _kpartition_statusValues[] = {partition_status::PS_INVALID, - partition_status::PS_INACTIVE, - partition_status::PS_ERROR, - partition_status::PS_PRIMARY, - partition_status::PS_SECONDARY, - partition_status::PS_POTENTIAL_SECONDARY, - partition_status::PS_PARTITION_SPLIT}; -const char *_kpartition_statusNames[] = {"PS_INVALID", - "PS_INACTIVE", - "PS_ERROR", - "PS_PRIMARY", - "PS_SECONDARY", - "PS_POTENTIAL_SECONDARY", - "PS_PARTITION_SPLIT"}; -const std::map _partition_status_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(7, _kpartition_statusValues, _kpartition_statusNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kread_semanticValues[] = {read_semantic::ReadInvalid, - read_semantic::ReadLastUpdate, - read_semantic::ReadOutdated, - read_semantic::ReadSnapshot}; -const char *_kread_semanticNames[] = { - "ReadInvalid", "ReadLastUpdate", "ReadOutdated", "ReadSnapshot"}; -const std::map _read_semantic_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(4, _kread_semanticValues, _kread_semanticNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); +namespace dsn { namespace replication { + +int _kpartition_statusValues[] = { + partition_status::PS_INVALID, + partition_status::PS_INACTIVE, + partition_status::PS_ERROR, + partition_status::PS_PRIMARY, + partition_status::PS_SECONDARY, + partition_status::PS_POTENTIAL_SECONDARY, + partition_status::PS_PARTITION_SPLIT +}; +const char* _kpartition_statusNames[] = { + "PS_INVALID", + "PS_INACTIVE", + "PS_ERROR", + "PS_PRIMARY", + "PS_SECONDARY", + "PS_POTENTIAL_SECONDARY", + "PS_PARTITION_SPLIT" +}; +const std::map _partition_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(7, _kpartition_statusValues, _kpartition_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kread_semanticValues[] = { + read_semantic::ReadInvalid, + read_semantic::ReadLastUpdate, + read_semantic::ReadOutdated, + read_semantic::ReadSnapshot +}; +const char* _kread_semanticNames[] = { + "ReadInvalid", + "ReadLastUpdate", + "ReadOutdated", + "ReadSnapshot" +}; +const std::map _read_semantic_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kread_semanticValues, _kread_semanticNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); int _klearn_typeValues[] = { - learn_type::LT_INVALID, learn_type::LT_CACHE, learn_type::LT_APP, learn_type::LT_LOG}; -const char *_klearn_typeNames[] = {"LT_INVALID", "LT_CACHE", "LT_APP", "LT_LOG"}; -const std::map _learn_type_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(4, _klearn_typeValues, _klearn_typeNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _klearner_statusValues[] = {learner_status::LearningInvalid, - learner_status::LearningWithoutPrepare, - learner_status::LearningWithPrepareTransient, - learner_status::LearningWithPrepare, - learner_status::LearningSucceeded, - learner_status::LearningFailed}; -const char *_klearner_statusNames[] = {"LearningInvalid", - "LearningWithoutPrepare", - "LearningWithPrepareTransient", - "LearningWithPrepare", - "LearningSucceeded", - "LearningFailed"}; -const std::map _learner_status_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(6, _klearner_statusValues, _klearner_statusNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kconfig_typeValues[] = {config_type::CT_INVALID, - config_type::CT_ASSIGN_PRIMARY, - config_type::CT_UPGRADE_TO_PRIMARY, - config_type::CT_ADD_SECONDARY, - config_type::CT_UPGRADE_TO_SECONDARY, - config_type::CT_DOWNGRADE_TO_SECONDARY, - config_type::CT_DOWNGRADE_TO_INACTIVE, - config_type::CT_REMOVE, - config_type::CT_ADD_SECONDARY_FOR_LB, - config_type::CT_PRIMARY_FORCE_UPDATE_BALLOT, - config_type::CT_DROP_PARTITION}; -const char *_kconfig_typeNames[] = {"CT_INVALID", - "CT_ASSIGN_PRIMARY", - "CT_UPGRADE_TO_PRIMARY", - "CT_ADD_SECONDARY", - "CT_UPGRADE_TO_SECONDARY", - "CT_DOWNGRADE_TO_SECONDARY", - "CT_DOWNGRADE_TO_INACTIVE", - "CT_REMOVE", - "CT_ADD_SECONDARY_FOR_LB", - "CT_PRIMARY_FORCE_UPDATE_BALLOT", - "CT_DROP_PARTITION"}; -const std::map _config_type_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(11, _kconfig_typeValues, _kconfig_typeNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + learn_type::LT_INVALID, + learn_type::LT_CACHE, + learn_type::LT_APP, + learn_type::LT_LOG +}; +const char* _klearn_typeNames[] = { + "LT_INVALID", + "LT_CACHE", + "LT_APP", + "LT_LOG" +}; +const std::map _learn_type_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _klearn_typeValues, _klearn_typeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _klearner_statusValues[] = { + learner_status::LearningInvalid, + learner_status::LearningWithoutPrepare, + learner_status::LearningWithPrepareTransient, + learner_status::LearningWithPrepare, + learner_status::LearningSucceeded, + learner_status::LearningFailed +}; +const char* _klearner_statusNames[] = { + "LearningInvalid", + "LearningWithoutPrepare", + "LearningWithPrepareTransient", + "LearningWithPrepare", + "LearningSucceeded", + "LearningFailed" +}; +const std::map _learner_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _klearner_statusValues, _klearner_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kconfig_typeValues[] = { + config_type::CT_INVALID, + config_type::CT_ASSIGN_PRIMARY, + config_type::CT_UPGRADE_TO_PRIMARY, + config_type::CT_ADD_SECONDARY, + config_type::CT_UPGRADE_TO_SECONDARY, + config_type::CT_DOWNGRADE_TO_SECONDARY, + config_type::CT_DOWNGRADE_TO_INACTIVE, + config_type::CT_REMOVE, + config_type::CT_ADD_SECONDARY_FOR_LB, + config_type::CT_PRIMARY_FORCE_UPDATE_BALLOT, + config_type::CT_DROP_PARTITION +}; +const char* _kconfig_typeNames[] = { + "CT_INVALID", + "CT_ASSIGN_PRIMARY", + "CT_UPGRADE_TO_PRIMARY", + "CT_ADD_SECONDARY", + "CT_UPGRADE_TO_SECONDARY", + "CT_DOWNGRADE_TO_SECONDARY", + "CT_DOWNGRADE_TO_INACTIVE", + "CT_REMOVE", + "CT_ADD_SECONDARY_FOR_LB", + "CT_PRIMARY_FORCE_UPDATE_BALLOT", + "CT_DROP_PARTITION" +}; +const std::map _config_type_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(11, _kconfig_typeValues, _kconfig_typeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); int _knode_statusValues[] = { - node_status::NS_INVALID, node_status::NS_ALIVE, node_status::NS_UNALIVE}; -const char *_knode_statusNames[] = {"NS_INVALID", "NS_ALIVE", "NS_UNALIVE"}; -const std::map _node_status_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(3, _knode_statusValues, _knode_statusNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kmeta_function_levelValues[] = {meta_function_level::fl_stopped, - meta_function_level::fl_blind, - meta_function_level::fl_freezed, - meta_function_level::fl_steady, - meta_function_level::fl_lively, - meta_function_level::fl_invalid}; -const char *_kmeta_function_levelNames[] = { - "fl_stopped", "fl_blind", "fl_freezed", "fl_steady", "fl_lively", "fl_invalid"}; -const std::map _meta_function_level_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(6, _kmeta_function_levelValues, _kmeta_function_levelNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kbalancer_request_typeValues[] = {balancer_request_type::move_primary, - balancer_request_type::copy_primary, - balancer_request_type::copy_secondary}; -const char *_kbalancer_request_typeNames[] = {"move_primary", "copy_primary", "copy_secondary"}; -const std::map _balancer_request_type_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(3, _kbalancer_request_typeValues, _kbalancer_request_typeNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kapp_env_operationValues[] = {app_env_operation::APP_ENV_OP_INVALID, - app_env_operation::APP_ENV_OP_SET, - app_env_operation::APP_ENV_OP_DEL, - app_env_operation::APP_ENV_OP_CLEAR}; -const char *_kapp_env_operationNames[] = { - "APP_ENV_OP_INVALID", "APP_ENV_OP_SET", "APP_ENV_OP_DEL", "APP_ENV_OP_CLEAR"}; -const std::map _app_env_operation_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(4, _kapp_env_operationValues, _kapp_env_operationNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kduplication_statusValues[] = {duplication_status::DS_INIT, - duplication_status::DS_START, - duplication_status::DS_PAUSE, - duplication_status::DS_REMOVED}; -const char *_kduplication_statusNames[] = {"DS_INIT", "DS_START", "DS_PAUSE", "DS_REMOVED"}; -const std::map _duplication_status_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(4, _kduplication_statusValues, _kduplication_statusNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kduplication_fail_modeValues[] = {duplication_fail_mode::FAIL_SLOW, - duplication_fail_mode::FAIL_SKIP, - duplication_fail_mode::FAIL_FAST}; -const char *_kduplication_fail_modeNames[] = {"FAIL_SLOW", "FAIL_SKIP", "FAIL_FAST"}; -const std::map _duplication_fail_mode_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(3, _kduplication_fail_modeValues, _kduplication_fail_modeNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kbulk_load_statusValues[] = {bulk_load_status::BLS_INVALID, - bulk_load_status::BLS_DOWNLOADING, - bulk_load_status::BLS_DOWNLOADED, - bulk_load_status::BLS_INGESTING, - bulk_load_status::BLS_SUCCEED, - bulk_load_status::BLS_FAILED, - bulk_load_status::BLS_PAUSING, - bulk_load_status::BLS_PAUSED, - bulk_load_status::BLS_CANCELED}; -const char *_kbulk_load_statusNames[] = {"BLS_INVALID", - "BLS_DOWNLOADING", - "BLS_DOWNLOADED", - "BLS_INGESTING", - "BLS_SUCCEED", - "BLS_FAILED", - "BLS_PAUSING", - "BLS_PAUSED", - "BLS_CANCELED"}; -const std::map _bulk_load_status_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(9, _kbulk_load_statusValues, _kbulk_load_statusNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -mutation_header::~mutation_header() throw() {} - -void mutation_header::__set_pid(const ::dsn::gpid &val) { this->pid = val; } - -void mutation_header::__set_ballot(const int64_t val) { this->ballot = val; } - -void mutation_header::__set_decree(const int64_t val) { this->decree = val; } - -void mutation_header::__set_log_offset(const int64_t val) { this->log_offset = val; } - -void mutation_header::__set_last_committed_decree(const int64_t val) -{ - this->last_committed_decree = val; -} - -void mutation_header::__set_timestamp(const int64_t val) { this->timestamp = val; } - -uint32_t mutation_header::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->decree); - this->__isset.decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->log_offset); - this->__isset.log_offset = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->timestamp); - this->__isset.timestamp = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + node_status::NS_INVALID, + node_status::NS_ALIVE, + node_status::NS_UNALIVE +}; +const char* _knode_statusNames[] = { + "NS_INVALID", + "NS_ALIVE", + "NS_UNALIVE" +}; +const std::map _node_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _knode_statusValues, _knode_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kmeta_function_levelValues[] = { + meta_function_level::fl_stopped, + meta_function_level::fl_blind, + meta_function_level::fl_freezed, + meta_function_level::fl_steady, + meta_function_level::fl_lively, + meta_function_level::fl_invalid +}; +const char* _kmeta_function_levelNames[] = { + "fl_stopped", + "fl_blind", + "fl_freezed", + "fl_steady", + "fl_lively", + "fl_invalid" +}; +const std::map _meta_function_level_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kmeta_function_levelValues, _kmeta_function_levelNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kbalancer_request_typeValues[] = { + balancer_request_type::move_primary, + balancer_request_type::copy_primary, + balancer_request_type::copy_secondary +}; +const char* _kbalancer_request_typeNames[] = { + "move_primary", + "copy_primary", + "copy_secondary" +}; +const std::map _balancer_request_type_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kbalancer_request_typeValues, _kbalancer_request_typeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kapp_env_operationValues[] = { + app_env_operation::APP_ENV_OP_INVALID, + app_env_operation::APP_ENV_OP_SET, + app_env_operation::APP_ENV_OP_DEL, + app_env_operation::APP_ENV_OP_CLEAR +}; +const char* _kapp_env_operationNames[] = { + "APP_ENV_OP_INVALID", + "APP_ENV_OP_SET", + "APP_ENV_OP_DEL", + "APP_ENV_OP_CLEAR" +}; +const std::map _app_env_operation_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kapp_env_operationValues, _kapp_env_operationNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kduplication_statusValues[] = { + duplication_status::DS_INIT, + duplication_status::DS_START, + duplication_status::DS_PAUSE, + duplication_status::DS_REMOVED +}; +const char* _kduplication_statusNames[] = { + "DS_INIT", + "DS_START", + "DS_PAUSE", + "DS_REMOVED" +}; +const std::map _duplication_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kduplication_statusValues, _kduplication_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kduplication_fail_modeValues[] = { + duplication_fail_mode::FAIL_SLOW, + duplication_fail_mode::FAIL_SKIP, + duplication_fail_mode::FAIL_FAST +}; +const char* _kduplication_fail_modeNames[] = { + "FAIL_SLOW", + "FAIL_SKIP", + "FAIL_FAST" +}; +const std::map _duplication_fail_mode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kduplication_fail_modeValues, _kduplication_fail_modeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kbulk_load_statusValues[] = { + bulk_load_status::BLS_INVALID, + bulk_load_status::BLS_DOWNLOADING, + bulk_load_status::BLS_DOWNLOADED, + bulk_load_status::BLS_INGESTING, + bulk_load_status::BLS_SUCCEED, + bulk_load_status::BLS_FAILED, + bulk_load_status::BLS_PAUSING, + bulk_load_status::BLS_PAUSED, + bulk_load_status::BLS_CANCELED +}; +const char* _kbulk_load_statusNames[] = { + "BLS_INVALID", + "BLS_DOWNLOADING", + "BLS_DOWNLOADED", + "BLS_INGESTING", + "BLS_SUCCEED", + "BLS_FAILED", + "BLS_PAUSING", + "BLS_PAUSED", + "BLS_CANCELED" +}; +const std::map _bulk_load_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(9, _kbulk_load_statusValues, _kbulk_load_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + + +mutation_header::~mutation_header() throw() { +} + + +void mutation_header::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} + +void mutation_header::__set_ballot(const int64_t val) { + this->ballot = val; +} + +void mutation_header::__set_decree(const int64_t val) { + this->decree = val; +} + +void mutation_header::__set_log_offset(const int64_t val) { + this->log_offset = val; +} + +void mutation_header::__set_last_committed_decree(const int64_t val) { + this->last_committed_decree = val; +} + +void mutation_header::__set_timestamp(const int64_t val) { + this->timestamp = val; +} + +uint32_t mutation_header::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->decree); + this->__isset.decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->log_offset); + this->__isset.log_offset = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t mutation_header::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("mutation_header"); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); -uint32_t mutation_header::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("mutation_header"); + xfer += oprot->writeFieldBegin("decree", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->decree); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("log_offset", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->log_offset); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("decree", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("log_offset", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->log_offset); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); +void swap(mutation_header &a, mutation_header &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.ballot, b.ballot); + swap(a.decree, b.decree); + swap(a.log_offset, b.log_offset); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.timestamp, b.timestamp); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 6); - xfer += oprot->writeI64(this->timestamp); - xfer += oprot->writeFieldEnd(); +mutation_header::mutation_header(const mutation_header& other0) { + pid = other0.pid; + ballot = other0.ballot; + decree = other0.decree; + log_offset = other0.log_offset; + last_committed_decree = other0.last_committed_decree; + timestamp = other0.timestamp; + __isset = other0.__isset; +} +mutation_header::mutation_header( mutation_header&& other1) { + pid = std::move(other1.pid); + ballot = std::move(other1.ballot); + decree = std::move(other1.decree); + log_offset = std::move(other1.log_offset); + last_committed_decree = std::move(other1.last_committed_decree); + timestamp = std::move(other1.timestamp); + __isset = std::move(other1.__isset); +} +mutation_header& mutation_header::operator=(const mutation_header& other2) { + pid = other2.pid; + ballot = other2.ballot; + decree = other2.decree; + log_offset = other2.log_offset; + last_committed_decree = other2.last_committed_decree; + timestamp = other2.timestamp; + __isset = other2.__isset; + return *this; +} +mutation_header& mutation_header::operator=(mutation_header&& other3) { + pid = std::move(other3.pid); + ballot = std::move(other3.ballot); + decree = std::move(other3.decree); + log_offset = std::move(other3.log_offset); + last_committed_decree = std::move(other3.last_committed_decree); + timestamp = std::move(other3.timestamp); + __isset = std::move(other3.__isset); + return *this; +} +void mutation_header::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "mutation_header("; + out << "pid=" << to_string(pid); + out << ", " << "ballot=" << to_string(ballot); + out << ", " << "decree=" << to_string(decree); + out << ", " << "log_offset=" << to_string(log_offset); + out << ", " << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " << "timestamp=" << to_string(timestamp); + out << ")"; +} + + +mutation_update::~mutation_update() throw() { +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(mutation_header &a, mutation_header &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.ballot, b.ballot); - swap(a.decree, b.decree); - swap(a.log_offset, b.log_offset); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.timestamp, b.timestamp); - swap(a.__isset, b.__isset); -} - -mutation_header::mutation_header(const mutation_header &other0) -{ - pid = other0.pid; - ballot = other0.ballot; - decree = other0.decree; - log_offset = other0.log_offset; - last_committed_decree = other0.last_committed_decree; - timestamp = other0.timestamp; - __isset = other0.__isset; -} -mutation_header::mutation_header(mutation_header &&other1) -{ - pid = std::move(other1.pid); - ballot = std::move(other1.ballot); - decree = std::move(other1.decree); - log_offset = std::move(other1.log_offset); - last_committed_decree = std::move(other1.last_committed_decree); - timestamp = std::move(other1.timestamp); - __isset = std::move(other1.__isset); -} -mutation_header &mutation_header::operator=(const mutation_header &other2) -{ - pid = other2.pid; - ballot = other2.ballot; - decree = other2.decree; - log_offset = other2.log_offset; - last_committed_decree = other2.last_committed_decree; - timestamp = other2.timestamp; - __isset = other2.__isset; - return *this; -} -mutation_header &mutation_header::operator=(mutation_header &&other3) -{ - pid = std::move(other3.pid); - ballot = std::move(other3.ballot); - decree = std::move(other3.decree); - log_offset = std::move(other3.log_offset); - last_committed_decree = std::move(other3.last_committed_decree); - timestamp = std::move(other3.timestamp); - __isset = std::move(other3.__isset); - return *this; -} -void mutation_header::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "mutation_header("; - out << "pid=" << to_string(pid); - out << ", " - << "ballot=" << to_string(ballot); - out << ", " - << "decree=" << to_string(decree); - out << ", " - << "log_offset=" << to_string(log_offset); - out << ", " - << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " - << "timestamp=" << to_string(timestamp); - out << ")"; -} - -mutation_update::~mutation_update() throw() {} - -void mutation_update::__set_code(const ::dsn::task_code &val) { this->code = val; } - -void mutation_update::__set_serialization_type(const int32_t val) -{ - this->serialization_type = val; -} - -void mutation_update::__set_data(const ::dsn::blob &val) { this->data = val; } - -void mutation_update::__set_start_time_ns(const int64_t val) -{ - this->start_time_ns = val; - __isset.start_time_ns = true; -} - -uint32_t mutation_update::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->code.read(iprot); - this->__isset.code = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->serialization_type); - this->__isset.serialization_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->data.read(iprot); - this->__isset.data = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->start_time_ns); - this->__isset.start_time_ns = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); +void mutation_update::__set_code(const ::dsn::task_code& val) { + this->code = val; +} - return xfer; +void mutation_update::__set_serialization_type(const int32_t val) { + this->serialization_type = val; } -uint32_t mutation_update::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("mutation_update"); +void mutation_update::__set_data(const ::dsn::blob& val) { + this->data = val; +} - xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->code.write(oprot); - xfer += oprot->writeFieldEnd(); +void mutation_update::__set_start_time_ns(const int64_t val) { + this->start_time_ns = val; +__isset.start_time_ns = true; +} - xfer += oprot->writeFieldBegin("serialization_type", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->serialization_type); - xfer += oprot->writeFieldEnd(); +uint32_t mutation_update::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->data.write(oprot); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - if (this->__isset.start_time_ns) { - xfer += oprot->writeFieldBegin("start_time_ns", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->start_time_ns); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(mutation_update &a, mutation_update &b) -{ - using ::std::swap; - swap(a.code, b.code); - swap(a.serialization_type, b.serialization_type); - swap(a.data, b.data); - swap(a.start_time_ns, b.start_time_ns); - swap(a.__isset, b.__isset); -} - -mutation_update::mutation_update(const mutation_update &other4) -{ - code = other4.code; - serialization_type = other4.serialization_type; - data = other4.data; - start_time_ns = other4.start_time_ns; - __isset = other4.__isset; -} -mutation_update::mutation_update(mutation_update &&other5) -{ - code = std::move(other5.code); - serialization_type = std::move(other5.serialization_type); - data = std::move(other5.data); - start_time_ns = std::move(other5.start_time_ns); - __isset = std::move(other5.__isset); -} -mutation_update &mutation_update::operator=(const mutation_update &other6) -{ - code = other6.code; - serialization_type = other6.serialization_type; - data = other6.data; - start_time_ns = other6.start_time_ns; - __isset = other6.__isset; - return *this; -} -mutation_update &mutation_update::operator=(mutation_update &&other7) -{ - code = std::move(other7.code); - serialization_type = std::move(other7.serialization_type); - data = std::move(other7.data); - start_time_ns = std::move(other7.start_time_ns); - __isset = std::move(other7.__isset); - return *this; -} -void mutation_update::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "mutation_update("; - out << "code=" << to_string(code); - out << ", " - << "serialization_type=" << to_string(serialization_type); - out << ", " - << "data=" << to_string(data); - out << ", " - << "start_time_ns="; - (__isset.start_time_ns ? (out << to_string(start_time_ns)) : (out << "")); - out << ")"; -} - -mutation_data::~mutation_data() throw() {} - -void mutation_data::__set_header(const mutation_header &val) { this->header = val; } - -void mutation_data::__set_updates(const std::vector &val) { this->updates = val; } - -uint32_t mutation_data::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->header.read(iprot); - this->__isset.header = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->updates.clear(); - uint32_t _size8; - ::apache::thrift::protocol::TType _etype11; - xfer += iprot->readListBegin(_etype11, _size8); - this->updates.resize(_size8); - uint32_t _i12; - for (_i12 = 0; _i12 < _size8; ++_i12) { - xfer += this->updates[_i12].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.updates = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->code.read(iprot); + this->__isset.code = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->serialization_type); + this->__isset.serialization_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->data.read(iprot); + this->__isset.data = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->start_time_ns); + this->__isset.start_time_ns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t mutation_data::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("mutation_data"); +uint32_t mutation_update::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("mutation_update"); - xfer += oprot->writeFieldBegin("header", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->header.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->code.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("updates", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->updates.size())); - std::vector::const_iterator _iter13; - for (_iter13 = this->updates.begin(); _iter13 != this->updates.end(); ++_iter13) { - xfer += (*_iter13).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("serialization_type", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->serialization_type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->data.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + if (this->__isset.start_time_ns) { + xfer += oprot->writeFieldBegin("start_time_ns", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->start_time_ns); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(mutation_data &a, mutation_data &b) -{ - using ::std::swap; - swap(a.header, b.header); - swap(a.updates, b.updates); - swap(a.__isset, b.__isset); +void swap(mutation_update &a, mutation_update &b) { + using ::std::swap; + swap(a.code, b.code); + swap(a.serialization_type, b.serialization_type); + swap(a.data, b.data); + swap(a.start_time_ns, b.start_time_ns); + swap(a.__isset, b.__isset); } -mutation_data::mutation_data(const mutation_data &other14) -{ - header = other14.header; - updates = other14.updates; - __isset = other14.__isset; +mutation_update::mutation_update(const mutation_update& other4) { + code = other4.code; + serialization_type = other4.serialization_type; + data = other4.data; + start_time_ns = other4.start_time_ns; + __isset = other4.__isset; } -mutation_data::mutation_data(mutation_data &&other15) -{ - header = std::move(other15.header); - updates = std::move(other15.updates); - __isset = std::move(other15.__isset); +mutation_update::mutation_update( mutation_update&& other5) { + code = std::move(other5.code); + serialization_type = std::move(other5.serialization_type); + data = std::move(other5.data); + start_time_ns = std::move(other5.start_time_ns); + __isset = std::move(other5.__isset); } -mutation_data &mutation_data::operator=(const mutation_data &other16) -{ - header = other16.header; - updates = other16.updates; - __isset = other16.__isset; - return *this; +mutation_update& mutation_update::operator=(const mutation_update& other6) { + code = other6.code; + serialization_type = other6.serialization_type; + data = other6.data; + start_time_ns = other6.start_time_ns; + __isset = other6.__isset; + return *this; } -mutation_data &mutation_data::operator=(mutation_data &&other17) -{ - header = std::move(other17.header); - updates = std::move(other17.updates); - __isset = std::move(other17.__isset); - return *this; +mutation_update& mutation_update::operator=(mutation_update&& other7) { + code = std::move(other7.code); + serialization_type = std::move(other7.serialization_type); + data = std::move(other7.data); + start_time_ns = std::move(other7.start_time_ns); + __isset = std::move(other7.__isset); + return *this; } -void mutation_data::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "mutation_data("; - out << "header=" << to_string(header); - out << ", " - << "updates=" << to_string(updates); - out << ")"; +void mutation_update::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "mutation_update("; + out << "code=" << to_string(code); + out << ", " << "serialization_type=" << to_string(serialization_type); + out << ", " << "data=" << to_string(data); + out << ", " << "start_time_ns="; (__isset.start_time_ns ? (out << to_string(start_time_ns)) : (out << "")); + out << ")"; } -replica_configuration::~replica_configuration() throw() {} - -void replica_configuration::__set_pid(const ::dsn::gpid &val) { this->pid = val; } -void replica_configuration::__set_ballot(const int64_t val) { this->ballot = val; } +mutation_data::~mutation_data() throw() { +} -void replica_configuration::__set_primary(const ::dsn::rpc_address &val) { this->primary = val; } -void replica_configuration::__set_status(const partition_status::type val) { this->status = val; } +void mutation_data::__set_header(const mutation_header& val) { + this->header = val; +} -void replica_configuration::__set_learner_signature(const int64_t val) -{ - this->learner_signature = val; +void mutation_data::__set_updates(const std::vector & val) { + this->updates = val; } -uint32_t replica_configuration::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t mutation_data::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->primary.read(iprot); - this->__isset.primary = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast18; - xfer += iprot->readI32(ecast18); - this->status = (partition_status::type)ecast18; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->learner_signature); - this->__isset.learner_signature = true; - } else { - xfer += iprot->skip(ftype); + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->header.read(iprot); + this->__isset.header = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->updates.clear(); + uint32_t _size8; + ::apache::thrift::protocol::TType _etype11; + xfer += iprot->readListBegin(_etype11, _size8); + this->updates.resize(_size8); + uint32_t _i12; + for (_i12 = 0; _i12 < _size8; ++_i12) + { + xfer += this->updates[_i12].read(iprot); } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readListEnd(); + } + this->__isset.updates = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t replica_configuration::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("replica_configuration"); - - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("primary", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->primary.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); +uint32_t mutation_data::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("mutation_data"); - xfer += oprot->writeFieldBegin("learner_signature", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->learner_signature); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("header", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->header.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(replica_configuration &a, replica_configuration &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.ballot, b.ballot); - swap(a.primary, b.primary); - swap(a.status, b.status); - swap(a.learner_signature, b.learner_signature); - swap(a.__isset, b.__isset); -} - -replica_configuration::replica_configuration(const replica_configuration &other19) -{ - pid = other19.pid; - ballot = other19.ballot; - primary = other19.primary; - status = other19.status; - learner_signature = other19.learner_signature; - __isset = other19.__isset; -} -replica_configuration::replica_configuration(replica_configuration &&other20) -{ - pid = std::move(other20.pid); - ballot = std::move(other20.ballot); - primary = std::move(other20.primary); - status = std::move(other20.status); - learner_signature = std::move(other20.learner_signature); - __isset = std::move(other20.__isset); -} -replica_configuration &replica_configuration::operator=(const replica_configuration &other21) -{ - pid = other21.pid; - ballot = other21.ballot; - primary = other21.primary; - status = other21.status; - learner_signature = other21.learner_signature; - __isset = other21.__isset; - return *this; -} -replica_configuration &replica_configuration::operator=(replica_configuration &&other22) -{ - pid = std::move(other22.pid); - ballot = std::move(other22.ballot); - primary = std::move(other22.primary); - status = std::move(other22.status); - learner_signature = std::move(other22.learner_signature); - __isset = std::move(other22.__isset); - return *this; -} -void replica_configuration::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "replica_configuration("; - out << "pid=" << to_string(pid); - out << ", " - << "ballot=" << to_string(ballot); - out << ", " - << "primary=" << to_string(primary); - out << ", " - << "status=" << to_string(status); - out << ", " - << "learner_signature=" << to_string(learner_signature); - out << ")"; -} - -prepare_msg::~prepare_msg() throw() {} - -void prepare_msg::__set_config(const replica_configuration &val) { this->config = val; } - -void prepare_msg::__set_mu(const mutation_data &val) { this->mu = val; } - -uint32_t prepare_msg::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->config.read(iprot); - this->__isset.config = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->mu.read(iprot); - this->__isset.mu = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + xfer += oprot->writeFieldBegin("updates", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->updates.size())); + std::vector ::const_iterator _iter13; + for (_iter13 = this->updates.begin(); _iter13 != this->updates.end(); ++_iter13) + { + xfer += (*_iter13).write(oprot); } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); - - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -uint32_t prepare_msg::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("prepare_msg"); +void swap(mutation_data &a, mutation_data &b) { + using ::std::swap; + swap(a.header, b.header); + swap(a.updates, b.updates); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->config.write(oprot); - xfer += oprot->writeFieldEnd(); +mutation_data::mutation_data(const mutation_data& other14) { + header = other14.header; + updates = other14.updates; + __isset = other14.__isset; +} +mutation_data::mutation_data( mutation_data&& other15) { + header = std::move(other15.header); + updates = std::move(other15.updates); + __isset = std::move(other15.__isset); +} +mutation_data& mutation_data::operator=(const mutation_data& other16) { + header = other16.header; + updates = other16.updates; + __isset = other16.__isset; + return *this; +} +mutation_data& mutation_data::operator=(mutation_data&& other17) { + header = std::move(other17.header); + updates = std::move(other17.updates); + __isset = std::move(other17.__isset); + return *this; +} +void mutation_data::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "mutation_data("; + out << "header=" << to_string(header); + out << ", " << "updates=" << to_string(updates); + out << ")"; +} - xfer += oprot->writeFieldBegin("mu", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->mu.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; +replica_configuration::~replica_configuration() throw() { } -void swap(prepare_msg &a, prepare_msg &b) -{ - using ::std::swap; - swap(a.config, b.config); - swap(a.mu, b.mu); - swap(a.__isset, b.__isset); -} -prepare_msg::prepare_msg(const prepare_msg &other23) -{ - config = other23.config; - mu = other23.mu; - __isset = other23.__isset; +void replica_configuration::__set_pid(const ::dsn::gpid& val) { + this->pid = val; } -prepare_msg::prepare_msg(prepare_msg &&other24) -{ - config = std::move(other24.config); - mu = std::move(other24.mu); - __isset = std::move(other24.__isset); + +void replica_configuration::__set_ballot(const int64_t val) { + this->ballot = val; } -prepare_msg &prepare_msg::operator=(const prepare_msg &other25) -{ - config = other25.config; - mu = other25.mu; - __isset = other25.__isset; - return *this; + +void replica_configuration::__set_primary(const ::dsn::rpc_address& val) { + this->primary = val; } -prepare_msg &prepare_msg::operator=(prepare_msg &&other26) -{ - config = std::move(other26.config); - mu = std::move(other26.mu); - __isset = std::move(other26.__isset); - return *this; + +void replica_configuration::__set_status(const partition_status::type val) { + this->status = val; } -void prepare_msg::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "prepare_msg("; - out << "config=" << to_string(config); - out << ", " - << "mu=" << to_string(mu); - out << ")"; + +void replica_configuration::__set_learner_signature(const int64_t val) { + this->learner_signature = val; } -read_request_header::~read_request_header() throw() {} +uint32_t replica_configuration::read(::apache::thrift::protocol::TProtocol* iprot) { -void read_request_header::__set_pid(const ::dsn::gpid &val) { this->pid = val; } + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -void read_request_header::__set_code(const ::dsn::task_code &val) { this->code = val; } + xfer += iprot->readStructBegin(fname); -void read_request_header::__set_semantic(const read_semantic::type val) { this->semantic = val; } + using ::apache::thrift::protocol::TProtocolException; -void read_request_header::__set_version_decree(const int64_t val) { this->version_decree = val; } -uint32_t read_request_header::read(::apache::thrift::protocol::TProtocol *iprot) -{ + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->primary.read(iprot); + this->__isset.primary = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast18; + xfer += iprot->readI32(ecast18); + this->status = (partition_status::type)ecast18; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->learner_signature); + this->__isset.learner_signature = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += iprot->readStructEnd(); - xfer += iprot->readStructBegin(fname); + return xfer; +} - using ::apache::thrift::protocol::TProtocolException; +uint32_t replica_configuration::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("replica_configuration"); - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->code.read(iprot); - this->__isset.code = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast27; - xfer += iprot->readI32(ecast27); - this->semantic = (read_semantic::type)ecast27; - this->__isset.semantic = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->version_decree); - this->__isset.version_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("primary", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->primary.write(oprot); + xfer += oprot->writeFieldEnd(); -uint32_t read_request_header::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("read_request_header"); + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("learner_signature", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->learner_signature); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->code.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("semantic", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->semantic); - xfer += oprot->writeFieldEnd(); +void swap(replica_configuration &a, replica_configuration &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.ballot, b.ballot); + swap(a.primary, b.primary); + swap(a.status, b.status); + swap(a.learner_signature, b.learner_signature); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldBegin("version_decree", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->version_decree); - xfer += oprot->writeFieldEnd(); +replica_configuration::replica_configuration(const replica_configuration& other19) { + pid = other19.pid; + ballot = other19.ballot; + primary = other19.primary; + status = other19.status; + learner_signature = other19.learner_signature; + __isset = other19.__isset; +} +replica_configuration::replica_configuration( replica_configuration&& other20) { + pid = std::move(other20.pid); + ballot = std::move(other20.ballot); + primary = std::move(other20.primary); + status = std::move(other20.status); + learner_signature = std::move(other20.learner_signature); + __isset = std::move(other20.__isset); +} +replica_configuration& replica_configuration::operator=(const replica_configuration& other21) { + pid = other21.pid; + ballot = other21.ballot; + primary = other21.primary; + status = other21.status; + learner_signature = other21.learner_signature; + __isset = other21.__isset; + return *this; +} +replica_configuration& replica_configuration::operator=(replica_configuration&& other22) { + pid = std::move(other22.pid); + ballot = std::move(other22.ballot); + primary = std::move(other22.primary); + status = std::move(other22.status); + learner_signature = std::move(other22.learner_signature); + __isset = std::move(other22.__isset); + return *this; +} +void replica_configuration::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "replica_configuration("; + out << "pid=" << to_string(pid); + out << ", " << "ballot=" << to_string(ballot); + out << ", " << "primary=" << to_string(primary); + out << ", " << "status=" << to_string(status); + out << ", " << "learner_signature=" << to_string(learner_signature); + out << ")"; +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(read_request_header &a, read_request_header &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.code, b.code); - swap(a.semantic, b.semantic); - swap(a.version_decree, b.version_decree); - swap(a.__isset, b.__isset); -} - -read_request_header::read_request_header(const read_request_header &other28) -{ - pid = other28.pid; - code = other28.code; - semantic = other28.semantic; - version_decree = other28.version_decree; - __isset = other28.__isset; -} -read_request_header::read_request_header(read_request_header &&other29) -{ - pid = std::move(other29.pid); - code = std::move(other29.code); - semantic = std::move(other29.semantic); - version_decree = std::move(other29.version_decree); - __isset = std::move(other29.__isset); -} -read_request_header &read_request_header::operator=(const read_request_header &other30) -{ - pid = other30.pid; - code = other30.code; - semantic = other30.semantic; - version_decree = other30.version_decree; - __isset = other30.__isset; - return *this; -} -read_request_header &read_request_header::operator=(read_request_header &&other31) -{ - pid = std::move(other31.pid); - code = std::move(other31.code); - semantic = std::move(other31.semantic); - version_decree = std::move(other31.version_decree); - __isset = std::move(other31.__isset); - return *this; -} -void read_request_header::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "read_request_header("; - out << "pid=" << to_string(pid); - out << ", " - << "code=" << to_string(code); - out << ", " - << "semantic=" << to_string(semantic); - out << ", " - << "version_decree=" << to_string(version_decree); - out << ")"; -} - -write_request_header::~write_request_header() throw() {} - -void write_request_header::__set_pid(const ::dsn::gpid &val) { this->pid = val; } - -void write_request_header::__set_code(const ::dsn::task_code &val) { this->code = val; } - -uint32_t write_request_header::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->code.read(iprot); - this->__isset.code = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); +prepare_msg::~prepare_msg() throw() { +} + - return xfer; +void prepare_msg::__set_config(const replica_configuration& val) { + this->config = val; } -uint32_t write_request_header::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("write_request_header"); +void prepare_msg::__set_mu(const mutation_data& val) { + this->mu = val; +} - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t prepare_msg::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->code.write(oprot); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(write_request_header &a, write_request_header &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.code, b.code); - swap(a.__isset, b.__isset); -} - -write_request_header::write_request_header(const write_request_header &other32) -{ - pid = other32.pid; - code = other32.code; - __isset = other32.__isset; -} -write_request_header::write_request_header(write_request_header &&other33) -{ - pid = std::move(other33.pid); - code = std::move(other33.code); - __isset = std::move(other33.__isset); -} -write_request_header &write_request_header::operator=(const write_request_header &other34) -{ - pid = other34.pid; - code = other34.code; - __isset = other34.__isset; - return *this; -} -write_request_header &write_request_header::operator=(write_request_header &&other35) -{ - pid = std::move(other35.pid); - code = std::move(other35.code); - __isset = std::move(other35.__isset); - return *this; -} -void write_request_header::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "write_request_header("; - out << "pid=" << to_string(pid); - out << ", " - << "code=" << to_string(code); - out << ")"; -} - -rw_response_header::~rw_response_header() throw() {} - -void rw_response_header::__set_err(const ::dsn::error_code &val) { this->err = val; } - -uint32_t rw_response_header::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->mu.read(iprot); + this->__isset.mu = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t rw_response_header::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("rw_response_header"); +uint32_t prepare_msg::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("prepare_msg"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldBegin("mu", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->mu.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(rw_response_header &a, rw_response_header &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.__isset, b.__isset); +void swap(prepare_msg &a, prepare_msg &b) { + using ::std::swap; + swap(a.config, b.config); + swap(a.mu, b.mu); + swap(a.__isset, b.__isset); } -rw_response_header::rw_response_header(const rw_response_header &other36) -{ - err = other36.err; - __isset = other36.__isset; +prepare_msg::prepare_msg(const prepare_msg& other23) { + config = other23.config; + mu = other23.mu; + __isset = other23.__isset; } -rw_response_header::rw_response_header(rw_response_header &&other37) -{ - err = std::move(other37.err); - __isset = std::move(other37.__isset); +prepare_msg::prepare_msg( prepare_msg&& other24) { + config = std::move(other24.config); + mu = std::move(other24.mu); + __isset = std::move(other24.__isset); } -rw_response_header &rw_response_header::operator=(const rw_response_header &other38) -{ - err = other38.err; - __isset = other38.__isset; - return *this; +prepare_msg& prepare_msg::operator=(const prepare_msg& other25) { + config = other25.config; + mu = other25.mu; + __isset = other25.__isset; + return *this; } -rw_response_header &rw_response_header::operator=(rw_response_header &&other39) -{ - err = std::move(other39.err); - __isset = std::move(other39.__isset); - return *this; +prepare_msg& prepare_msg::operator=(prepare_msg&& other26) { + config = std::move(other26.config); + mu = std::move(other26.mu); + __isset = std::move(other26.__isset); + return *this; } -void rw_response_header::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "rw_response_header("; - out << "err=" << to_string(err); - out << ")"; +void prepare_msg::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "prepare_msg("; + out << "config=" << to_string(config); + out << ", " << "mu=" << to_string(mu); + out << ")"; } -prepare_ack::~prepare_ack() throw() {} -void prepare_ack::__set_pid(const ::dsn::gpid &val) { this->pid = val; } +read_request_header::~read_request_header() throw() { +} -void prepare_ack::__set_err(const ::dsn::error_code &val) { this->err = val; } -void prepare_ack::__set_ballot(const int64_t val) { this->ballot = val; } +void read_request_header::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} -void prepare_ack::__set_decree(const int64_t val) { this->decree = val; } +void read_request_header::__set_code(const ::dsn::task_code& val) { + this->code = val; +} -void prepare_ack::__set_last_committed_decree_in_app(const int64_t val) -{ - this->last_committed_decree_in_app = val; +void read_request_header::__set_semantic(const read_semantic::type val) { + this->semantic = val; } -void prepare_ack::__set_last_committed_decree_in_prepare_list(const int64_t val) -{ - this->last_committed_decree_in_prepare_list = val; +void read_request_header::__set_version_decree(const int64_t val) { + this->version_decree = val; } -uint32_t prepare_ack::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t read_request_header::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->decree); - this->__isset.decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree_in_app); - this->__isset.last_committed_decree_in_app = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree_in_prepare_list); - this->__isset.last_committed_decree_in_prepare_list = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->code.read(iprot); + this->__isset.code = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast27; + xfer += iprot->readI32(ecast27); + this->semantic = (read_semantic::type)ecast27; + this->__isset.semantic = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->version_decree); + this->__isset.version_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t prepare_ack::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("prepare_ack"); +uint32_t read_request_header::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("read_request_header"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->code.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("semantic", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->semantic); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("decree", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("version_decree", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->version_decree); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin( - "last_committed_decree_in_app", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->last_committed_decree_in_app); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin( - "last_committed_decree_in_prepare_list", ::apache::thrift::protocol::T_I64, 6); - xfer += oprot->writeI64(this->last_committed_decree_in_prepare_list); - xfer += oprot->writeFieldEnd(); +void swap(read_request_header &a, read_request_header &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.code, b.code); + swap(a.semantic, b.semantic); + swap(a.version_decree, b.version_decree); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(prepare_ack &a, prepare_ack &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.err, b.err); - swap(a.ballot, b.ballot); - swap(a.decree, b.decree); - swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app); - swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list); - swap(a.__isset, b.__isset); -} - -prepare_ack::prepare_ack(const prepare_ack &other40) -{ - pid = other40.pid; - err = other40.err; - ballot = other40.ballot; - decree = other40.decree; - last_committed_decree_in_app = other40.last_committed_decree_in_app; - last_committed_decree_in_prepare_list = other40.last_committed_decree_in_prepare_list; - __isset = other40.__isset; -} -prepare_ack::prepare_ack(prepare_ack &&other41) -{ - pid = std::move(other41.pid); - err = std::move(other41.err); - ballot = std::move(other41.ballot); - decree = std::move(other41.decree); - last_committed_decree_in_app = std::move(other41.last_committed_decree_in_app); - last_committed_decree_in_prepare_list = - std::move(other41.last_committed_decree_in_prepare_list); - __isset = std::move(other41.__isset); -} -prepare_ack &prepare_ack::operator=(const prepare_ack &other42) -{ - pid = other42.pid; - err = other42.err; - ballot = other42.ballot; - decree = other42.decree; - last_committed_decree_in_app = other42.last_committed_decree_in_app; - last_committed_decree_in_prepare_list = other42.last_committed_decree_in_prepare_list; - __isset = other42.__isset; - return *this; -} -prepare_ack &prepare_ack::operator=(prepare_ack &&other43) -{ - pid = std::move(other43.pid); - err = std::move(other43.err); - ballot = std::move(other43.ballot); - decree = std::move(other43.decree); - last_committed_decree_in_app = std::move(other43.last_committed_decree_in_app); - last_committed_decree_in_prepare_list = - std::move(other43.last_committed_decree_in_prepare_list); - __isset = std::move(other43.__isset); - return *this; -} -void prepare_ack::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "prepare_ack("; - out << "pid=" << to_string(pid); - out << ", " - << "err=" << to_string(err); - out << ", " - << "ballot=" << to_string(ballot); - out << ", " - << "decree=" << to_string(decree); - out << ", " - << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app); - out << ", " - << "last_committed_decree_in_prepare_list=" - << to_string(last_committed_decree_in_prepare_list); - out << ")"; -} - -learn_state::~learn_state() throw() {} - -void learn_state::__set_from_decree_excluded(const int64_t val) -{ - this->from_decree_excluded = val; -} - -void learn_state::__set_to_decree_included(const int64_t val) { this->to_decree_included = val; } - -void learn_state::__set_meta(const ::dsn::blob &val) { this->meta = val; } - -void learn_state::__set_files(const std::vector &val) { this->files = val; } - -void learn_state::__set_learn_start_decree(const int64_t val) -{ - this->learn_start_decree = val; - __isset.learn_start_decree = true; -} - -uint32_t learn_state::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->from_decree_excluded); - this->__isset.from_decree_excluded = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->to_decree_included); - this->__isset.to_decree_included = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->meta.read(iprot); - this->__isset.meta = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->files.clear(); - uint32_t _size44; - ::apache::thrift::protocol::TType _etype47; - xfer += iprot->readListBegin(_etype47, _size44); - this->files.resize(_size44); - uint32_t _i48; - for (_i48 = 0; _i48 < _size44; ++_i48) { - xfer += iprot->readString(this->files[_i48]); - } - xfer += iprot->readListEnd(); - } - this->__isset.files = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->learn_start_decree); - this->__isset.learn_start_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +read_request_header::read_request_header(const read_request_header& other28) { + pid = other28.pid; + code = other28.code; + semantic = other28.semantic; + version_decree = other28.version_decree; + __isset = other28.__isset; +} +read_request_header::read_request_header( read_request_header&& other29) { + pid = std::move(other29.pid); + code = std::move(other29.code); + semantic = std::move(other29.semantic); + version_decree = std::move(other29.version_decree); + __isset = std::move(other29.__isset); +} +read_request_header& read_request_header::operator=(const read_request_header& other30) { + pid = other30.pid; + code = other30.code; + semantic = other30.semantic; + version_decree = other30.version_decree; + __isset = other30.__isset; + return *this; +} +read_request_header& read_request_header::operator=(read_request_header&& other31) { + pid = std::move(other31.pid); + code = std::move(other31.code); + semantic = std::move(other31.semantic); + version_decree = std::move(other31.version_decree); + __isset = std::move(other31.__isset); + return *this; +} +void read_request_header::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "read_request_header("; + out << "pid=" << to_string(pid); + out << ", " << "code=" << to_string(code); + out << ", " << "semantic=" << to_string(semantic); + out << ", " << "version_decree=" << to_string(version_decree); + out << ")"; +} - xfer += iprot->readStructEnd(); - return xfer; +write_request_header::~write_request_header() throw() { } -uint32_t learn_state::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("learn_state"); - - xfer += oprot->writeFieldBegin("from_decree_excluded", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->from_decree_excluded); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("to_decree_included", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->to_decree_included); - xfer += oprot->writeFieldEnd(); +void write_request_header::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} - xfer += oprot->writeFieldBegin("meta", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->meta.write(oprot); - xfer += oprot->writeFieldEnd(); +void write_request_header::__set_code(const ::dsn::task_code& val) { + this->code = val; +} - xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, - static_cast(this->files.size())); - std::vector::const_iterator _iter49; - for (_iter49 = this->files.begin(); _iter49 != this->files.end(); ++_iter49) { - xfer += oprot->writeString((*_iter49)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); +uint32_t write_request_header::read(::apache::thrift::protocol::TProtocol* iprot) { - if (this->__isset.learn_start_decree) { - xfer += oprot->writeFieldBegin("learn_start_decree", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->learn_start_decree); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(learn_state &a, learn_state &b) -{ - using ::std::swap; - swap(a.from_decree_excluded, b.from_decree_excluded); - swap(a.to_decree_included, b.to_decree_included); - swap(a.meta, b.meta); - swap(a.files, b.files); - swap(a.learn_start_decree, b.learn_start_decree); - swap(a.__isset, b.__isset); -} - -learn_state::learn_state(const learn_state &other50) -{ - from_decree_excluded = other50.from_decree_excluded; - to_decree_included = other50.to_decree_included; - meta = other50.meta; - files = other50.files; - learn_start_decree = other50.learn_start_decree; - __isset = other50.__isset; -} -learn_state::learn_state(learn_state &&other51) -{ - from_decree_excluded = std::move(other51.from_decree_excluded); - to_decree_included = std::move(other51.to_decree_included); - meta = std::move(other51.meta); - files = std::move(other51.files); - learn_start_decree = std::move(other51.learn_start_decree); - __isset = std::move(other51.__isset); -} -learn_state &learn_state::operator=(const learn_state &other52) -{ - from_decree_excluded = other52.from_decree_excluded; - to_decree_included = other52.to_decree_included; - meta = other52.meta; - files = other52.files; - learn_start_decree = other52.learn_start_decree; - __isset = other52.__isset; - return *this; -} -learn_state &learn_state::operator=(learn_state &&other53) -{ - from_decree_excluded = std::move(other53.from_decree_excluded); - to_decree_included = std::move(other53.to_decree_included); - meta = std::move(other53.meta); - files = std::move(other53.files); - learn_start_decree = std::move(other53.learn_start_decree); - __isset = std::move(other53.__isset); - return *this; -} -void learn_state::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "learn_state("; - out << "from_decree_excluded=" << to_string(from_decree_excluded); - out << ", " - << "to_decree_included=" << to_string(to_decree_included); - out << ", " - << "meta=" << to_string(meta); - out << ", " - << "files=" << to_string(files); - out << ", " - << "learn_start_decree="; - (__isset.learn_start_decree ? (out << to_string(learn_start_decree)) : (out << "")); - out << ")"; -} - -learn_request::~learn_request() throw() {} - -void learn_request::__set_pid(const ::dsn::gpid &val) { this->pid = val; } - -void learn_request::__set_learner(const ::dsn::rpc_address &val) { this->learner = val; } - -void learn_request::__set_signature(const int64_t val) { this->signature = val; } - -void learn_request::__set_last_committed_decree_in_app(const int64_t val) -{ - this->last_committed_decree_in_app = val; -} - -void learn_request::__set_last_committed_decree_in_prepare_list(const int64_t val) -{ - this->last_committed_decree_in_prepare_list = val; -} - -void learn_request::__set_app_specific_learn_request(const ::dsn::blob &val) -{ - this->app_specific_learn_request = val; -} - -void learn_request::__set_max_gced_decree(const int64_t val) -{ - this->max_gced_decree = val; - __isset.max_gced_decree = true; -} - -uint32_t learn_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->learner.read(iprot); - this->__isset.learner = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->signature); - this->__isset.signature = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree_in_app); - this->__isset.last_committed_decree_in_app = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree_in_prepare_list); - this->__isset.last_committed_decree_in_prepare_list = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->app_specific_learn_request.read(iprot); - this->__isset.app_specific_learn_request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->max_gced_decree); - this->__isset.max_gced_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructEnd(); + xfer += iprot->readStructBegin(fname); - return xfer; -} + using ::apache::thrift::protocol::TProtocolException; -uint32_t learn_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("learn_request"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->code.read(iprot); + this->__isset.code = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - xfer += oprot->writeFieldBegin("learner", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->learner.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructEnd(); - xfer += oprot->writeFieldBegin("signature", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->signature); - xfer += oprot->writeFieldEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin( - "last_committed_decree_in_app", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->last_committed_decree_in_app); - xfer += oprot->writeFieldEnd(); +uint32_t write_request_header::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("write_request_header"); - xfer += oprot->writeFieldBegin( - "last_committed_decree_in_prepare_list", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->last_committed_decree_in_prepare_list); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin( - "app_specific_learn_request", ::apache::thrift::protocol::T_STRUCT, 6); - xfer += this->app_specific_learn_request.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->code.write(oprot); + xfer += oprot->writeFieldEnd(); - if (this->__isset.max_gced_decree) { - xfer += oprot->writeFieldBegin("max_gced_decree", ::apache::thrift::protocol::T_I64, 7); - xfer += oprot->writeI64(this->max_gced_decree); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(learn_request &a, learn_request &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.learner, b.learner); - swap(a.signature, b.signature); - swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app); - swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list); - swap(a.app_specific_learn_request, b.app_specific_learn_request); - swap(a.max_gced_decree, b.max_gced_decree); - swap(a.__isset, b.__isset); -} - -learn_request::learn_request(const learn_request &other54) -{ - pid = other54.pid; - learner = other54.learner; - signature = other54.signature; - last_committed_decree_in_app = other54.last_committed_decree_in_app; - last_committed_decree_in_prepare_list = other54.last_committed_decree_in_prepare_list; - app_specific_learn_request = other54.app_specific_learn_request; - max_gced_decree = other54.max_gced_decree; - __isset = other54.__isset; -} -learn_request::learn_request(learn_request &&other55) -{ - pid = std::move(other55.pid); - learner = std::move(other55.learner); - signature = std::move(other55.signature); - last_committed_decree_in_app = std::move(other55.last_committed_decree_in_app); - last_committed_decree_in_prepare_list = - std::move(other55.last_committed_decree_in_prepare_list); - app_specific_learn_request = std::move(other55.app_specific_learn_request); - max_gced_decree = std::move(other55.max_gced_decree); - __isset = std::move(other55.__isset); -} -learn_request &learn_request::operator=(const learn_request &other56) -{ - pid = other56.pid; - learner = other56.learner; - signature = other56.signature; - last_committed_decree_in_app = other56.last_committed_decree_in_app; - last_committed_decree_in_prepare_list = other56.last_committed_decree_in_prepare_list; - app_specific_learn_request = other56.app_specific_learn_request; - max_gced_decree = other56.max_gced_decree; - __isset = other56.__isset; - return *this; -} -learn_request &learn_request::operator=(learn_request &&other57) -{ - pid = std::move(other57.pid); - learner = std::move(other57.learner); - signature = std::move(other57.signature); - last_committed_decree_in_app = std::move(other57.last_committed_decree_in_app); - last_committed_decree_in_prepare_list = - std::move(other57.last_committed_decree_in_prepare_list); - app_specific_learn_request = std::move(other57.app_specific_learn_request); - max_gced_decree = std::move(other57.max_gced_decree); - __isset = std::move(other57.__isset); - return *this; -} -void learn_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "learn_request("; - out << "pid=" << to_string(pid); - out << ", " - << "learner=" << to_string(learner); - out << ", " - << "signature=" << to_string(signature); - out << ", " - << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app); - out << ", " - << "last_committed_decree_in_prepare_list=" - << to_string(last_committed_decree_in_prepare_list); - out << ", " - << "app_specific_learn_request=" << to_string(app_specific_learn_request); - out << ", " - << "max_gced_decree="; - (__isset.max_gced_decree ? (out << to_string(max_gced_decree)) : (out << "")); - out << ")"; -} - -learn_response::~learn_response() throw() {} - -void learn_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void learn_response::__set_config(const replica_configuration &val) { this->config = val; } - -void learn_response::__set_last_committed_decree(const int64_t val) -{ - this->last_committed_decree = val; -} - -void learn_response::__set_prepare_start_decree(const int64_t val) -{ - this->prepare_start_decree = val; -} - -void learn_response::__set_type(const learn_type::type val) { this->type = val; } - -void learn_response::__set_state(const learn_state &val) { this->state = val; } - -void learn_response::__set_address(const ::dsn::rpc_address &val) { this->address = val; } - -void learn_response::__set_base_local_dir(const std::string &val) { this->base_local_dir = val; } - -uint32_t learn_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->config.read(iprot); - this->__isset.config = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->prepare_start_decree); - this->__isset.prepare_start_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast58; - xfer += iprot->readI32(ecast58); - this->type = (learn_type::type)ecast58; - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->state.read(iprot); - this->__isset.state = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->address.read(iprot); - this->__isset.address = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->base_local_dir); - this->__isset.base_local_dir = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += iprot->readStructEnd(); +void swap(write_request_header &a, write_request_header &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.code, b.code); + swap(a.__isset, b.__isset); +} - return xfer; +write_request_header::write_request_header(const write_request_header& other32) { + pid = other32.pid; + code = other32.code; + __isset = other32.__isset; +} +write_request_header::write_request_header( write_request_header&& other33) { + pid = std::move(other33.pid); + code = std::move(other33.code); + __isset = std::move(other33.__isset); +} +write_request_header& write_request_header::operator=(const write_request_header& other34) { + pid = other34.pid; + code = other34.code; + __isset = other34.__isset; + return *this; +} +write_request_header& write_request_header::operator=(write_request_header&& other35) { + pid = std::move(other35.pid); + code = std::move(other35.code); + __isset = std::move(other35.__isset); + return *this; +} +void write_request_header::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "write_request_header("; + out << "pid=" << to_string(pid); + out << ", " << "code=" << to_string(code); + out << ")"; } -uint32_t learn_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("learn_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +rw_response_header::~rw_response_header() throw() { +} - xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->config.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); +void rw_response_header::__set_err(const ::dsn::error_code& val) { + this->err = val; +} - xfer += oprot->writeFieldBegin("prepare_start_decree", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->prepare_start_decree); - xfer += oprot->writeFieldEnd(); +uint32_t rw_response_header::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32((int32_t)this->type); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRUCT, 6); - xfer += this->state.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("address", ::apache::thrift::protocol::T_STRUCT, 7); - xfer += this->address.write(oprot); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("base_local_dir", ::apache::thrift::protocol::T_STRING, 8); - xfer += oprot->writeString(this->base_local_dir); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(learn_response &a, learn_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.config, b.config); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.prepare_start_decree, b.prepare_start_decree); - swap(a.type, b.type); - swap(a.state, b.state); - swap(a.address, b.address); - swap(a.base_local_dir, b.base_local_dir); - swap(a.__isset, b.__isset); -} - -learn_response::learn_response(const learn_response &other59) -{ - err = other59.err; - config = other59.config; - last_committed_decree = other59.last_committed_decree; - prepare_start_decree = other59.prepare_start_decree; - type = other59.type; - state = other59.state; - address = other59.address; - base_local_dir = other59.base_local_dir; - __isset = other59.__isset; -} -learn_response::learn_response(learn_response &&other60) -{ - err = std::move(other60.err); - config = std::move(other60.config); - last_committed_decree = std::move(other60.last_committed_decree); - prepare_start_decree = std::move(other60.prepare_start_decree); - type = std::move(other60.type); - state = std::move(other60.state); - address = std::move(other60.address); - base_local_dir = std::move(other60.base_local_dir); - __isset = std::move(other60.__isset); -} -learn_response &learn_response::operator=(const learn_response &other61) -{ - err = other61.err; - config = other61.config; - last_committed_decree = other61.last_committed_decree; - prepare_start_decree = other61.prepare_start_decree; - type = other61.type; - state = other61.state; - address = other61.address; - base_local_dir = other61.base_local_dir; - __isset = other61.__isset; - return *this; -} -learn_response &learn_response::operator=(learn_response &&other62) -{ - err = std::move(other62.err); - config = std::move(other62.config); - last_committed_decree = std::move(other62.last_committed_decree); - prepare_start_decree = std::move(other62.prepare_start_decree); - type = std::move(other62.type); - state = std::move(other62.state); - address = std::move(other62.address); - base_local_dir = std::move(other62.base_local_dir); - __isset = std::move(other62.__isset); - return *this; -} -void learn_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "learn_response("; - out << "err=" << to_string(err); - out << ", " - << "config=" << to_string(config); - out << ", " - << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " - << "prepare_start_decree=" << to_string(prepare_start_decree); - out << ", " - << "type=" << to_string(type); - out << ", " - << "state=" << to_string(state); - out << ", " - << "address=" << to_string(address); - out << ", " - << "base_local_dir=" << to_string(base_local_dir); - out << ")"; -} - -learn_notify_response::~learn_notify_response() throw() {} - -void learn_notify_response::__set_pid(const ::dsn::gpid &val) { this->pid = val; } - -void learn_notify_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void learn_notify_response::__set_signature(const int64_t val) { this->signature = val; } - -uint32_t learn_notify_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->signature); - this->__isset.signature = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t learn_notify_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("learn_notify_response"); - - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t rw_response_header::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("rw_response_header"); - xfer += oprot->writeFieldBegin("signature", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->signature); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(learn_notify_response &a, learn_notify_response &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.err, b.err); - swap(a.signature, b.signature); - swap(a.__isset, b.__isset); +void swap(rw_response_header &a, rw_response_header &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.__isset, b.__isset); } -learn_notify_response::learn_notify_response(const learn_notify_response &other63) -{ - pid = other63.pid; - err = other63.err; - signature = other63.signature; - __isset = other63.__isset; +rw_response_header::rw_response_header(const rw_response_header& other36) { + err = other36.err; + __isset = other36.__isset; } -learn_notify_response::learn_notify_response(learn_notify_response &&other64) -{ - pid = std::move(other64.pid); - err = std::move(other64.err); - signature = std::move(other64.signature); - __isset = std::move(other64.__isset); +rw_response_header::rw_response_header( rw_response_header&& other37) { + err = std::move(other37.err); + __isset = std::move(other37.__isset); } -learn_notify_response &learn_notify_response::operator=(const learn_notify_response &other65) -{ - pid = other65.pid; - err = other65.err; - signature = other65.signature; - __isset = other65.__isset; - return *this; +rw_response_header& rw_response_header::operator=(const rw_response_header& other38) { + err = other38.err; + __isset = other38.__isset; + return *this; } -learn_notify_response &learn_notify_response::operator=(learn_notify_response &&other66) -{ - pid = std::move(other66.pid); - err = std::move(other66.err); - signature = std::move(other66.signature); - __isset = std::move(other66.__isset); - return *this; +rw_response_header& rw_response_header::operator=(rw_response_header&& other39) { + err = std::move(other39.err); + __isset = std::move(other39.__isset); + return *this; } -void learn_notify_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "learn_notify_response("; - out << "pid=" << to_string(pid); - out << ", " - << "err=" << to_string(err); - out << ", " - << "signature=" << to_string(signature); - out << ")"; +void rw_response_header::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "rw_response_header("; + out << "err=" << to_string(err); + out << ")"; } -group_check_request::~group_check_request() throw() {} -void group_check_request::__set_app(const ::dsn::app_info &val) { this->app = val; } +prepare_ack::~prepare_ack() throw() { +} -void group_check_request::__set_node(const ::dsn::rpc_address &val) { this->node = val; } -void group_check_request::__set_config(const replica_configuration &val) { this->config = val; } +void prepare_ack::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} -void group_check_request::__set_last_committed_decree(const int64_t val) -{ - this->last_committed_decree = val; +void prepare_ack::__set_err(const ::dsn::error_code& val) { + this->err = val; } -void group_check_request::__set_confirmed_decree(const int64_t val) -{ - this->confirmed_decree = val; - __isset.confirmed_decree = true; +void prepare_ack::__set_ballot(const int64_t val) { + this->ballot = val; } -void group_check_request::__set_child_gpid(const ::dsn::gpid &val) -{ - this->child_gpid = val; - __isset.child_gpid = true; +void prepare_ack::__set_decree(const int64_t val) { + this->decree = val; } -uint32_t group_check_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ +void prepare_ack::__set_last_committed_decree_in_app(const int64_t val) { + this->last_committed_decree_in_app = val; +} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +void prepare_ack::__set_last_committed_decree_in_prepare_list(const int64_t val) { + this->last_committed_decree_in_prepare_list = val; +} - xfer += iprot->readStructBegin(fname); +uint32_t prepare_ack::read(::apache::thrift::protocol::TProtocol* iprot) { - using ::apache::thrift::protocol::TProtocolException; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->app.read(iprot); - this->__isset.app = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->config.read(iprot); - this->__isset.config = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->confirmed_decree); - this->__isset.confirmed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->child_gpid.read(iprot); - this->__isset.child_gpid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->decree); + this->__isset.decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree_in_app); + this->__isset.last_committed_decree_in_app = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree_in_prepare_list); + this->__isset.last_committed_decree_in_prepare_list = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t prepare_ack::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("prepare_ack"); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); -uint32_t group_check_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("group_check_request"); + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->app.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("decree", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->decree); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("last_committed_decree_in_app", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->last_committed_decree_in_app); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->config.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("last_committed_decree_in_prepare_list", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->last_committed_decree_in_prepare_list); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - if (this->__isset.confirmed_decree) { - xfer += oprot->writeFieldBegin("confirmed_decree", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->confirmed_decree); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.child_gpid) { - xfer += oprot->writeFieldBegin("child_gpid", ::apache::thrift::protocol::T_STRUCT, 6); - xfer += this->child_gpid.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(group_check_request &a, group_check_request &b) -{ - using ::std::swap; - swap(a.app, b.app); - swap(a.node, b.node); - swap(a.config, b.config); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.confirmed_decree, b.confirmed_decree); - swap(a.child_gpid, b.child_gpid); - swap(a.__isset, b.__isset); -} - -group_check_request::group_check_request(const group_check_request &other67) -{ - app = other67.app; - node = other67.node; - config = other67.config; - last_committed_decree = other67.last_committed_decree; - confirmed_decree = other67.confirmed_decree; - child_gpid = other67.child_gpid; - __isset = other67.__isset; -} -group_check_request::group_check_request(group_check_request &&other68) -{ - app = std::move(other68.app); - node = std::move(other68.node); - config = std::move(other68.config); - last_committed_decree = std::move(other68.last_committed_decree); - confirmed_decree = std::move(other68.confirmed_decree); - child_gpid = std::move(other68.child_gpid); - __isset = std::move(other68.__isset); -} -group_check_request &group_check_request::operator=(const group_check_request &other69) -{ - app = other69.app; - node = other69.node; - config = other69.config; - last_committed_decree = other69.last_committed_decree; - confirmed_decree = other69.confirmed_decree; - child_gpid = other69.child_gpid; - __isset = other69.__isset; - return *this; -} -group_check_request &group_check_request::operator=(group_check_request &&other70) -{ - app = std::move(other70.app); - node = std::move(other70.node); - config = std::move(other70.config); - last_committed_decree = std::move(other70.last_committed_decree); - confirmed_decree = std::move(other70.confirmed_decree); - child_gpid = std::move(other70.child_gpid); - __isset = std::move(other70.__isset); - return *this; -} -void group_check_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "group_check_request("; - out << "app=" << to_string(app); - out << ", " - << "node=" << to_string(node); - out << ", " - << "config=" << to_string(config); - out << ", " - << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " - << "confirmed_decree="; - (__isset.confirmed_decree ? (out << to_string(confirmed_decree)) : (out << "")); - out << ", " - << "child_gpid="; - (__isset.child_gpid ? (out << to_string(child_gpid)) : (out << "")); - out << ")"; -} - -group_check_response::~group_check_response() throw() {} - -void group_check_response::__set_pid(const ::dsn::gpid &val) { this->pid = val; } - -void group_check_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void group_check_response::__set_last_committed_decree_in_app(const int64_t val) -{ - this->last_committed_decree_in_app = val; -} - -void group_check_response::__set_last_committed_decree_in_prepare_list(const int64_t val) -{ - this->last_committed_decree_in_prepare_list = val; -} - -void group_check_response::__set_learner_status_(const learner_status::type val) -{ - this->learner_status_ = val; -} - -void group_check_response::__set_learner_signature(const int64_t val) -{ - this->learner_signature = val; -} - -void group_check_response::__set_node(const ::dsn::rpc_address &val) { this->node = val; } - -uint32_t group_check_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree_in_app); - this->__isset.last_committed_decree_in_app = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree_in_prepare_list); - this->__isset.last_committed_decree_in_prepare_list = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast71; - xfer += iprot->readI32(ecast71); - this->learner_status_ = (learner_status::type)ecast71; - this->__isset.learner_status_ = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->learner_signature); - this->__isset.learner_signature = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void swap(prepare_ack &a, prepare_ack &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.err, b.err); + swap(a.ballot, b.ballot); + swap(a.decree, b.decree); + swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app); + swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list); + swap(a.__isset, b.__isset); +} + +prepare_ack::prepare_ack(const prepare_ack& other40) { + pid = other40.pid; + err = other40.err; + ballot = other40.ballot; + decree = other40.decree; + last_committed_decree_in_app = other40.last_committed_decree_in_app; + last_committed_decree_in_prepare_list = other40.last_committed_decree_in_prepare_list; + __isset = other40.__isset; +} +prepare_ack::prepare_ack( prepare_ack&& other41) { + pid = std::move(other41.pid); + err = std::move(other41.err); + ballot = std::move(other41.ballot); + decree = std::move(other41.decree); + last_committed_decree_in_app = std::move(other41.last_committed_decree_in_app); + last_committed_decree_in_prepare_list = std::move(other41.last_committed_decree_in_prepare_list); + __isset = std::move(other41.__isset); +} +prepare_ack& prepare_ack::operator=(const prepare_ack& other42) { + pid = other42.pid; + err = other42.err; + ballot = other42.ballot; + decree = other42.decree; + last_committed_decree_in_app = other42.last_committed_decree_in_app; + last_committed_decree_in_prepare_list = other42.last_committed_decree_in_prepare_list; + __isset = other42.__isset; + return *this; +} +prepare_ack& prepare_ack::operator=(prepare_ack&& other43) { + pid = std::move(other43.pid); + err = std::move(other43.err); + ballot = std::move(other43.ballot); + decree = std::move(other43.decree); + last_committed_decree_in_app = std::move(other43.last_committed_decree_in_app); + last_committed_decree_in_prepare_list = std::move(other43.last_committed_decree_in_prepare_list); + __isset = std::move(other43.__isset); + return *this; +} +void prepare_ack::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "prepare_ack("; + out << "pid=" << to_string(pid); + out << ", " << "err=" << to_string(err); + out << ", " << "ballot=" << to_string(ballot); + out << ", " << "decree=" << to_string(decree); + out << ", " << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app); + out << ", " << "last_committed_decree_in_prepare_list=" << to_string(last_committed_decree_in_prepare_list); + out << ")"; +} - xfer += iprot->readStructEnd(); - return xfer; +learn_state::~learn_state() throw() { } -uint32_t group_check_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("group_check_response"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); +void learn_state::__set_from_decree_excluded(const int64_t val) { + this->from_decree_excluded = val; +} - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +void learn_state::__set_to_decree_included(const int64_t val) { + this->to_decree_included = val; +} - xfer += oprot->writeFieldBegin( - "last_committed_decree_in_app", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->last_committed_decree_in_app); - xfer += oprot->writeFieldEnd(); +void learn_state::__set_meta(const ::dsn::blob& val) { + this->meta = val; +} - xfer += oprot->writeFieldBegin( - "last_committed_decree_in_prepare_list", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->last_committed_decree_in_prepare_list); - xfer += oprot->writeFieldEnd(); +void learn_state::__set_files(const std::vector & val) { + this->files = val; +} - xfer += oprot->writeFieldBegin("learner_status_", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32((int32_t)this->learner_status_); - xfer += oprot->writeFieldEnd(); +void learn_state::__set_learn_start_decree(const int64_t val) { + this->learn_start_decree = val; +__isset.learn_start_decree = true; +} - xfer += oprot->writeFieldBegin("learner_signature", ::apache::thrift::protocol::T_I64, 6); - xfer += oprot->writeI64(this->learner_signature); - xfer += oprot->writeFieldEnd(); +uint32_t learn_state::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 7); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(group_check_response &a, group_check_response &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.err, b.err); - swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app); - swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list); - swap(a.learner_status_, b.learner_status_); - swap(a.learner_signature, b.learner_signature); - swap(a.node, b.node); - swap(a.__isset, b.__isset); -} - -group_check_response::group_check_response(const group_check_response &other72) -{ - pid = other72.pid; - err = other72.err; - last_committed_decree_in_app = other72.last_committed_decree_in_app; - last_committed_decree_in_prepare_list = other72.last_committed_decree_in_prepare_list; - learner_status_ = other72.learner_status_; - learner_signature = other72.learner_signature; - node = other72.node; - __isset = other72.__isset; -} -group_check_response::group_check_response(group_check_response &&other73) -{ - pid = std::move(other73.pid); - err = std::move(other73.err); - last_committed_decree_in_app = std::move(other73.last_committed_decree_in_app); - last_committed_decree_in_prepare_list = - std::move(other73.last_committed_decree_in_prepare_list); - learner_status_ = std::move(other73.learner_status_); - learner_signature = std::move(other73.learner_signature); - node = std::move(other73.node); - __isset = std::move(other73.__isset); -} -group_check_response &group_check_response::operator=(const group_check_response &other74) -{ - pid = other74.pid; - err = other74.err; - last_committed_decree_in_app = other74.last_committed_decree_in_app; - last_committed_decree_in_prepare_list = other74.last_committed_decree_in_prepare_list; - learner_status_ = other74.learner_status_; - learner_signature = other74.learner_signature; - node = other74.node; - __isset = other74.__isset; - return *this; -} -group_check_response &group_check_response::operator=(group_check_response &&other75) -{ - pid = std::move(other75.pid); - err = std::move(other75.err); - last_committed_decree_in_app = std::move(other75.last_committed_decree_in_app); - last_committed_decree_in_prepare_list = - std::move(other75.last_committed_decree_in_prepare_list); - learner_status_ = std::move(other75.learner_status_); - learner_signature = std::move(other75.learner_signature); - node = std::move(other75.node); - __isset = std::move(other75.__isset); - return *this; -} -void group_check_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "group_check_response("; - out << "pid=" << to_string(pid); - out << ", " - << "err=" << to_string(err); - out << ", " - << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app); - out << ", " - << "last_committed_decree_in_prepare_list=" - << to_string(last_committed_decree_in_prepare_list); - out << ", " - << "learner_status_=" << to_string(learner_status_); - out << ", " - << "learner_signature=" << to_string(learner_signature); - out << ", " - << "node=" << to_string(node); - out << ")"; -} - -node_info::~node_info() throw() {} - -void node_info::__set_status(const node_status::type val) { this->status = val; } - -void node_info::__set_address(const ::dsn::rpc_address &val) { this->address = val; } - -uint32_t node_info::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast76; - xfer += iprot->readI32(ecast76); - this->status = (node_status::type)ecast76; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->address.read(iprot); - this->__isset.address = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->from_decree_excluded); + this->__isset.from_decree_excluded = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->to_decree_included); + this->__isset.to_decree_included = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->meta.read(iprot); + this->__isset.meta = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->files.clear(); + uint32_t _size44; + ::apache::thrift::protocol::TType _etype47; + xfer += iprot->readListBegin(_etype47, _size44); + this->files.resize(_size44); + uint32_t _i48; + for (_i48 = 0; _i48 < _size44; ++_i48) + { + xfer += iprot->readString(this->files[_i48]); + } + xfer += iprot->readListEnd(); + } + this->__isset.files = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->learn_start_decree); + this->__isset.learn_start_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t node_info::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("node_info"); +uint32_t learn_state::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("learn_state"); - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("from_decree_excluded", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->from_decree_excluded); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("address", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->address.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("to_decree_included", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->to_decree_included); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldBegin("meta", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->meta.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->files.size())); + std::vector ::const_iterator _iter49; + for (_iter49 = this->files.begin(); _iter49 != this->files.end(); ++_iter49) + { + xfer += oprot->writeString((*_iter49)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.learn_start_decree) { + xfer += oprot->writeFieldBegin("learn_start_decree", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->learn_start_decree); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(node_info &a, node_info &b) -{ - using ::std::swap; - swap(a.status, b.status); - swap(a.address, b.address); - swap(a.__isset, b.__isset); +void swap(learn_state &a, learn_state &b) { + using ::std::swap; + swap(a.from_decree_excluded, b.from_decree_excluded); + swap(a.to_decree_included, b.to_decree_included); + swap(a.meta, b.meta); + swap(a.files, b.files); + swap(a.learn_start_decree, b.learn_start_decree); + swap(a.__isset, b.__isset); } -node_info::node_info(const node_info &other77) -{ - status = other77.status; - address = other77.address; - __isset = other77.__isset; +learn_state::learn_state(const learn_state& other50) { + from_decree_excluded = other50.from_decree_excluded; + to_decree_included = other50.to_decree_included; + meta = other50.meta; + files = other50.files; + learn_start_decree = other50.learn_start_decree; + __isset = other50.__isset; } -node_info::node_info(node_info &&other78) -{ - status = std::move(other78.status); - address = std::move(other78.address); - __isset = std::move(other78.__isset); +learn_state::learn_state( learn_state&& other51) { + from_decree_excluded = std::move(other51.from_decree_excluded); + to_decree_included = std::move(other51.to_decree_included); + meta = std::move(other51.meta); + files = std::move(other51.files); + learn_start_decree = std::move(other51.learn_start_decree); + __isset = std::move(other51.__isset); } -node_info &node_info::operator=(const node_info &other79) -{ - status = other79.status; - address = other79.address; - __isset = other79.__isset; - return *this; +learn_state& learn_state::operator=(const learn_state& other52) { + from_decree_excluded = other52.from_decree_excluded; + to_decree_included = other52.to_decree_included; + meta = other52.meta; + files = other52.files; + learn_start_decree = other52.learn_start_decree; + __isset = other52.__isset; + return *this; } -node_info &node_info::operator=(node_info &&other80) -{ - status = std::move(other80.status); - address = std::move(other80.address); - __isset = std::move(other80.__isset); - return *this; +learn_state& learn_state::operator=(learn_state&& other53) { + from_decree_excluded = std::move(other53.from_decree_excluded); + to_decree_included = std::move(other53.to_decree_included); + meta = std::move(other53.meta); + files = std::move(other53.files); + learn_start_decree = std::move(other53.learn_start_decree); + __isset = std::move(other53.__isset); + return *this; } -void node_info::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "node_info("; - out << "status=" << to_string(status); - out << ", " - << "address=" << to_string(address); - out << ")"; +void learn_state::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "learn_state("; + out << "from_decree_excluded=" << to_string(from_decree_excluded); + out << ", " << "to_decree_included=" << to_string(to_decree_included); + out << ", " << "meta=" << to_string(meta); + out << ", " << "files=" << to_string(files); + out << ", " << "learn_start_decree="; (__isset.learn_start_decree ? (out << to_string(learn_start_decree)) : (out << "")); + out << ")"; } -configuration_update_request::~configuration_update_request() throw() {} - -void configuration_update_request::__set_info(const ::dsn::app_info &val) { this->info = val; } -void configuration_update_request::__set_config(const ::dsn::partition_configuration &val) -{ - this->config = val; +learn_request::~learn_request() throw() { } -void configuration_update_request::__set_type(const config_type::type val) { this->type = val; } -void configuration_update_request::__set_node(const ::dsn::rpc_address &val) { this->node = val; } - -void configuration_update_request::__set_host_node(const ::dsn::rpc_address &val) -{ - this->host_node = val; +void learn_request::__set_pid(const ::dsn::gpid& val) { + this->pid = val; } -uint32_t configuration_update_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); +void learn_request::__set_learner(const ::dsn::rpc_address& val) { + this->learner = val; +} - using ::apache::thrift::protocol::TProtocolException; +void learn_request::__set_signature(const int64_t val) { + this->signature = val; +} - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->info.read(iprot); - this->__isset.info = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->config.read(iprot); - this->__isset.config = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast81; - xfer += iprot->readI32(ecast81); - this->type = (config_type::type)ecast81; - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->host_node.read(iprot); - this->__isset.host_node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void learn_request::__set_last_committed_decree_in_app(const int64_t val) { + this->last_committed_decree_in_app = val; +} - xfer += iprot->readStructEnd(); +void learn_request::__set_last_committed_decree_in_prepare_list(const int64_t val) { + this->last_committed_decree_in_prepare_list = val; +} - return xfer; +void learn_request::__set_app_specific_learn_request(const ::dsn::blob& val) { + this->app_specific_learn_request = val; } -uint32_t configuration_update_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_update_request"); +void learn_request::__set_max_gced_decree(const int64_t val) { + this->max_gced_decree = val; +__isset.max_gced_decree = true; +} - xfer += oprot->writeFieldBegin("info", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->info.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t learn_request::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->config.write(oprot); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->type); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("host_node", ::apache::thrift::protocol::T_STRUCT, 5); - xfer += this->host_node.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_update_request &a, configuration_update_request &b) -{ - using ::std::swap; - swap(a.info, b.info); - swap(a.config, b.config); - swap(a.type, b.type); - swap(a.node, b.node); - swap(a.host_node, b.host_node); - swap(a.__isset, b.__isset); -} - -configuration_update_request::configuration_update_request( - const configuration_update_request &other82) -{ - info = other82.info; - config = other82.config; - type = other82.type; - node = other82.node; - host_node = other82.host_node; - __isset = other82.__isset; -} -configuration_update_request::configuration_update_request(configuration_update_request &&other83) -{ - info = std::move(other83.info); - config = std::move(other83.config); - type = std::move(other83.type); - node = std::move(other83.node); - host_node = std::move(other83.host_node); - __isset = std::move(other83.__isset); -} -configuration_update_request &configuration_update_request:: -operator=(const configuration_update_request &other84) -{ - info = other84.info; - config = other84.config; - type = other84.type; - node = other84.node; - host_node = other84.host_node; - __isset = other84.__isset; - return *this; -} -configuration_update_request &configuration_update_request:: -operator=(configuration_update_request &&other85) -{ - info = std::move(other85.info); - config = std::move(other85.config); - type = std::move(other85.type); - node = std::move(other85.node); - host_node = std::move(other85.host_node); - __isset = std::move(other85.__isset); - return *this; -} -void configuration_update_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_update_request("; - out << "info=" << to_string(info); - out << ", " - << "config=" << to_string(config); - out << ", " - << "type=" << to_string(type); - out << ", " - << "node=" << to_string(node); - out << ", " - << "host_node=" << to_string(host_node); - out << ")"; -} - -configuration_update_response::~configuration_update_response() throw() {} - -void configuration_update_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void configuration_update_response::__set_config(const ::dsn::partition_configuration &val) -{ - this->config = val; -} - -uint32_t configuration_update_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->config.read(iprot); - this->__isset.config = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->learner.read(iprot); + this->__isset.learner = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->signature); + this->__isset.signature = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree_in_app); + this->__isset.last_committed_decree_in_app = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree_in_prepare_list); + this->__isset.last_committed_decree_in_prepare_list = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->app_specific_learn_request.read(iprot); + this->__isset.app_specific_learn_request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->max_gced_decree); + this->__isset.max_gced_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t learn_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("learn_request"); + + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("learner", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->learner.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("signature", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->signature); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("last_committed_decree_in_app", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->last_committed_decree_in_app); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("last_committed_decree_in_prepare_list", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->last_committed_decree_in_prepare_list); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldBegin("app_specific_learn_request", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->app_specific_learn_request.write(oprot); + xfer += oprot->writeFieldEnd(); - return xfer; + if (this->__isset.max_gced_decree) { + xfer += oprot->writeFieldBegin("max_gced_decree", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64(this->max_gced_decree); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -uint32_t configuration_update_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_update_response"); +void swap(learn_request &a, learn_request &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.learner, b.learner); + swap(a.signature, b.signature); + swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app); + swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list); + swap(a.app_specific_learn_request, b.app_specific_learn_request); + swap(a.max_gced_decree, b.max_gced_decree); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +learn_request::learn_request(const learn_request& other54) { + pid = other54.pid; + learner = other54.learner; + signature = other54.signature; + last_committed_decree_in_app = other54.last_committed_decree_in_app; + last_committed_decree_in_prepare_list = other54.last_committed_decree_in_prepare_list; + app_specific_learn_request = other54.app_specific_learn_request; + max_gced_decree = other54.max_gced_decree; + __isset = other54.__isset; +} +learn_request::learn_request( learn_request&& other55) { + pid = std::move(other55.pid); + learner = std::move(other55.learner); + signature = std::move(other55.signature); + last_committed_decree_in_app = std::move(other55.last_committed_decree_in_app); + last_committed_decree_in_prepare_list = std::move(other55.last_committed_decree_in_prepare_list); + app_specific_learn_request = std::move(other55.app_specific_learn_request); + max_gced_decree = std::move(other55.max_gced_decree); + __isset = std::move(other55.__isset); +} +learn_request& learn_request::operator=(const learn_request& other56) { + pid = other56.pid; + learner = other56.learner; + signature = other56.signature; + last_committed_decree_in_app = other56.last_committed_decree_in_app; + last_committed_decree_in_prepare_list = other56.last_committed_decree_in_prepare_list; + app_specific_learn_request = other56.app_specific_learn_request; + max_gced_decree = other56.max_gced_decree; + __isset = other56.__isset; + return *this; +} +learn_request& learn_request::operator=(learn_request&& other57) { + pid = std::move(other57.pid); + learner = std::move(other57.learner); + signature = std::move(other57.signature); + last_committed_decree_in_app = std::move(other57.last_committed_decree_in_app); + last_committed_decree_in_prepare_list = std::move(other57.last_committed_decree_in_prepare_list); + app_specific_learn_request = std::move(other57.app_specific_learn_request); + max_gced_decree = std::move(other57.max_gced_decree); + __isset = std::move(other57.__isset); + return *this; +} +void learn_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "learn_request("; + out << "pid=" << to_string(pid); + out << ", " << "learner=" << to_string(learner); + out << ", " << "signature=" << to_string(signature); + out << ", " << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app); + out << ", " << "last_committed_decree_in_prepare_list=" << to_string(last_committed_decree_in_prepare_list); + out << ", " << "app_specific_learn_request=" << to_string(app_specific_learn_request); + out << ", " << "max_gced_decree="; (__isset.max_gced_decree ? (out << to_string(max_gced_decree)) : (out << "")); + out << ")"; +} - xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->config.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; +learn_response::~learn_response() throw() { } -void swap(configuration_update_response &a, configuration_update_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.config, b.config); - swap(a.__isset, b.__isset); -} -configuration_update_response::configuration_update_response( - const configuration_update_response &other86) -{ - err = other86.err; - config = other86.config; - __isset = other86.__isset; +void learn_response::__set_err(const ::dsn::error_code& val) { + this->err = val; } -configuration_update_response::configuration_update_response( - configuration_update_response &&other87) -{ - err = std::move(other87.err); - config = std::move(other87.config); - __isset = std::move(other87.__isset); + +void learn_response::__set_config(const replica_configuration& val) { + this->config = val; } -configuration_update_response &configuration_update_response:: -operator=(const configuration_update_response &other88) -{ - err = other88.err; - config = other88.config; - __isset = other88.__isset; - return *this; + +void learn_response::__set_last_committed_decree(const int64_t val) { + this->last_committed_decree = val; } -configuration_update_response &configuration_update_response:: -operator=(configuration_update_response &&other89) -{ - err = std::move(other89.err); - config = std::move(other89.config); - __isset = std::move(other89.__isset); - return *this; + +void learn_response::__set_prepare_start_decree(const int64_t val) { + this->prepare_start_decree = val; } -void configuration_update_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_update_response("; - out << "err=" << to_string(err); - out << ", " - << "config=" << to_string(config); - out << ")"; + +void learn_response::__set_type(const learn_type::type val) { + this->type = val; } -replica_server_info::~replica_server_info() throw() {} +void learn_response::__set_state(const learn_state& val) { + this->state = val; +} -void replica_server_info::__set_geo_tags(const std::map &val) -{ - this->geo_tags = val; +void learn_response::__set_address(const ::dsn::rpc_address& val) { + this->address = val; } -void replica_server_info::__set_total_capacity_mb(const int64_t val) -{ - this->total_capacity_mb = val; +void learn_response::__set_base_local_dir(const std::string& val) { + this->base_local_dir = val; } -uint32_t replica_server_info::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t learn_response::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->geo_tags.clear(); - uint32_t _size90; - ::apache::thrift::protocol::TType _ktype91; - ::apache::thrift::protocol::TType _vtype92; - xfer += iprot->readMapBegin(_ktype91, _vtype92, _size90); - uint32_t _i94; - for (_i94 = 0; _i94 < _size90; ++_i94) { - std::string _key95; - xfer += iprot->readString(_key95); - std::string &_val96 = this->geo_tags[_key95]; - xfer += iprot->readString(_val96); - } - xfer += iprot->readMapEnd(); - } - this->__isset.geo_tags = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->total_capacity_mb); - this->__isset.total_capacity_mb = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->prepare_start_decree); + this->__isset.prepare_start_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast58; + xfer += iprot->readI32(ecast58); + this->type = (learn_type::type)ecast58; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->state.read(iprot); + this->__isset.state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->address.read(iprot); + this->__isset.address = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->base_local_dir); + this->__isset.base_local_dir = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t learn_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("learn_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("prepare_start_decree", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->prepare_start_decree); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->state.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("address", ::apache::thrift::protocol::T_STRUCT, 7); + xfer += this->address.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("base_local_dir", ::apache::thrift::protocol::T_STRING, 8); + xfer += oprot->writeString(this->base_local_dir); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(learn_response &a, learn_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.config, b.config); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.prepare_start_decree, b.prepare_start_decree); + swap(a.type, b.type); + swap(a.state, b.state); + swap(a.address, b.address); + swap(a.base_local_dir, b.base_local_dir); + swap(a.__isset, b.__isset); +} + +learn_response::learn_response(const learn_response& other59) { + err = other59.err; + config = other59.config; + last_committed_decree = other59.last_committed_decree; + prepare_start_decree = other59.prepare_start_decree; + type = other59.type; + state = other59.state; + address = other59.address; + base_local_dir = other59.base_local_dir; + __isset = other59.__isset; +} +learn_response::learn_response( learn_response&& other60) { + err = std::move(other60.err); + config = std::move(other60.config); + last_committed_decree = std::move(other60.last_committed_decree); + prepare_start_decree = std::move(other60.prepare_start_decree); + type = std::move(other60.type); + state = std::move(other60.state); + address = std::move(other60.address); + base_local_dir = std::move(other60.base_local_dir); + __isset = std::move(other60.__isset); +} +learn_response& learn_response::operator=(const learn_response& other61) { + err = other61.err; + config = other61.config; + last_committed_decree = other61.last_committed_decree; + prepare_start_decree = other61.prepare_start_decree; + type = other61.type; + state = other61.state; + address = other61.address; + base_local_dir = other61.base_local_dir; + __isset = other61.__isset; + return *this; +} +learn_response& learn_response::operator=(learn_response&& other62) { + err = std::move(other62.err); + config = std::move(other62.config); + last_committed_decree = std::move(other62.last_committed_decree); + prepare_start_decree = std::move(other62.prepare_start_decree); + type = std::move(other62.type); + state = std::move(other62.state); + address = std::move(other62.address); + base_local_dir = std::move(other62.base_local_dir); + __isset = std::move(other62.__isset); + return *this; +} +void learn_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "learn_response("; + out << "err=" << to_string(err); + out << ", " << "config=" << to_string(config); + out << ", " << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " << "prepare_start_decree=" << to_string(prepare_start_decree); + out << ", " << "type=" << to_string(type); + out << ", " << "state=" << to_string(state); + out << ", " << "address=" << to_string(address); + out << ", " << "base_local_dir=" << to_string(base_local_dir); + out << ")"; +} + + +learn_notify_response::~learn_notify_response() throw() { +} + + +void learn_notify_response::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} + +void learn_notify_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void learn_notify_response::__set_signature(const int64_t val) { + this->signature = val; +} + +uint32_t learn_notify_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->signature); + this->__isset.signature = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t replica_server_info::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("replica_server_info"); +uint32_t learn_notify_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("learn_notify_response"); - xfer += oprot->writeFieldBegin("geo_tags", ::apache::thrift::protocol::T_MAP, 1); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, - ::apache::thrift::protocol::T_STRING, - static_cast(this->geo_tags.size())); - std::map::const_iterator _iter97; - for (_iter97 = this->geo_tags.begin(); _iter97 != this->geo_tags.end(); ++_iter97) { - xfer += oprot->writeString(_iter97->first); - xfer += oprot->writeString(_iter97->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("total_capacity_mb", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->total_capacity_mb); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("signature", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->signature); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(replica_server_info &a, replica_server_info &b) -{ - using ::std::swap; - swap(a.geo_tags, b.geo_tags); - swap(a.total_capacity_mb, b.total_capacity_mb); - swap(a.__isset, b.__isset); +void swap(learn_notify_response &a, learn_notify_response &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.err, b.err); + swap(a.signature, b.signature); + swap(a.__isset, b.__isset); } -replica_server_info::replica_server_info(const replica_server_info &other98) -{ - geo_tags = other98.geo_tags; - total_capacity_mb = other98.total_capacity_mb; - __isset = other98.__isset; +learn_notify_response::learn_notify_response(const learn_notify_response& other63) { + pid = other63.pid; + err = other63.err; + signature = other63.signature; + __isset = other63.__isset; } -replica_server_info::replica_server_info(replica_server_info &&other99) -{ - geo_tags = std::move(other99.geo_tags); - total_capacity_mb = std::move(other99.total_capacity_mb); - __isset = std::move(other99.__isset); +learn_notify_response::learn_notify_response( learn_notify_response&& other64) { + pid = std::move(other64.pid); + err = std::move(other64.err); + signature = std::move(other64.signature); + __isset = std::move(other64.__isset); } -replica_server_info &replica_server_info::operator=(const replica_server_info &other100) -{ - geo_tags = other100.geo_tags; - total_capacity_mb = other100.total_capacity_mb; - __isset = other100.__isset; - return *this; +learn_notify_response& learn_notify_response::operator=(const learn_notify_response& other65) { + pid = other65.pid; + err = other65.err; + signature = other65.signature; + __isset = other65.__isset; + return *this; } -replica_server_info &replica_server_info::operator=(replica_server_info &&other101) -{ - geo_tags = std::move(other101.geo_tags); - total_capacity_mb = std::move(other101.total_capacity_mb); - __isset = std::move(other101.__isset); - return *this; +learn_notify_response& learn_notify_response::operator=(learn_notify_response&& other66) { + pid = std::move(other66.pid); + err = std::move(other66.err); + signature = std::move(other66.signature); + __isset = std::move(other66.__isset); + return *this; } -void replica_server_info::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "replica_server_info("; - out << "geo_tags=" << to_string(geo_tags); - out << ", " - << "total_capacity_mb=" << to_string(total_capacity_mb); - out << ")"; +void learn_notify_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "learn_notify_response("; + out << "pid=" << to_string(pid); + out << ", " << "err=" << to_string(err); + out << ", " << "signature=" << to_string(signature); + out << ")"; } -configuration_query_by_node_request::~configuration_query_by_node_request() throw() {} -void configuration_query_by_node_request::__set_node(const ::dsn::rpc_address &val) -{ - this->node = val; +group_check_request::~group_check_request() throw() { } -void configuration_query_by_node_request::__set_stored_replicas( - const std::vector &val) -{ - this->stored_replicas = val; - __isset.stored_replicas = true; -} -void configuration_query_by_node_request::__set_info(const replica_server_info &val) -{ - this->info = val; - __isset.info = true; +void group_check_request::__set_app(const ::dsn::app_info& val) { + this->app = val; } -uint32_t configuration_query_by_node_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->stored_replicas.clear(); - uint32_t _size102; - ::apache::thrift::protocol::TType _etype105; - xfer += iprot->readListBegin(_etype105, _size102); - this->stored_replicas.resize(_size102); - uint32_t _i106; - for (_i106 = 0; _i106 < _size102; ++_i106) { - xfer += this->stored_replicas[_i106].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.stored_replicas = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->info.read(iprot); - this->__isset.info = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void group_check_request::__set_node(const ::dsn::rpc_address& val) { + this->node = val; +} - xfer += iprot->readStructEnd(); +void group_check_request::__set_config(const replica_configuration& val) { + this->config = val; +} - return xfer; +void group_check_request::__set_last_committed_decree(const int64_t val) { + this->last_committed_decree = val; } -uint32_t -configuration_query_by_node_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_by_node_request"); +void group_check_request::__set_confirmed_decree(const int64_t val) { + this->confirmed_decree = val; +__isset.confirmed_decree = true; +} - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); +void group_check_request::__set_child_gpid(const ::dsn::gpid& val) { + this->child_gpid = val; +__isset.child_gpid = true; +} - if (this->__isset.stored_replicas) { - xfer += oprot->writeFieldBegin("stored_replicas", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->stored_replicas.size())); - std::vector::const_iterator _iter107; - for (_iter107 = this->stored_replicas.begin(); _iter107 != this->stored_replicas.end(); - ++_iter107) { - xfer += (*_iter107).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.info) { - xfer += oprot->writeFieldBegin("info", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->info.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_query_by_node_request &a, configuration_query_by_node_request &b) -{ - using ::std::swap; - swap(a.node, b.node); - swap(a.stored_replicas, b.stored_replicas); - swap(a.info, b.info); - swap(a.__isset, b.__isset); -} - -configuration_query_by_node_request::configuration_query_by_node_request( - const configuration_query_by_node_request &other108) -{ - node = other108.node; - stored_replicas = other108.stored_replicas; - info = other108.info; - __isset = other108.__isset; -} -configuration_query_by_node_request::configuration_query_by_node_request( - configuration_query_by_node_request &&other109) -{ - node = std::move(other109.node); - stored_replicas = std::move(other109.stored_replicas); - info = std::move(other109.info); - __isset = std::move(other109.__isset); -} -configuration_query_by_node_request &configuration_query_by_node_request:: -operator=(const configuration_query_by_node_request &other110) -{ - node = other110.node; - stored_replicas = other110.stored_replicas; - info = other110.info; - __isset = other110.__isset; - return *this; -} -configuration_query_by_node_request &configuration_query_by_node_request:: -operator=(configuration_query_by_node_request &&other111) -{ - node = std::move(other111.node); - stored_replicas = std::move(other111.stored_replicas); - info = std::move(other111.info); - __isset = std::move(other111.__isset); - return *this; -} -void configuration_query_by_node_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_query_by_node_request("; - out << "node=" << to_string(node); - out << ", " - << "stored_replicas="; - (__isset.stored_replicas ? (out << to_string(stored_replicas)) : (out << "")); - out << ", " - << "info="; - (__isset.info ? (out << to_string(info)) : (out << "")); - out << ")"; -} - -configuration_query_by_node_response::~configuration_query_by_node_response() throw() {} - -void configuration_query_by_node_response::__set_err(const ::dsn::error_code &val) -{ - this->err = val; -} - -void configuration_query_by_node_response::__set_partitions( - const std::vector &val) -{ - this->partitions = val; -} - -void configuration_query_by_node_response::__set_gc_replicas(const std::vector &val) -{ - this->gc_replicas = val; - __isset.gc_replicas = true; -} - -uint32_t configuration_query_by_node_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitions.clear(); - uint32_t _size112; - ::apache::thrift::protocol::TType _etype115; - xfer += iprot->readListBegin(_etype115, _size112); - this->partitions.resize(_size112); - uint32_t _i116; - for (_i116 = 0; _i116 < _size112; ++_i116) { - xfer += this->partitions[_i116].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.partitions = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->gc_replicas.clear(); - uint32_t _size117; - ::apache::thrift::protocol::TType _etype120; - xfer += iprot->readListBegin(_etype120, _size117); - this->gc_replicas.resize(_size117); - uint32_t _i121; - for (_i121 = 0; _i121 < _size117; ++_i121) { - xfer += this->gc_replicas[_i121].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.gc_replicas = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +uint32_t group_check_request::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += iprot->readStructEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - return xfer; -} + xfer += iprot->readStructBegin(fname); -uint32_t -configuration_query_by_node_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_by_node_response"); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->partitions.size())); - std::vector::const_iterator _iter122; - for (_iter122 = this->partitions.begin(); _iter122 != this->partitions.end(); ++_iter122) { - xfer += (*_iter122).write(oprot); - } - xfer += oprot->writeListEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.gc_replicas) { - xfer += oprot->writeFieldBegin("gc_replicas", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->gc_replicas.size())); - std::vector::const_iterator _iter123; - for (_iter123 = this->gc_replicas.begin(); _iter123 != this->gc_replicas.end(); - ++_iter123) { - xfer += (*_iter123).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_query_by_node_response &a, configuration_query_by_node_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.partitions, b.partitions); - swap(a.gc_replicas, b.gc_replicas); - swap(a.__isset, b.__isset); -} - -configuration_query_by_node_response::configuration_query_by_node_response( - const configuration_query_by_node_response &other124) -{ - err = other124.err; - partitions = other124.partitions; - gc_replicas = other124.gc_replicas; - __isset = other124.__isset; -} -configuration_query_by_node_response::configuration_query_by_node_response( - configuration_query_by_node_response &&other125) -{ - err = std::move(other125.err); - partitions = std::move(other125.partitions); - gc_replicas = std::move(other125.gc_replicas); - __isset = std::move(other125.__isset); -} -configuration_query_by_node_response &configuration_query_by_node_response:: -operator=(const configuration_query_by_node_response &other126) -{ - err = other126.err; - partitions = other126.partitions; - gc_replicas = other126.gc_replicas; - __isset = other126.__isset; - return *this; -} -configuration_query_by_node_response &configuration_query_by_node_response:: -operator=(configuration_query_by_node_response &&other127) -{ - err = std::move(other127.err); - partitions = std::move(other127.partitions); - gc_replicas = std::move(other127.gc_replicas); - __isset = std::move(other127.__isset); - return *this; -} -void configuration_query_by_node_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_query_by_node_response("; - out << "err=" << to_string(err); - out << ", " - << "partitions=" << to_string(partitions); - out << ", " - << "gc_replicas="; - (__isset.gc_replicas ? (out << to_string(gc_replicas)) : (out << "")); - out << ")"; -} - -create_app_options::~create_app_options() throw() {} - -void create_app_options::__set_partition_count(const int32_t val) { this->partition_count = val; } - -void create_app_options::__set_replica_count(const int32_t val) { this->replica_count = val; } - -void create_app_options::__set_success_if_exist(const bool val) { this->success_if_exist = val; } - -void create_app_options::__set_app_type(const std::string &val) { this->app_type = val; } - -void create_app_options::__set_is_stateful(const bool val) { this->is_stateful = val; } - -void create_app_options::__set_envs(const std::map &val) -{ - this->envs = val; -} - -uint32_t create_app_options::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_count); - this->__isset.partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->replica_count); - this->__isset.replica_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success_if_exist); - this->__isset.success_if_exist = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_type); - this->__isset.app_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_stateful); - this->__isset.is_stateful = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->envs.clear(); - uint32_t _size128; - ::apache::thrift::protocol::TType _ktype129; - ::apache::thrift::protocol::TType _vtype130; - xfer += iprot->readMapBegin(_ktype129, _vtype130, _size128); - uint32_t _i132; - for (_i132 = 0; _i132 < _size128; ++_i132) { - std::string _key133; - xfer += iprot->readString(_key133); - std::string &_val134 = this->envs[_key133]; - xfer += iprot->readString(_val134); - } - xfer += iprot->readMapEnd(); - } - this->__isset.envs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->app.read(iprot); + this->__isset.app = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->confirmed_decree); + this->__isset.confirmed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->child_gpid.read(iprot); + this->__isset.child_gpid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t create_app_options::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("create_app_options"); +uint32_t group_check_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("group_check_request"); - xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->partition_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->app.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("replica_count", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->replica_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("success_if_exist", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->success_if_exist); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->app_type); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 5); - xfer += oprot->writeBool(this->is_stateful); + if (this->__isset.confirmed_decree) { + xfer += oprot->writeFieldBegin("confirmed_decree", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->confirmed_decree); xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("envs", ::apache::thrift::protocol::T_MAP, 6); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, - ::apache::thrift::protocol::T_STRING, - static_cast(this->envs.size())); - std::map::const_iterator _iter135; - for (_iter135 = this->envs.begin(); _iter135 != this->envs.end(); ++_iter135) { - xfer += oprot->writeString(_iter135->first); - xfer += oprot->writeString(_iter135->second); - } - xfer += oprot->writeMapEnd(); - } + } + if (this->__isset.child_gpid) { + xfer += oprot->writeFieldBegin("child_gpid", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->child_gpid.write(oprot); xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(create_app_options &a, create_app_options &b) -{ - using ::std::swap; - swap(a.partition_count, b.partition_count); - swap(a.replica_count, b.replica_count); - swap(a.success_if_exist, b.success_if_exist); - swap(a.app_type, b.app_type); - swap(a.is_stateful, b.is_stateful); - swap(a.envs, b.envs); - swap(a.__isset, b.__isset); -} - -create_app_options::create_app_options(const create_app_options &other136) -{ - partition_count = other136.partition_count; - replica_count = other136.replica_count; - success_if_exist = other136.success_if_exist; - app_type = other136.app_type; - is_stateful = other136.is_stateful; - envs = other136.envs; - __isset = other136.__isset; -} -create_app_options::create_app_options(create_app_options &&other137) -{ - partition_count = std::move(other137.partition_count); - replica_count = std::move(other137.replica_count); - success_if_exist = std::move(other137.success_if_exist); - app_type = std::move(other137.app_type); - is_stateful = std::move(other137.is_stateful); - envs = std::move(other137.envs); - __isset = std::move(other137.__isset); -} -create_app_options &create_app_options::operator=(const create_app_options &other138) -{ - partition_count = other138.partition_count; - replica_count = other138.replica_count; - success_if_exist = other138.success_if_exist; - app_type = other138.app_type; - is_stateful = other138.is_stateful; - envs = other138.envs; - __isset = other138.__isset; - return *this; -} -create_app_options &create_app_options::operator=(create_app_options &&other139) -{ - partition_count = std::move(other139.partition_count); - replica_count = std::move(other139.replica_count); - success_if_exist = std::move(other139.success_if_exist); - app_type = std::move(other139.app_type); - is_stateful = std::move(other139.is_stateful); - envs = std::move(other139.envs); - __isset = std::move(other139.__isset); - return *this; -} -void create_app_options::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "create_app_options("; - out << "partition_count=" << to_string(partition_count); - out << ", " - << "replica_count=" << to_string(replica_count); - out << ", " - << "success_if_exist=" << to_string(success_if_exist); - out << ", " - << "app_type=" << to_string(app_type); - out << ", " - << "is_stateful=" << to_string(is_stateful); - out << ", " - << "envs=" << to_string(envs); - out << ")"; -} - -configuration_create_app_request::~configuration_create_app_request() throw() {} - -void configuration_create_app_request::__set_app_name(const std::string &val) -{ - this->app_name = val; -} - -void configuration_create_app_request::__set_options(const create_app_options &val) -{ - this->options = val; -} - -uint32_t configuration_create_app_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->options.read(iprot); - this->__isset.options = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; +void swap(group_check_request &a, group_check_request &b) { + using ::std::swap; + swap(a.app, b.app); + swap(a.node, b.node); + swap(a.config, b.config); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.confirmed_decree, b.confirmed_decree); + swap(a.child_gpid, b.child_gpid); + swap(a.__isset, b.__isset); } -uint32_t configuration_create_app_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_create_app_request"); +group_check_request::group_check_request(const group_check_request& other67) { + app = other67.app; + node = other67.node; + config = other67.config; + last_committed_decree = other67.last_committed_decree; + confirmed_decree = other67.confirmed_decree; + child_gpid = other67.child_gpid; + __isset = other67.__isset; +} +group_check_request::group_check_request( group_check_request&& other68) { + app = std::move(other68.app); + node = std::move(other68.node); + config = std::move(other68.config); + last_committed_decree = std::move(other68.last_committed_decree); + confirmed_decree = std::move(other68.confirmed_decree); + child_gpid = std::move(other68.child_gpid); + __isset = std::move(other68.__isset); +} +group_check_request& group_check_request::operator=(const group_check_request& other69) { + app = other69.app; + node = other69.node; + config = other69.config; + last_committed_decree = other69.last_committed_decree; + confirmed_decree = other69.confirmed_decree; + child_gpid = other69.child_gpid; + __isset = other69.__isset; + return *this; +} +group_check_request& group_check_request::operator=(group_check_request&& other70) { + app = std::move(other70.app); + node = std::move(other70.node); + config = std::move(other70.config); + last_committed_decree = std::move(other70.last_committed_decree); + confirmed_decree = std::move(other70.confirmed_decree); + child_gpid = std::move(other70.child_gpid); + __isset = std::move(other70.__isset); + return *this; +} +void group_check_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "group_check_request("; + out << "app=" << to_string(app); + out << ", " << "node=" << to_string(node); + out << ", " << "config=" << to_string(config); + out << ", " << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " << "confirmed_decree="; (__isset.confirmed_decree ? (out << to_string(confirmed_decree)) : (out << "")); + out << ", " << "child_gpid="; (__isset.child_gpid ? (out << to_string(child_gpid)) : (out << "")); + out << ")"; +} - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("options", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->options.write(oprot); - xfer += oprot->writeFieldEnd(); +group_check_response::~group_check_response() throw() { +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_create_app_request &a, configuration_create_app_request &b) -{ - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.options, b.options); - swap(a.__isset, b.__isset); -} - -configuration_create_app_request::configuration_create_app_request( - const configuration_create_app_request &other140) -{ - app_name = other140.app_name; - options = other140.options; - __isset = other140.__isset; -} -configuration_create_app_request::configuration_create_app_request( - configuration_create_app_request &&other141) -{ - app_name = std::move(other141.app_name); - options = std::move(other141.options); - __isset = std::move(other141.__isset); -} -configuration_create_app_request &configuration_create_app_request:: -operator=(const configuration_create_app_request &other142) -{ - app_name = other142.app_name; - options = other142.options; - __isset = other142.__isset; - return *this; -} -configuration_create_app_request &configuration_create_app_request:: -operator=(configuration_create_app_request &&other143) -{ - app_name = std::move(other143.app_name); - options = std::move(other143.options); - __isset = std::move(other143.__isset); - return *this; -} -void configuration_create_app_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_create_app_request("; - out << "app_name=" << to_string(app_name); - out << ", " - << "options=" << to_string(options); - out << ")"; -} - -drop_app_options::~drop_app_options() throw() {} - -void drop_app_options::__set_success_if_not_exist(const bool val) -{ - this->success_if_not_exist = val; -} - -void drop_app_options::__set_reserve_seconds(const int64_t val) -{ - this->reserve_seconds = val; - __isset.reserve_seconds = true; -} - -uint32_t drop_app_options::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success_if_not_exist); - this->__isset.success_if_not_exist = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->reserve_seconds); - this->__isset.reserve_seconds = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); +void group_check_response::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} - return xfer; +void group_check_response::__set_err(const ::dsn::error_code& val) { + this->err = val; } -uint32_t drop_app_options::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("drop_app_options"); +void group_check_response::__set_last_committed_decree_in_app(const int64_t val) { + this->last_committed_decree_in_app = val; +} - xfer += oprot->writeFieldBegin("success_if_not_exist", ::apache::thrift::protocol::T_BOOL, 1); - xfer += oprot->writeBool(this->success_if_not_exist); - xfer += oprot->writeFieldEnd(); +void group_check_response::__set_last_committed_decree_in_prepare_list(const int64_t val) { + this->last_committed_decree_in_prepare_list = val; +} - if (this->__isset.reserve_seconds) { - xfer += oprot->writeFieldBegin("reserve_seconds", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->reserve_seconds); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(drop_app_options &a, drop_app_options &b) -{ - using ::std::swap; - swap(a.success_if_not_exist, b.success_if_not_exist); - swap(a.reserve_seconds, b.reserve_seconds); - swap(a.__isset, b.__isset); -} - -drop_app_options::drop_app_options(const drop_app_options &other144) -{ - success_if_not_exist = other144.success_if_not_exist; - reserve_seconds = other144.reserve_seconds; - __isset = other144.__isset; -} -drop_app_options::drop_app_options(drop_app_options &&other145) -{ - success_if_not_exist = std::move(other145.success_if_not_exist); - reserve_seconds = std::move(other145.reserve_seconds); - __isset = std::move(other145.__isset); -} -drop_app_options &drop_app_options::operator=(const drop_app_options &other146) -{ - success_if_not_exist = other146.success_if_not_exist; - reserve_seconds = other146.reserve_seconds; - __isset = other146.__isset; - return *this; -} -drop_app_options &drop_app_options::operator=(drop_app_options &&other147) -{ - success_if_not_exist = std::move(other147.success_if_not_exist); - reserve_seconds = std::move(other147.reserve_seconds); - __isset = std::move(other147.__isset); - return *this; -} -void drop_app_options::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "drop_app_options("; - out << "success_if_not_exist=" << to_string(success_if_not_exist); - out << ", " - << "reserve_seconds="; - (__isset.reserve_seconds ? (out << to_string(reserve_seconds)) : (out << "")); - out << ")"; -} - -configuration_drop_app_request::~configuration_drop_app_request() throw() {} - -void configuration_drop_app_request::__set_app_name(const std::string &val) -{ - this->app_name = val; -} - -void configuration_drop_app_request::__set_options(const drop_app_options &val) -{ - this->options = val; -} - -uint32_t configuration_drop_app_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->options.read(iprot); - this->__isset.options = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void group_check_response::__set_learner_status_(const learner_status::type val) { + this->learner_status_ = val; +} - xfer += iprot->readStructEnd(); +void group_check_response::__set_learner_signature(const int64_t val) { + this->learner_signature = val; +} - return xfer; +void group_check_response::__set_node(const ::dsn::rpc_address& val) { + this->node = val; } -uint32_t configuration_drop_app_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_drop_app_request"); +uint32_t group_check_response::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldBegin("options", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->options.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_drop_app_request &a, configuration_drop_app_request &b) -{ - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.options, b.options); - swap(a.__isset, b.__isset); -} - -configuration_drop_app_request::configuration_drop_app_request( - const configuration_drop_app_request &other148) -{ - app_name = other148.app_name; - options = other148.options; - __isset = other148.__isset; -} -configuration_drop_app_request::configuration_drop_app_request( - configuration_drop_app_request &&other149) -{ - app_name = std::move(other149.app_name); - options = std::move(other149.options); - __isset = std::move(other149.__isset); -} -configuration_drop_app_request &configuration_drop_app_request:: -operator=(const configuration_drop_app_request &other150) -{ - app_name = other150.app_name; - options = other150.options; - __isset = other150.__isset; - return *this; -} -configuration_drop_app_request &configuration_drop_app_request:: -operator=(configuration_drop_app_request &&other151) -{ - app_name = std::move(other151.app_name); - options = std::move(other151.options); - __isset = std::move(other151.__isset); - return *this; -} -void configuration_drop_app_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_drop_app_request("; - out << "app_name=" << to_string(app_name); - out << ", " - << "options=" << to_string(options); - out << ")"; -} - -configuration_list_apps_request::~configuration_list_apps_request() throw() {} - -void configuration_list_apps_request::__set_status(const ::dsn::app_status::type val) -{ - this->status = val; -} - -uint32_t configuration_list_apps_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast152; - xfer += iprot->readI32(ecast152); - this->status = (::dsn::app_status::type)ecast152; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree_in_app); + this->__isset.last_committed_decree_in_app = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree_in_prepare_list); + this->__isset.last_committed_decree_in_prepare_list = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast71; + xfer += iprot->readI32(ecast71); + this->learner_status_ = (learner_status::type)ecast71; + this->__isset.learner_status_ = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->learner_signature); + this->__isset.learner_signature = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t group_check_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("group_check_response"); + + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("last_committed_decree_in_app", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->last_committed_decree_in_app); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("last_committed_decree_in_prepare_list", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->last_committed_decree_in_prepare_list); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldBegin("learner_status_", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)this->learner_status_); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("learner_signature", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->learner_signature); + xfer += oprot->writeFieldEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 7); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); -uint32_t configuration_list_apps_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_list_apps_request"); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); +void swap(group_check_response &a, group_check_response &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.err, b.err); + swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app); + swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list); + swap(a.learner_status_, b.learner_status_); + swap(a.learner_signature, b.learner_signature); + swap(a.node, b.node); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_list_apps_request &a, configuration_list_apps_request &b) -{ - using ::std::swap; - swap(a.status, b.status); - swap(a.__isset, b.__isset); -} - -configuration_list_apps_request::configuration_list_apps_request( - const configuration_list_apps_request &other153) -{ - status = other153.status; - __isset = other153.__isset; -} -configuration_list_apps_request::configuration_list_apps_request( - configuration_list_apps_request &&other154) -{ - status = std::move(other154.status); - __isset = std::move(other154.__isset); -} -configuration_list_apps_request &configuration_list_apps_request:: -operator=(const configuration_list_apps_request &other155) -{ - status = other155.status; - __isset = other155.__isset; - return *this; -} -configuration_list_apps_request &configuration_list_apps_request:: -operator=(configuration_list_apps_request &&other156) -{ - status = std::move(other156.status); - __isset = std::move(other156.__isset); - return *this; -} -void configuration_list_apps_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_list_apps_request("; - out << "status=" << to_string(status); - out << ")"; -} - -configuration_list_nodes_request::~configuration_list_nodes_request() throw() {} - -void configuration_list_nodes_request::__set_status(const node_status::type val) -{ - this->status = val; -} - -uint32_t configuration_list_nodes_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast157; - xfer += iprot->readI32(ecast157); - this->status = (node_status::type)ecast157; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); +group_check_response::group_check_response(const group_check_response& other72) { + pid = other72.pid; + err = other72.err; + last_committed_decree_in_app = other72.last_committed_decree_in_app; + last_committed_decree_in_prepare_list = other72.last_committed_decree_in_prepare_list; + learner_status_ = other72.learner_status_; + learner_signature = other72.learner_signature; + node = other72.node; + __isset = other72.__isset; +} +group_check_response::group_check_response( group_check_response&& other73) { + pid = std::move(other73.pid); + err = std::move(other73.err); + last_committed_decree_in_app = std::move(other73.last_committed_decree_in_app); + last_committed_decree_in_prepare_list = std::move(other73.last_committed_decree_in_prepare_list); + learner_status_ = std::move(other73.learner_status_); + learner_signature = std::move(other73.learner_signature); + node = std::move(other73.node); + __isset = std::move(other73.__isset); +} +group_check_response& group_check_response::operator=(const group_check_response& other74) { + pid = other74.pid; + err = other74.err; + last_committed_decree_in_app = other74.last_committed_decree_in_app; + last_committed_decree_in_prepare_list = other74.last_committed_decree_in_prepare_list; + learner_status_ = other74.learner_status_; + learner_signature = other74.learner_signature; + node = other74.node; + __isset = other74.__isset; + return *this; +} +group_check_response& group_check_response::operator=(group_check_response&& other75) { + pid = std::move(other75.pid); + err = std::move(other75.err); + last_committed_decree_in_app = std::move(other75.last_committed_decree_in_app); + last_committed_decree_in_prepare_list = std::move(other75.last_committed_decree_in_prepare_list); + learner_status_ = std::move(other75.learner_status_); + learner_signature = std::move(other75.learner_signature); + node = std::move(other75.node); + __isset = std::move(other75.__isset); + return *this; +} +void group_check_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "group_check_response("; + out << "pid=" << to_string(pid); + out << ", " << "err=" << to_string(err); + out << ", " << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app); + out << ", " << "last_committed_decree_in_prepare_list=" << to_string(last_committed_decree_in_prepare_list); + out << ", " << "learner_status_=" << to_string(learner_status_); + out << ", " << "learner_signature=" << to_string(learner_signature); + out << ", " << "node=" << to_string(node); + out << ")"; +} + + +node_info::~node_info() throw() { +} + + +void node_info::__set_status(const node_status::type val) { + this->status = val; +} + +void node_info::__set_address(const ::dsn::rpc_address& val) { + this->address = val; +} + +uint32_t node_info::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast76; + xfer += iprot->readI32(ecast76); + this->status = (node_status::type)ecast76; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->address.read(iprot); + this->__isset.address = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_list_nodes_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_list_nodes_request"); +uint32_t node_info::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("node_info"); - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("address", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->address.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_list_nodes_request &a, configuration_list_nodes_request &b) -{ - using ::std::swap; - swap(a.status, b.status); - swap(a.__isset, b.__isset); +void swap(node_info &a, node_info &b) { + using ::std::swap; + swap(a.status, b.status); + swap(a.address, b.address); + swap(a.__isset, b.__isset); } -configuration_list_nodes_request::configuration_list_nodes_request( - const configuration_list_nodes_request &other158) -{ - status = other158.status; - __isset = other158.__isset; +node_info::node_info(const node_info& other77) { + status = other77.status; + address = other77.address; + __isset = other77.__isset; } -configuration_list_nodes_request::configuration_list_nodes_request( - configuration_list_nodes_request &&other159) -{ - status = std::move(other159.status); - __isset = std::move(other159.__isset); +node_info::node_info( node_info&& other78) { + status = std::move(other78.status); + address = std::move(other78.address); + __isset = std::move(other78.__isset); } -configuration_list_nodes_request &configuration_list_nodes_request:: -operator=(const configuration_list_nodes_request &other160) -{ - status = other160.status; - __isset = other160.__isset; - return *this; +node_info& node_info::operator=(const node_info& other79) { + status = other79.status; + address = other79.address; + __isset = other79.__isset; + return *this; } -configuration_list_nodes_request &configuration_list_nodes_request:: -operator=(configuration_list_nodes_request &&other161) -{ - status = std::move(other161.status); - __isset = std::move(other161.__isset); - return *this; +node_info& node_info::operator=(node_info&& other80) { + status = std::move(other80.status); + address = std::move(other80.address); + __isset = std::move(other80.__isset); + return *this; } -void configuration_list_nodes_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_list_nodes_request("; - out << "status=" << to_string(status); - out << ")"; +void node_info::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "node_info("; + out << "status=" << to_string(status); + out << ", " << "address=" << to_string(address); + out << ")"; } -configuration_cluster_info_request::~configuration_cluster_info_request() throw() {} - -uint32_t configuration_cluster_info_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - return xfer; +configuration_update_request::~configuration_update_request() throw() { } -uint32_t -configuration_cluster_info_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_cluster_info_request"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; +void configuration_update_request::__set_info(const ::dsn::app_info& val) { + this->info = val; } -void swap(configuration_cluster_info_request &a, configuration_cluster_info_request &b) -{ - using ::std::swap; - (void)a; - (void)b; +void configuration_update_request::__set_config(const ::dsn::partition_configuration& val) { + this->config = val; } -configuration_cluster_info_request::configuration_cluster_info_request( - const configuration_cluster_info_request &other162) -{ - (void)other162; -} -configuration_cluster_info_request::configuration_cluster_info_request( - configuration_cluster_info_request &&other163) -{ - (void)other163; +void configuration_update_request::__set_type(const config_type::type val) { + this->type = val; } -configuration_cluster_info_request &configuration_cluster_info_request:: -operator=(const configuration_cluster_info_request &other164) -{ - (void)other164; - return *this; -} -configuration_cluster_info_request &configuration_cluster_info_request:: -operator=(configuration_cluster_info_request &&other165) -{ - (void)other165; - return *this; + +void configuration_update_request::__set_node(const ::dsn::rpc_address& val) { + this->node = val; } -void configuration_cluster_info_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_cluster_info_request("; - out << ")"; + +void configuration_update_request::__set_host_node(const ::dsn::rpc_address& val) { + this->host_node = val; } -configuration_recall_app_request::~configuration_recall_app_request() throw() {} +uint32_t configuration_update_request::read(::apache::thrift::protocol::TProtocol* iprot) { -void configuration_recall_app_request::__set_app_id(const int32_t val) { this->app_id = val; } + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -void configuration_recall_app_request::__set_new_app_name(const std::string &val) -{ - this->new_app_name = val; -} + xfer += iprot->readStructBegin(fname); -uint32_t configuration_recall_app_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ + using ::apache::thrift::protocol::TProtocolException; - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->new_app_name); - this->__isset.new_app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_recall_app_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_recall_app_request"); - - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("new_app_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->new_app_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_recall_app_request &a, configuration_recall_app_request &b) -{ - using ::std::swap; - swap(a.app_id, b.app_id); - swap(a.new_app_name, b.new_app_name); - swap(a.__isset, b.__isset); -} - -configuration_recall_app_request::configuration_recall_app_request( - const configuration_recall_app_request &other166) -{ - app_id = other166.app_id; - new_app_name = other166.new_app_name; - __isset = other166.__isset; -} -configuration_recall_app_request::configuration_recall_app_request( - configuration_recall_app_request &&other167) -{ - app_id = std::move(other167.app_id); - new_app_name = std::move(other167.new_app_name); - __isset = std::move(other167.__isset); -} -configuration_recall_app_request &configuration_recall_app_request:: -operator=(const configuration_recall_app_request &other168) -{ - app_id = other168.app_id; - new_app_name = other168.new_app_name; - __isset = other168.__isset; - return *this; -} -configuration_recall_app_request &configuration_recall_app_request:: -operator=(configuration_recall_app_request &&other169) -{ - app_id = std::move(other169.app_id); - new_app_name = std::move(other169.new_app_name); - __isset = std::move(other169.__isset); - return *this; -} -void configuration_recall_app_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_recall_app_request("; - out << "app_id=" << to_string(app_id); - out << ", " - << "new_app_name=" << to_string(new_app_name); - out << ")"; -} - -configuration_create_app_response::~configuration_create_app_response() throw() {} - -void configuration_create_app_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void configuration_create_app_response::__set_appid(const int32_t val) { this->appid = val; } - -uint32_t configuration_create_app_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->appid); - this->__isset.appid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->info.read(iprot); + this->__isset.info = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast81; + xfer += iprot->readI32(ecast81); + this->type = (config_type::type)ecast81; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->host_node.read(iprot); + this->__isset.host_node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t -configuration_create_app_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_create_app_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->appid); - xfer += oprot->writeFieldEnd(); +uint32_t configuration_update_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_update_request"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_create_app_response &a, configuration_create_app_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.appid, b.appid); - swap(a.__isset, b.__isset); -} - -configuration_create_app_response::configuration_create_app_response( - const configuration_create_app_response &other170) -{ - err = other170.err; - appid = other170.appid; - __isset = other170.__isset; -} -configuration_create_app_response::configuration_create_app_response( - configuration_create_app_response &&other171) -{ - err = std::move(other171.err); - appid = std::move(other171.appid); - __isset = std::move(other171.__isset); -} -configuration_create_app_response &configuration_create_app_response:: -operator=(const configuration_create_app_response &other172) -{ - err = other172.err; - appid = other172.appid; - __isset = other172.__isset; - return *this; -} -configuration_create_app_response &configuration_create_app_response:: -operator=(configuration_create_app_response &&other173) -{ - err = std::move(other173.err); - appid = std::move(other173.appid); - __isset = std::move(other173.__isset); - return *this; -} -void configuration_create_app_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_create_app_response("; - out << "err=" << to_string(err); - out << ", " - << "appid=" << to_string(appid); - out << ")"; -} - -configuration_meta_control_request::~configuration_meta_control_request() throw() {} - -void configuration_meta_control_request::__set_level(const meta_function_level::type val) -{ - this->level = val; -} - -uint32_t configuration_meta_control_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast174; - xfer += iprot->readI32(ecast174); - this->level = (meta_function_level::type)ecast174; - this->__isset.level = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } + xfer += oprot->writeFieldBegin("info", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->info.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); -uint32_t -configuration_meta_control_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_meta_control_request"); + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("level", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->level); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("host_node", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->host_node.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_meta_control_request &a, configuration_meta_control_request &b) -{ - using ::std::swap; - swap(a.level, b.level); - swap(a.__isset, b.__isset); +void swap(configuration_update_request &a, configuration_update_request &b) { + using ::std::swap; + swap(a.info, b.info); + swap(a.config, b.config); + swap(a.type, b.type); + swap(a.node, b.node); + swap(a.host_node, b.host_node); + swap(a.__isset, b.__isset); } -configuration_meta_control_request::configuration_meta_control_request( - const configuration_meta_control_request &other175) -{ - level = other175.level; - __isset = other175.__isset; +configuration_update_request::configuration_update_request(const configuration_update_request& other82) { + info = other82.info; + config = other82.config; + type = other82.type; + node = other82.node; + host_node = other82.host_node; + __isset = other82.__isset; } -configuration_meta_control_request::configuration_meta_control_request( - configuration_meta_control_request &&other176) -{ - level = std::move(other176.level); - __isset = std::move(other176.__isset); +configuration_update_request::configuration_update_request( configuration_update_request&& other83) { + info = std::move(other83.info); + config = std::move(other83.config); + type = std::move(other83.type); + node = std::move(other83.node); + host_node = std::move(other83.host_node); + __isset = std::move(other83.__isset); } -configuration_meta_control_request &configuration_meta_control_request:: -operator=(const configuration_meta_control_request &other177) -{ - level = other177.level; - __isset = other177.__isset; - return *this; +configuration_update_request& configuration_update_request::operator=(const configuration_update_request& other84) { + info = other84.info; + config = other84.config; + type = other84.type; + node = other84.node; + host_node = other84.host_node; + __isset = other84.__isset; + return *this; } -configuration_meta_control_request &configuration_meta_control_request:: -operator=(configuration_meta_control_request &&other178) -{ - level = std::move(other178.level); - __isset = std::move(other178.__isset); - return *this; +configuration_update_request& configuration_update_request::operator=(configuration_update_request&& other85) { + info = std::move(other85.info); + config = std::move(other85.config); + type = std::move(other85.type); + node = std::move(other85.node); + host_node = std::move(other85.host_node); + __isset = std::move(other85.__isset); + return *this; } -void configuration_meta_control_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_meta_control_request("; - out << "level=" << to_string(level); - out << ")"; +void configuration_update_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_update_request("; + out << "info=" << to_string(info); + out << ", " << "config=" << to_string(config); + out << ", " << "type=" << to_string(type); + out << ", " << "node=" << to_string(node); + out << ", " << "host_node=" << to_string(host_node); + out << ")"; } -configuration_meta_control_response::~configuration_meta_control_response() throw() {} -void configuration_meta_control_response::__set_err(const ::dsn::error_code &val) -{ - this->err = val; +configuration_update_response::~configuration_update_response() throw() { } -void configuration_meta_control_response::__set_old_level(const meta_function_level::type val) -{ - this->old_level = val; + +void configuration_update_response::__set_err(const ::dsn::error_code& val) { + this->err = val; } -uint32_t configuration_meta_control_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ +void configuration_update_response::__set_config(const ::dsn::partition_configuration& val) { + this->config = val; +} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t configuration_update_response::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast179; - xfer += iprot->readI32(ecast179); - this->old_level = (meta_function_level::type)ecast179; - this->__isset.old_level = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t -configuration_meta_control_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_meta_control_response"); +uint32_t configuration_update_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_update_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("old_level", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->old_level); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_meta_control_response &a, configuration_meta_control_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.old_level, b.old_level); - swap(a.__isset, b.__isset); -} - -configuration_meta_control_response::configuration_meta_control_response( - const configuration_meta_control_response &other180) -{ - err = other180.err; - old_level = other180.old_level; - __isset = other180.__isset; -} -configuration_meta_control_response::configuration_meta_control_response( - configuration_meta_control_response &&other181) -{ - err = std::move(other181.err); - old_level = std::move(other181.old_level); - __isset = std::move(other181.__isset); -} -configuration_meta_control_response &configuration_meta_control_response:: -operator=(const configuration_meta_control_response &other182) -{ - err = other182.err; - old_level = other182.old_level; - __isset = other182.__isset; - return *this; -} -configuration_meta_control_response &configuration_meta_control_response:: -operator=(configuration_meta_control_response &&other183) -{ - err = std::move(other183.err); - old_level = std::move(other183.old_level); - __isset = std::move(other183.__isset); - return *this; -} -void configuration_meta_control_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_meta_control_response("; - out << "err=" << to_string(err); - out << ", " - << "old_level=" << to_string(old_level); - out << ")"; -} - -configuration_proposal_action::~configuration_proposal_action() throw() {} - -void configuration_proposal_action::__set_target(const ::dsn::rpc_address &val) -{ - this->target = val; -} - -void configuration_proposal_action::__set_node(const ::dsn::rpc_address &val) { this->node = val; } - -void configuration_proposal_action::__set_type(const config_type::type val) { this->type = val; } - -uint32_t configuration_proposal_action::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->target.read(iprot); - this->__isset.target = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast184; - xfer += iprot->readI32(ecast184); - this->type = (config_type::type)ecast184; - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += iprot->readStructEnd(); +void swap(configuration_update_response &a, configuration_update_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.config, b.config); + swap(a.__isset, b.__isset); +} - return xfer; +configuration_update_response::configuration_update_response(const configuration_update_response& other86) { + err = other86.err; + config = other86.config; + __isset = other86.__isset; +} +configuration_update_response::configuration_update_response( configuration_update_response&& other87) { + err = std::move(other87.err); + config = std::move(other87.config); + __isset = std::move(other87.__isset); +} +configuration_update_response& configuration_update_response::operator=(const configuration_update_response& other88) { + err = other88.err; + config = other88.config; + __isset = other88.__isset; + return *this; +} +configuration_update_response& configuration_update_response::operator=(configuration_update_response&& other89) { + err = std::move(other89.err); + config = std::move(other89.config); + __isset = std::move(other89.__isset); + return *this; +} +void configuration_update_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_update_response("; + out << "err=" << to_string(err); + out << ", " << "config=" << to_string(config); + out << ")"; } -uint32_t configuration_proposal_action::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_proposal_action"); - xfer += oprot->writeFieldBegin("target", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->target.write(oprot); - xfer += oprot->writeFieldEnd(); +replica_server_info::~replica_server_info() throw() { +} - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->type); - xfer += oprot->writeFieldEnd(); +void replica_server_info::__set_geo_tags(const std::map & val) { + this->geo_tags = val; +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_proposal_action &a, configuration_proposal_action &b) -{ - using ::std::swap; - swap(a.target, b.target); - swap(a.node, b.node); - swap(a.type, b.type); - swap(a.__isset, b.__isset); -} - -configuration_proposal_action::configuration_proposal_action( - const configuration_proposal_action &other185) -{ - target = other185.target; - node = other185.node; - type = other185.type; - __isset = other185.__isset; -} -configuration_proposal_action::configuration_proposal_action( - configuration_proposal_action &&other186) -{ - target = std::move(other186.target); - node = std::move(other186.node); - type = std::move(other186.type); - __isset = std::move(other186.__isset); -} -configuration_proposal_action &configuration_proposal_action:: -operator=(const configuration_proposal_action &other187) -{ - target = other187.target; - node = other187.node; - type = other187.type; - __isset = other187.__isset; - return *this; -} -configuration_proposal_action &configuration_proposal_action:: -operator=(configuration_proposal_action &&other188) -{ - target = std::move(other188.target); - node = std::move(other188.node); - type = std::move(other188.type); - __isset = std::move(other188.__isset); - return *this; -} -void configuration_proposal_action::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_proposal_action("; - out << "target=" << to_string(target); - out << ", " - << "node=" << to_string(node); - out << ", " - << "type=" << to_string(type); - out << ")"; -} - -configuration_balancer_request::~configuration_balancer_request() throw() {} - -void configuration_balancer_request::__set_gpid(const ::dsn::gpid &val) { this->gpid = val; } - -void configuration_balancer_request::__set_action_list( - const std::vector &val) -{ - this->action_list = val; -} - -void configuration_balancer_request::__set_force(const bool val) -{ - this->force = val; - __isset.force = true; -} - -void configuration_balancer_request::__set_balance_type(const balancer_request_type::type val) -{ - this->balance_type = val; - __isset.balance_type = true; -} - -uint32_t configuration_balancer_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->gpid.read(iprot); - this->__isset.gpid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->action_list.clear(); - uint32_t _size189; - ::apache::thrift::protocol::TType _etype192; - xfer += iprot->readListBegin(_etype192, _size189); - this->action_list.resize(_size189); - uint32_t _i193; - for (_i193 = 0; _i193 < _size189; ++_i193) { - xfer += this->action_list[_i193].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.action_list = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->force); - this->__isset.force = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast194; - xfer += iprot->readI32(ecast194); - this->balance_type = (balancer_request_type::type)ecast194; - this->__isset.balance_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void replica_server_info::__set_total_capacity_mb(const int64_t val) { + this->total_capacity_mb = val; +} - xfer += iprot->readStructEnd(); +uint32_t replica_server_info::read(::apache::thrift::protocol::TProtocol* iprot) { - return xfer; -} + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -uint32_t configuration_balancer_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_balancer_request"); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("gpid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->gpid.write(oprot); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("action_list", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->action_list.size())); - std::vector::const_iterator _iter195; - for (_iter195 = this->action_list.begin(); _iter195 != this->action_list.end(); - ++_iter195) { - xfer += (*_iter195).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - if (this->__isset.force) { - xfer += oprot->writeFieldBegin("force", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->force); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.balance_type) { - xfer += oprot->writeFieldBegin("balance_type", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32((int32_t)this->balance_type); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_balancer_request &a, configuration_balancer_request &b) -{ - using ::std::swap; - swap(a.gpid, b.gpid); - swap(a.action_list, b.action_list); - swap(a.force, b.force); - swap(a.balance_type, b.balance_type); - swap(a.__isset, b.__isset); -} - -configuration_balancer_request::configuration_balancer_request( - const configuration_balancer_request &other196) -{ - gpid = other196.gpid; - action_list = other196.action_list; - force = other196.force; - balance_type = other196.balance_type; - __isset = other196.__isset; -} -configuration_balancer_request::configuration_balancer_request( - configuration_balancer_request &&other197) -{ - gpid = std::move(other197.gpid); - action_list = std::move(other197.action_list); - force = std::move(other197.force); - balance_type = std::move(other197.balance_type); - __isset = std::move(other197.__isset); -} -configuration_balancer_request &configuration_balancer_request:: -operator=(const configuration_balancer_request &other198) -{ - gpid = other198.gpid; - action_list = other198.action_list; - force = other198.force; - balance_type = other198.balance_type; - __isset = other198.__isset; - return *this; -} -configuration_balancer_request &configuration_balancer_request:: -operator=(configuration_balancer_request &&other199) -{ - gpid = std::move(other199.gpid); - action_list = std::move(other199.action_list); - force = std::move(other199.force); - balance_type = std::move(other199.balance_type); - __isset = std::move(other199.__isset); - return *this; -} -void configuration_balancer_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_balancer_request("; - out << "gpid=" << to_string(gpid); - out << ", " - << "action_list=" << to_string(action_list); - out << ", " - << "force="; - (__isset.force ? (out << to_string(force)) : (out << "")); - out << ", " - << "balance_type="; - (__isset.balance_type ? (out << to_string(balance_type)) : (out << "")); - out << ")"; -} - -configuration_balancer_response::~configuration_balancer_response() throw() {} - -void configuration_balancer_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -uint32_t configuration_balancer_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->geo_tags.clear(); + uint32_t _size90; + ::apache::thrift::protocol::TType _ktype91; + ::apache::thrift::protocol::TType _vtype92; + xfer += iprot->readMapBegin(_ktype91, _vtype92, _size90); + uint32_t _i94; + for (_i94 = 0; _i94 < _size90; ++_i94) + { + std::string _key95; + xfer += iprot->readString(_key95); + std::string& _val96 = this->geo_tags[_key95]; + xfer += iprot->readString(_val96); + } + xfer += iprot->readMapEnd(); + } + this->__isset.geo_tags = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->total_capacity_mb); + this->__isset.total_capacity_mb = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_balancer_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_balancer_response"); +uint32_t replica_server_info::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("replica_server_info"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_balancer_response &a, configuration_balancer_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.__isset, b.__isset); -} - -configuration_balancer_response::configuration_balancer_response( - const configuration_balancer_response &other200) -{ - err = other200.err; - __isset = other200.__isset; -} -configuration_balancer_response::configuration_balancer_response( - configuration_balancer_response &&other201) -{ - err = std::move(other201.err); - __isset = std::move(other201.__isset); -} -configuration_balancer_response &configuration_balancer_response:: -operator=(const configuration_balancer_response &other202) -{ - err = other202.err; - __isset = other202.__isset; - return *this; -} -configuration_balancer_response &configuration_balancer_response:: -operator=(configuration_balancer_response &&other203) -{ - err = std::move(other203.err); - __isset = std::move(other203.__isset); - return *this; -} -void configuration_balancer_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_balancer_response("; - out << "err=" << to_string(err); - out << ")"; -} - -configuration_drop_app_response::~configuration_drop_app_response() throw() {} - -void configuration_drop_app_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -uint32_t configuration_drop_app_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + xfer += oprot->writeFieldBegin("geo_tags", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->geo_tags.size())); + std::map ::const_iterator _iter97; + for (_iter97 = this->geo_tags.begin(); _iter97 != this->geo_tags.end(); ++_iter97) + { + xfer += oprot->writeString(_iter97->first); + xfer += oprot->writeString(_iter97->second); } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_drop_app_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_drop_app_response"); + xfer += oprot->writeFieldBegin("total_capacity_mb", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->total_capacity_mb); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_drop_app_response &a, configuration_drop_app_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.__isset, b.__isset); +void swap(replica_server_info &a, replica_server_info &b) { + using ::std::swap; + swap(a.geo_tags, b.geo_tags); + swap(a.total_capacity_mb, b.total_capacity_mb); + swap(a.__isset, b.__isset); } -configuration_drop_app_response::configuration_drop_app_response( - const configuration_drop_app_response &other204) -{ - err = other204.err; - __isset = other204.__isset; +replica_server_info::replica_server_info(const replica_server_info& other98) { + geo_tags = other98.geo_tags; + total_capacity_mb = other98.total_capacity_mb; + __isset = other98.__isset; } -configuration_drop_app_response::configuration_drop_app_response( - configuration_drop_app_response &&other205) -{ - err = std::move(other205.err); - __isset = std::move(other205.__isset); +replica_server_info::replica_server_info( replica_server_info&& other99) { + geo_tags = std::move(other99.geo_tags); + total_capacity_mb = std::move(other99.total_capacity_mb); + __isset = std::move(other99.__isset); } -configuration_drop_app_response &configuration_drop_app_response:: -operator=(const configuration_drop_app_response &other206) -{ - err = other206.err; - __isset = other206.__isset; - return *this; +replica_server_info& replica_server_info::operator=(const replica_server_info& other100) { + geo_tags = other100.geo_tags; + total_capacity_mb = other100.total_capacity_mb; + __isset = other100.__isset; + return *this; } -configuration_drop_app_response &configuration_drop_app_response:: -operator=(configuration_drop_app_response &&other207) -{ - err = std::move(other207.err); - __isset = std::move(other207.__isset); - return *this; +replica_server_info& replica_server_info::operator=(replica_server_info&& other101) { + geo_tags = std::move(other101.geo_tags); + total_capacity_mb = std::move(other101.total_capacity_mb); + __isset = std::move(other101.__isset); + return *this; } -void configuration_drop_app_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_drop_app_response("; - out << "err=" << to_string(err); - out << ")"; +void replica_server_info::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "replica_server_info("; + out << "geo_tags=" << to_string(geo_tags); + out << ", " << "total_capacity_mb=" << to_string(total_capacity_mb); + out << ")"; } -configuration_list_apps_response::~configuration_list_apps_response() throw() {} -void configuration_list_apps_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void configuration_list_apps_response::__set_infos(const std::vector<::dsn::app_info> &val) -{ - this->infos = val; +configuration_query_by_node_request::~configuration_query_by_node_request() throw() { } -uint32_t configuration_list_apps_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->infos.clear(); - uint32_t _size208; - ::apache::thrift::protocol::TType _etype211; - xfer += iprot->readListBegin(_etype211, _size208); - this->infos.resize(_size208); - uint32_t _i212; - for (_i212 = 0; _i212 < _size208; ++_i212) { - xfer += this->infos[_i212].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.infos = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - return xfer; +void configuration_query_by_node_request::__set_node(const ::dsn::rpc_address& val) { + this->node = val; } -uint32_t configuration_list_apps_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_list_apps_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +void configuration_query_by_node_request::__set_stored_replicas(const std::vector & val) { + this->stored_replicas = val; +__isset.stored_replicas = true; +} - xfer += oprot->writeFieldBegin("infos", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->infos.size())); - std::vector<::dsn::app_info>::const_iterator _iter213; - for (_iter213 = this->infos.begin(); _iter213 != this->infos.end(); ++_iter213) { - xfer += (*_iter213).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); +void configuration_query_by_node_request::__set_info(const replica_server_info& val) { + this->info = val; +__isset.info = true; +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_list_apps_response &a, configuration_list_apps_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.infos, b.infos); - swap(a.__isset, b.__isset); -} - -configuration_list_apps_response::configuration_list_apps_response( - const configuration_list_apps_response &other214) -{ - err = other214.err; - infos = other214.infos; - __isset = other214.__isset; -} -configuration_list_apps_response::configuration_list_apps_response( - configuration_list_apps_response &&other215) -{ - err = std::move(other215.err); - infos = std::move(other215.infos); - __isset = std::move(other215.__isset); -} -configuration_list_apps_response &configuration_list_apps_response:: -operator=(const configuration_list_apps_response &other216) -{ - err = other216.err; - infos = other216.infos; - __isset = other216.__isset; - return *this; -} -configuration_list_apps_response &configuration_list_apps_response:: -operator=(configuration_list_apps_response &&other217) -{ - err = std::move(other217.err); - infos = std::move(other217.infos); - __isset = std::move(other217.__isset); - return *this; -} -void configuration_list_apps_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_list_apps_response("; - out << "err=" << to_string(err); - out << ", " - << "infos=" << to_string(infos); - out << ")"; -} - -configuration_list_nodes_response::~configuration_list_nodes_response() throw() {} - -void configuration_list_nodes_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void configuration_list_nodes_response::__set_infos(const std::vector &val) -{ - this->infos = val; -} - -uint32_t configuration_list_nodes_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->infos.clear(); - uint32_t _size218; - ::apache::thrift::protocol::TType _etype221; - xfer += iprot->readListBegin(_etype221, _size218); - this->infos.resize(_size218); - uint32_t _i222; - for (_i222 = 0; _i222 < _size218; ++_i222) { - xfer += this->infos[_i222].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.infos = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +uint32_t configuration_query_by_node_request::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += iprot->readStructEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - return xfer; -} + xfer += iprot->readStructBegin(fname); -uint32_t -configuration_list_nodes_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_list_nodes_response"); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("infos", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->infos.size())); - std::vector::const_iterator _iter223; - for (_iter223 = this->infos.begin(); _iter223 != this->infos.end(); ++_iter223) { - xfer += (*_iter223).write(oprot); - } - xfer += oprot->writeListEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_list_nodes_response &a, configuration_list_nodes_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.infos, b.infos); - swap(a.__isset, b.__isset); -} - -configuration_list_nodes_response::configuration_list_nodes_response( - const configuration_list_nodes_response &other224) -{ - err = other224.err; - infos = other224.infos; - __isset = other224.__isset; -} -configuration_list_nodes_response::configuration_list_nodes_response( - configuration_list_nodes_response &&other225) -{ - err = std::move(other225.err); - infos = std::move(other225.infos); - __isset = std::move(other225.__isset); -} -configuration_list_nodes_response &configuration_list_nodes_response:: -operator=(const configuration_list_nodes_response &other226) -{ - err = other226.err; - infos = other226.infos; - __isset = other226.__isset; - return *this; -} -configuration_list_nodes_response &configuration_list_nodes_response:: -operator=(configuration_list_nodes_response &&other227) -{ - err = std::move(other227.err); - infos = std::move(other227.infos); - __isset = std::move(other227.__isset); - return *this; -} -void configuration_list_nodes_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_list_nodes_response("; - out << "err=" << to_string(err); - out << ", " - << "infos=" << to_string(infos); - out << ")"; -} - -configuration_cluster_info_response::~configuration_cluster_info_response() throw() {} - -void configuration_cluster_info_response::__set_err(const ::dsn::error_code &val) -{ - this->err = val; -} - -void configuration_cluster_info_response::__set_keys(const std::vector &val) -{ - this->keys = val; -} - -void configuration_cluster_info_response::__set_values(const std::vector &val) -{ - this->values = val; -} - -uint32_t configuration_cluster_info_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->keys.clear(); - uint32_t _size228; - ::apache::thrift::protocol::TType _etype231; - xfer += iprot->readListBegin(_etype231, _size228); - this->keys.resize(_size228); - uint32_t _i232; - for (_i232 = 0; _i232 < _size228; ++_i232) { - xfer += iprot->readString(this->keys[_i232]); - } - xfer += iprot->readListEnd(); - } - this->__isset.keys = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->values.clear(); - uint32_t _size233; - ::apache::thrift::protocol::TType _etype236; - xfer += iprot->readListBegin(_etype236, _size233); - this->values.resize(_size233); - uint32_t _i237; - for (_i237 = 0; _i237 < _size233; ++_i237) { - xfer += iprot->readString(this->values[_i237]); - } - xfer += iprot->readListEnd(); - } - this->__isset.values = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->stored_replicas.clear(); + uint32_t _size102; + ::apache::thrift::protocol::TType _etype105; + xfer += iprot->readListBegin(_etype105, _size102); + this->stored_replicas.resize(_size102); + uint32_t _i106; + for (_i106 = 0; _i106 < _size102; ++_i106) + { + xfer += this->stored_replicas[_i106].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.stored_replicas = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->info.read(iprot); + this->__isset.info = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t -configuration_cluster_info_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_cluster_info_response"); +uint32_t configuration_query_by_node_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_by_node_request"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("keys", ::apache::thrift::protocol::T_LIST, 2); + if (this->__isset.stored_replicas) { + xfer += oprot->writeFieldBegin("stored_replicas", ::apache::thrift::protocol::T_LIST, 2); { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, - static_cast(this->keys.size())); - std::vector::const_iterator _iter238; - for (_iter238 = this->keys.begin(); _iter238 != this->keys.end(); ++_iter238) { - xfer += oprot->writeString((*_iter238)); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->stored_replicas.size())); + std::vector ::const_iterator _iter107; + for (_iter107 = this->stored_replicas.begin(); _iter107 != this->stored_replicas.end(); ++_iter107) + { + xfer += (*_iter107).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.info) { + xfer += oprot->writeFieldBegin("info", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->info.write(oprot); xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, - static_cast(this->values.size())); - std::vector::const_iterator _iter239; - for (_iter239 = this->values.begin(); _iter239 != this->values.end(); ++_iter239) { - xfer += oprot->writeString((*_iter239)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); +void swap(configuration_query_by_node_request &a, configuration_query_by_node_request &b) { + using ::std::swap; + swap(a.node, b.node); + swap(a.stored_replicas, b.stored_replicas); + swap(a.info, b.info); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_cluster_info_response &a, configuration_cluster_info_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.keys, b.keys); - swap(a.values, b.values); - swap(a.__isset, b.__isset); -} - -configuration_cluster_info_response::configuration_cluster_info_response( - const configuration_cluster_info_response &other240) -{ - err = other240.err; - keys = other240.keys; - values = other240.values; - __isset = other240.__isset; -} -configuration_cluster_info_response::configuration_cluster_info_response( - configuration_cluster_info_response &&other241) -{ - err = std::move(other241.err); - keys = std::move(other241.keys); - values = std::move(other241.values); - __isset = std::move(other241.__isset); -} -configuration_cluster_info_response &configuration_cluster_info_response:: -operator=(const configuration_cluster_info_response &other242) -{ - err = other242.err; - keys = other242.keys; - values = other242.values; - __isset = other242.__isset; - return *this; -} -configuration_cluster_info_response &configuration_cluster_info_response:: -operator=(configuration_cluster_info_response &&other243) -{ - err = std::move(other243.err); - keys = std::move(other243.keys); - values = std::move(other243.values); - __isset = std::move(other243.__isset); - return *this; -} -void configuration_cluster_info_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_cluster_info_response("; - out << "err=" << to_string(err); - out << ", " - << "keys=" << to_string(keys); - out << ", " - << "values=" << to_string(values); - out << ")"; -} - -configuration_recall_app_response::~configuration_recall_app_response() throw() {} - -void configuration_recall_app_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void configuration_recall_app_response::__set_info(const ::dsn::app_info &val) { this->info = val; } - -uint32_t configuration_recall_app_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->info.read(iprot); - this->__isset.info = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +configuration_query_by_node_request::configuration_query_by_node_request(const configuration_query_by_node_request& other108) { + node = other108.node; + stored_replicas = other108.stored_replicas; + info = other108.info; + __isset = other108.__isset; +} +configuration_query_by_node_request::configuration_query_by_node_request( configuration_query_by_node_request&& other109) { + node = std::move(other109.node); + stored_replicas = std::move(other109.stored_replicas); + info = std::move(other109.info); + __isset = std::move(other109.__isset); +} +configuration_query_by_node_request& configuration_query_by_node_request::operator=(const configuration_query_by_node_request& other110) { + node = other110.node; + stored_replicas = other110.stored_replicas; + info = other110.info; + __isset = other110.__isset; + return *this; +} +configuration_query_by_node_request& configuration_query_by_node_request::operator=(configuration_query_by_node_request&& other111) { + node = std::move(other111.node); + stored_replicas = std::move(other111.stored_replicas); + info = std::move(other111.info); + __isset = std::move(other111.__isset); + return *this; +} +void configuration_query_by_node_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_query_by_node_request("; + out << "node=" << to_string(node); + out << ", " << "stored_replicas="; (__isset.stored_replicas ? (out << to_string(stored_replicas)) : (out << "")); + out << ", " << "info="; (__isset.info ? (out << to_string(info)) : (out << "")); + out << ")"; +} - xfer += iprot->readStructEnd(); - return xfer; +configuration_query_by_node_response::~configuration_query_by_node_response() throw() { } -uint32_t -configuration_recall_app_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_recall_app_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +void configuration_query_by_node_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} - xfer += oprot->writeFieldBegin("info", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->info.write(oprot); - xfer += oprot->writeFieldEnd(); +void configuration_query_by_node_response::__set_partitions(const std::vector & val) { + this->partitions = val; +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_recall_app_response &a, configuration_recall_app_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.info, b.info); - swap(a.__isset, b.__isset); -} - -configuration_recall_app_response::configuration_recall_app_response( - const configuration_recall_app_response &other244) -{ - err = other244.err; - info = other244.info; - __isset = other244.__isset; -} -configuration_recall_app_response::configuration_recall_app_response( - configuration_recall_app_response &&other245) -{ - err = std::move(other245.err); - info = std::move(other245.info); - __isset = std::move(other245.__isset); -} -configuration_recall_app_response &configuration_recall_app_response:: -operator=(const configuration_recall_app_response &other246) -{ - err = other246.err; - info = other246.info; - __isset = other246.__isset; - return *this; -} -configuration_recall_app_response &configuration_recall_app_response:: -operator=(configuration_recall_app_response &&other247) -{ - err = std::move(other247.err); - info = std::move(other247.info); - __isset = std::move(other247.__isset); - return *this; -} -void configuration_recall_app_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_recall_app_response("; - out << "err=" << to_string(err); - out << ", " - << "info=" << to_string(info); - out << ")"; -} - -query_replica_decree_request::~query_replica_decree_request() throw() {} - -void query_replica_decree_request::__set_pid(const ::dsn::gpid &val) { this->pid = val; } - -void query_replica_decree_request::__set_node(const ::dsn::rpc_address &val) { this->node = val; } - -uint32_t query_replica_decree_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void configuration_query_by_node_response::__set_gc_replicas(const std::vector & val) { + this->gc_replicas = val; +__isset.gc_replicas = true; +} - xfer += iprot->readStructEnd(); +uint32_t configuration_query_by_node_response::read(::apache::thrift::protocol::TProtocol* iprot) { - return xfer; -} + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -uint32_t query_replica_decree_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_replica_decree_request"); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(query_replica_decree_request &a, query_replica_decree_request &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.node, b.node); - swap(a.__isset, b.__isset); -} - -query_replica_decree_request::query_replica_decree_request( - const query_replica_decree_request &other248) -{ - pid = other248.pid; - node = other248.node; - __isset = other248.__isset; -} -query_replica_decree_request::query_replica_decree_request(query_replica_decree_request &&other249) -{ - pid = std::move(other249.pid); - node = std::move(other249.node); - __isset = std::move(other249.__isset); -} -query_replica_decree_request &query_replica_decree_request:: -operator=(const query_replica_decree_request &other250) -{ - pid = other250.pid; - node = other250.node; - __isset = other250.__isset; - return *this; -} -query_replica_decree_request &query_replica_decree_request:: -operator=(query_replica_decree_request &&other251) -{ - pid = std::move(other251.pid); - node = std::move(other251.node); - __isset = std::move(other251.__isset); - return *this; -} -void query_replica_decree_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "query_replica_decree_request("; - out << "pid=" << to_string(pid); - out << ", " - << "node=" << to_string(node); - out << ")"; -} - -query_replica_decree_response::~query_replica_decree_response() throw() {} - -void query_replica_decree_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void query_replica_decree_response::__set_last_decree(const int64_t val) -{ - this->last_decree = val; -} - -uint32_t query_replica_decree_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_decree); - this->__isset.last_decree = true; - } else { - xfer += iprot->skip(ftype); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitions.clear(); + uint32_t _size112; + ::apache::thrift::protocol::TType _etype115; + xfer += iprot->readListBegin(_etype115, _size112); + this->partitions.resize(_size112); + uint32_t _i116; + for (_i116 = 0; _i116 < _size112; ++_i116) + { + xfer += this->partitions[_i116].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.partitions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->gc_replicas.clear(); + uint32_t _size117; + ::apache::thrift::protocol::TType _etype120; + xfer += iprot->readListBegin(_etype120, _size117); + this->gc_replicas.resize(_size117); + uint32_t _i121; + for (_i121 = 0; _i121 < _size117; ++_i121) + { + xfer += this->gc_replicas[_i121].read(iprot); } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readListEnd(); + } + this->__isset.gc_replicas = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t query_replica_decree_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_replica_decree_response"); +uint32_t configuration_query_by_node_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_by_node_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("last_decree", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->last_decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); + std::vector ::const_iterator _iter122; + for (_iter122 = this->partitions.begin(); _iter122 != this->partitions.end(); ++_iter122) + { + xfer += (*_iter122).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + if (this->__isset.gc_replicas) { + xfer += oprot->writeFieldBegin("gc_replicas", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->gc_replicas.size())); + std::vector ::const_iterator _iter123; + for (_iter123 = this->gc_replicas.begin(); _iter123 != this->gc_replicas.end(); ++_iter123) + { + xfer += (*_iter123).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(query_replica_decree_response &a, query_replica_decree_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.last_decree, b.last_decree); - swap(a.__isset, b.__isset); +void swap(configuration_query_by_node_response &a, configuration_query_by_node_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.partitions, b.partitions); + swap(a.gc_replicas, b.gc_replicas); + swap(a.__isset, b.__isset); } -query_replica_decree_response::query_replica_decree_response( - const query_replica_decree_response &other252) -{ - err = other252.err; - last_decree = other252.last_decree; - __isset = other252.__isset; +configuration_query_by_node_response::configuration_query_by_node_response(const configuration_query_by_node_response& other124) { + err = other124.err; + partitions = other124.partitions; + gc_replicas = other124.gc_replicas; + __isset = other124.__isset; } -query_replica_decree_response::query_replica_decree_response( - query_replica_decree_response &&other253) -{ - err = std::move(other253.err); - last_decree = std::move(other253.last_decree); - __isset = std::move(other253.__isset); +configuration_query_by_node_response::configuration_query_by_node_response( configuration_query_by_node_response&& other125) { + err = std::move(other125.err); + partitions = std::move(other125.partitions); + gc_replicas = std::move(other125.gc_replicas); + __isset = std::move(other125.__isset); } -query_replica_decree_response &query_replica_decree_response:: -operator=(const query_replica_decree_response &other254) -{ - err = other254.err; - last_decree = other254.last_decree; - __isset = other254.__isset; - return *this; +configuration_query_by_node_response& configuration_query_by_node_response::operator=(const configuration_query_by_node_response& other126) { + err = other126.err; + partitions = other126.partitions; + gc_replicas = other126.gc_replicas; + __isset = other126.__isset; + return *this; } -query_replica_decree_response &query_replica_decree_response:: -operator=(query_replica_decree_response &&other255) -{ - err = std::move(other255.err); - last_decree = std::move(other255.last_decree); - __isset = std::move(other255.__isset); - return *this; +configuration_query_by_node_response& configuration_query_by_node_response::operator=(configuration_query_by_node_response&& other127) { + err = std::move(other127.err); + partitions = std::move(other127.partitions); + gc_replicas = std::move(other127.gc_replicas); + __isset = std::move(other127.__isset); + return *this; } -void query_replica_decree_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "query_replica_decree_response("; - out << "err=" << to_string(err); - out << ", " - << "last_decree=" << to_string(last_decree); - out << ")"; +void configuration_query_by_node_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_query_by_node_response("; + out << "err=" << to_string(err); + out << ", " << "partitions=" << to_string(partitions); + out << ", " << "gc_replicas="; (__isset.gc_replicas ? (out << to_string(gc_replicas)) : (out << "")); + out << ")"; } -replica_info::~replica_info() throw() {} -void replica_info::__set_pid(const ::dsn::gpid &val) { this->pid = val; } +create_app_options::~create_app_options() throw() { +} -void replica_info::__set_ballot(const int64_t val) { this->ballot = val; } -void replica_info::__set_status(const partition_status::type val) { this->status = val; } +void create_app_options::__set_partition_count(const int32_t val) { + this->partition_count = val; +} -void replica_info::__set_last_committed_decree(const int64_t val) -{ - this->last_committed_decree = val; +void create_app_options::__set_replica_count(const int32_t val) { + this->replica_count = val; } -void replica_info::__set_last_prepared_decree(const int64_t val) -{ - this->last_prepared_decree = val; +void create_app_options::__set_success_if_exist(const bool val) { + this->success_if_exist = val; } -void replica_info::__set_last_durable_decree(const int64_t val) { this->last_durable_decree = val; } +void create_app_options::__set_app_type(const std::string& val) { + this->app_type = val; +} -void replica_info::__set_app_type(const std::string &val) { this->app_type = val; } +void create_app_options::__set_is_stateful(const bool val) { + this->is_stateful = val; +} -void replica_info::__set_disk_tag(const std::string &val) { this->disk_tag = val; } +void create_app_options::__set_envs(const std::map & val) { + this->envs = val; +} -uint32_t replica_info::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t create_app_options::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast256; - xfer += iprot->readI32(ecast256); - this->status = (partition_status::type)ecast256; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_prepared_decree); - this->__isset.last_prepared_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_durable_decree); - this->__isset.last_durable_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_type); - this->__isset.app_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->disk_tag); - this->__isset.disk_tag = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_count); + this->__isset.partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->replica_count); + this->__isset.replica_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success_if_exist); + this->__isset.success_if_exist = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_type); + this->__isset.app_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_stateful); + this->__isset.is_stateful = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->envs.clear(); + uint32_t _size128; + ::apache::thrift::protocol::TType _ktype129; + ::apache::thrift::protocol::TType _vtype130; + xfer += iprot->readMapBegin(_ktype129, _vtype130, _size128); + uint32_t _i132; + for (_i132 = 0; _i132 < _size128; ++_i132) + { + std::string _key133; + xfer += iprot->readString(_key133); + std::string& _val134 = this->envs[_key133]; + xfer += iprot->readString(_val134); + } + xfer += iprot->readMapEnd(); + } + this->__isset.envs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t replica_info::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("replica_info"); - - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); +uint32_t create_app_options::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("create_app_options"); - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->partition_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("last_prepared_decree", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->last_prepared_decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("replica_count", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->replica_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("last_durable_decree", ::apache::thrift::protocol::T_I64, 6); - xfer += oprot->writeI64(this->last_durable_decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("success_if_exist", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->success_if_exist); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 7); - xfer += oprot->writeString(this->app_type); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->app_type); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("disk_tag", ::apache::thrift::protocol::T_STRING, 8); - xfer += oprot->writeString(this->disk_tag); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->is_stateful); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(replica_info &a, replica_info &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.ballot, b.ballot); - swap(a.status, b.status); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.last_prepared_decree, b.last_prepared_decree); - swap(a.last_durable_decree, b.last_durable_decree); - swap(a.app_type, b.app_type); - swap(a.disk_tag, b.disk_tag); - swap(a.__isset, b.__isset); -} - -replica_info::replica_info(const replica_info &other257) -{ - pid = other257.pid; - ballot = other257.ballot; - status = other257.status; - last_committed_decree = other257.last_committed_decree; - last_prepared_decree = other257.last_prepared_decree; - last_durable_decree = other257.last_durable_decree; - app_type = other257.app_type; - disk_tag = other257.disk_tag; - __isset = other257.__isset; -} -replica_info::replica_info(replica_info &&other258) -{ - pid = std::move(other258.pid); - ballot = std::move(other258.ballot); - status = std::move(other258.status); - last_committed_decree = std::move(other258.last_committed_decree); - last_prepared_decree = std::move(other258.last_prepared_decree); - last_durable_decree = std::move(other258.last_durable_decree); - app_type = std::move(other258.app_type); - disk_tag = std::move(other258.disk_tag); - __isset = std::move(other258.__isset); -} -replica_info &replica_info::operator=(const replica_info &other259) -{ - pid = other259.pid; - ballot = other259.ballot; - status = other259.status; - last_committed_decree = other259.last_committed_decree; - last_prepared_decree = other259.last_prepared_decree; - last_durable_decree = other259.last_durable_decree; - app_type = other259.app_type; - disk_tag = other259.disk_tag; - __isset = other259.__isset; - return *this; -} -replica_info &replica_info::operator=(replica_info &&other260) -{ - pid = std::move(other260.pid); - ballot = std::move(other260.ballot); - status = std::move(other260.status); - last_committed_decree = std::move(other260.last_committed_decree); - last_prepared_decree = std::move(other260.last_prepared_decree); - last_durable_decree = std::move(other260.last_durable_decree); - app_type = std::move(other260.app_type); - disk_tag = std::move(other260.disk_tag); - __isset = std::move(other260.__isset); - return *this; -} -void replica_info::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "replica_info("; - out << "pid=" << to_string(pid); - out << ", " - << "ballot=" << to_string(ballot); - out << ", " - << "status=" << to_string(status); - out << ", " - << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " - << "last_prepared_decree=" << to_string(last_prepared_decree); - out << ", " - << "last_durable_decree=" << to_string(last_durable_decree); - out << ", " - << "app_type=" << to_string(app_type); - out << ", " - << "disk_tag=" << to_string(disk_tag); - out << ")"; -} - -query_replica_info_request::~query_replica_info_request() throw() {} - -void query_replica_info_request::__set_node(const ::dsn::rpc_address &val) { this->node = val; } - -uint32_t query_replica_info_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + xfer += oprot->writeFieldBegin("envs", ::apache::thrift::protocol::T_MAP, 6); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->envs.size())); + std::map ::const_iterator _iter135; + for (_iter135 = this->envs.begin(); _iter135 != this->envs.end(); ++_iter135) + { + xfer += oprot->writeString(_iter135->first); + xfer += oprot->writeString(_iter135->second); } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); - - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -uint32_t query_replica_info_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_replica_info_request"); - - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; +void swap(create_app_options &a, create_app_options &b) { + using ::std::swap; + swap(a.partition_count, b.partition_count); + swap(a.replica_count, b.replica_count); + swap(a.success_if_exist, b.success_if_exist); + swap(a.app_type, b.app_type); + swap(a.is_stateful, b.is_stateful); + swap(a.envs, b.envs); + swap(a.__isset, b.__isset); } -void swap(query_replica_info_request &a, query_replica_info_request &b) -{ - using ::std::swap; - swap(a.node, b.node); - swap(a.__isset, b.__isset); +create_app_options::create_app_options(const create_app_options& other136) { + partition_count = other136.partition_count; + replica_count = other136.replica_count; + success_if_exist = other136.success_if_exist; + app_type = other136.app_type; + is_stateful = other136.is_stateful; + envs = other136.envs; + __isset = other136.__isset; } - -query_replica_info_request::query_replica_info_request(const query_replica_info_request &other261) -{ - node = other261.node; - __isset = other261.__isset; +create_app_options::create_app_options( create_app_options&& other137) { + partition_count = std::move(other137.partition_count); + replica_count = std::move(other137.replica_count); + success_if_exist = std::move(other137.success_if_exist); + app_type = std::move(other137.app_type); + is_stateful = std::move(other137.is_stateful); + envs = std::move(other137.envs); + __isset = std::move(other137.__isset); } -query_replica_info_request::query_replica_info_request(query_replica_info_request &&other262) -{ - node = std::move(other262.node); - __isset = std::move(other262.__isset); +create_app_options& create_app_options::operator=(const create_app_options& other138) { + partition_count = other138.partition_count; + replica_count = other138.replica_count; + success_if_exist = other138.success_if_exist; + app_type = other138.app_type; + is_stateful = other138.is_stateful; + envs = other138.envs; + __isset = other138.__isset; + return *this; } -query_replica_info_request &query_replica_info_request:: -operator=(const query_replica_info_request &other263) -{ - node = other263.node; - __isset = other263.__isset; - return *this; +create_app_options& create_app_options::operator=(create_app_options&& other139) { + partition_count = std::move(other139.partition_count); + replica_count = std::move(other139.replica_count); + success_if_exist = std::move(other139.success_if_exist); + app_type = std::move(other139.app_type); + is_stateful = std::move(other139.is_stateful); + envs = std::move(other139.envs); + __isset = std::move(other139.__isset); + return *this; } -query_replica_info_request &query_replica_info_request:: -operator=(query_replica_info_request &&other264) -{ - node = std::move(other264.node); - __isset = std::move(other264.__isset); - return *this; +void create_app_options::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "create_app_options("; + out << "partition_count=" << to_string(partition_count); + out << ", " << "replica_count=" << to_string(replica_count); + out << ", " << "success_if_exist=" << to_string(success_if_exist); + out << ", " << "app_type=" << to_string(app_type); + out << ", " << "is_stateful=" << to_string(is_stateful); + out << ", " << "envs=" << to_string(envs); + out << ")"; } -void query_replica_info_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "query_replica_info_request("; - out << "node=" << to_string(node); - out << ")"; + + +configuration_create_app_request::~configuration_create_app_request() throw() { } -query_replica_info_response::~query_replica_info_response() throw() {} -void query_replica_info_response::__set_err(const ::dsn::error_code &val) { this->err = val; } +void configuration_create_app_request::__set_app_name(const std::string& val) { + this->app_name = val; +} -void query_replica_info_response::__set_replicas(const std::vector &val) -{ - this->replicas = val; +void configuration_create_app_request::__set_options(const create_app_options& val) { + this->options = val; } -uint32_t query_replica_info_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t configuration_create_app_request::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->replicas.clear(); - uint32_t _size265; - ::apache::thrift::protocol::TType _etype268; - xfer += iprot->readListBegin(_etype268, _size265); - this->replicas.resize(_size265); - uint32_t _i269; - for (_i269 = 0; _i269 < _size265; ++_i269) { - xfer += this->replicas[_i269].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.replicas = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->options.read(iprot); + this->__isset.options = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t query_replica_info_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_replica_info_response"); +uint32_t configuration_create_app_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_create_app_request"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("replicas", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->replicas.size())); - std::vector::const_iterator _iter270; - for (_iter270 = this->replicas.begin(); _iter270 != this->replicas.end(); ++_iter270) { - xfer += (*_iter270).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("options", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->options.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(query_replica_info_response &a, query_replica_info_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.replicas, b.replicas); - swap(a.__isset, b.__isset); +void swap(configuration_create_app_request &a, configuration_create_app_request &b) { + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.options, b.options); + swap(a.__isset, b.__isset); } -query_replica_info_response::query_replica_info_response( - const query_replica_info_response &other271) -{ - err = other271.err; - replicas = other271.replicas; - __isset = other271.__isset; +configuration_create_app_request::configuration_create_app_request(const configuration_create_app_request& other140) { + app_name = other140.app_name; + options = other140.options; + __isset = other140.__isset; } -query_replica_info_response::query_replica_info_response(query_replica_info_response &&other272) -{ - err = std::move(other272.err); - replicas = std::move(other272.replicas); - __isset = std::move(other272.__isset); +configuration_create_app_request::configuration_create_app_request( configuration_create_app_request&& other141) { + app_name = std::move(other141.app_name); + options = std::move(other141.options); + __isset = std::move(other141.__isset); } -query_replica_info_response &query_replica_info_response:: -operator=(const query_replica_info_response &other273) -{ - err = other273.err; - replicas = other273.replicas; - __isset = other273.__isset; - return *this; +configuration_create_app_request& configuration_create_app_request::operator=(const configuration_create_app_request& other142) { + app_name = other142.app_name; + options = other142.options; + __isset = other142.__isset; + return *this; } -query_replica_info_response &query_replica_info_response:: -operator=(query_replica_info_response &&other274) -{ - err = std::move(other274.err); - replicas = std::move(other274.replicas); - __isset = std::move(other274.__isset); - return *this; +configuration_create_app_request& configuration_create_app_request::operator=(configuration_create_app_request&& other143) { + app_name = std::move(other143.app_name); + options = std::move(other143.options); + __isset = std::move(other143.__isset); + return *this; } -void query_replica_info_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "query_replica_info_response("; - out << "err=" << to_string(err); - out << ", " - << "replicas=" << to_string(replicas); - out << ")"; +void configuration_create_app_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_create_app_request("; + out << "app_name=" << to_string(app_name); + out << ", " << "options=" << to_string(options); + out << ")"; } -disk_info::~disk_info() throw() {} - -void disk_info::__set_tag(const std::string &val) { this->tag = val; } -void disk_info::__set_full_dir(const std::string &val) { this->full_dir = val; } - -void disk_info::__set_disk_capacity_mb(const int64_t val) { this->disk_capacity_mb = val; } +drop_app_options::~drop_app_options() throw() { +} -void disk_info::__set_disk_available_mb(const int64_t val) { this->disk_available_mb = val; } -void disk_info::__set_holding_primary_replica_counts(const std::map &val) -{ - this->holding_primary_replica_counts = val; +void drop_app_options::__set_success_if_not_exist(const bool val) { + this->success_if_not_exist = val; } -void disk_info::__set_holding_secondary_replica_counts(const std::map &val) -{ - this->holding_secondary_replica_counts = val; +void drop_app_options::__set_reserve_seconds(const int64_t val) { + this->reserve_seconds = val; +__isset.reserve_seconds = true; } -uint32_t disk_info::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t drop_app_options::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tag); - this->__isset.tag = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->full_dir); - this->__isset.full_dir = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->disk_capacity_mb); - this->__isset.disk_capacity_mb = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->disk_available_mb); - this->__isset.disk_available_mb = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->holding_primary_replica_counts.clear(); - uint32_t _size275; - ::apache::thrift::protocol::TType _ktype276; - ::apache::thrift::protocol::TType _vtype277; - xfer += iprot->readMapBegin(_ktype276, _vtype277, _size275); - uint32_t _i279; - for (_i279 = 0; _i279 < _size275; ++_i279) { - int32_t _key280; - xfer += iprot->readI32(_key280); - int32_t &_val281 = this->holding_primary_replica_counts[_key280]; - xfer += iprot->readI32(_val281); - } - xfer += iprot->readMapEnd(); - } - this->__isset.holding_primary_replica_counts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->holding_secondary_replica_counts.clear(); - uint32_t _size282; - ::apache::thrift::protocol::TType _ktype283; - ::apache::thrift::protocol::TType _vtype284; - xfer += iprot->readMapBegin(_ktype283, _vtype284, _size282); - uint32_t _i286; - for (_i286 = 0; _i286 < _size282; ++_i286) { - int32_t _key287; - xfer += iprot->readI32(_key287); - int32_t &_val288 = this->holding_secondary_replica_counts[_key287]; - xfer += iprot->readI32(_val288); - } - xfer += iprot->readMapEnd(); - } - this->__isset.holding_secondary_replica_counts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t disk_info::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("disk_info"); - - xfer += oprot->writeFieldBegin("tag", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->tag); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("full_dir", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->full_dir); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("disk_capacity_mb", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->disk_capacity_mb); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("disk_available_mb", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->disk_available_mb); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin( - "holding_primary_replica_counts", ::apache::thrift::protocol::T_MAP, 5); - { - xfer += oprot->writeMapBegin( - ::apache::thrift::protocol::T_I32, - ::apache::thrift::protocol::T_I32, - static_cast(this->holding_primary_replica_counts.size())); - std::map::const_iterator _iter289; - for (_iter289 = this->holding_primary_replica_counts.begin(); - _iter289 != this->holding_primary_replica_counts.end(); - ++_iter289) { - xfer += oprot->writeI32(_iter289->first); - xfer += oprot->writeI32(_iter289->second); - } - xfer += oprot->writeMapEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin( - "holding_secondary_replica_counts", ::apache::thrift::protocol::T_MAP, 6); + switch (fid) { - xfer += oprot->writeMapBegin( - ::apache::thrift::protocol::T_I32, - ::apache::thrift::protocol::T_I32, - static_cast(this->holding_secondary_replica_counts.size())); - std::map::const_iterator _iter290; - for (_iter290 = this->holding_secondary_replica_counts.begin(); - _iter290 != this->holding_secondary_replica_counts.end(); - ++_iter290) { - xfer += oprot->writeI32(_iter290->first); - xfer += oprot->writeI32(_iter290->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(disk_info &a, disk_info &b) -{ - using ::std::swap; - swap(a.tag, b.tag); - swap(a.full_dir, b.full_dir); - swap(a.disk_capacity_mb, b.disk_capacity_mb); - swap(a.disk_available_mb, b.disk_available_mb); - swap(a.holding_primary_replica_counts, b.holding_primary_replica_counts); - swap(a.holding_secondary_replica_counts, b.holding_secondary_replica_counts); - swap(a.__isset, b.__isset); -} - -disk_info::disk_info(const disk_info &other291) -{ - tag = other291.tag; - full_dir = other291.full_dir; - disk_capacity_mb = other291.disk_capacity_mb; - disk_available_mb = other291.disk_available_mb; - holding_primary_replica_counts = other291.holding_primary_replica_counts; - holding_secondary_replica_counts = other291.holding_secondary_replica_counts; - __isset = other291.__isset; -} -disk_info::disk_info(disk_info &&other292) -{ - tag = std::move(other292.tag); - full_dir = std::move(other292.full_dir); - disk_capacity_mb = std::move(other292.disk_capacity_mb); - disk_available_mb = std::move(other292.disk_available_mb); - holding_primary_replica_counts = std::move(other292.holding_primary_replica_counts); - holding_secondary_replica_counts = std::move(other292.holding_secondary_replica_counts); - __isset = std::move(other292.__isset); -} -disk_info &disk_info::operator=(const disk_info &other293) -{ - tag = other293.tag; - full_dir = other293.full_dir; - disk_capacity_mb = other293.disk_capacity_mb; - disk_available_mb = other293.disk_available_mb; - holding_primary_replica_counts = other293.holding_primary_replica_counts; - holding_secondary_replica_counts = other293.holding_secondary_replica_counts; - __isset = other293.__isset; - return *this; -} -disk_info &disk_info::operator=(disk_info &&other294) -{ - tag = std::move(other294.tag); - full_dir = std::move(other294.full_dir); - disk_capacity_mb = std::move(other294.disk_capacity_mb); - disk_available_mb = std::move(other294.disk_available_mb); - holding_primary_replica_counts = std::move(other294.holding_primary_replica_counts); - holding_secondary_replica_counts = std::move(other294.holding_secondary_replica_counts); - __isset = std::move(other294.__isset); - return *this; -} -void disk_info::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "disk_info("; - out << "tag=" << to_string(tag); - out << ", " - << "full_dir=" << to_string(full_dir); - out << ", " - << "disk_capacity_mb=" << to_string(disk_capacity_mb); - out << ", " - << "disk_available_mb=" << to_string(disk_available_mb); - out << ", " - << "holding_primary_replica_counts=" << to_string(holding_primary_replica_counts); - out << ", " - << "holding_secondary_replica_counts=" << to_string(holding_secondary_replica_counts); - out << ")"; -} - -query_disk_info_request::~query_disk_info_request() throw() {} - -void query_disk_info_request::__set_node(const ::dsn::rpc_address &val) { this->node = val; } - -void query_disk_info_request::__set_app_name(const std::string &val) { this->app_name = val; } - -uint32_t query_disk_info_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + case 1: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success_if_not_exist); + this->__isset.success_if_not_exist = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->reserve_seconds); + this->__isset.reserve_seconds = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t query_disk_info_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_disk_info_request"); +uint32_t drop_app_options::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("drop_app_options"); - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("success_if_not_exist", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->success_if_not_exist); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->app_name); + if (this->__isset.reserve_seconds) { + xfer += oprot->writeFieldBegin("reserve_seconds", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->reserve_seconds); xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(query_disk_info_request &a, query_disk_info_request &b) -{ - using ::std::swap; - swap(a.node, b.node); - swap(a.app_name, b.app_name); - swap(a.__isset, b.__isset); +void swap(drop_app_options &a, drop_app_options &b) { + using ::std::swap; + swap(a.success_if_not_exist, b.success_if_not_exist); + swap(a.reserve_seconds, b.reserve_seconds); + swap(a.__isset, b.__isset); } -query_disk_info_request::query_disk_info_request(const query_disk_info_request &other295) -{ - node = other295.node; - app_name = other295.app_name; - __isset = other295.__isset; +drop_app_options::drop_app_options(const drop_app_options& other144) { + success_if_not_exist = other144.success_if_not_exist; + reserve_seconds = other144.reserve_seconds; + __isset = other144.__isset; } -query_disk_info_request::query_disk_info_request(query_disk_info_request &&other296) -{ - node = std::move(other296.node); - app_name = std::move(other296.app_name); - __isset = std::move(other296.__isset); +drop_app_options::drop_app_options( drop_app_options&& other145) { + success_if_not_exist = std::move(other145.success_if_not_exist); + reserve_seconds = std::move(other145.reserve_seconds); + __isset = std::move(other145.__isset); } -query_disk_info_request &query_disk_info_request::operator=(const query_disk_info_request &other297) -{ - node = other297.node; - app_name = other297.app_name; - __isset = other297.__isset; - return *this; +drop_app_options& drop_app_options::operator=(const drop_app_options& other146) { + success_if_not_exist = other146.success_if_not_exist; + reserve_seconds = other146.reserve_seconds; + __isset = other146.__isset; + return *this; } -query_disk_info_request &query_disk_info_request::operator=(query_disk_info_request &&other298) -{ - node = std::move(other298.node); - app_name = std::move(other298.app_name); - __isset = std::move(other298.__isset); - return *this; +drop_app_options& drop_app_options::operator=(drop_app_options&& other147) { + success_if_not_exist = std::move(other147.success_if_not_exist); + reserve_seconds = std::move(other147.reserve_seconds); + __isset = std::move(other147.__isset); + return *this; } -void query_disk_info_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "query_disk_info_request("; - out << "node=" << to_string(node); - out << ", " - << "app_name=" << to_string(app_name); - out << ")"; +void drop_app_options::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "drop_app_options("; + out << "success_if_not_exist=" << to_string(success_if_not_exist); + out << ", " << "reserve_seconds="; (__isset.reserve_seconds ? (out << to_string(reserve_seconds)) : (out << "")); + out << ")"; } -query_disk_info_response::~query_disk_info_response() throw() {} - -void query_disk_info_response::__set_err(const ::dsn::error_code &val) { this->err = val; } -void query_disk_info_response::__set_total_capacity_mb(const int64_t val) -{ - this->total_capacity_mb = val; +configuration_drop_app_request::~configuration_drop_app_request() throw() { } -void query_disk_info_response::__set_total_available_mb(const int64_t val) -{ - this->total_available_mb = val; -} -void query_disk_info_response::__set_disk_infos(const std::vector &val) -{ - this->disk_infos = val; +void configuration_drop_app_request::__set_app_name(const std::string& val) { + this->app_name = val; } -uint32_t query_disk_info_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->total_capacity_mb); - this->__isset.total_capacity_mb = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->total_available_mb); - this->__isset.total_available_mb = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->disk_infos.clear(); - uint32_t _size299; - ::apache::thrift::protocol::TType _etype302; - xfer += iprot->readListBegin(_etype302, _size299); - this->disk_infos.resize(_size299); - uint32_t _i303; - for (_i303 = 0; _i303 < _size299; ++_i303) { - xfer += this->disk_infos[_i303].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.disk_infos = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; +void configuration_drop_app_request::__set_options(const drop_app_options& val) { + this->options = val; } -uint32_t query_disk_info_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_disk_info_response"); +uint32_t configuration_drop_app_request::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldBegin("total_capacity_mb", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->total_capacity_mb); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("total_available_mb", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->total_available_mb); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("disk_infos", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->disk_infos.size())); - std::vector::const_iterator _iter304; - for (_iter304 = this->disk_infos.begin(); _iter304 != this->disk_infos.end(); ++_iter304) { - xfer += (*_iter304).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(query_disk_info_response &a, query_disk_info_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.total_capacity_mb, b.total_capacity_mb); - swap(a.total_available_mb, b.total_available_mb); - swap(a.disk_infos, b.disk_infos); - swap(a.__isset, b.__isset); -} - -query_disk_info_response::query_disk_info_response(const query_disk_info_response &other305) -{ - err = other305.err; - total_capacity_mb = other305.total_capacity_mb; - total_available_mb = other305.total_available_mb; - disk_infos = other305.disk_infos; - __isset = other305.__isset; -} -query_disk_info_response::query_disk_info_response(query_disk_info_response &&other306) -{ - err = std::move(other306.err); - total_capacity_mb = std::move(other306.total_capacity_mb); - total_available_mb = std::move(other306.total_available_mb); - disk_infos = std::move(other306.disk_infos); - __isset = std::move(other306.__isset); -} -query_disk_info_response &query_disk_info_response:: -operator=(const query_disk_info_response &other307) -{ - err = other307.err; - total_capacity_mb = other307.total_capacity_mb; - total_available_mb = other307.total_available_mb; - disk_infos = other307.disk_infos; - __isset = other307.__isset; - return *this; -} -query_disk_info_response &query_disk_info_response::operator=(query_disk_info_response &&other308) -{ - err = std::move(other308.err); - total_capacity_mb = std::move(other308.total_capacity_mb); - total_available_mb = std::move(other308.total_available_mb); - disk_infos = std::move(other308.disk_infos); - __isset = std::move(other308.__isset); - return *this; -} -void query_disk_info_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "query_disk_info_response("; - out << "err=" << to_string(err); - out << ", " - << "total_capacity_mb=" << to_string(total_capacity_mb); - out << ", " - << "total_available_mb=" << to_string(total_available_mb); - out << ", " - << "disk_infos=" << to_string(disk_infos); - out << ")"; -} - -query_app_info_request::~query_app_info_request() throw() {} - -void query_app_info_request::__set_meta_server(const ::dsn::rpc_address &val) -{ - this->meta_server = val; -} - -uint32_t query_app_info_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->meta_server.read(iprot); - this->__isset.meta_server = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->options.read(iprot); + this->__isset.options = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t query_app_info_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_app_info_request"); +uint32_t configuration_drop_app_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_drop_app_request"); - xfer += oprot->writeFieldBegin("meta_server", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->meta_server.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldBegin("options", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->options.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(query_app_info_request &a, query_app_info_request &b) -{ - using ::std::swap; - swap(a.meta_server, b.meta_server); - swap(a.__isset, b.__isset); +void swap(configuration_drop_app_request &a, configuration_drop_app_request &b) { + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.options, b.options); + swap(a.__isset, b.__isset); } -query_app_info_request::query_app_info_request(const query_app_info_request &other309) -{ - meta_server = other309.meta_server; - __isset = other309.__isset; +configuration_drop_app_request::configuration_drop_app_request(const configuration_drop_app_request& other148) { + app_name = other148.app_name; + options = other148.options; + __isset = other148.__isset; } -query_app_info_request::query_app_info_request(query_app_info_request &&other310) -{ - meta_server = std::move(other310.meta_server); - __isset = std::move(other310.__isset); +configuration_drop_app_request::configuration_drop_app_request( configuration_drop_app_request&& other149) { + app_name = std::move(other149.app_name); + options = std::move(other149.options); + __isset = std::move(other149.__isset); } -query_app_info_request &query_app_info_request::operator=(const query_app_info_request &other311) -{ - meta_server = other311.meta_server; - __isset = other311.__isset; - return *this; +configuration_drop_app_request& configuration_drop_app_request::operator=(const configuration_drop_app_request& other150) { + app_name = other150.app_name; + options = other150.options; + __isset = other150.__isset; + return *this; } -query_app_info_request &query_app_info_request::operator=(query_app_info_request &&other312) -{ - meta_server = std::move(other312.meta_server); - __isset = std::move(other312.__isset); - return *this; +configuration_drop_app_request& configuration_drop_app_request::operator=(configuration_drop_app_request&& other151) { + app_name = std::move(other151.app_name); + options = std::move(other151.options); + __isset = std::move(other151.__isset); + return *this; } -void query_app_info_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "query_app_info_request("; - out << "meta_server=" << to_string(meta_server); - out << ")"; +void configuration_drop_app_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_drop_app_request("; + out << "app_name=" << to_string(app_name); + out << ", " << "options=" << to_string(options); + out << ")"; } -query_app_info_response::~query_app_info_response() throw() {} -void query_app_info_response::__set_err(const ::dsn::error_code &val) { this->err = val; } +configuration_list_apps_request::~configuration_list_apps_request() throw() { +} + -void query_app_info_response::__set_apps(const std::vector<::dsn::app_info> &val) -{ - this->apps = val; +void configuration_list_apps_request::__set_status(const ::dsn::app_status::type val) { + this->status = val; } -uint32_t query_app_info_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t configuration_list_apps_request::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->apps.clear(); - uint32_t _size313; - ::apache::thrift::protocol::TType _etype316; - xfer += iprot->readListBegin(_etype316, _size313); - this->apps.resize(_size313); - uint32_t _i317; - for (_i317 = 0; _i317 < _size313; ++_i317) { - xfer += this->apps[_i317].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.apps = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast152; + xfer += iprot->readI32(ecast152); + this->status = ( ::dsn::app_status::type)ecast152; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t query_app_info_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_app_info_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t configuration_list_apps_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_list_apps_request"); - xfer += oprot->writeFieldBegin("apps", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->apps.size())); - std::vector<::dsn::app_info>::const_iterator _iter318; - for (_iter318 = this->apps.begin(); _iter318 != this->apps.end(); ++_iter318) { - xfer += (*_iter318).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(query_app_info_response &a, query_app_info_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.apps, b.apps); - swap(a.__isset, b.__isset); +void swap(configuration_list_apps_request &a, configuration_list_apps_request &b) { + using ::std::swap; + swap(a.status, b.status); + swap(a.__isset, b.__isset); } -query_app_info_response::query_app_info_response(const query_app_info_response &other319) -{ - err = other319.err; - apps = other319.apps; - __isset = other319.__isset; +configuration_list_apps_request::configuration_list_apps_request(const configuration_list_apps_request& other153) { + status = other153.status; + __isset = other153.__isset; } -query_app_info_response::query_app_info_response(query_app_info_response &&other320) -{ - err = std::move(other320.err); - apps = std::move(other320.apps); - __isset = std::move(other320.__isset); +configuration_list_apps_request::configuration_list_apps_request( configuration_list_apps_request&& other154) { + status = std::move(other154.status); + __isset = std::move(other154.__isset); } -query_app_info_response &query_app_info_response::operator=(const query_app_info_response &other321) -{ - err = other321.err; - apps = other321.apps; - __isset = other321.__isset; - return *this; +configuration_list_apps_request& configuration_list_apps_request::operator=(const configuration_list_apps_request& other155) { + status = other155.status; + __isset = other155.__isset; + return *this; } -query_app_info_response &query_app_info_response::operator=(query_app_info_response &&other322) -{ - err = std::move(other322.err); - apps = std::move(other322.apps); - __isset = std::move(other322.__isset); - return *this; +configuration_list_apps_request& configuration_list_apps_request::operator=(configuration_list_apps_request&& other156) { + status = std::move(other156.status); + __isset = std::move(other156.__isset); + return *this; } -void query_app_info_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "query_app_info_response("; - out << "err=" << to_string(err); - out << ", " - << "apps=" << to_string(apps); - out << ")"; +void configuration_list_apps_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_list_apps_request("; + out << "status=" << to_string(status); + out << ")"; } -configuration_recovery_request::~configuration_recovery_request() throw() {} -void configuration_recovery_request::__set_recovery_set(const std::vector<::dsn::rpc_address> &val) -{ - this->recovery_set = val; +configuration_list_nodes_request::~configuration_list_nodes_request() throw() { } -void configuration_recovery_request::__set_skip_bad_nodes(const bool val) -{ - this->skip_bad_nodes = val; -} -void configuration_recovery_request::__set_skip_lost_partitions(const bool val) -{ - this->skip_lost_partitions = val; +void configuration_list_nodes_request::__set_status(const node_status::type val) { + this->status = val; } -uint32_t configuration_recovery_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t configuration_list_nodes_request::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->recovery_set.clear(); - uint32_t _size323; - ::apache::thrift::protocol::TType _etype326; - xfer += iprot->readListBegin(_etype326, _size323); - this->recovery_set.resize(_size323); - uint32_t _i327; - for (_i327 = 0; _i327 < _size323; ++_i327) { - xfer += this->recovery_set[_i327].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.recovery_set = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->skip_bad_nodes); - this->__isset.skip_bad_nodes = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->skip_lost_partitions); - this->__isset.skip_lost_partitions = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast157; + xfer += iprot->readI32(ecast157); + this->status = (node_status::type)ecast157; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_recovery_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_recovery_request"); +uint32_t configuration_list_nodes_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_list_nodes_request"); - xfer += oprot->writeFieldBegin("recovery_set", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->recovery_set.size())); - std::vector<::dsn::rpc_address>::const_iterator _iter328; - for (_iter328 = this->recovery_set.begin(); _iter328 != this->recovery_set.end(); - ++_iter328) { - xfer += (*_iter328).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("skip_bad_nodes", ::apache::thrift::protocol::T_BOOL, 2); - xfer += oprot->writeBool(this->skip_bad_nodes); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("skip_lost_partitions", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->skip_lost_partitions); - xfer += oprot->writeFieldEnd(); +void swap(configuration_list_nodes_request &a, configuration_list_nodes_request &b) { + using ::std::swap; + swap(a.status, b.status); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_recovery_request &a, configuration_recovery_request &b) -{ - using ::std::swap; - swap(a.recovery_set, b.recovery_set); - swap(a.skip_bad_nodes, b.skip_bad_nodes); - swap(a.skip_lost_partitions, b.skip_lost_partitions); - swap(a.__isset, b.__isset); -} - -configuration_recovery_request::configuration_recovery_request( - const configuration_recovery_request &other329) -{ - recovery_set = other329.recovery_set; - skip_bad_nodes = other329.skip_bad_nodes; - skip_lost_partitions = other329.skip_lost_partitions; - __isset = other329.__isset; -} -configuration_recovery_request::configuration_recovery_request( - configuration_recovery_request &&other330) -{ - recovery_set = std::move(other330.recovery_set); - skip_bad_nodes = std::move(other330.skip_bad_nodes); - skip_lost_partitions = std::move(other330.skip_lost_partitions); - __isset = std::move(other330.__isset); -} -configuration_recovery_request &configuration_recovery_request:: -operator=(const configuration_recovery_request &other331) -{ - recovery_set = other331.recovery_set; - skip_bad_nodes = other331.skip_bad_nodes; - skip_lost_partitions = other331.skip_lost_partitions; - __isset = other331.__isset; - return *this; -} -configuration_recovery_request &configuration_recovery_request:: -operator=(configuration_recovery_request &&other332) -{ - recovery_set = std::move(other332.recovery_set); - skip_bad_nodes = std::move(other332.skip_bad_nodes); - skip_lost_partitions = std::move(other332.skip_lost_partitions); - __isset = std::move(other332.__isset); - return *this; -} -void configuration_recovery_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_recovery_request("; - out << "recovery_set=" << to_string(recovery_set); - out << ", " - << "skip_bad_nodes=" << to_string(skip_bad_nodes); - out << ", " - << "skip_lost_partitions=" << to_string(skip_lost_partitions); - out << ")"; -} - -configuration_recovery_response::~configuration_recovery_response() throw() {} - -void configuration_recovery_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void configuration_recovery_response::__set_hint_message(const std::string &val) -{ - this->hint_message = val; -} - -uint32_t configuration_recovery_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint_message); - this->__isset.hint_message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +configuration_list_nodes_request::configuration_list_nodes_request(const configuration_list_nodes_request& other158) { + status = other158.status; + __isset = other158.__isset; +} +configuration_list_nodes_request::configuration_list_nodes_request( configuration_list_nodes_request&& other159) { + status = std::move(other159.status); + __isset = std::move(other159.__isset); +} +configuration_list_nodes_request& configuration_list_nodes_request::operator=(const configuration_list_nodes_request& other160) { + status = other160.status; + __isset = other160.__isset; + return *this; +} +configuration_list_nodes_request& configuration_list_nodes_request::operator=(configuration_list_nodes_request&& other161) { + status = std::move(other161.status); + __isset = std::move(other161.__isset); + return *this; +} +void configuration_list_nodes_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_list_nodes_request("; + out << "status=" << to_string(status); + out << ")"; +} - xfer += iprot->readStructEnd(); - return xfer; +configuration_cluster_info_request::~configuration_cluster_info_request() throw() { } -uint32_t configuration_recovery_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_recovery_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t configuration_cluster_info_request::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->hint_message); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_recovery_response &a, configuration_recovery_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.hint_message, b.hint_message); - swap(a.__isset, b.__isset); -} - -configuration_recovery_response::configuration_recovery_response( - const configuration_recovery_response &other333) -{ - err = other333.err; - hint_message = other333.hint_message; - __isset = other333.__isset; -} -configuration_recovery_response::configuration_recovery_response( - configuration_recovery_response &&other334) -{ - err = std::move(other334.err); - hint_message = std::move(other334.hint_message); - __isset = std::move(other334.__isset); -} -configuration_recovery_response &configuration_recovery_response:: -operator=(const configuration_recovery_response &other335) -{ - err = other335.err; - hint_message = other335.hint_message; - __isset = other335.__isset; - return *this; -} -configuration_recovery_response &configuration_recovery_response:: -operator=(configuration_recovery_response &&other336) -{ - err = std::move(other336.err); - hint_message = std::move(other336.hint_message); - __isset = std::move(other336.__isset); - return *this; -} -void configuration_recovery_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_recovery_response("; - out << "err=" << to_string(err); - out << ", " - << "hint_message=" << to_string(hint_message); - out << ")"; -} - -policy_info::~policy_info() throw() {} - -void policy_info::__set_policy_name(const std::string &val) { this->policy_name = val; } - -void policy_info::__set_backup_provider_type(const std::string &val) -{ - this->backup_provider_type = val; -} - -uint32_t policy_info::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->backup_provider_type); - this->__isset.backup_provider_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } + xfer += iprot->readStructBegin(fname); - xfer += iprot->readStructEnd(); + using ::apache::thrift::protocol::TProtocolException; - return xfer; -} -uint32_t policy_info::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("policy_info"); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("backup_provider_type", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->backup_provider_type); - xfer += oprot->writeFieldEnd(); +uint32_t configuration_cluster_info_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_cluster_info_request"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(policy_info &a, policy_info &b) -{ - using ::std::swap; - swap(a.policy_name, b.policy_name); - swap(a.backup_provider_type, b.backup_provider_type); - swap(a.__isset, b.__isset); +void swap(configuration_cluster_info_request &a, configuration_cluster_info_request &b) { + using ::std::swap; + (void) a; + (void) b; } -policy_info::policy_info(const policy_info &other337) -{ - policy_name = other337.policy_name; - backup_provider_type = other337.backup_provider_type; - __isset = other337.__isset; +configuration_cluster_info_request::configuration_cluster_info_request(const configuration_cluster_info_request& other162) { + (void) other162; } -policy_info::policy_info(policy_info &&other338) -{ - policy_name = std::move(other338.policy_name); - backup_provider_type = std::move(other338.backup_provider_type); - __isset = std::move(other338.__isset); +configuration_cluster_info_request::configuration_cluster_info_request( configuration_cluster_info_request&& other163) { + (void) other163; } -policy_info &policy_info::operator=(const policy_info &other339) -{ - policy_name = other339.policy_name; - backup_provider_type = other339.backup_provider_type; - __isset = other339.__isset; - return *this; +configuration_cluster_info_request& configuration_cluster_info_request::operator=(const configuration_cluster_info_request& other164) { + (void) other164; + return *this; } -policy_info &policy_info::operator=(policy_info &&other340) -{ - policy_name = std::move(other340.policy_name); - backup_provider_type = std::move(other340.backup_provider_type); - __isset = std::move(other340.__isset); - return *this; +configuration_cluster_info_request& configuration_cluster_info_request::operator=(configuration_cluster_info_request&& other165) { + (void) other165; + return *this; } -void policy_info::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "policy_info("; - out << "policy_name=" << to_string(policy_name); - out << ", " - << "backup_provider_type=" << to_string(backup_provider_type); - out << ")"; +void configuration_cluster_info_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_cluster_info_request("; + out << ")"; } -configuration_restore_request::~configuration_restore_request() throw() {} -void configuration_restore_request::__set_cluster_name(const std::string &val) -{ - this->cluster_name = val; +configuration_recall_app_request::~configuration_recall_app_request() throw() { } -void configuration_restore_request::__set_policy_name(const std::string &val) -{ - this->policy_name = val; + +void configuration_recall_app_request::__set_app_id(const int32_t val) { + this->app_id = val; } -void configuration_restore_request::__set_time_stamp(const int64_t val) { this->time_stamp = val; } +void configuration_recall_app_request::__set_new_app_name(const std::string& val) { + this->new_app_name = val; +} -void configuration_restore_request::__set_app_name(const std::string &val) { this->app_name = val; } +uint32_t configuration_recall_app_request::read(::apache::thrift::protocol::TProtocol* iprot) { -void configuration_restore_request::__set_app_id(const int32_t val) { this->app_id = val; } + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -void configuration_restore_request::__set_new_app_name(const std::string &val) -{ - this->new_app_name = val; -} + xfer += iprot->readStructBegin(fname); -void configuration_restore_request::__set_backup_provider_name(const std::string &val) -{ - this->backup_provider_name = val; -} + using ::apache::thrift::protocol::TProtocolException; -void configuration_restore_request::__set_skip_bad_partition(const bool val) -{ - this->skip_bad_partition = val; -} -uint32_t configuration_restore_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->new_app_name); + this->__isset.new_app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += iprot->readStructEnd(); - xfer += iprot->readStructBegin(fname); + return xfer; +} - using ::apache::thrift::protocol::TProtocolException; +uint32_t configuration_recall_app_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_recall_app_request"); - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->cluster_name); - this->__isset.cluster_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->time_stamp); - this->__isset.time_stamp = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->new_app_name); - this->__isset.new_app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->backup_provider_name); - this->__isset.backup_provider_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->skip_bad_partition); - this->__isset.skip_bad_partition = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldBegin("new_app_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->new_app_name); + xfer += oprot->writeFieldEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -uint32_t configuration_restore_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_restore_request"); +void swap(configuration_recall_app_request &a, configuration_recall_app_request &b) { + using ::std::swap; + swap(a.app_id, b.app_id); + swap(a.new_app_name, b.new_app_name); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldBegin("cluster_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->cluster_name); - xfer += oprot->writeFieldEnd(); +configuration_recall_app_request::configuration_recall_app_request(const configuration_recall_app_request& other166) { + app_id = other166.app_id; + new_app_name = other166.new_app_name; + __isset = other166.__isset; +} +configuration_recall_app_request::configuration_recall_app_request( configuration_recall_app_request&& other167) { + app_id = std::move(other167.app_id); + new_app_name = std::move(other167.new_app_name); + __isset = std::move(other167.__isset); +} +configuration_recall_app_request& configuration_recall_app_request::operator=(const configuration_recall_app_request& other168) { + app_id = other168.app_id; + new_app_name = other168.new_app_name; + __isset = other168.__isset; + return *this; +} +configuration_recall_app_request& configuration_recall_app_request::operator=(configuration_recall_app_request&& other169) { + app_id = std::move(other169.app_id); + new_app_name = std::move(other169.new_app_name); + __isset = std::move(other169.__isset); + return *this; +} +void configuration_recall_app_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_recall_app_request("; + out << "app_id=" << to_string(app_id); + out << ", " << "new_app_name=" << to_string(new_app_name); + out << ")"; +} - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("time_stamp", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->time_stamp); - xfer += oprot->writeFieldEnd(); +configuration_create_app_response::~configuration_create_app_response() throw() { +} - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); +void configuration_create_app_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} - xfer += oprot->writeFieldBegin("new_app_name", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->new_app_name); - xfer += oprot->writeFieldEnd(); +void configuration_create_app_response::__set_appid(const int32_t val) { + this->appid = val; +} - xfer += oprot->writeFieldBegin("backup_provider_name", ::apache::thrift::protocol::T_STRING, 7); - xfer += oprot->writeString(this->backup_provider_name); - xfer += oprot->writeFieldEnd(); +uint32_t configuration_create_app_response::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("skip_bad_partition", ::apache::thrift::protocol::T_BOOL, 8); - xfer += oprot->writeBool(this->skip_bad_partition); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_restore_request &a, configuration_restore_request &b) -{ - using ::std::swap; - swap(a.cluster_name, b.cluster_name); - swap(a.policy_name, b.policy_name); - swap(a.time_stamp, b.time_stamp); - swap(a.app_name, b.app_name); - swap(a.app_id, b.app_id); - swap(a.new_app_name, b.new_app_name); - swap(a.backup_provider_name, b.backup_provider_name); - swap(a.skip_bad_partition, b.skip_bad_partition); - swap(a.__isset, b.__isset); -} - -configuration_restore_request::configuration_restore_request( - const configuration_restore_request &other341) -{ - cluster_name = other341.cluster_name; - policy_name = other341.policy_name; - time_stamp = other341.time_stamp; - app_name = other341.app_name; - app_id = other341.app_id; - new_app_name = other341.new_app_name; - backup_provider_name = other341.backup_provider_name; - skip_bad_partition = other341.skip_bad_partition; - __isset = other341.__isset; -} -configuration_restore_request::configuration_restore_request( - configuration_restore_request &&other342) -{ - cluster_name = std::move(other342.cluster_name); - policy_name = std::move(other342.policy_name); - time_stamp = std::move(other342.time_stamp); - app_name = std::move(other342.app_name); - app_id = std::move(other342.app_id); - new_app_name = std::move(other342.new_app_name); - backup_provider_name = std::move(other342.backup_provider_name); - skip_bad_partition = std::move(other342.skip_bad_partition); - __isset = std::move(other342.__isset); -} -configuration_restore_request &configuration_restore_request:: -operator=(const configuration_restore_request &other343) -{ - cluster_name = other343.cluster_name; - policy_name = other343.policy_name; - time_stamp = other343.time_stamp; - app_name = other343.app_name; - app_id = other343.app_id; - new_app_name = other343.new_app_name; - backup_provider_name = other343.backup_provider_name; - skip_bad_partition = other343.skip_bad_partition; - __isset = other343.__isset; - return *this; -} -configuration_restore_request &configuration_restore_request:: -operator=(configuration_restore_request &&other344) -{ - cluster_name = std::move(other344.cluster_name); - policy_name = std::move(other344.policy_name); - time_stamp = std::move(other344.time_stamp); - app_name = std::move(other344.app_name); - app_id = std::move(other344.app_id); - new_app_name = std::move(other344.new_app_name); - backup_provider_name = std::move(other344.backup_provider_name); - skip_bad_partition = std::move(other344.skip_bad_partition); - __isset = std::move(other344.__isset); - return *this; -} -void configuration_restore_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_restore_request("; - out << "cluster_name=" << to_string(cluster_name); - out << ", " - << "policy_name=" << to_string(policy_name); - out << ", " - << "time_stamp=" << to_string(time_stamp); - out << ", " - << "app_name=" << to_string(app_name); - out << ", " - << "app_id=" << to_string(app_id); - out << ", " - << "new_app_name=" << to_string(new_app_name); - out << ", " - << "backup_provider_name=" << to_string(backup_provider_name); - out << ", " - << "skip_bad_partition=" << to_string(skip_bad_partition); - out << ")"; -} - -backup_request::~backup_request() throw() {} - -void backup_request::__set_pid(const ::dsn::gpid &val) { this->pid = val; } - -void backup_request::__set_policy(const policy_info &val) { this->policy = val; } - -void backup_request::__set_app_name(const std::string &val) { this->app_name = val; } - -void backup_request::__set_backup_id(const int64_t val) { this->backup_id = val; } - -uint32_t backup_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->policy.read(iprot); - this->__isset.policy = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->backup_id); - this->__isset.backup_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->appid); + this->__isset.appid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t backup_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("backup_request"); +uint32_t configuration_create_app_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_create_app_response"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("policy", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->policy.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->appid); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("backup_id", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->backup_id); - xfer += oprot->writeFieldEnd(); +void swap(configuration_create_app_response &a, configuration_create_app_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.appid, b.appid); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(backup_request &a, backup_request &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.policy, b.policy); - swap(a.app_name, b.app_name); - swap(a.backup_id, b.backup_id); - swap(a.__isset, b.__isset); -} - -backup_request::backup_request(const backup_request &other345) -{ - pid = other345.pid; - policy = other345.policy; - app_name = other345.app_name; - backup_id = other345.backup_id; - __isset = other345.__isset; -} -backup_request::backup_request(backup_request &&other346) -{ - pid = std::move(other346.pid); - policy = std::move(other346.policy); - app_name = std::move(other346.app_name); - backup_id = std::move(other346.backup_id); - __isset = std::move(other346.__isset); -} -backup_request &backup_request::operator=(const backup_request &other347) -{ - pid = other347.pid; - policy = other347.policy; - app_name = other347.app_name; - backup_id = other347.backup_id; - __isset = other347.__isset; - return *this; -} -backup_request &backup_request::operator=(backup_request &&other348) -{ - pid = std::move(other348.pid); - policy = std::move(other348.policy); - app_name = std::move(other348.app_name); - backup_id = std::move(other348.backup_id); - __isset = std::move(other348.__isset); - return *this; -} -void backup_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "backup_request("; - out << "pid=" << to_string(pid); - out << ", " - << "policy=" << to_string(policy); - out << ", " - << "app_name=" << to_string(app_name); - out << ", " - << "backup_id=" << to_string(backup_id); - out << ")"; -} - -backup_response::~backup_response() throw() {} - -void backup_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void backup_response::__set_pid(const ::dsn::gpid &val) { this->pid = val; } - -void backup_response::__set_progress(const int32_t val) { this->progress = val; } - -void backup_response::__set_policy_name(const std::string &val) { this->policy_name = val; } - -void backup_response::__set_backup_id(const int64_t val) { this->backup_id = val; } - -void backup_response::__set_checkpoint_total_size(const int64_t val) -{ - this->checkpoint_total_size = val; -} - -uint32_t backup_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->progress); - this->__isset.progress = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->backup_id); - this->__isset.backup_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->checkpoint_total_size); - this->__isset.checkpoint_total_size = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +configuration_create_app_response::configuration_create_app_response(const configuration_create_app_response& other170) { + err = other170.err; + appid = other170.appid; + __isset = other170.__isset; +} +configuration_create_app_response::configuration_create_app_response( configuration_create_app_response&& other171) { + err = std::move(other171.err); + appid = std::move(other171.appid); + __isset = std::move(other171.__isset); +} +configuration_create_app_response& configuration_create_app_response::operator=(const configuration_create_app_response& other172) { + err = other172.err; + appid = other172.appid; + __isset = other172.__isset; + return *this; +} +configuration_create_app_response& configuration_create_app_response::operator=(configuration_create_app_response&& other173) { + err = std::move(other173.err); + appid = std::move(other173.appid); + __isset = std::move(other173.__isset); + return *this; +} +void configuration_create_app_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_create_app_response("; + out << "err=" << to_string(err); + out << ", " << "appid=" << to_string(appid); + out << ")"; +} - xfer += iprot->readStructEnd(); - return xfer; +configuration_meta_control_request::~configuration_meta_control_request() throw() { } -uint32_t backup_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("backup_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +void configuration_meta_control_request::__set_level(const meta_function_level::type val) { + this->level = val; +} - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t configuration_meta_control_request::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->progress); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("backup_id", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->backup_id); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("checkpoint_total_size", ::apache::thrift::protocol::T_I64, 6); - xfer += oprot->writeI64(this->checkpoint_total_size); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(backup_response &a, backup_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.pid, b.pid); - swap(a.progress, b.progress); - swap(a.policy_name, b.policy_name); - swap(a.backup_id, b.backup_id); - swap(a.checkpoint_total_size, b.checkpoint_total_size); - swap(a.__isset, b.__isset); -} - -backup_response::backup_response(const backup_response &other349) -{ - err = other349.err; - pid = other349.pid; - progress = other349.progress; - policy_name = other349.policy_name; - backup_id = other349.backup_id; - checkpoint_total_size = other349.checkpoint_total_size; - __isset = other349.__isset; -} -backup_response::backup_response(backup_response &&other350) -{ - err = std::move(other350.err); - pid = std::move(other350.pid); - progress = std::move(other350.progress); - policy_name = std::move(other350.policy_name); - backup_id = std::move(other350.backup_id); - checkpoint_total_size = std::move(other350.checkpoint_total_size); - __isset = std::move(other350.__isset); -} -backup_response &backup_response::operator=(const backup_response &other351) -{ - err = other351.err; - pid = other351.pid; - progress = other351.progress; - policy_name = other351.policy_name; - backup_id = other351.backup_id; - checkpoint_total_size = other351.checkpoint_total_size; - __isset = other351.__isset; - return *this; -} -backup_response &backup_response::operator=(backup_response &&other352) -{ - err = std::move(other352.err); - pid = std::move(other352.pid); - progress = std::move(other352.progress); - policy_name = std::move(other352.policy_name); - backup_id = std::move(other352.backup_id); - checkpoint_total_size = std::move(other352.checkpoint_total_size); - __isset = std::move(other352.__isset); - return *this; -} -void backup_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "backup_response("; - out << "err=" << to_string(err); - out << ", " - << "pid=" << to_string(pid); - out << ", " - << "progress=" << to_string(progress); - out << ", " - << "policy_name=" << to_string(policy_name); - out << ", " - << "backup_id=" << to_string(backup_id); - out << ", " - << "checkpoint_total_size=" << to_string(checkpoint_total_size); - out << ")"; -} - -backup_clear_request::~backup_clear_request() throw() {} - -void backup_clear_request::__set_pid(const ::dsn::gpid &val) { this->pid = val; } - -void backup_clear_request::__set_policy_name(const std::string &val) { this->policy_name = val; } - -uint32_t backup_clear_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast174; + xfer += iprot->readI32(ecast174); + this->level = (meta_function_level::type)ecast174; + this->__isset.level = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t backup_clear_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("backup_clear_request"); - - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t configuration_meta_control_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_meta_control_request"); - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("level", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->level); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(backup_clear_request &a, backup_clear_request &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.policy_name, b.policy_name); - swap(a.__isset, b.__isset); +void swap(configuration_meta_control_request &a, configuration_meta_control_request &b) { + using ::std::swap; + swap(a.level, b.level); + swap(a.__isset, b.__isset); } -backup_clear_request::backup_clear_request(const backup_clear_request &other353) -{ - pid = other353.pid; - policy_name = other353.policy_name; - __isset = other353.__isset; +configuration_meta_control_request::configuration_meta_control_request(const configuration_meta_control_request& other175) { + level = other175.level; + __isset = other175.__isset; } -backup_clear_request::backup_clear_request(backup_clear_request &&other354) -{ - pid = std::move(other354.pid); - policy_name = std::move(other354.policy_name); - __isset = std::move(other354.__isset); +configuration_meta_control_request::configuration_meta_control_request( configuration_meta_control_request&& other176) { + level = std::move(other176.level); + __isset = std::move(other176.__isset); } -backup_clear_request &backup_clear_request::operator=(const backup_clear_request &other355) -{ - pid = other355.pid; - policy_name = other355.policy_name; - __isset = other355.__isset; - return *this; +configuration_meta_control_request& configuration_meta_control_request::operator=(const configuration_meta_control_request& other177) { + level = other177.level; + __isset = other177.__isset; + return *this; } -backup_clear_request &backup_clear_request::operator=(backup_clear_request &&other356) -{ - pid = std::move(other356.pid); - policy_name = std::move(other356.policy_name); - __isset = std::move(other356.__isset); - return *this; +configuration_meta_control_request& configuration_meta_control_request::operator=(configuration_meta_control_request&& other178) { + level = std::move(other178.level); + __isset = std::move(other178.__isset); + return *this; } -void backup_clear_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "backup_clear_request("; - out << "pid=" << to_string(pid); - out << ", " - << "policy_name=" << to_string(policy_name); - out << ")"; +void configuration_meta_control_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_meta_control_request("; + out << "level=" << to_string(level); + out << ")"; } -configuration_modify_backup_policy_request::~configuration_modify_backup_policy_request() throw() {} -void configuration_modify_backup_policy_request::__set_policy_name(const std::string &val) -{ - this->policy_name = val; +configuration_meta_control_response::~configuration_meta_control_response() throw() { } -void configuration_modify_backup_policy_request::__set_add_appids(const std::vector &val) -{ - this->add_appids = val; - __isset.add_appids = true; -} - -void configuration_modify_backup_policy_request::__set_removal_appids( - const std::vector &val) -{ - this->removal_appids = val; - __isset.removal_appids = true; -} - -void configuration_modify_backup_policy_request::__set_new_backup_interval_sec(const int64_t val) -{ - this->new_backup_interval_sec = val; - __isset.new_backup_interval_sec = true; -} - -void configuration_modify_backup_policy_request::__set_backup_history_count_to_keep( - const int32_t val) -{ - this->backup_history_count_to_keep = val; - __isset.backup_history_count_to_keep = true; -} -void configuration_modify_backup_policy_request::__set_is_disable(const bool val) -{ - this->is_disable = val; - __isset.is_disable = true; +void configuration_meta_control_response::__set_err(const ::dsn::error_code& val) { + this->err = val; } -void configuration_modify_backup_policy_request::__set_start_time(const std::string &val) -{ - this->start_time = val; - __isset.start_time = true; +void configuration_meta_control_response::__set_old_level(const meta_function_level::type val) { + this->old_level = val; } -uint32_t -configuration_modify_backup_policy_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->add_appids.clear(); - uint32_t _size357; - ::apache::thrift::protocol::TType _etype360; - xfer += iprot->readListBegin(_etype360, _size357); - this->add_appids.resize(_size357); - uint32_t _i361; - for (_i361 = 0; _i361 < _size357; ++_i361) { - xfer += iprot->readI32(this->add_appids[_i361]); - } - xfer += iprot->readListEnd(); - } - this->__isset.add_appids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->removal_appids.clear(); - uint32_t _size362; - ::apache::thrift::protocol::TType _etype365; - xfer += iprot->readListBegin(_etype365, _size362); - this->removal_appids.resize(_size362); - uint32_t _i366; - for (_i366 = 0; _i366 < _size362; ++_i366) { - xfer += iprot->readI32(this->removal_appids[_i366]); - } - xfer += iprot->readListEnd(); - } - this->__isset.removal_appids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->new_backup_interval_sec); - this->__isset.new_backup_interval_sec = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->backup_history_count_to_keep); - this->__isset.backup_history_count_to_keep = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_disable); - this->__isset.is_disable = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->start_time); - this->__isset.start_time = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +uint32_t configuration_meta_control_response::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += iprot->readStructEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - return xfer; -} + xfer += iprot->readStructBegin(fname); -uint32_t configuration_modify_backup_policy_request::write( - ::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_modify_backup_policy_request"); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); - if (this->__isset.add_appids) { - xfer += oprot->writeFieldBegin("add_appids", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, - static_cast(this->add_appids.size())); - std::vector::const_iterator _iter367; - for (_iter367 = this->add_appids.begin(); _iter367 != this->add_appids.end(); - ++_iter367) { - xfer += oprot->writeI32((*_iter367)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - if (this->__isset.removal_appids) { - xfer += oprot->writeFieldBegin("removal_appids", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, - static_cast(this->removal_appids.size())); - std::vector::const_iterator _iter368; - for (_iter368 = this->removal_appids.begin(); _iter368 != this->removal_appids.end(); - ++_iter368) { - xfer += oprot->writeI32((*_iter368)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.new_backup_interval_sec) { - xfer += - oprot->writeFieldBegin("new_backup_interval_sec", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->new_backup_interval_sec); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.backup_history_count_to_keep) { - xfer += oprot->writeFieldBegin( - "backup_history_count_to_keep", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32(this->backup_history_count_to_keep); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.is_disable) { - xfer += oprot->writeFieldBegin("is_disable", ::apache::thrift::protocol::T_BOOL, 6); - xfer += oprot->writeBool(this->is_disable); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.start_time) { - xfer += oprot->writeFieldBegin("start_time", ::apache::thrift::protocol::T_STRING, 7); - xfer += oprot->writeString(this->start_time); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_modify_backup_policy_request &a, - configuration_modify_backup_policy_request &b) -{ - using ::std::swap; - swap(a.policy_name, b.policy_name); - swap(a.add_appids, b.add_appids); - swap(a.removal_appids, b.removal_appids); - swap(a.new_backup_interval_sec, b.new_backup_interval_sec); - swap(a.backup_history_count_to_keep, b.backup_history_count_to_keep); - swap(a.is_disable, b.is_disable); - swap(a.start_time, b.start_time); - swap(a.__isset, b.__isset); -} - -configuration_modify_backup_policy_request::configuration_modify_backup_policy_request( - const configuration_modify_backup_policy_request &other369) -{ - policy_name = other369.policy_name; - add_appids = other369.add_appids; - removal_appids = other369.removal_appids; - new_backup_interval_sec = other369.new_backup_interval_sec; - backup_history_count_to_keep = other369.backup_history_count_to_keep; - is_disable = other369.is_disable; - start_time = other369.start_time; - __isset = other369.__isset; -} -configuration_modify_backup_policy_request::configuration_modify_backup_policy_request( - configuration_modify_backup_policy_request &&other370) -{ - policy_name = std::move(other370.policy_name); - add_appids = std::move(other370.add_appids); - removal_appids = std::move(other370.removal_appids); - new_backup_interval_sec = std::move(other370.new_backup_interval_sec); - backup_history_count_to_keep = std::move(other370.backup_history_count_to_keep); - is_disable = std::move(other370.is_disable); - start_time = std::move(other370.start_time); - __isset = std::move(other370.__isset); -} -configuration_modify_backup_policy_request &configuration_modify_backup_policy_request:: -operator=(const configuration_modify_backup_policy_request &other371) -{ - policy_name = other371.policy_name; - add_appids = other371.add_appids; - removal_appids = other371.removal_appids; - new_backup_interval_sec = other371.new_backup_interval_sec; - backup_history_count_to_keep = other371.backup_history_count_to_keep; - is_disable = other371.is_disable; - start_time = other371.start_time; - __isset = other371.__isset; - return *this; -} -configuration_modify_backup_policy_request &configuration_modify_backup_policy_request:: -operator=(configuration_modify_backup_policy_request &&other372) -{ - policy_name = std::move(other372.policy_name); - add_appids = std::move(other372.add_appids); - removal_appids = std::move(other372.removal_appids); - new_backup_interval_sec = std::move(other372.new_backup_interval_sec); - backup_history_count_to_keep = std::move(other372.backup_history_count_to_keep); - is_disable = std::move(other372.is_disable); - start_time = std::move(other372.start_time); - __isset = std::move(other372.__isset); - return *this; -} -void configuration_modify_backup_policy_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_modify_backup_policy_request("; - out << "policy_name=" << to_string(policy_name); - out << ", " - << "add_appids="; - (__isset.add_appids ? (out << to_string(add_appids)) : (out << "")); - out << ", " - << "removal_appids="; - (__isset.removal_appids ? (out << to_string(removal_appids)) : (out << "")); - out << ", " - << "new_backup_interval_sec="; - (__isset.new_backup_interval_sec ? (out << to_string(new_backup_interval_sec)) - : (out << "")); - out << ", " - << "backup_history_count_to_keep="; - (__isset.backup_history_count_to_keep ? (out << to_string(backup_history_count_to_keep)) - : (out << "")); - out << ", " - << "is_disable="; - (__isset.is_disable ? (out << to_string(is_disable)) : (out << "")); - out << ", " - << "start_time="; - (__isset.start_time ? (out << to_string(start_time)) : (out << "")); - out << ")"; -} - -configuration_modify_backup_policy_response::~configuration_modify_backup_policy_response() throw() -{ -} - -void configuration_modify_backup_policy_response::__set_err(const ::dsn::error_code &val) -{ - this->err = val; -} - -void configuration_modify_backup_policy_response::__set_hint_message(const std::string &val) -{ - this->hint_message = val; -} - -uint32_t -configuration_modify_backup_policy_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint_message); - this->__isset.hint_message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast179; + xfer += iprot->readI32(ecast179); + this->old_level = (meta_function_level::type)ecast179; + this->__isset.old_level = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_modify_backup_policy_response::write( - ::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_modify_backup_policy_response"); +uint32_t configuration_meta_control_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_meta_control_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->hint_message); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("old_level", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->old_level); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_modify_backup_policy_response &a, - configuration_modify_backup_policy_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.hint_message, b.hint_message); - swap(a.__isset, b.__isset); +void swap(configuration_meta_control_response &a, configuration_meta_control_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.old_level, b.old_level); + swap(a.__isset, b.__isset); } -configuration_modify_backup_policy_response::configuration_modify_backup_policy_response( - const configuration_modify_backup_policy_response &other373) -{ - err = other373.err; - hint_message = other373.hint_message; - __isset = other373.__isset; +configuration_meta_control_response::configuration_meta_control_response(const configuration_meta_control_response& other180) { + err = other180.err; + old_level = other180.old_level; + __isset = other180.__isset; } -configuration_modify_backup_policy_response::configuration_modify_backup_policy_response( - configuration_modify_backup_policy_response &&other374) -{ - err = std::move(other374.err); - hint_message = std::move(other374.hint_message); - __isset = std::move(other374.__isset); +configuration_meta_control_response::configuration_meta_control_response( configuration_meta_control_response&& other181) { + err = std::move(other181.err); + old_level = std::move(other181.old_level); + __isset = std::move(other181.__isset); } -configuration_modify_backup_policy_response &configuration_modify_backup_policy_response:: -operator=(const configuration_modify_backup_policy_response &other375) -{ - err = other375.err; - hint_message = other375.hint_message; - __isset = other375.__isset; - return *this; +configuration_meta_control_response& configuration_meta_control_response::operator=(const configuration_meta_control_response& other182) { + err = other182.err; + old_level = other182.old_level; + __isset = other182.__isset; + return *this; } -configuration_modify_backup_policy_response &configuration_modify_backup_policy_response:: -operator=(configuration_modify_backup_policy_response &&other376) -{ - err = std::move(other376.err); - hint_message = std::move(other376.hint_message); - __isset = std::move(other376.__isset); - return *this; +configuration_meta_control_response& configuration_meta_control_response::operator=(configuration_meta_control_response&& other183) { + err = std::move(other183.err); + old_level = std::move(other183.old_level); + __isset = std::move(other183.__isset); + return *this; } -void configuration_modify_backup_policy_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_modify_backup_policy_response("; - out << "err=" << to_string(err); - out << ", " - << "hint_message=" << to_string(hint_message); - out << ")"; +void configuration_meta_control_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_meta_control_response("; + out << "err=" << to_string(err); + out << ", " << "old_level=" << to_string(old_level); + out << ")"; } -configuration_add_backup_policy_request::~configuration_add_backup_policy_request() throw() {} -void configuration_add_backup_policy_request::__set_backup_provider_type(const std::string &val) -{ - this->backup_provider_type = val; +configuration_proposal_action::~configuration_proposal_action() throw() { } -void configuration_add_backup_policy_request::__set_policy_name(const std::string &val) -{ - this->policy_name = val; -} -void configuration_add_backup_policy_request::__set_app_ids(const std::vector &val) -{ - this->app_ids = val; +void configuration_proposal_action::__set_target(const ::dsn::rpc_address& val) { + this->target = val; } -void configuration_add_backup_policy_request::__set_backup_interval_seconds(const int64_t val) -{ - this->backup_interval_seconds = val; +void configuration_proposal_action::__set_node(const ::dsn::rpc_address& val) { + this->node = val; } -void configuration_add_backup_policy_request::__set_backup_history_count_to_keep(const int32_t val) -{ - this->backup_history_count_to_keep = val; +void configuration_proposal_action::__set_type(const config_type::type val) { + this->type = val; } -void configuration_add_backup_policy_request::__set_start_time(const std::string &val) -{ - this->start_time = val; -} +uint32_t configuration_proposal_action::read(::apache::thrift::protocol::TProtocol* iprot) { -uint32_t configuration_add_backup_policy_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += iprot->readStructBegin(fname); - xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->backup_provider_type); - this->__isset.backup_provider_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->app_ids.clear(); - uint32_t _size377; - ::apache::thrift::protocol::TType _etype380; - xfer += iprot->readListBegin(_etype380, _size377); - this->app_ids.resize(_size377); - uint32_t _i381; - for (_i381 = 0; _i381 < _size377; ++_i381) { - xfer += iprot->readI32(this->app_ids[_i381]); - } - xfer += iprot->readListEnd(); - } - this->__isset.app_ids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->backup_interval_seconds); - this->__isset.backup_interval_seconds = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->backup_history_count_to_keep); - this->__isset.backup_history_count_to_keep = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->start_time); - this->__isset.start_time = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->target.read(iprot); + this->__isset.target = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast184; + xfer += iprot->readI32(ecast184); + this->type = (config_type::type)ecast184; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t -configuration_add_backup_policy_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_add_backup_policy_request"); +uint32_t configuration_proposal_action::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_proposal_action"); - xfer += oprot->writeFieldBegin("backup_provider_type", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->backup_provider_type); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("target", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->target.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_proposal_action &a, configuration_proposal_action &b) { + using ::std::swap; + swap(a.target, b.target); + swap(a.node, b.node); + swap(a.type, b.type); + swap(a.__isset, b.__isset); +} + +configuration_proposal_action::configuration_proposal_action(const configuration_proposal_action& other185) { + target = other185.target; + node = other185.node; + type = other185.type; + __isset = other185.__isset; +} +configuration_proposal_action::configuration_proposal_action( configuration_proposal_action&& other186) { + target = std::move(other186.target); + node = std::move(other186.node); + type = std::move(other186.type); + __isset = std::move(other186.__isset); +} +configuration_proposal_action& configuration_proposal_action::operator=(const configuration_proposal_action& other187) { + target = other187.target; + node = other187.node; + type = other187.type; + __isset = other187.__isset; + return *this; +} +configuration_proposal_action& configuration_proposal_action::operator=(configuration_proposal_action&& other188) { + target = std::move(other188.target); + node = std::move(other188.node); + type = std::move(other188.type); + __isset = std::move(other188.__isset); + return *this; +} +void configuration_proposal_action::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_proposal_action("; + out << "target=" << to_string(target); + out << ", " << "node=" << to_string(node); + out << ", " << "type=" << to_string(type); + out << ")"; +} + + +configuration_balancer_request::~configuration_balancer_request() throw() { +} + + +void configuration_balancer_request::__set_gpid(const ::dsn::gpid& val) { + this->gpid = val; +} + +void configuration_balancer_request::__set_action_list(const std::vector & val) { + this->action_list = val; +} + +void configuration_balancer_request::__set_force(const bool val) { + this->force = val; +__isset.force = true; +} + +void configuration_balancer_request::__set_balance_type(const balancer_request_type::type val) { + this->balance_type = val; +__isset.balance_type = true; +} + +uint32_t configuration_balancer_request::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->policy_name); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->gpid.read(iprot); + this->__isset.gpid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->action_list.clear(); + uint32_t _size189; + ::apache::thrift::protocol::TType _etype192; + xfer += iprot->readListBegin(_etype192, _size189); + this->action_list.resize(_size189); + uint32_t _i193; + for (_i193 = 0; _i193 < _size189; ++_i193) + { + xfer += this->action_list[_i193].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.action_list = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->force); + this->__isset.force = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast194; + xfer += iprot->readI32(ecast194); + this->balance_type = (balancer_request_type::type)ecast194; + this->__isset.balance_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_balancer_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_balancer_request"); + + xfer += oprot->writeFieldBegin("gpid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->gpid.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("action_list", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->action_list.size())); + std::vector ::const_iterator _iter195; + for (_iter195 = this->action_list.begin(); _iter195 != this->action_list.end(); ++_iter195) + { + xfer += (*_iter195).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.force) { + xfer += oprot->writeFieldBegin("force", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->force); xfer += oprot->writeFieldEnd(); + } + if (this->__isset.balance_type) { + xfer += oprot->writeFieldBegin("balance_type", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((int32_t)this->balance_type); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_balancer_request &a, configuration_balancer_request &b) { + using ::std::swap; + swap(a.gpid, b.gpid); + swap(a.action_list, b.action_list); + swap(a.force, b.force); + swap(a.balance_type, b.balance_type); + swap(a.__isset, b.__isset); +} + +configuration_balancer_request::configuration_balancer_request(const configuration_balancer_request& other196) { + gpid = other196.gpid; + action_list = other196.action_list; + force = other196.force; + balance_type = other196.balance_type; + __isset = other196.__isset; +} +configuration_balancer_request::configuration_balancer_request( configuration_balancer_request&& other197) { + gpid = std::move(other197.gpid); + action_list = std::move(other197.action_list); + force = std::move(other197.force); + balance_type = std::move(other197.balance_type); + __isset = std::move(other197.__isset); +} +configuration_balancer_request& configuration_balancer_request::operator=(const configuration_balancer_request& other198) { + gpid = other198.gpid; + action_list = other198.action_list; + force = other198.force; + balance_type = other198.balance_type; + __isset = other198.__isset; + return *this; +} +configuration_balancer_request& configuration_balancer_request::operator=(configuration_balancer_request&& other199) { + gpid = std::move(other199.gpid); + action_list = std::move(other199.action_list); + force = std::move(other199.force); + balance_type = std::move(other199.balance_type); + __isset = std::move(other199.__isset); + return *this; +} +void configuration_balancer_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_balancer_request("; + out << "gpid=" << to_string(gpid); + out << ", " << "action_list=" << to_string(action_list); + out << ", " << "force="; (__isset.force ? (out << to_string(force)) : (out << "")); + out << ", " << "balance_type="; (__isset.balance_type ? (out << to_string(balance_type)) : (out << "")); + out << ")"; +} + + +configuration_balancer_response::~configuration_balancer_response() throw() { +} + + +void configuration_balancer_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +uint32_t configuration_balancer_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_balancer_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_balancer_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_balancer_response &a, configuration_balancer_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.__isset, b.__isset); +} + +configuration_balancer_response::configuration_balancer_response(const configuration_balancer_response& other200) { + err = other200.err; + __isset = other200.__isset; +} +configuration_balancer_response::configuration_balancer_response( configuration_balancer_response&& other201) { + err = std::move(other201.err); + __isset = std::move(other201.__isset); +} +configuration_balancer_response& configuration_balancer_response::operator=(const configuration_balancer_response& other202) { + err = other202.err; + __isset = other202.__isset; + return *this; +} +configuration_balancer_response& configuration_balancer_response::operator=(configuration_balancer_response&& other203) { + err = std::move(other203.err); + __isset = std::move(other203.__isset); + return *this; +} +void configuration_balancer_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_balancer_response("; + out << "err=" << to_string(err); + out << ")"; +} + + +configuration_drop_app_response::~configuration_drop_app_response() throw() { +} + + +void configuration_drop_app_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +uint32_t configuration_drop_app_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_drop_app_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_drop_app_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_drop_app_response &a, configuration_drop_app_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.__isset, b.__isset); +} + +configuration_drop_app_response::configuration_drop_app_response(const configuration_drop_app_response& other204) { + err = other204.err; + __isset = other204.__isset; +} +configuration_drop_app_response::configuration_drop_app_response( configuration_drop_app_response&& other205) { + err = std::move(other205.err); + __isset = std::move(other205.__isset); +} +configuration_drop_app_response& configuration_drop_app_response::operator=(const configuration_drop_app_response& other206) { + err = other206.err; + __isset = other206.__isset; + return *this; +} +configuration_drop_app_response& configuration_drop_app_response::operator=(configuration_drop_app_response&& other207) { + err = std::move(other207.err); + __isset = std::move(other207.__isset); + return *this; +} +void configuration_drop_app_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_drop_app_response("; + out << "err=" << to_string(err); + out << ")"; +} + + +configuration_list_apps_response::~configuration_list_apps_response() throw() { +} + + +void configuration_list_apps_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} - xfer += oprot->writeFieldBegin("app_ids", ::apache::thrift::protocol::T_LIST, 3); +void configuration_list_apps_response::__set_infos(const std::vector< ::dsn::app_info> & val) { + this->infos = val; +} + +uint32_t configuration_list_apps_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, - static_cast(this->app_ids.size())); - std::vector::const_iterator _iter382; - for (_iter382 = this->app_ids.begin(); _iter382 != this->app_ids.end(); ++_iter382) { - xfer += oprot->writeI32((*_iter382)); + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->infos.clear(); + uint32_t _size208; + ::apache::thrift::protocol::TType _etype211; + xfer += iprot->readListBegin(_etype211, _size208); + this->infos.resize(_size208); + uint32_t _i212; + for (_i212 = 0; _i212 < _size208; ++_i212) + { + xfer += this->infos[_i212].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.infos = true; + } else { + xfer += iprot->skip(ftype); } - xfer += oprot->writeListEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } - xfer += oprot->writeFieldEnd(); + xfer += iprot->readFieldEnd(); + } - xfer += oprot->writeFieldBegin("backup_interval_seconds", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->backup_interval_seconds); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructEnd(); - xfer += oprot->writeFieldBegin( - "backup_history_count_to_keep", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32(this->backup_history_count_to_keep); - xfer += oprot->writeFieldEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("start_time", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->start_time); - xfer += oprot->writeFieldEnd(); +uint32_t configuration_list_apps_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_list_apps_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("infos", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->infos.size())); + std::vector< ::dsn::app_info> ::const_iterator _iter213; + for (_iter213 = this->infos.begin(); _iter213 != this->infos.end(); ++_iter213) + { + xfer += (*_iter213).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_list_apps_response &a, configuration_list_apps_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.infos, b.infos); + swap(a.__isset, b.__isset); +} + +configuration_list_apps_response::configuration_list_apps_response(const configuration_list_apps_response& other214) { + err = other214.err; + infos = other214.infos; + __isset = other214.__isset; +} +configuration_list_apps_response::configuration_list_apps_response( configuration_list_apps_response&& other215) { + err = std::move(other215.err); + infos = std::move(other215.infos); + __isset = std::move(other215.__isset); +} +configuration_list_apps_response& configuration_list_apps_response::operator=(const configuration_list_apps_response& other216) { + err = other216.err; + infos = other216.infos; + __isset = other216.__isset; + return *this; +} +configuration_list_apps_response& configuration_list_apps_response::operator=(configuration_list_apps_response&& other217) { + err = std::move(other217.err); + infos = std::move(other217.infos); + __isset = std::move(other217.__isset); + return *this; +} +void configuration_list_apps_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_list_apps_response("; + out << "err=" << to_string(err); + out << ", " << "infos=" << to_string(infos); + out << ")"; +} + + +configuration_list_nodes_response::~configuration_list_nodes_response() throw() { +} + + +void configuration_list_nodes_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void configuration_list_nodes_response::__set_infos(const std::vector & val) { + this->infos = val; +} + +uint32_t configuration_list_nodes_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_add_backup_policy_request &a, configuration_add_backup_policy_request &b) -{ - using ::std::swap; - swap(a.backup_provider_type, b.backup_provider_type); - swap(a.policy_name, b.policy_name); - swap(a.app_ids, b.app_ids); - swap(a.backup_interval_seconds, b.backup_interval_seconds); - swap(a.backup_history_count_to_keep, b.backup_history_count_to_keep); - swap(a.start_time, b.start_time); - swap(a.__isset, b.__isset); -} - -configuration_add_backup_policy_request::configuration_add_backup_policy_request( - const configuration_add_backup_policy_request &other383) -{ - backup_provider_type = other383.backup_provider_type; - policy_name = other383.policy_name; - app_ids = other383.app_ids; - backup_interval_seconds = other383.backup_interval_seconds; - backup_history_count_to_keep = other383.backup_history_count_to_keep; - start_time = other383.start_time; - __isset = other383.__isset; -} -configuration_add_backup_policy_request::configuration_add_backup_policy_request( - configuration_add_backup_policy_request &&other384) -{ - backup_provider_type = std::move(other384.backup_provider_type); - policy_name = std::move(other384.policy_name); - app_ids = std::move(other384.app_ids); - backup_interval_seconds = std::move(other384.backup_interval_seconds); - backup_history_count_to_keep = std::move(other384.backup_history_count_to_keep); - start_time = std::move(other384.start_time); - __isset = std::move(other384.__isset); -} -configuration_add_backup_policy_request &configuration_add_backup_policy_request:: -operator=(const configuration_add_backup_policy_request &other385) -{ - backup_provider_type = other385.backup_provider_type; - policy_name = other385.policy_name; - app_ids = other385.app_ids; - backup_interval_seconds = other385.backup_interval_seconds; - backup_history_count_to_keep = other385.backup_history_count_to_keep; - start_time = other385.start_time; - __isset = other385.__isset; - return *this; -} -configuration_add_backup_policy_request &configuration_add_backup_policy_request:: -operator=(configuration_add_backup_policy_request &&other386) -{ - backup_provider_type = std::move(other386.backup_provider_type); - policy_name = std::move(other386.policy_name); - app_ids = std::move(other386.app_ids); - backup_interval_seconds = std::move(other386.backup_interval_seconds); - backup_history_count_to_keep = std::move(other386.backup_history_count_to_keep); - start_time = std::move(other386.start_time); - __isset = std::move(other386.__isset); - return *this; -} -void configuration_add_backup_policy_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_add_backup_policy_request("; - out << "backup_provider_type=" << to_string(backup_provider_type); - out << ", " - << "policy_name=" << to_string(policy_name); - out << ", " - << "app_ids=" << to_string(app_ids); - out << ", " - << "backup_interval_seconds=" << to_string(backup_interval_seconds); - out << ", " - << "backup_history_count_to_keep=" << to_string(backup_history_count_to_keep); - out << ", " - << "start_time=" << to_string(start_time); - out << ")"; -} - -configuration_add_backup_policy_response::~configuration_add_backup_policy_response() throw() {} - -void configuration_add_backup_policy_response::__set_err(const ::dsn::error_code &val) -{ - this->err = val; -} - -void configuration_add_backup_policy_response::__set_hint_message(const std::string &val) -{ - this->hint_message = val; -} - -uint32_t -configuration_add_backup_policy_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->infos.clear(); + uint32_t _size218; + ::apache::thrift::protocol::TType _etype221; + xfer += iprot->readListBegin(_etype221, _size218); + this->infos.resize(_size218); + uint32_t _i222; + for (_i222 = 0; _i222 < _size218; ++_i222) + { + xfer += this->infos[_i222].read(iprot); } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint_message); - this->__isset.hint_message = true; - } else { - xfer += iprot->skip(ftype); + xfer += iprot->readListEnd(); + } + this->__isset.infos = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_list_nodes_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_list_nodes_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("infos", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->infos.size())); + std::vector ::const_iterator _iter223; + for (_iter223 = this->infos.begin(); _iter223 != this->infos.end(); ++_iter223) + { + xfer += (*_iter223).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_list_nodes_response &a, configuration_list_nodes_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.infos, b.infos); + swap(a.__isset, b.__isset); +} + +configuration_list_nodes_response::configuration_list_nodes_response(const configuration_list_nodes_response& other224) { + err = other224.err; + infos = other224.infos; + __isset = other224.__isset; +} +configuration_list_nodes_response::configuration_list_nodes_response( configuration_list_nodes_response&& other225) { + err = std::move(other225.err); + infos = std::move(other225.infos); + __isset = std::move(other225.__isset); +} +configuration_list_nodes_response& configuration_list_nodes_response::operator=(const configuration_list_nodes_response& other226) { + err = other226.err; + infos = other226.infos; + __isset = other226.__isset; + return *this; +} +configuration_list_nodes_response& configuration_list_nodes_response::operator=(configuration_list_nodes_response&& other227) { + err = std::move(other227.err); + infos = std::move(other227.infos); + __isset = std::move(other227.__isset); + return *this; +} +void configuration_list_nodes_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_list_nodes_response("; + out << "err=" << to_string(err); + out << ", " << "infos=" << to_string(infos); + out << ")"; +} + + +configuration_cluster_info_response::~configuration_cluster_info_response() throw() { +} + + +void configuration_cluster_info_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void configuration_cluster_info_response::__set_keys(const std::vector & val) { + this->keys = val; +} + +void configuration_cluster_info_response::__set_values(const std::vector & val) { + this->values = val; +} + +uint32_t configuration_cluster_info_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->keys.clear(); + uint32_t _size228; + ::apache::thrift::protocol::TType _etype231; + xfer += iprot->readListBegin(_etype231, _size228); + this->keys.resize(_size228); + uint32_t _i232; + for (_i232 = 0; _i232 < _size228; ++_i232) + { + xfer += iprot->readString(this->keys[_i232]); + } + xfer += iprot->readListEnd(); + } + this->__isset.keys = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->values.clear(); + uint32_t _size233; + ::apache::thrift::protocol::TType _etype236; + xfer += iprot->readListBegin(_etype236, _size233); + this->values.resize(_size233); + uint32_t _i237; + for (_i237 = 0; _i237 < _size233; ++_i237) + { + xfer += iprot->readString(this->values[_i237]); } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readListEnd(); + } + this->__isset.values = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t -configuration_add_backup_policy_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_add_backup_policy_response"); +uint32_t configuration_cluster_info_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_cluster_info_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->hint_message); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("keys", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->keys.size())); + std::vector ::const_iterator _iter238; + for (_iter238 = this->keys.begin(); _iter238 != this->keys.end(); ++_iter238) + { + xfer += oprot->writeString((*_iter238)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->values.size())); + std::vector ::const_iterator _iter239; + for (_iter239 = this->values.begin(); _iter239 != this->values.end(); ++_iter239) + { + xfer += oprot->writeString((*_iter239)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_add_backup_policy_response &a, configuration_add_backup_policy_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.hint_message, b.hint_message); - swap(a.__isset, b.__isset); +void swap(configuration_cluster_info_response &a, configuration_cluster_info_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.keys, b.keys); + swap(a.values, b.values); + swap(a.__isset, b.__isset); } -configuration_add_backup_policy_response::configuration_add_backup_policy_response( - const configuration_add_backup_policy_response &other387) -{ - err = other387.err; - hint_message = other387.hint_message; - __isset = other387.__isset; +configuration_cluster_info_response::configuration_cluster_info_response(const configuration_cluster_info_response& other240) { + err = other240.err; + keys = other240.keys; + values = other240.values; + __isset = other240.__isset; +} +configuration_cluster_info_response::configuration_cluster_info_response( configuration_cluster_info_response&& other241) { + err = std::move(other241.err); + keys = std::move(other241.keys); + values = std::move(other241.values); + __isset = std::move(other241.__isset); +} +configuration_cluster_info_response& configuration_cluster_info_response::operator=(const configuration_cluster_info_response& other242) { + err = other242.err; + keys = other242.keys; + values = other242.values; + __isset = other242.__isset; + return *this; } -configuration_add_backup_policy_response::configuration_add_backup_policy_response( - configuration_add_backup_policy_response &&other388) -{ - err = std::move(other388.err); - hint_message = std::move(other388.hint_message); - __isset = std::move(other388.__isset); +configuration_cluster_info_response& configuration_cluster_info_response::operator=(configuration_cluster_info_response&& other243) { + err = std::move(other243.err); + keys = std::move(other243.keys); + values = std::move(other243.values); + __isset = std::move(other243.__isset); + return *this; +} +void configuration_cluster_info_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_cluster_info_response("; + out << "err=" << to_string(err); + out << ", " << "keys=" << to_string(keys); + out << ", " << "values=" << to_string(values); + out << ")"; +} + + +configuration_recall_app_response::~configuration_recall_app_response() throw() { } -configuration_add_backup_policy_response &configuration_add_backup_policy_response:: -operator=(const configuration_add_backup_policy_response &other389) -{ - err = other389.err; - hint_message = other389.hint_message; - __isset = other389.__isset; - return *this; + + +void configuration_recall_app_response::__set_err(const ::dsn::error_code& val) { + this->err = val; } -configuration_add_backup_policy_response &configuration_add_backup_policy_response:: -operator=(configuration_add_backup_policy_response &&other390) -{ - err = std::move(other390.err); - hint_message = std::move(other390.hint_message); - __isset = std::move(other390.__isset); - return *this; + +void configuration_recall_app_response::__set_info(const ::dsn::app_info& val) { + this->info = val; } -void configuration_add_backup_policy_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_add_backup_policy_response("; - out << "err=" << to_string(err); - out << ", " - << "hint_message=" << to_string(hint_message); - out << ")"; + +uint32_t configuration_recall_app_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->info.read(iprot); + this->__isset.info = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; } -policy_entry::~policy_entry() throw() {} +uint32_t configuration_recall_app_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_recall_app_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); -void policy_entry::__set_policy_name(const std::string &val) { this->policy_name = val; } + xfer += oprot->writeFieldBegin("info", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->info.write(oprot); + xfer += oprot->writeFieldEnd(); -void policy_entry::__set_backup_provider_type(const std::string &val) -{ - this->backup_provider_type = val; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void policy_entry::__set_backup_interval_seconds(const std::string &val) -{ - this->backup_interval_seconds = val; +void swap(configuration_recall_app_response &a, configuration_recall_app_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.info, b.info); + swap(a.__isset, b.__isset); } -void policy_entry::__set_app_ids(const std::set &val) { this->app_ids = val; } +configuration_recall_app_response::configuration_recall_app_response(const configuration_recall_app_response& other244) { + err = other244.err; + info = other244.info; + __isset = other244.__isset; +} +configuration_recall_app_response::configuration_recall_app_response( configuration_recall_app_response&& other245) { + err = std::move(other245.err); + info = std::move(other245.info); + __isset = std::move(other245.__isset); +} +configuration_recall_app_response& configuration_recall_app_response::operator=(const configuration_recall_app_response& other246) { + err = other246.err; + info = other246.info; + __isset = other246.__isset; + return *this; +} +configuration_recall_app_response& configuration_recall_app_response::operator=(configuration_recall_app_response&& other247) { + err = std::move(other247.err); + info = std::move(other247.info); + __isset = std::move(other247.__isset); + return *this; +} +void configuration_recall_app_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_recall_app_response("; + out << "err=" << to_string(err); + out << ", " << "info=" << to_string(info); + out << ")"; +} + + +query_replica_decree_request::~query_replica_decree_request() throw() { +} + + +void query_replica_decree_request::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} + +void query_replica_decree_request::__set_node(const ::dsn::rpc_address& val) { + this->node = val; +} + +uint32_t query_replica_decree_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t query_replica_decree_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_replica_decree_request"); + + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(query_replica_decree_request &a, query_replica_decree_request &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.node, b.node); + swap(a.__isset, b.__isset); +} + +query_replica_decree_request::query_replica_decree_request(const query_replica_decree_request& other248) { + pid = other248.pid; + node = other248.node; + __isset = other248.__isset; +} +query_replica_decree_request::query_replica_decree_request( query_replica_decree_request&& other249) { + pid = std::move(other249.pid); + node = std::move(other249.node); + __isset = std::move(other249.__isset); +} +query_replica_decree_request& query_replica_decree_request::operator=(const query_replica_decree_request& other250) { + pid = other250.pid; + node = other250.node; + __isset = other250.__isset; + return *this; +} +query_replica_decree_request& query_replica_decree_request::operator=(query_replica_decree_request&& other251) { + pid = std::move(other251.pid); + node = std::move(other251.node); + __isset = std::move(other251.__isset); + return *this; +} +void query_replica_decree_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "query_replica_decree_request("; + out << "pid=" << to_string(pid); + out << ", " << "node=" << to_string(node); + out << ")"; +} + + +query_replica_decree_response::~query_replica_decree_response() throw() { +} + + +void query_replica_decree_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void query_replica_decree_response::__set_last_decree(const int64_t val) { + this->last_decree = val; +} + +uint32_t query_replica_decree_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_decree); + this->__isset.last_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t query_replica_decree_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_replica_decree_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("last_decree", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->last_decree); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(query_replica_decree_response &a, query_replica_decree_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.last_decree, b.last_decree); + swap(a.__isset, b.__isset); +} + +query_replica_decree_response::query_replica_decree_response(const query_replica_decree_response& other252) { + err = other252.err; + last_decree = other252.last_decree; + __isset = other252.__isset; +} +query_replica_decree_response::query_replica_decree_response( query_replica_decree_response&& other253) { + err = std::move(other253.err); + last_decree = std::move(other253.last_decree); + __isset = std::move(other253.__isset); +} +query_replica_decree_response& query_replica_decree_response::operator=(const query_replica_decree_response& other254) { + err = other254.err; + last_decree = other254.last_decree; + __isset = other254.__isset; + return *this; +} +query_replica_decree_response& query_replica_decree_response::operator=(query_replica_decree_response&& other255) { + err = std::move(other255.err); + last_decree = std::move(other255.last_decree); + __isset = std::move(other255.__isset); + return *this; +} +void query_replica_decree_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "query_replica_decree_response("; + out << "err=" << to_string(err); + out << ", " << "last_decree=" << to_string(last_decree); + out << ")"; +} + + +replica_info::~replica_info() throw() { +} + + +void replica_info::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} + +void replica_info::__set_ballot(const int64_t val) { + this->ballot = val; +} + +void replica_info::__set_status(const partition_status::type val) { + this->status = val; +} + +void replica_info::__set_last_committed_decree(const int64_t val) { + this->last_committed_decree = val; +} + +void replica_info::__set_last_prepared_decree(const int64_t val) { + this->last_prepared_decree = val; +} + +void replica_info::__set_last_durable_decree(const int64_t val) { + this->last_durable_decree = val; +} + +void replica_info::__set_app_type(const std::string& val) { + this->app_type = val; +} + +void replica_info::__set_disk_tag(const std::string& val) { + this->disk_tag = val; +} + +uint32_t replica_info::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast256; + xfer += iprot->readI32(ecast256); + this->status = (partition_status::type)ecast256; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_prepared_decree); + this->__isset.last_prepared_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_durable_decree); + this->__isset.last_durable_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_type); + this->__isset.app_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->disk_tag); + this->__isset.disk_tag = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t replica_info::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("replica_info"); + + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("last_prepared_decree", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->last_prepared_decree); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("last_durable_decree", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->last_durable_decree); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->app_type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("disk_tag", ::apache::thrift::protocol::T_STRING, 8); + xfer += oprot->writeString(this->disk_tag); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(replica_info &a, replica_info &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.ballot, b.ballot); + swap(a.status, b.status); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.last_prepared_decree, b.last_prepared_decree); + swap(a.last_durable_decree, b.last_durable_decree); + swap(a.app_type, b.app_type); + swap(a.disk_tag, b.disk_tag); + swap(a.__isset, b.__isset); +} + +replica_info::replica_info(const replica_info& other257) { + pid = other257.pid; + ballot = other257.ballot; + status = other257.status; + last_committed_decree = other257.last_committed_decree; + last_prepared_decree = other257.last_prepared_decree; + last_durable_decree = other257.last_durable_decree; + app_type = other257.app_type; + disk_tag = other257.disk_tag; + __isset = other257.__isset; +} +replica_info::replica_info( replica_info&& other258) { + pid = std::move(other258.pid); + ballot = std::move(other258.ballot); + status = std::move(other258.status); + last_committed_decree = std::move(other258.last_committed_decree); + last_prepared_decree = std::move(other258.last_prepared_decree); + last_durable_decree = std::move(other258.last_durable_decree); + app_type = std::move(other258.app_type); + disk_tag = std::move(other258.disk_tag); + __isset = std::move(other258.__isset); +} +replica_info& replica_info::operator=(const replica_info& other259) { + pid = other259.pid; + ballot = other259.ballot; + status = other259.status; + last_committed_decree = other259.last_committed_decree; + last_prepared_decree = other259.last_prepared_decree; + last_durable_decree = other259.last_durable_decree; + app_type = other259.app_type; + disk_tag = other259.disk_tag; + __isset = other259.__isset; + return *this; +} +replica_info& replica_info::operator=(replica_info&& other260) { + pid = std::move(other260.pid); + ballot = std::move(other260.ballot); + status = std::move(other260.status); + last_committed_decree = std::move(other260.last_committed_decree); + last_prepared_decree = std::move(other260.last_prepared_decree); + last_durable_decree = std::move(other260.last_durable_decree); + app_type = std::move(other260.app_type); + disk_tag = std::move(other260.disk_tag); + __isset = std::move(other260.__isset); + return *this; +} +void replica_info::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "replica_info("; + out << "pid=" << to_string(pid); + out << ", " << "ballot=" << to_string(ballot); + out << ", " << "status=" << to_string(status); + out << ", " << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " << "last_prepared_decree=" << to_string(last_prepared_decree); + out << ", " << "last_durable_decree=" << to_string(last_durable_decree); + out << ", " << "app_type=" << to_string(app_type); + out << ", " << "disk_tag=" << to_string(disk_tag); + out << ")"; +} + + +query_replica_info_request::~query_replica_info_request() throw() { +} + + +void query_replica_info_request::__set_node(const ::dsn::rpc_address& val) { + this->node = val; +} + +uint32_t query_replica_info_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t query_replica_info_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_replica_info_request"); + + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(query_replica_info_request &a, query_replica_info_request &b) { + using ::std::swap; + swap(a.node, b.node); + swap(a.__isset, b.__isset); +} + +query_replica_info_request::query_replica_info_request(const query_replica_info_request& other261) { + node = other261.node; + __isset = other261.__isset; +} +query_replica_info_request::query_replica_info_request( query_replica_info_request&& other262) { + node = std::move(other262.node); + __isset = std::move(other262.__isset); +} +query_replica_info_request& query_replica_info_request::operator=(const query_replica_info_request& other263) { + node = other263.node; + __isset = other263.__isset; + return *this; +} +query_replica_info_request& query_replica_info_request::operator=(query_replica_info_request&& other264) { + node = std::move(other264.node); + __isset = std::move(other264.__isset); + return *this; +} +void query_replica_info_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "query_replica_info_request("; + out << "node=" << to_string(node); + out << ")"; +} + + +query_replica_info_response::~query_replica_info_response() throw() { +} + + +void query_replica_info_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void query_replica_info_response::__set_replicas(const std::vector & val) { + this->replicas = val; +} + +uint32_t query_replica_info_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->replicas.clear(); + uint32_t _size265; + ::apache::thrift::protocol::TType _etype268; + xfer += iprot->readListBegin(_etype268, _size265); + this->replicas.resize(_size265); + uint32_t _i269; + for (_i269 = 0; _i269 < _size265; ++_i269) + { + xfer += this->replicas[_i269].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.replicas = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t query_replica_info_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_replica_info_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("replicas", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->replicas.size())); + std::vector ::const_iterator _iter270; + for (_iter270 = this->replicas.begin(); _iter270 != this->replicas.end(); ++_iter270) + { + xfer += (*_iter270).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(query_replica_info_response &a, query_replica_info_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.replicas, b.replicas); + swap(a.__isset, b.__isset); +} + +query_replica_info_response::query_replica_info_response(const query_replica_info_response& other271) { + err = other271.err; + replicas = other271.replicas; + __isset = other271.__isset; +} +query_replica_info_response::query_replica_info_response( query_replica_info_response&& other272) { + err = std::move(other272.err); + replicas = std::move(other272.replicas); + __isset = std::move(other272.__isset); +} +query_replica_info_response& query_replica_info_response::operator=(const query_replica_info_response& other273) { + err = other273.err; + replicas = other273.replicas; + __isset = other273.__isset; + return *this; +} +query_replica_info_response& query_replica_info_response::operator=(query_replica_info_response&& other274) { + err = std::move(other274.err); + replicas = std::move(other274.replicas); + __isset = std::move(other274.__isset); + return *this; +} +void query_replica_info_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "query_replica_info_response("; + out << "err=" << to_string(err); + out << ", " << "replicas=" << to_string(replicas); + out << ")"; +} + + +disk_info::~disk_info() throw() { +} + + +void disk_info::__set_tag(const std::string& val) { + this->tag = val; +} + +void disk_info::__set_full_dir(const std::string& val) { + this->full_dir = val; +} + +void disk_info::__set_disk_capacity_mb(const int64_t val) { + this->disk_capacity_mb = val; +} + +void disk_info::__set_disk_available_mb(const int64_t val) { + this->disk_available_mb = val; +} + +void disk_info::__set_holding_primary_replica_counts(const std::map & val) { + this->holding_primary_replica_counts = val; +} + +void disk_info::__set_holding_secondary_replica_counts(const std::map & val) { + this->holding_secondary_replica_counts = val; +} + +uint32_t disk_info::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tag); + this->__isset.tag = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->full_dir); + this->__isset.full_dir = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->disk_capacity_mb); + this->__isset.disk_capacity_mb = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->disk_available_mb); + this->__isset.disk_available_mb = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->holding_primary_replica_counts.clear(); + uint32_t _size275; + ::apache::thrift::protocol::TType _ktype276; + ::apache::thrift::protocol::TType _vtype277; + xfer += iprot->readMapBegin(_ktype276, _vtype277, _size275); + uint32_t _i279; + for (_i279 = 0; _i279 < _size275; ++_i279) + { + int32_t _key280; + xfer += iprot->readI32(_key280); + int32_t& _val281 = this->holding_primary_replica_counts[_key280]; + xfer += iprot->readI32(_val281); + } + xfer += iprot->readMapEnd(); + } + this->__isset.holding_primary_replica_counts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->holding_secondary_replica_counts.clear(); + uint32_t _size282; + ::apache::thrift::protocol::TType _ktype283; + ::apache::thrift::protocol::TType _vtype284; + xfer += iprot->readMapBegin(_ktype283, _vtype284, _size282); + uint32_t _i286; + for (_i286 = 0; _i286 < _size282; ++_i286) + { + int32_t _key287; + xfer += iprot->readI32(_key287); + int32_t& _val288 = this->holding_secondary_replica_counts[_key287]; + xfer += iprot->readI32(_val288); + } + xfer += iprot->readMapEnd(); + } + this->__isset.holding_secondary_replica_counts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t disk_info::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("disk_info"); + + xfer += oprot->writeFieldBegin("tag", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->tag); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("full_dir", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->full_dir); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("disk_capacity_mb", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->disk_capacity_mb); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("disk_available_mb", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->disk_available_mb); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("holding_primary_replica_counts", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_I32, static_cast(this->holding_primary_replica_counts.size())); + std::map ::const_iterator _iter289; + for (_iter289 = this->holding_primary_replica_counts.begin(); _iter289 != this->holding_primary_replica_counts.end(); ++_iter289) + { + xfer += oprot->writeI32(_iter289->first); + xfer += oprot->writeI32(_iter289->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("holding_secondary_replica_counts", ::apache::thrift::protocol::T_MAP, 6); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_I32, static_cast(this->holding_secondary_replica_counts.size())); + std::map ::const_iterator _iter290; + for (_iter290 = this->holding_secondary_replica_counts.begin(); _iter290 != this->holding_secondary_replica_counts.end(); ++_iter290) + { + xfer += oprot->writeI32(_iter290->first); + xfer += oprot->writeI32(_iter290->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(disk_info &a, disk_info &b) { + using ::std::swap; + swap(a.tag, b.tag); + swap(a.full_dir, b.full_dir); + swap(a.disk_capacity_mb, b.disk_capacity_mb); + swap(a.disk_available_mb, b.disk_available_mb); + swap(a.holding_primary_replica_counts, b.holding_primary_replica_counts); + swap(a.holding_secondary_replica_counts, b.holding_secondary_replica_counts); + swap(a.__isset, b.__isset); +} + +disk_info::disk_info(const disk_info& other291) { + tag = other291.tag; + full_dir = other291.full_dir; + disk_capacity_mb = other291.disk_capacity_mb; + disk_available_mb = other291.disk_available_mb; + holding_primary_replica_counts = other291.holding_primary_replica_counts; + holding_secondary_replica_counts = other291.holding_secondary_replica_counts; + __isset = other291.__isset; +} +disk_info::disk_info( disk_info&& other292) { + tag = std::move(other292.tag); + full_dir = std::move(other292.full_dir); + disk_capacity_mb = std::move(other292.disk_capacity_mb); + disk_available_mb = std::move(other292.disk_available_mb); + holding_primary_replica_counts = std::move(other292.holding_primary_replica_counts); + holding_secondary_replica_counts = std::move(other292.holding_secondary_replica_counts); + __isset = std::move(other292.__isset); +} +disk_info& disk_info::operator=(const disk_info& other293) { + tag = other293.tag; + full_dir = other293.full_dir; + disk_capacity_mb = other293.disk_capacity_mb; + disk_available_mb = other293.disk_available_mb; + holding_primary_replica_counts = other293.holding_primary_replica_counts; + holding_secondary_replica_counts = other293.holding_secondary_replica_counts; + __isset = other293.__isset; + return *this; +} +disk_info& disk_info::operator=(disk_info&& other294) { + tag = std::move(other294.tag); + full_dir = std::move(other294.full_dir); + disk_capacity_mb = std::move(other294.disk_capacity_mb); + disk_available_mb = std::move(other294.disk_available_mb); + holding_primary_replica_counts = std::move(other294.holding_primary_replica_counts); + holding_secondary_replica_counts = std::move(other294.holding_secondary_replica_counts); + __isset = std::move(other294.__isset); + return *this; +} +void disk_info::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "disk_info("; + out << "tag=" << to_string(tag); + out << ", " << "full_dir=" << to_string(full_dir); + out << ", " << "disk_capacity_mb=" << to_string(disk_capacity_mb); + out << ", " << "disk_available_mb=" << to_string(disk_available_mb); + out << ", " << "holding_primary_replica_counts=" << to_string(holding_primary_replica_counts); + out << ", " << "holding_secondary_replica_counts=" << to_string(holding_secondary_replica_counts); + out << ")"; +} + + +query_disk_info_request::~query_disk_info_request() throw() { +} + + +void query_disk_info_request::__set_node(const ::dsn::rpc_address& val) { + this->node = val; +} + +void query_disk_info_request::__set_app_name(const std::string& val) { + this->app_name = val; +} + +uint32_t query_disk_info_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t query_disk_info_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_disk_info_request"); + + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(query_disk_info_request &a, query_disk_info_request &b) { + using ::std::swap; + swap(a.node, b.node); + swap(a.app_name, b.app_name); + swap(a.__isset, b.__isset); +} + +query_disk_info_request::query_disk_info_request(const query_disk_info_request& other295) { + node = other295.node; + app_name = other295.app_name; + __isset = other295.__isset; +} +query_disk_info_request::query_disk_info_request( query_disk_info_request&& other296) { + node = std::move(other296.node); + app_name = std::move(other296.app_name); + __isset = std::move(other296.__isset); +} +query_disk_info_request& query_disk_info_request::operator=(const query_disk_info_request& other297) { + node = other297.node; + app_name = other297.app_name; + __isset = other297.__isset; + return *this; +} +query_disk_info_request& query_disk_info_request::operator=(query_disk_info_request&& other298) { + node = std::move(other298.node); + app_name = std::move(other298.app_name); + __isset = std::move(other298.__isset); + return *this; +} +void query_disk_info_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "query_disk_info_request("; + out << "node=" << to_string(node); + out << ", " << "app_name=" << to_string(app_name); + out << ")"; +} + + +query_disk_info_response::~query_disk_info_response() throw() { +} + + +void query_disk_info_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void query_disk_info_response::__set_total_capacity_mb(const int64_t val) { + this->total_capacity_mb = val; +} + +void query_disk_info_response::__set_total_available_mb(const int64_t val) { + this->total_available_mb = val; +} + +void query_disk_info_response::__set_disk_infos(const std::vector & val) { + this->disk_infos = val; +} + +uint32_t query_disk_info_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->total_capacity_mb); + this->__isset.total_capacity_mb = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->total_available_mb); + this->__isset.total_available_mb = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->disk_infos.clear(); + uint32_t _size299; + ::apache::thrift::protocol::TType _etype302; + xfer += iprot->readListBegin(_etype302, _size299); + this->disk_infos.resize(_size299); + uint32_t _i303; + for (_i303 = 0; _i303 < _size299; ++_i303) + { + xfer += this->disk_infos[_i303].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.disk_infos = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t query_disk_info_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_disk_info_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("total_capacity_mb", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->total_capacity_mb); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("total_available_mb", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->total_available_mb); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("disk_infos", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->disk_infos.size())); + std::vector ::const_iterator _iter304; + for (_iter304 = this->disk_infos.begin(); _iter304 != this->disk_infos.end(); ++_iter304) + { + xfer += (*_iter304).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(query_disk_info_response &a, query_disk_info_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.total_capacity_mb, b.total_capacity_mb); + swap(a.total_available_mb, b.total_available_mb); + swap(a.disk_infos, b.disk_infos); + swap(a.__isset, b.__isset); +} + +query_disk_info_response::query_disk_info_response(const query_disk_info_response& other305) { + err = other305.err; + total_capacity_mb = other305.total_capacity_mb; + total_available_mb = other305.total_available_mb; + disk_infos = other305.disk_infos; + __isset = other305.__isset; +} +query_disk_info_response::query_disk_info_response( query_disk_info_response&& other306) { + err = std::move(other306.err); + total_capacity_mb = std::move(other306.total_capacity_mb); + total_available_mb = std::move(other306.total_available_mb); + disk_infos = std::move(other306.disk_infos); + __isset = std::move(other306.__isset); +} +query_disk_info_response& query_disk_info_response::operator=(const query_disk_info_response& other307) { + err = other307.err; + total_capacity_mb = other307.total_capacity_mb; + total_available_mb = other307.total_available_mb; + disk_infos = other307.disk_infos; + __isset = other307.__isset; + return *this; +} +query_disk_info_response& query_disk_info_response::operator=(query_disk_info_response&& other308) { + err = std::move(other308.err); + total_capacity_mb = std::move(other308.total_capacity_mb); + total_available_mb = std::move(other308.total_available_mb); + disk_infos = std::move(other308.disk_infos); + __isset = std::move(other308.__isset); + return *this; +} +void query_disk_info_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "query_disk_info_response("; + out << "err=" << to_string(err); + out << ", " << "total_capacity_mb=" << to_string(total_capacity_mb); + out << ", " << "total_available_mb=" << to_string(total_available_mb); + out << ", " << "disk_infos=" << to_string(disk_infos); + out << ")"; +} + + +query_app_info_request::~query_app_info_request() throw() { +} + + +void query_app_info_request::__set_meta_server(const ::dsn::rpc_address& val) { + this->meta_server = val; +} + +uint32_t query_app_info_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->meta_server.read(iprot); + this->__isset.meta_server = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t query_app_info_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_app_info_request"); + + xfer += oprot->writeFieldBegin("meta_server", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->meta_server.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(query_app_info_request &a, query_app_info_request &b) { + using ::std::swap; + swap(a.meta_server, b.meta_server); + swap(a.__isset, b.__isset); +} + +query_app_info_request::query_app_info_request(const query_app_info_request& other309) { + meta_server = other309.meta_server; + __isset = other309.__isset; +} +query_app_info_request::query_app_info_request( query_app_info_request&& other310) { + meta_server = std::move(other310.meta_server); + __isset = std::move(other310.__isset); +} +query_app_info_request& query_app_info_request::operator=(const query_app_info_request& other311) { + meta_server = other311.meta_server; + __isset = other311.__isset; + return *this; +} +query_app_info_request& query_app_info_request::operator=(query_app_info_request&& other312) { + meta_server = std::move(other312.meta_server); + __isset = std::move(other312.__isset); + return *this; +} +void query_app_info_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "query_app_info_request("; + out << "meta_server=" << to_string(meta_server); + out << ")"; +} + + +query_app_info_response::~query_app_info_response() throw() { +} + + +void query_app_info_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void query_app_info_response::__set_apps(const std::vector< ::dsn::app_info> & val) { + this->apps = val; +} + +uint32_t query_app_info_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->apps.clear(); + uint32_t _size313; + ::apache::thrift::protocol::TType _etype316; + xfer += iprot->readListBegin(_etype316, _size313); + this->apps.resize(_size313); + uint32_t _i317; + for (_i317 = 0; _i317 < _size313; ++_i317) + { + xfer += this->apps[_i317].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.apps = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t query_app_info_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_app_info_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("apps", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->apps.size())); + std::vector< ::dsn::app_info> ::const_iterator _iter318; + for (_iter318 = this->apps.begin(); _iter318 != this->apps.end(); ++_iter318) + { + xfer += (*_iter318).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(query_app_info_response &a, query_app_info_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.apps, b.apps); + swap(a.__isset, b.__isset); +} + +query_app_info_response::query_app_info_response(const query_app_info_response& other319) { + err = other319.err; + apps = other319.apps; + __isset = other319.__isset; +} +query_app_info_response::query_app_info_response( query_app_info_response&& other320) { + err = std::move(other320.err); + apps = std::move(other320.apps); + __isset = std::move(other320.__isset); +} +query_app_info_response& query_app_info_response::operator=(const query_app_info_response& other321) { + err = other321.err; + apps = other321.apps; + __isset = other321.__isset; + return *this; +} +query_app_info_response& query_app_info_response::operator=(query_app_info_response&& other322) { + err = std::move(other322.err); + apps = std::move(other322.apps); + __isset = std::move(other322.__isset); + return *this; +} +void query_app_info_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "query_app_info_response("; + out << "err=" << to_string(err); + out << ", " << "apps=" << to_string(apps); + out << ")"; +} + + +configuration_recovery_request::~configuration_recovery_request() throw() { +} + + +void configuration_recovery_request::__set_recovery_set(const std::vector< ::dsn::rpc_address> & val) { + this->recovery_set = val; +} + +void configuration_recovery_request::__set_skip_bad_nodes(const bool val) { + this->skip_bad_nodes = val; +} + +void configuration_recovery_request::__set_skip_lost_partitions(const bool val) { + this->skip_lost_partitions = val; +} + +uint32_t configuration_recovery_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->recovery_set.clear(); + uint32_t _size323; + ::apache::thrift::protocol::TType _etype326; + xfer += iprot->readListBegin(_etype326, _size323); + this->recovery_set.resize(_size323); + uint32_t _i327; + for (_i327 = 0; _i327 < _size323; ++_i327) + { + xfer += this->recovery_set[_i327].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.recovery_set = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->skip_bad_nodes); + this->__isset.skip_bad_nodes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->skip_lost_partitions); + this->__isset.skip_lost_partitions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_recovery_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_recovery_request"); + + xfer += oprot->writeFieldBegin("recovery_set", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->recovery_set.size())); + std::vector< ::dsn::rpc_address> ::const_iterator _iter328; + for (_iter328 = this->recovery_set.begin(); _iter328 != this->recovery_set.end(); ++_iter328) + { + xfer += (*_iter328).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("skip_bad_nodes", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->skip_bad_nodes); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("skip_lost_partitions", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->skip_lost_partitions); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_recovery_request &a, configuration_recovery_request &b) { + using ::std::swap; + swap(a.recovery_set, b.recovery_set); + swap(a.skip_bad_nodes, b.skip_bad_nodes); + swap(a.skip_lost_partitions, b.skip_lost_partitions); + swap(a.__isset, b.__isset); +} + +configuration_recovery_request::configuration_recovery_request(const configuration_recovery_request& other329) { + recovery_set = other329.recovery_set; + skip_bad_nodes = other329.skip_bad_nodes; + skip_lost_partitions = other329.skip_lost_partitions; + __isset = other329.__isset; +} +configuration_recovery_request::configuration_recovery_request( configuration_recovery_request&& other330) { + recovery_set = std::move(other330.recovery_set); + skip_bad_nodes = std::move(other330.skip_bad_nodes); + skip_lost_partitions = std::move(other330.skip_lost_partitions); + __isset = std::move(other330.__isset); +} +configuration_recovery_request& configuration_recovery_request::operator=(const configuration_recovery_request& other331) { + recovery_set = other331.recovery_set; + skip_bad_nodes = other331.skip_bad_nodes; + skip_lost_partitions = other331.skip_lost_partitions; + __isset = other331.__isset; + return *this; +} +configuration_recovery_request& configuration_recovery_request::operator=(configuration_recovery_request&& other332) { + recovery_set = std::move(other332.recovery_set); + skip_bad_nodes = std::move(other332.skip_bad_nodes); + skip_lost_partitions = std::move(other332.skip_lost_partitions); + __isset = std::move(other332.__isset); + return *this; +} +void configuration_recovery_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_recovery_request("; + out << "recovery_set=" << to_string(recovery_set); + out << ", " << "skip_bad_nodes=" << to_string(skip_bad_nodes); + out << ", " << "skip_lost_partitions=" << to_string(skip_lost_partitions); + out << ")"; +} + + +configuration_recovery_response::~configuration_recovery_response() throw() { +} + + +void configuration_recovery_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void configuration_recovery_response::__set_hint_message(const std::string& val) { + this->hint_message = val; +} + +uint32_t configuration_recovery_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint_message); + this->__isset.hint_message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_recovery_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_recovery_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->hint_message); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_recovery_response &a, configuration_recovery_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.hint_message, b.hint_message); + swap(a.__isset, b.__isset); +} + +configuration_recovery_response::configuration_recovery_response(const configuration_recovery_response& other333) { + err = other333.err; + hint_message = other333.hint_message; + __isset = other333.__isset; +} +configuration_recovery_response::configuration_recovery_response( configuration_recovery_response&& other334) { + err = std::move(other334.err); + hint_message = std::move(other334.hint_message); + __isset = std::move(other334.__isset); +} +configuration_recovery_response& configuration_recovery_response::operator=(const configuration_recovery_response& other335) { + err = other335.err; + hint_message = other335.hint_message; + __isset = other335.__isset; + return *this; +} +configuration_recovery_response& configuration_recovery_response::operator=(configuration_recovery_response&& other336) { + err = std::move(other336.err); + hint_message = std::move(other336.hint_message); + __isset = std::move(other336.__isset); + return *this; +} +void configuration_recovery_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_recovery_response("; + out << "err=" << to_string(err); + out << ", " << "hint_message=" << to_string(hint_message); + out << ")"; +} + + +policy_info::~policy_info() throw() { +} + + +void policy_info::__set_policy_name(const std::string& val) { + this->policy_name = val; +} + +void policy_info::__set_backup_provider_type(const std::string& val) { + this->backup_provider_type = val; +} + +uint32_t policy_info::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->backup_provider_type); + this->__isset.backup_provider_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t policy_info::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("policy_info"); + + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("backup_provider_type", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->backup_provider_type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(policy_info &a, policy_info &b) { + using ::std::swap; + swap(a.policy_name, b.policy_name); + swap(a.backup_provider_type, b.backup_provider_type); + swap(a.__isset, b.__isset); +} + +policy_info::policy_info(const policy_info& other337) { + policy_name = other337.policy_name; + backup_provider_type = other337.backup_provider_type; + __isset = other337.__isset; +} +policy_info::policy_info( policy_info&& other338) { + policy_name = std::move(other338.policy_name); + backup_provider_type = std::move(other338.backup_provider_type); + __isset = std::move(other338.__isset); +} +policy_info& policy_info::operator=(const policy_info& other339) { + policy_name = other339.policy_name; + backup_provider_type = other339.backup_provider_type; + __isset = other339.__isset; + return *this; +} +policy_info& policy_info::operator=(policy_info&& other340) { + policy_name = std::move(other340.policy_name); + backup_provider_type = std::move(other340.backup_provider_type); + __isset = std::move(other340.__isset); + return *this; +} +void policy_info::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "policy_info("; + out << "policy_name=" << to_string(policy_name); + out << ", " << "backup_provider_type=" << to_string(backup_provider_type); + out << ")"; +} + + +configuration_restore_request::~configuration_restore_request() throw() { +} + + +void configuration_restore_request::__set_cluster_name(const std::string& val) { + this->cluster_name = val; +} + +void configuration_restore_request::__set_policy_name(const std::string& val) { + this->policy_name = val; +} + +void configuration_restore_request::__set_time_stamp(const int64_t val) { + this->time_stamp = val; +} + +void configuration_restore_request::__set_app_name(const std::string& val) { + this->app_name = val; +} + +void configuration_restore_request::__set_app_id(const int32_t val) { + this->app_id = val; +} + +void configuration_restore_request::__set_new_app_name(const std::string& val) { + this->new_app_name = val; +} + +void configuration_restore_request::__set_backup_provider_name(const std::string& val) { + this->backup_provider_name = val; +} + +void configuration_restore_request::__set_skip_bad_partition(const bool val) { + this->skip_bad_partition = val; +} + +uint32_t configuration_restore_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->cluster_name); + this->__isset.cluster_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->time_stamp); + this->__isset.time_stamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->new_app_name); + this->__isset.new_app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->backup_provider_name); + this->__isset.backup_provider_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->skip_bad_partition); + this->__isset.skip_bad_partition = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_restore_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_restore_request"); + + xfer += oprot->writeFieldBegin("cluster_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->cluster_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("time_stamp", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->time_stamp); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("new_app_name", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->new_app_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("backup_provider_name", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->backup_provider_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("skip_bad_partition", ::apache::thrift::protocol::T_BOOL, 8); + xfer += oprot->writeBool(this->skip_bad_partition); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_restore_request &a, configuration_restore_request &b) { + using ::std::swap; + swap(a.cluster_name, b.cluster_name); + swap(a.policy_name, b.policy_name); + swap(a.time_stamp, b.time_stamp); + swap(a.app_name, b.app_name); + swap(a.app_id, b.app_id); + swap(a.new_app_name, b.new_app_name); + swap(a.backup_provider_name, b.backup_provider_name); + swap(a.skip_bad_partition, b.skip_bad_partition); + swap(a.__isset, b.__isset); +} + +configuration_restore_request::configuration_restore_request(const configuration_restore_request& other341) { + cluster_name = other341.cluster_name; + policy_name = other341.policy_name; + time_stamp = other341.time_stamp; + app_name = other341.app_name; + app_id = other341.app_id; + new_app_name = other341.new_app_name; + backup_provider_name = other341.backup_provider_name; + skip_bad_partition = other341.skip_bad_partition; + __isset = other341.__isset; +} +configuration_restore_request::configuration_restore_request( configuration_restore_request&& other342) { + cluster_name = std::move(other342.cluster_name); + policy_name = std::move(other342.policy_name); + time_stamp = std::move(other342.time_stamp); + app_name = std::move(other342.app_name); + app_id = std::move(other342.app_id); + new_app_name = std::move(other342.new_app_name); + backup_provider_name = std::move(other342.backup_provider_name); + skip_bad_partition = std::move(other342.skip_bad_partition); + __isset = std::move(other342.__isset); +} +configuration_restore_request& configuration_restore_request::operator=(const configuration_restore_request& other343) { + cluster_name = other343.cluster_name; + policy_name = other343.policy_name; + time_stamp = other343.time_stamp; + app_name = other343.app_name; + app_id = other343.app_id; + new_app_name = other343.new_app_name; + backup_provider_name = other343.backup_provider_name; + skip_bad_partition = other343.skip_bad_partition; + __isset = other343.__isset; + return *this; +} +configuration_restore_request& configuration_restore_request::operator=(configuration_restore_request&& other344) { + cluster_name = std::move(other344.cluster_name); + policy_name = std::move(other344.policy_name); + time_stamp = std::move(other344.time_stamp); + app_name = std::move(other344.app_name); + app_id = std::move(other344.app_id); + new_app_name = std::move(other344.new_app_name); + backup_provider_name = std::move(other344.backup_provider_name); + skip_bad_partition = std::move(other344.skip_bad_partition); + __isset = std::move(other344.__isset); + return *this; +} +void configuration_restore_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_restore_request("; + out << "cluster_name=" << to_string(cluster_name); + out << ", " << "policy_name=" << to_string(policy_name); + out << ", " << "time_stamp=" << to_string(time_stamp); + out << ", " << "app_name=" << to_string(app_name); + out << ", " << "app_id=" << to_string(app_id); + out << ", " << "new_app_name=" << to_string(new_app_name); + out << ", " << "backup_provider_name=" << to_string(backup_provider_name); + out << ", " << "skip_bad_partition=" << to_string(skip_bad_partition); + out << ")"; +} + + +backup_request::~backup_request() throw() { +} + + +void backup_request::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} + +void backup_request::__set_policy(const policy_info& val) { + this->policy = val; +} + +void backup_request::__set_app_name(const std::string& val) { + this->app_name = val; +} + +void backup_request::__set_backup_id(const int64_t val) { + this->backup_id = val; +} + +uint32_t backup_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->policy.read(iprot); + this->__isset.policy = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->backup_id); + this->__isset.backup_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t backup_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("backup_request"); + + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("policy", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->policy.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("backup_id", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->backup_id); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(backup_request &a, backup_request &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.policy, b.policy); + swap(a.app_name, b.app_name); + swap(a.backup_id, b.backup_id); + swap(a.__isset, b.__isset); +} + +backup_request::backup_request(const backup_request& other345) { + pid = other345.pid; + policy = other345.policy; + app_name = other345.app_name; + backup_id = other345.backup_id; + __isset = other345.__isset; +} +backup_request::backup_request( backup_request&& other346) { + pid = std::move(other346.pid); + policy = std::move(other346.policy); + app_name = std::move(other346.app_name); + backup_id = std::move(other346.backup_id); + __isset = std::move(other346.__isset); +} +backup_request& backup_request::operator=(const backup_request& other347) { + pid = other347.pid; + policy = other347.policy; + app_name = other347.app_name; + backup_id = other347.backup_id; + __isset = other347.__isset; + return *this; +} +backup_request& backup_request::operator=(backup_request&& other348) { + pid = std::move(other348.pid); + policy = std::move(other348.policy); + app_name = std::move(other348.app_name); + backup_id = std::move(other348.backup_id); + __isset = std::move(other348.__isset); + return *this; +} +void backup_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "backup_request("; + out << "pid=" << to_string(pid); + out << ", " << "policy=" << to_string(policy); + out << ", " << "app_name=" << to_string(app_name); + out << ", " << "backup_id=" << to_string(backup_id); + out << ")"; +} + + +backup_response::~backup_response() throw() { +} + + +void backup_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void backup_response::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} + +void backup_response::__set_progress(const int32_t val) { + this->progress = val; +} + +void backup_response::__set_policy_name(const std::string& val) { + this->policy_name = val; +} + +void backup_response::__set_backup_id(const int64_t val) { + this->backup_id = val; +} + +void backup_response::__set_checkpoint_total_size(const int64_t val) { + this->checkpoint_total_size = val; +} + +uint32_t backup_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->progress); + this->__isset.progress = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->backup_id); + this->__isset.backup_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->checkpoint_total_size); + this->__isset.checkpoint_total_size = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t backup_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("backup_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->progress); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("backup_id", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->backup_id); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("checkpoint_total_size", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->checkpoint_total_size); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(backup_response &a, backup_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.pid, b.pid); + swap(a.progress, b.progress); + swap(a.policy_name, b.policy_name); + swap(a.backup_id, b.backup_id); + swap(a.checkpoint_total_size, b.checkpoint_total_size); + swap(a.__isset, b.__isset); +} + +backup_response::backup_response(const backup_response& other349) { + err = other349.err; + pid = other349.pid; + progress = other349.progress; + policy_name = other349.policy_name; + backup_id = other349.backup_id; + checkpoint_total_size = other349.checkpoint_total_size; + __isset = other349.__isset; +} +backup_response::backup_response( backup_response&& other350) { + err = std::move(other350.err); + pid = std::move(other350.pid); + progress = std::move(other350.progress); + policy_name = std::move(other350.policy_name); + backup_id = std::move(other350.backup_id); + checkpoint_total_size = std::move(other350.checkpoint_total_size); + __isset = std::move(other350.__isset); +} +backup_response& backup_response::operator=(const backup_response& other351) { + err = other351.err; + pid = other351.pid; + progress = other351.progress; + policy_name = other351.policy_name; + backup_id = other351.backup_id; + checkpoint_total_size = other351.checkpoint_total_size; + __isset = other351.__isset; + return *this; +} +backup_response& backup_response::operator=(backup_response&& other352) { + err = std::move(other352.err); + pid = std::move(other352.pid); + progress = std::move(other352.progress); + policy_name = std::move(other352.policy_name); + backup_id = std::move(other352.backup_id); + checkpoint_total_size = std::move(other352.checkpoint_total_size); + __isset = std::move(other352.__isset); + return *this; +} +void backup_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "backup_response("; + out << "err=" << to_string(err); + out << ", " << "pid=" << to_string(pid); + out << ", " << "progress=" << to_string(progress); + out << ", " << "policy_name=" << to_string(policy_name); + out << ", " << "backup_id=" << to_string(backup_id); + out << ", " << "checkpoint_total_size=" << to_string(checkpoint_total_size); + out << ")"; +} + + +backup_clear_request::~backup_clear_request() throw() { +} + + +void backup_clear_request::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} + +void backup_clear_request::__set_policy_name(const std::string& val) { + this->policy_name = val; +} + +uint32_t backup_clear_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t backup_clear_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("backup_clear_request"); + + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(backup_clear_request &a, backup_clear_request &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.policy_name, b.policy_name); + swap(a.__isset, b.__isset); +} + +backup_clear_request::backup_clear_request(const backup_clear_request& other353) { + pid = other353.pid; + policy_name = other353.policy_name; + __isset = other353.__isset; +} +backup_clear_request::backup_clear_request( backup_clear_request&& other354) { + pid = std::move(other354.pid); + policy_name = std::move(other354.policy_name); + __isset = std::move(other354.__isset); +} +backup_clear_request& backup_clear_request::operator=(const backup_clear_request& other355) { + pid = other355.pid; + policy_name = other355.policy_name; + __isset = other355.__isset; + return *this; +} +backup_clear_request& backup_clear_request::operator=(backup_clear_request&& other356) { + pid = std::move(other356.pid); + policy_name = std::move(other356.policy_name); + __isset = std::move(other356.__isset); + return *this; +} +void backup_clear_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "backup_clear_request("; + out << "pid=" << to_string(pid); + out << ", " << "policy_name=" << to_string(policy_name); + out << ")"; +} + + +configuration_modify_backup_policy_request::~configuration_modify_backup_policy_request() throw() { +} + + +void configuration_modify_backup_policy_request::__set_policy_name(const std::string& val) { + this->policy_name = val; +} + +void configuration_modify_backup_policy_request::__set_add_appids(const std::vector & val) { + this->add_appids = val; +__isset.add_appids = true; +} + +void configuration_modify_backup_policy_request::__set_removal_appids(const std::vector & val) { + this->removal_appids = val; +__isset.removal_appids = true; +} + +void configuration_modify_backup_policy_request::__set_new_backup_interval_sec(const int64_t val) { + this->new_backup_interval_sec = val; +__isset.new_backup_interval_sec = true; +} + +void configuration_modify_backup_policy_request::__set_backup_history_count_to_keep(const int32_t val) { + this->backup_history_count_to_keep = val; +__isset.backup_history_count_to_keep = true; +} + +void configuration_modify_backup_policy_request::__set_is_disable(const bool val) { + this->is_disable = val; +__isset.is_disable = true; +} + +void configuration_modify_backup_policy_request::__set_start_time(const std::string& val) { + this->start_time = val; +__isset.start_time = true; +} + +uint32_t configuration_modify_backup_policy_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->add_appids.clear(); + uint32_t _size357; + ::apache::thrift::protocol::TType _etype360; + xfer += iprot->readListBegin(_etype360, _size357); + this->add_appids.resize(_size357); + uint32_t _i361; + for (_i361 = 0; _i361 < _size357; ++_i361) + { + xfer += iprot->readI32(this->add_appids[_i361]); + } + xfer += iprot->readListEnd(); + } + this->__isset.add_appids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->removal_appids.clear(); + uint32_t _size362; + ::apache::thrift::protocol::TType _etype365; + xfer += iprot->readListBegin(_etype365, _size362); + this->removal_appids.resize(_size362); + uint32_t _i366; + for (_i366 = 0; _i366 < _size362; ++_i366) + { + xfer += iprot->readI32(this->removal_appids[_i366]); + } + xfer += iprot->readListEnd(); + } + this->__isset.removal_appids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->new_backup_interval_sec); + this->__isset.new_backup_interval_sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->backup_history_count_to_keep); + this->__isset.backup_history_count_to_keep = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_disable); + this->__isset.is_disable = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->start_time); + this->__isset.start_time = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_modify_backup_policy_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_modify_backup_policy_request"); + + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.add_appids) { + xfer += oprot->writeFieldBegin("add_appids", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->add_appids.size())); + std::vector ::const_iterator _iter367; + for (_iter367 = this->add_appids.begin(); _iter367 != this->add_appids.end(); ++_iter367) + { + xfer += oprot->writeI32((*_iter367)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.removal_appids) { + xfer += oprot->writeFieldBegin("removal_appids", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->removal_appids.size())); + std::vector ::const_iterator _iter368; + for (_iter368 = this->removal_appids.begin(); _iter368 != this->removal_appids.end(); ++_iter368) + { + xfer += oprot->writeI32((*_iter368)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.new_backup_interval_sec) { + xfer += oprot->writeFieldBegin("new_backup_interval_sec", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->new_backup_interval_sec); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.backup_history_count_to_keep) { + xfer += oprot->writeFieldBegin("backup_history_count_to_keep", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->backup_history_count_to_keep); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.is_disable) { + xfer += oprot->writeFieldBegin("is_disable", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->is_disable); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.start_time) { + xfer += oprot->writeFieldBegin("start_time", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->start_time); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_modify_backup_policy_request &a, configuration_modify_backup_policy_request &b) { + using ::std::swap; + swap(a.policy_name, b.policy_name); + swap(a.add_appids, b.add_appids); + swap(a.removal_appids, b.removal_appids); + swap(a.new_backup_interval_sec, b.new_backup_interval_sec); + swap(a.backup_history_count_to_keep, b.backup_history_count_to_keep); + swap(a.is_disable, b.is_disable); + swap(a.start_time, b.start_time); + swap(a.__isset, b.__isset); +} + +configuration_modify_backup_policy_request::configuration_modify_backup_policy_request(const configuration_modify_backup_policy_request& other369) { + policy_name = other369.policy_name; + add_appids = other369.add_appids; + removal_appids = other369.removal_appids; + new_backup_interval_sec = other369.new_backup_interval_sec; + backup_history_count_to_keep = other369.backup_history_count_to_keep; + is_disable = other369.is_disable; + start_time = other369.start_time; + __isset = other369.__isset; +} +configuration_modify_backup_policy_request::configuration_modify_backup_policy_request( configuration_modify_backup_policy_request&& other370) { + policy_name = std::move(other370.policy_name); + add_appids = std::move(other370.add_appids); + removal_appids = std::move(other370.removal_appids); + new_backup_interval_sec = std::move(other370.new_backup_interval_sec); + backup_history_count_to_keep = std::move(other370.backup_history_count_to_keep); + is_disable = std::move(other370.is_disable); + start_time = std::move(other370.start_time); + __isset = std::move(other370.__isset); +} +configuration_modify_backup_policy_request& configuration_modify_backup_policy_request::operator=(const configuration_modify_backup_policy_request& other371) { + policy_name = other371.policy_name; + add_appids = other371.add_appids; + removal_appids = other371.removal_appids; + new_backup_interval_sec = other371.new_backup_interval_sec; + backup_history_count_to_keep = other371.backup_history_count_to_keep; + is_disable = other371.is_disable; + start_time = other371.start_time; + __isset = other371.__isset; + return *this; +} +configuration_modify_backup_policy_request& configuration_modify_backup_policy_request::operator=(configuration_modify_backup_policy_request&& other372) { + policy_name = std::move(other372.policy_name); + add_appids = std::move(other372.add_appids); + removal_appids = std::move(other372.removal_appids); + new_backup_interval_sec = std::move(other372.new_backup_interval_sec); + backup_history_count_to_keep = std::move(other372.backup_history_count_to_keep); + is_disable = std::move(other372.is_disable); + start_time = std::move(other372.start_time); + __isset = std::move(other372.__isset); + return *this; +} +void configuration_modify_backup_policy_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_modify_backup_policy_request("; + out << "policy_name=" << to_string(policy_name); + out << ", " << "add_appids="; (__isset.add_appids ? (out << to_string(add_appids)) : (out << "")); + out << ", " << "removal_appids="; (__isset.removal_appids ? (out << to_string(removal_appids)) : (out << "")); + out << ", " << "new_backup_interval_sec="; (__isset.new_backup_interval_sec ? (out << to_string(new_backup_interval_sec)) : (out << "")); + out << ", " << "backup_history_count_to_keep="; (__isset.backup_history_count_to_keep ? (out << to_string(backup_history_count_to_keep)) : (out << "")); + out << ", " << "is_disable="; (__isset.is_disable ? (out << to_string(is_disable)) : (out << "")); + out << ", " << "start_time="; (__isset.start_time ? (out << to_string(start_time)) : (out << "")); + out << ")"; +} + + +configuration_modify_backup_policy_response::~configuration_modify_backup_policy_response() throw() { +} + + +void configuration_modify_backup_policy_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void configuration_modify_backup_policy_response::__set_hint_message(const std::string& val) { + this->hint_message = val; +} + +uint32_t configuration_modify_backup_policy_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint_message); + this->__isset.hint_message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_modify_backup_policy_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_modify_backup_policy_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->hint_message); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_modify_backup_policy_response &a, configuration_modify_backup_policy_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.hint_message, b.hint_message); + swap(a.__isset, b.__isset); +} + +configuration_modify_backup_policy_response::configuration_modify_backup_policy_response(const configuration_modify_backup_policy_response& other373) { + err = other373.err; + hint_message = other373.hint_message; + __isset = other373.__isset; +} +configuration_modify_backup_policy_response::configuration_modify_backup_policy_response( configuration_modify_backup_policy_response&& other374) { + err = std::move(other374.err); + hint_message = std::move(other374.hint_message); + __isset = std::move(other374.__isset); +} +configuration_modify_backup_policy_response& configuration_modify_backup_policy_response::operator=(const configuration_modify_backup_policy_response& other375) { + err = other375.err; + hint_message = other375.hint_message; + __isset = other375.__isset; + return *this; +} +configuration_modify_backup_policy_response& configuration_modify_backup_policy_response::operator=(configuration_modify_backup_policy_response&& other376) { + err = std::move(other376.err); + hint_message = std::move(other376.hint_message); + __isset = std::move(other376.__isset); + return *this; +} +void configuration_modify_backup_policy_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_modify_backup_policy_response("; + out << "err=" << to_string(err); + out << ", " << "hint_message=" << to_string(hint_message); + out << ")"; +} + + +configuration_add_backup_policy_request::~configuration_add_backup_policy_request() throw() { +} + + +void configuration_add_backup_policy_request::__set_backup_provider_type(const std::string& val) { + this->backup_provider_type = val; +} + +void configuration_add_backup_policy_request::__set_policy_name(const std::string& val) { + this->policy_name = val; +} + +void configuration_add_backup_policy_request::__set_app_ids(const std::vector & val) { + this->app_ids = val; +} + +void configuration_add_backup_policy_request::__set_backup_interval_seconds(const int64_t val) { + this->backup_interval_seconds = val; +} + +void configuration_add_backup_policy_request::__set_backup_history_count_to_keep(const int32_t val) { + this->backup_history_count_to_keep = val; +} + +void configuration_add_backup_policy_request::__set_start_time(const std::string& val) { + this->start_time = val; +} + +uint32_t configuration_add_backup_policy_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->backup_provider_type); + this->__isset.backup_provider_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->app_ids.clear(); + uint32_t _size377; + ::apache::thrift::protocol::TType _etype380; + xfer += iprot->readListBegin(_etype380, _size377); + this->app_ids.resize(_size377); + uint32_t _i381; + for (_i381 = 0; _i381 < _size377; ++_i381) + { + xfer += iprot->readI32(this->app_ids[_i381]); + } + xfer += iprot->readListEnd(); + } + this->__isset.app_ids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->backup_interval_seconds); + this->__isset.backup_interval_seconds = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->backup_history_count_to_keep); + this->__isset.backup_history_count_to_keep = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->start_time); + this->__isset.start_time = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_add_backup_policy_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_add_backup_policy_request"); + + xfer += oprot->writeFieldBegin("backup_provider_type", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->backup_provider_type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("app_ids", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->app_ids.size())); + std::vector ::const_iterator _iter382; + for (_iter382 = this->app_ids.begin(); _iter382 != this->app_ids.end(); ++_iter382) + { + xfer += oprot->writeI32((*_iter382)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("backup_interval_seconds", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->backup_interval_seconds); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("backup_history_count_to_keep", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->backup_history_count_to_keep); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("start_time", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->start_time); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_add_backup_policy_request &a, configuration_add_backup_policy_request &b) { + using ::std::swap; + swap(a.backup_provider_type, b.backup_provider_type); + swap(a.policy_name, b.policy_name); + swap(a.app_ids, b.app_ids); + swap(a.backup_interval_seconds, b.backup_interval_seconds); + swap(a.backup_history_count_to_keep, b.backup_history_count_to_keep); + swap(a.start_time, b.start_time); + swap(a.__isset, b.__isset); +} + +configuration_add_backup_policy_request::configuration_add_backup_policy_request(const configuration_add_backup_policy_request& other383) { + backup_provider_type = other383.backup_provider_type; + policy_name = other383.policy_name; + app_ids = other383.app_ids; + backup_interval_seconds = other383.backup_interval_seconds; + backup_history_count_to_keep = other383.backup_history_count_to_keep; + start_time = other383.start_time; + __isset = other383.__isset; +} +configuration_add_backup_policy_request::configuration_add_backup_policy_request( configuration_add_backup_policy_request&& other384) { + backup_provider_type = std::move(other384.backup_provider_type); + policy_name = std::move(other384.policy_name); + app_ids = std::move(other384.app_ids); + backup_interval_seconds = std::move(other384.backup_interval_seconds); + backup_history_count_to_keep = std::move(other384.backup_history_count_to_keep); + start_time = std::move(other384.start_time); + __isset = std::move(other384.__isset); +} +configuration_add_backup_policy_request& configuration_add_backup_policy_request::operator=(const configuration_add_backup_policy_request& other385) { + backup_provider_type = other385.backup_provider_type; + policy_name = other385.policy_name; + app_ids = other385.app_ids; + backup_interval_seconds = other385.backup_interval_seconds; + backup_history_count_to_keep = other385.backup_history_count_to_keep; + start_time = other385.start_time; + __isset = other385.__isset; + return *this; +} +configuration_add_backup_policy_request& configuration_add_backup_policy_request::operator=(configuration_add_backup_policy_request&& other386) { + backup_provider_type = std::move(other386.backup_provider_type); + policy_name = std::move(other386.policy_name); + app_ids = std::move(other386.app_ids); + backup_interval_seconds = std::move(other386.backup_interval_seconds); + backup_history_count_to_keep = std::move(other386.backup_history_count_to_keep); + start_time = std::move(other386.start_time); + __isset = std::move(other386.__isset); + return *this; +} +void configuration_add_backup_policy_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_add_backup_policy_request("; + out << "backup_provider_type=" << to_string(backup_provider_type); + out << ", " << "policy_name=" << to_string(policy_name); + out << ", " << "app_ids=" << to_string(app_ids); + out << ", " << "backup_interval_seconds=" << to_string(backup_interval_seconds); + out << ", " << "backup_history_count_to_keep=" << to_string(backup_history_count_to_keep); + out << ", " << "start_time=" << to_string(start_time); + out << ")"; +} + + +configuration_add_backup_policy_response::~configuration_add_backup_policy_response() throw() { +} + + +void configuration_add_backup_policy_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void configuration_add_backup_policy_response::__set_hint_message(const std::string& val) { + this->hint_message = val; +} + +uint32_t configuration_add_backup_policy_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint_message); + this->__isset.hint_message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_add_backup_policy_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_add_backup_policy_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->hint_message); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_add_backup_policy_response &a, configuration_add_backup_policy_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.hint_message, b.hint_message); + swap(a.__isset, b.__isset); +} + +configuration_add_backup_policy_response::configuration_add_backup_policy_response(const configuration_add_backup_policy_response& other387) { + err = other387.err; + hint_message = other387.hint_message; + __isset = other387.__isset; +} +configuration_add_backup_policy_response::configuration_add_backup_policy_response( configuration_add_backup_policy_response&& other388) { + err = std::move(other388.err); + hint_message = std::move(other388.hint_message); + __isset = std::move(other388.__isset); +} +configuration_add_backup_policy_response& configuration_add_backup_policy_response::operator=(const configuration_add_backup_policy_response& other389) { + err = other389.err; + hint_message = other389.hint_message; + __isset = other389.__isset; + return *this; +} +configuration_add_backup_policy_response& configuration_add_backup_policy_response::operator=(configuration_add_backup_policy_response&& other390) { + err = std::move(other390.err); + hint_message = std::move(other390.hint_message); + __isset = std::move(other390.__isset); + return *this; +} +void configuration_add_backup_policy_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_add_backup_policy_response("; + out << "err=" << to_string(err); + out << ", " << "hint_message=" << to_string(hint_message); + out << ")"; +} + + +policy_entry::~policy_entry() throw() { +} + + +void policy_entry::__set_policy_name(const std::string& val) { + this->policy_name = val; +} + +void policy_entry::__set_backup_provider_type(const std::string& val) { + this->backup_provider_type = val; +} + +void policy_entry::__set_backup_interval_seconds(const std::string& val) { + this->backup_interval_seconds = val; +} + +void policy_entry::__set_app_ids(const std::set & val) { + this->app_ids = val; +} + +void policy_entry::__set_backup_history_count_to_keep(const int32_t val) { + this->backup_history_count_to_keep = val; +} + +void policy_entry::__set_start_time(const std::string& val) { + this->start_time = val; +} + +void policy_entry::__set_is_disable(const bool val) { + this->is_disable = val; +} + +uint32_t policy_entry::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->backup_provider_type); + this->__isset.backup_provider_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->backup_interval_seconds); + this->__isset.backup_interval_seconds = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_SET) { + { + this->app_ids.clear(); + uint32_t _size391; + ::apache::thrift::protocol::TType _etype394; + xfer += iprot->readSetBegin(_etype394, _size391); + uint32_t _i395; + for (_i395 = 0; _i395 < _size391; ++_i395) + { + int32_t _elem396; + xfer += iprot->readI32(_elem396); + this->app_ids.insert(_elem396); + } + xfer += iprot->readSetEnd(); + } + this->__isset.app_ids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->backup_history_count_to_keep); + this->__isset.backup_history_count_to_keep = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->start_time); + this->__isset.start_time = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_disable); + this->__isset.is_disable = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t policy_entry::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("policy_entry"); + + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("backup_provider_type", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->backup_provider_type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("backup_interval_seconds", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->backup_interval_seconds); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("app_ids", ::apache::thrift::protocol::T_SET, 4); + { + xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I32, static_cast(this->app_ids.size())); + std::set ::const_iterator _iter397; + for (_iter397 = this->app_ids.begin(); _iter397 != this->app_ids.end(); ++_iter397) + { + xfer += oprot->writeI32((*_iter397)); + } + xfer += oprot->writeSetEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("backup_history_count_to_keep", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->backup_history_count_to_keep); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("start_time", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->start_time); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("is_disable", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->is_disable); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(policy_entry &a, policy_entry &b) { + using ::std::swap; + swap(a.policy_name, b.policy_name); + swap(a.backup_provider_type, b.backup_provider_type); + swap(a.backup_interval_seconds, b.backup_interval_seconds); + swap(a.app_ids, b.app_ids); + swap(a.backup_history_count_to_keep, b.backup_history_count_to_keep); + swap(a.start_time, b.start_time); + swap(a.is_disable, b.is_disable); + swap(a.__isset, b.__isset); +} + +policy_entry::policy_entry(const policy_entry& other398) { + policy_name = other398.policy_name; + backup_provider_type = other398.backup_provider_type; + backup_interval_seconds = other398.backup_interval_seconds; + app_ids = other398.app_ids; + backup_history_count_to_keep = other398.backup_history_count_to_keep; + start_time = other398.start_time; + is_disable = other398.is_disable; + __isset = other398.__isset; +} +policy_entry::policy_entry( policy_entry&& other399) { + policy_name = std::move(other399.policy_name); + backup_provider_type = std::move(other399.backup_provider_type); + backup_interval_seconds = std::move(other399.backup_interval_seconds); + app_ids = std::move(other399.app_ids); + backup_history_count_to_keep = std::move(other399.backup_history_count_to_keep); + start_time = std::move(other399.start_time); + is_disable = std::move(other399.is_disable); + __isset = std::move(other399.__isset); +} +policy_entry& policy_entry::operator=(const policy_entry& other400) { + policy_name = other400.policy_name; + backup_provider_type = other400.backup_provider_type; + backup_interval_seconds = other400.backup_interval_seconds; + app_ids = other400.app_ids; + backup_history_count_to_keep = other400.backup_history_count_to_keep; + start_time = other400.start_time; + is_disable = other400.is_disable; + __isset = other400.__isset; + return *this; +} +policy_entry& policy_entry::operator=(policy_entry&& other401) { + policy_name = std::move(other401.policy_name); + backup_provider_type = std::move(other401.backup_provider_type); + backup_interval_seconds = std::move(other401.backup_interval_seconds); + app_ids = std::move(other401.app_ids); + backup_history_count_to_keep = std::move(other401.backup_history_count_to_keep); + start_time = std::move(other401.start_time); + is_disable = std::move(other401.is_disable); + __isset = std::move(other401.__isset); + return *this; +} +void policy_entry::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "policy_entry("; + out << "policy_name=" << to_string(policy_name); + out << ", " << "backup_provider_type=" << to_string(backup_provider_type); + out << ", " << "backup_interval_seconds=" << to_string(backup_interval_seconds); + out << ", " << "app_ids=" << to_string(app_ids); + out << ", " << "backup_history_count_to_keep=" << to_string(backup_history_count_to_keep); + out << ", " << "start_time=" << to_string(start_time); + out << ", " << "is_disable=" << to_string(is_disable); + out << ")"; +} + + +backup_entry::~backup_entry() throw() { +} + + +void backup_entry::__set_backup_id(const int64_t val) { + this->backup_id = val; +} + +void backup_entry::__set_start_time_ms(const int64_t val) { + this->start_time_ms = val; +} + +void backup_entry::__set_end_time_ms(const int64_t val) { + this->end_time_ms = val; +} + +void backup_entry::__set_app_ids(const std::set & val) { + this->app_ids = val; +} + +uint32_t backup_entry::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->backup_id); + this->__isset.backup_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->start_time_ms); + this->__isset.start_time_ms = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->end_time_ms); + this->__isset.end_time_ms = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_SET) { + { + this->app_ids.clear(); + uint32_t _size402; + ::apache::thrift::protocol::TType _etype405; + xfer += iprot->readSetBegin(_etype405, _size402); + uint32_t _i406; + for (_i406 = 0; _i406 < _size402; ++_i406) + { + int32_t _elem407; + xfer += iprot->readI32(_elem407); + this->app_ids.insert(_elem407); + } + xfer += iprot->readSetEnd(); + } + this->__isset.app_ids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t backup_entry::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("backup_entry"); + + xfer += oprot->writeFieldBegin("backup_id", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->backup_id); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("start_time_ms", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->start_time_ms); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("end_time_ms", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->end_time_ms); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("app_ids", ::apache::thrift::protocol::T_SET, 4); + { + xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I32, static_cast(this->app_ids.size())); + std::set ::const_iterator _iter408; + for (_iter408 = this->app_ids.begin(); _iter408 != this->app_ids.end(); ++_iter408) + { + xfer += oprot->writeI32((*_iter408)); + } + xfer += oprot->writeSetEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(backup_entry &a, backup_entry &b) { + using ::std::swap; + swap(a.backup_id, b.backup_id); + swap(a.start_time_ms, b.start_time_ms); + swap(a.end_time_ms, b.end_time_ms); + swap(a.app_ids, b.app_ids); + swap(a.__isset, b.__isset); +} + +backup_entry::backup_entry(const backup_entry& other409) { + backup_id = other409.backup_id; + start_time_ms = other409.start_time_ms; + end_time_ms = other409.end_time_ms; + app_ids = other409.app_ids; + __isset = other409.__isset; +} +backup_entry::backup_entry( backup_entry&& other410) { + backup_id = std::move(other410.backup_id); + start_time_ms = std::move(other410.start_time_ms); + end_time_ms = std::move(other410.end_time_ms); + app_ids = std::move(other410.app_ids); + __isset = std::move(other410.__isset); +} +backup_entry& backup_entry::operator=(const backup_entry& other411) { + backup_id = other411.backup_id; + start_time_ms = other411.start_time_ms; + end_time_ms = other411.end_time_ms; + app_ids = other411.app_ids; + __isset = other411.__isset; + return *this; +} +backup_entry& backup_entry::operator=(backup_entry&& other412) { + backup_id = std::move(other412.backup_id); + start_time_ms = std::move(other412.start_time_ms); + end_time_ms = std::move(other412.end_time_ms); + app_ids = std::move(other412.app_ids); + __isset = std::move(other412.__isset); + return *this; +} +void backup_entry::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "backup_entry("; + out << "backup_id=" << to_string(backup_id); + out << ", " << "start_time_ms=" << to_string(start_time_ms); + out << ", " << "end_time_ms=" << to_string(end_time_ms); + out << ", " << "app_ids=" << to_string(app_ids); + out << ")"; +} + + +configuration_query_backup_policy_request::~configuration_query_backup_policy_request() throw() { +} + + +void configuration_query_backup_policy_request::__set_policy_names(const std::vector & val) { + this->policy_names = val; +} + +void configuration_query_backup_policy_request::__set_backup_info_count(const int32_t val) { + this->backup_info_count = val; +} + +uint32_t configuration_query_backup_policy_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->policy_names.clear(); + uint32_t _size413; + ::apache::thrift::protocol::TType _etype416; + xfer += iprot->readListBegin(_etype416, _size413); + this->policy_names.resize(_size413); + uint32_t _i417; + for (_i417 = 0; _i417 < _size413; ++_i417) + { + xfer += iprot->readString(this->policy_names[_i417]); + } + xfer += iprot->readListEnd(); + } + this->__isset.policy_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->backup_info_count); + this->__isset.backup_info_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_query_backup_policy_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_backup_policy_request"); + + xfer += oprot->writeFieldBegin("policy_names", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->policy_names.size())); + std::vector ::const_iterator _iter418; + for (_iter418 = this->policy_names.begin(); _iter418 != this->policy_names.end(); ++_iter418) + { + xfer += oprot->writeString((*_iter418)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("backup_info_count", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->backup_info_count); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_query_backup_policy_request &a, configuration_query_backup_policy_request &b) { + using ::std::swap; + swap(a.policy_names, b.policy_names); + swap(a.backup_info_count, b.backup_info_count); + swap(a.__isset, b.__isset); +} + +configuration_query_backup_policy_request::configuration_query_backup_policy_request(const configuration_query_backup_policy_request& other419) { + policy_names = other419.policy_names; + backup_info_count = other419.backup_info_count; + __isset = other419.__isset; +} +configuration_query_backup_policy_request::configuration_query_backup_policy_request( configuration_query_backup_policy_request&& other420) { + policy_names = std::move(other420.policy_names); + backup_info_count = std::move(other420.backup_info_count); + __isset = std::move(other420.__isset); +} +configuration_query_backup_policy_request& configuration_query_backup_policy_request::operator=(const configuration_query_backup_policy_request& other421) { + policy_names = other421.policy_names; + backup_info_count = other421.backup_info_count; + __isset = other421.__isset; + return *this; +} +configuration_query_backup_policy_request& configuration_query_backup_policy_request::operator=(configuration_query_backup_policy_request&& other422) { + policy_names = std::move(other422.policy_names); + backup_info_count = std::move(other422.backup_info_count); + __isset = std::move(other422.__isset); + return *this; +} +void configuration_query_backup_policy_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_query_backup_policy_request("; + out << "policy_names=" << to_string(policy_names); + out << ", " << "backup_info_count=" << to_string(backup_info_count); + out << ")"; +} + + +configuration_query_backup_policy_response::~configuration_query_backup_policy_response() throw() { +} + + +void configuration_query_backup_policy_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void configuration_query_backup_policy_response::__set_policys(const std::vector & val) { + this->policys = val; +} + +void configuration_query_backup_policy_response::__set_backup_infos(const std::vector > & val) { + this->backup_infos = val; +} + +void configuration_query_backup_policy_response::__set_hint_msg(const std::string& val) { + this->hint_msg = val; +__isset.hint_msg = true; +} + +uint32_t configuration_query_backup_policy_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->policys.clear(); + uint32_t _size423; + ::apache::thrift::protocol::TType _etype426; + xfer += iprot->readListBegin(_etype426, _size423); + this->policys.resize(_size423); + uint32_t _i427; + for (_i427 = 0; _i427 < _size423; ++_i427) + { + xfer += this->policys[_i427].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.policys = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->backup_infos.clear(); + uint32_t _size428; + ::apache::thrift::protocol::TType _etype431; + xfer += iprot->readListBegin(_etype431, _size428); + this->backup_infos.resize(_size428); + uint32_t _i432; + for (_i432 = 0; _i432 < _size428; ++_i432) + { + { + this->backup_infos[_i432].clear(); + uint32_t _size433; + ::apache::thrift::protocol::TType _etype436; + xfer += iprot->readListBegin(_etype436, _size433); + this->backup_infos[_i432].resize(_size433); + uint32_t _i437; + for (_i437 = 0; _i437 < _size433; ++_i437) + { + xfer += this->backup_infos[_i432][_i437].read(iprot); + } + xfer += iprot->readListEnd(); + } + } + xfer += iprot->readListEnd(); + } + this->__isset.backup_infos = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint_msg); + this->__isset.hint_msg = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_query_backup_policy_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_backup_policy_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("policys", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->policys.size())); + std::vector ::const_iterator _iter438; + for (_iter438 = this->policys.begin(); _iter438 != this->policys.end(); ++_iter438) + { + xfer += (*_iter438).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("backup_infos", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast(this->backup_infos.size())); + std::vector > ::const_iterator _iter439; + for (_iter439 = this->backup_infos.begin(); _iter439 != this->backup_infos.end(); ++_iter439) + { + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*_iter439).size())); + std::vector ::const_iterator _iter440; + for (_iter440 = (*_iter439).begin(); _iter440 != (*_iter439).end(); ++_iter440) + { + xfer += (*_iter440).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.hint_msg) { + xfer += oprot->writeFieldBegin("hint_msg", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->hint_msg); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_query_backup_policy_response &a, configuration_query_backup_policy_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.policys, b.policys); + swap(a.backup_infos, b.backup_infos); + swap(a.hint_msg, b.hint_msg); + swap(a.__isset, b.__isset); +} + +configuration_query_backup_policy_response::configuration_query_backup_policy_response(const configuration_query_backup_policy_response& other441) { + err = other441.err; + policys = other441.policys; + backup_infos = other441.backup_infos; + hint_msg = other441.hint_msg; + __isset = other441.__isset; +} +configuration_query_backup_policy_response::configuration_query_backup_policy_response( configuration_query_backup_policy_response&& other442) { + err = std::move(other442.err); + policys = std::move(other442.policys); + backup_infos = std::move(other442.backup_infos); + hint_msg = std::move(other442.hint_msg); + __isset = std::move(other442.__isset); +} +configuration_query_backup_policy_response& configuration_query_backup_policy_response::operator=(const configuration_query_backup_policy_response& other443) { + err = other443.err; + policys = other443.policys; + backup_infos = other443.backup_infos; + hint_msg = other443.hint_msg; + __isset = other443.__isset; + return *this; +} +configuration_query_backup_policy_response& configuration_query_backup_policy_response::operator=(configuration_query_backup_policy_response&& other444) { + err = std::move(other444.err); + policys = std::move(other444.policys); + backup_infos = std::move(other444.backup_infos); + hint_msg = std::move(other444.hint_msg); + __isset = std::move(other444.__isset); + return *this; +} +void configuration_query_backup_policy_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_query_backup_policy_response("; + out << "err=" << to_string(err); + out << ", " << "policys=" << to_string(policys); + out << ", " << "backup_infos=" << to_string(backup_infos); + out << ", " << "hint_msg="; (__isset.hint_msg ? (out << to_string(hint_msg)) : (out << "")); + out << ")"; +} + + +configuration_report_restore_status_request::~configuration_report_restore_status_request() throw() { +} + + +void configuration_report_restore_status_request::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} + +void configuration_report_restore_status_request::__set_restore_status(const ::dsn::error_code& val) { + this->restore_status = val; +} + +void configuration_report_restore_status_request::__set_progress(const int32_t val) { + this->progress = val; +} + +void configuration_report_restore_status_request::__set_reason(const std::string& val) { + this->reason = val; +__isset.reason = true; +} + +uint32_t configuration_report_restore_status_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->restore_status.read(iprot); + this->__isset.restore_status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->progress); + this->__isset.progress = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->reason); + this->__isset.reason = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_report_restore_status_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_report_restore_status_request"); + + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("restore_status", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->restore_status.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->progress); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.reason) { + xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->reason); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_report_restore_status_request &a, configuration_report_restore_status_request &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.restore_status, b.restore_status); + swap(a.progress, b.progress); + swap(a.reason, b.reason); + swap(a.__isset, b.__isset); +} + +configuration_report_restore_status_request::configuration_report_restore_status_request(const configuration_report_restore_status_request& other445) { + pid = other445.pid; + restore_status = other445.restore_status; + progress = other445.progress; + reason = other445.reason; + __isset = other445.__isset; +} +configuration_report_restore_status_request::configuration_report_restore_status_request( configuration_report_restore_status_request&& other446) { + pid = std::move(other446.pid); + restore_status = std::move(other446.restore_status); + progress = std::move(other446.progress); + reason = std::move(other446.reason); + __isset = std::move(other446.__isset); +} +configuration_report_restore_status_request& configuration_report_restore_status_request::operator=(const configuration_report_restore_status_request& other447) { + pid = other447.pid; + restore_status = other447.restore_status; + progress = other447.progress; + reason = other447.reason; + __isset = other447.__isset; + return *this; +} +configuration_report_restore_status_request& configuration_report_restore_status_request::operator=(configuration_report_restore_status_request&& other448) { + pid = std::move(other448.pid); + restore_status = std::move(other448.restore_status); + progress = std::move(other448.progress); + reason = std::move(other448.reason); + __isset = std::move(other448.__isset); + return *this; +} +void configuration_report_restore_status_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_report_restore_status_request("; + out << "pid=" << to_string(pid); + out << ", " << "restore_status=" << to_string(restore_status); + out << ", " << "progress=" << to_string(progress); + out << ", " << "reason="; (__isset.reason ? (out << to_string(reason)) : (out << "")); + out << ")"; +} + + +configuration_report_restore_status_response::~configuration_report_restore_status_response() throw() { +} + + +void configuration_report_restore_status_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +uint32_t configuration_report_restore_status_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_report_restore_status_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_report_restore_status_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_report_restore_status_response &a, configuration_report_restore_status_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.__isset, b.__isset); +} + +configuration_report_restore_status_response::configuration_report_restore_status_response(const configuration_report_restore_status_response& other449) { + err = other449.err; + __isset = other449.__isset; +} +configuration_report_restore_status_response::configuration_report_restore_status_response( configuration_report_restore_status_response&& other450) { + err = std::move(other450.err); + __isset = std::move(other450.__isset); +} +configuration_report_restore_status_response& configuration_report_restore_status_response::operator=(const configuration_report_restore_status_response& other451) { + err = other451.err; + __isset = other451.__isset; + return *this; +} +configuration_report_restore_status_response& configuration_report_restore_status_response::operator=(configuration_report_restore_status_response&& other452) { + err = std::move(other452.err); + __isset = std::move(other452.__isset); + return *this; +} +void configuration_report_restore_status_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_report_restore_status_response("; + out << "err=" << to_string(err); + out << ")"; +} + + +configuration_query_restore_request::~configuration_query_restore_request() throw() { +} + + +void configuration_query_restore_request::__set_restore_app_id(const int32_t val) { + this->restore_app_id = val; +} + +uint32_t configuration_query_restore_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->restore_app_id); + this->__isset.restore_app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_query_restore_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_restore_request"); + + xfer += oprot->writeFieldBegin("restore_app_id", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->restore_app_id); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_query_restore_request &a, configuration_query_restore_request &b) { + using ::std::swap; + swap(a.restore_app_id, b.restore_app_id); + swap(a.__isset, b.__isset); +} + +configuration_query_restore_request::configuration_query_restore_request(const configuration_query_restore_request& other453) { + restore_app_id = other453.restore_app_id; + __isset = other453.__isset; +} +configuration_query_restore_request::configuration_query_restore_request( configuration_query_restore_request&& other454) { + restore_app_id = std::move(other454.restore_app_id); + __isset = std::move(other454.__isset); +} +configuration_query_restore_request& configuration_query_restore_request::operator=(const configuration_query_restore_request& other455) { + restore_app_id = other455.restore_app_id; + __isset = other455.__isset; + return *this; +} +configuration_query_restore_request& configuration_query_restore_request::operator=(configuration_query_restore_request&& other456) { + restore_app_id = std::move(other456.restore_app_id); + __isset = std::move(other456.__isset); + return *this; +} +void configuration_query_restore_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_query_restore_request("; + out << "restore_app_id=" << to_string(restore_app_id); + out << ")"; +} + + +configuration_query_restore_response::~configuration_query_restore_response() throw() { +} + + +void configuration_query_restore_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void configuration_query_restore_response::__set_restore_status(const std::vector< ::dsn::error_code> & val) { + this->restore_status = val; +} + +void configuration_query_restore_response::__set_restore_progress(const std::vector & val) { + this->restore_progress = val; +} + +uint32_t configuration_query_restore_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->restore_status.clear(); + uint32_t _size457; + ::apache::thrift::protocol::TType _etype460; + xfer += iprot->readListBegin(_etype460, _size457); + this->restore_status.resize(_size457); + uint32_t _i461; + for (_i461 = 0; _i461 < _size457; ++_i461) + { + xfer += this->restore_status[_i461].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.restore_status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->restore_progress.clear(); + uint32_t _size462; + ::apache::thrift::protocol::TType _etype465; + xfer += iprot->readListBegin(_etype465, _size462); + this->restore_progress.resize(_size462); + uint32_t _i466; + for (_i466 = 0; _i466 < _size462; ++_i466) + { + xfer += iprot->readI32(this->restore_progress[_i466]); + } + xfer += iprot->readListEnd(); + } + this->__isset.restore_progress = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_query_restore_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_restore_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("restore_status", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->restore_status.size())); + std::vector< ::dsn::error_code> ::const_iterator _iter467; + for (_iter467 = this->restore_status.begin(); _iter467 != this->restore_status.end(); ++_iter467) + { + xfer += (*_iter467).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("restore_progress", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->restore_progress.size())); + std::vector ::const_iterator _iter468; + for (_iter468 = this->restore_progress.begin(); _iter468 != this->restore_progress.end(); ++_iter468) + { + xfer += oprot->writeI32((*_iter468)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_query_restore_response &a, configuration_query_restore_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.restore_status, b.restore_status); + swap(a.restore_progress, b.restore_progress); + swap(a.__isset, b.__isset); +} + +configuration_query_restore_response::configuration_query_restore_response(const configuration_query_restore_response& other469) { + err = other469.err; + restore_status = other469.restore_status; + restore_progress = other469.restore_progress; + __isset = other469.__isset; +} +configuration_query_restore_response::configuration_query_restore_response( configuration_query_restore_response&& other470) { + err = std::move(other470.err); + restore_status = std::move(other470.restore_status); + restore_progress = std::move(other470.restore_progress); + __isset = std::move(other470.__isset); +} +configuration_query_restore_response& configuration_query_restore_response::operator=(const configuration_query_restore_response& other471) { + err = other471.err; + restore_status = other471.restore_status; + restore_progress = other471.restore_progress; + __isset = other471.__isset; + return *this; +} +configuration_query_restore_response& configuration_query_restore_response::operator=(configuration_query_restore_response&& other472) { + err = std::move(other472.err); + restore_status = std::move(other472.restore_status); + restore_progress = std::move(other472.restore_progress); + __isset = std::move(other472.__isset); + return *this; +} +void configuration_query_restore_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_query_restore_response("; + out << "err=" << to_string(err); + out << ", " << "restore_status=" << to_string(restore_status); + out << ", " << "restore_progress=" << to_string(restore_progress); + out << ")"; +} + + +file_meta::~file_meta() throw() { +} + + +void file_meta::__set_name(const std::string& val) { + this->name = val; +} + +void file_meta::__set_size(const int64_t val) { + this->size = val; +} + +void file_meta::__set_md5(const std::string& val) { + this->md5 = val; +} + +uint32_t file_meta::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->size); + this->__isset.size = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->md5); + this->__isset.md5 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t file_meta::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("file_meta"); + + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("size", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->size); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("md5", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->md5); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(file_meta &a, file_meta &b) { + using ::std::swap; + swap(a.name, b.name); + swap(a.size, b.size); + swap(a.md5, b.md5); + swap(a.__isset, b.__isset); +} + +file_meta::file_meta(const file_meta& other473) { + name = other473.name; + size = other473.size; + md5 = other473.md5; + __isset = other473.__isset; +} +file_meta::file_meta( file_meta&& other474) { + name = std::move(other474.name); + size = std::move(other474.size); + md5 = std::move(other474.md5); + __isset = std::move(other474.__isset); +} +file_meta& file_meta::operator=(const file_meta& other475) { + name = other475.name; + size = other475.size; + md5 = other475.md5; + __isset = other475.__isset; + return *this; +} +file_meta& file_meta::operator=(file_meta&& other476) { + name = std::move(other476.name); + size = std::move(other476.size); + md5 = std::move(other476.md5); + __isset = std::move(other476.__isset); + return *this; +} +void file_meta::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "file_meta("; + out << "name=" << to_string(name); + out << ", " << "size=" << to_string(size); + out << ", " << "md5=" << to_string(md5); + out << ")"; +} + + +configuration_update_app_env_request::~configuration_update_app_env_request() throw() { +} + + +void configuration_update_app_env_request::__set_app_name(const std::string& val) { + this->app_name = val; +} + +void configuration_update_app_env_request::__set_op(const app_env_operation::type val) { + this->op = val; +} + +void configuration_update_app_env_request::__set_keys(const std::vector & val) { + this->keys = val; +__isset.keys = true; +} + +void configuration_update_app_env_request::__set_values(const std::vector & val) { + this->values = val; +__isset.values = true; +} + +void configuration_update_app_env_request::__set_clear_prefix(const std::string& val) { + this->clear_prefix = val; +__isset.clear_prefix = true; +} + +uint32_t configuration_update_app_env_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast477; + xfer += iprot->readI32(ecast477); + this->op = (app_env_operation::type)ecast477; + this->__isset.op = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->keys.clear(); + uint32_t _size478; + ::apache::thrift::protocol::TType _etype481; + xfer += iprot->readListBegin(_etype481, _size478); + this->keys.resize(_size478); + uint32_t _i482; + for (_i482 = 0; _i482 < _size478; ++_i482) + { + xfer += iprot->readString(this->keys[_i482]); + } + xfer += iprot->readListEnd(); + } + this->__isset.keys = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->values.clear(); + uint32_t _size483; + ::apache::thrift::protocol::TType _etype486; + xfer += iprot->readListBegin(_etype486, _size483); + this->values.resize(_size483); + uint32_t _i487; + for (_i487 = 0; _i487 < _size483; ++_i487) + { + xfer += iprot->readString(this->values[_i487]); + } + xfer += iprot->readListEnd(); + } + this->__isset.values = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->clear_prefix); + this->__isset.clear_prefix = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_update_app_env_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_update_app_env_request"); + + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("op", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->op); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.keys) { + xfer += oprot->writeFieldBegin("keys", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->keys.size())); + std::vector ::const_iterator _iter488; + for (_iter488 = this->keys.begin(); _iter488 != this->keys.end(); ++_iter488) + { + xfer += oprot->writeString((*_iter488)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.values) { + xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->values.size())); + std::vector ::const_iterator _iter489; + for (_iter489 = this->values.begin(); _iter489 != this->values.end(); ++_iter489) + { + xfer += oprot->writeString((*_iter489)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.clear_prefix) { + xfer += oprot->writeFieldBegin("clear_prefix", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->clear_prefix); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_update_app_env_request &a, configuration_update_app_env_request &b) { + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.op, b.op); + swap(a.keys, b.keys); + swap(a.values, b.values); + swap(a.clear_prefix, b.clear_prefix); + swap(a.__isset, b.__isset); +} + +configuration_update_app_env_request::configuration_update_app_env_request(const configuration_update_app_env_request& other490) { + app_name = other490.app_name; + op = other490.op; + keys = other490.keys; + values = other490.values; + clear_prefix = other490.clear_prefix; + __isset = other490.__isset; +} +configuration_update_app_env_request::configuration_update_app_env_request( configuration_update_app_env_request&& other491) { + app_name = std::move(other491.app_name); + op = std::move(other491.op); + keys = std::move(other491.keys); + values = std::move(other491.values); + clear_prefix = std::move(other491.clear_prefix); + __isset = std::move(other491.__isset); +} +configuration_update_app_env_request& configuration_update_app_env_request::operator=(const configuration_update_app_env_request& other492) { + app_name = other492.app_name; + op = other492.op; + keys = other492.keys; + values = other492.values; + clear_prefix = other492.clear_prefix; + __isset = other492.__isset; + return *this; +} +configuration_update_app_env_request& configuration_update_app_env_request::operator=(configuration_update_app_env_request&& other493) { + app_name = std::move(other493.app_name); + op = std::move(other493.op); + keys = std::move(other493.keys); + values = std::move(other493.values); + clear_prefix = std::move(other493.clear_prefix); + __isset = std::move(other493.__isset); + return *this; +} +void configuration_update_app_env_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_update_app_env_request("; + out << "app_name=" << to_string(app_name); + out << ", " << "op=" << to_string(op); + out << ", " << "keys="; (__isset.keys ? (out << to_string(keys)) : (out << "")); + out << ", " << "values="; (__isset.values ? (out << to_string(values)) : (out << "")); + out << ", " << "clear_prefix="; (__isset.clear_prefix ? (out << to_string(clear_prefix)) : (out << "")); + out << ")"; +} + + +configuration_update_app_env_response::~configuration_update_app_env_response() throw() { +} + + +void configuration_update_app_env_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void configuration_update_app_env_response::__set_hint_message(const std::string& val) { + this->hint_message = val; +} + +uint32_t configuration_update_app_env_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint_message); + this->__isset.hint_message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_update_app_env_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_update_app_env_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->hint_message); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_update_app_env_response &a, configuration_update_app_env_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.hint_message, b.hint_message); + swap(a.__isset, b.__isset); +} + +configuration_update_app_env_response::configuration_update_app_env_response(const configuration_update_app_env_response& other494) { + err = other494.err; + hint_message = other494.hint_message; + __isset = other494.__isset; +} +configuration_update_app_env_response::configuration_update_app_env_response( configuration_update_app_env_response&& other495) { + err = std::move(other495.err); + hint_message = std::move(other495.hint_message); + __isset = std::move(other495.__isset); +} +configuration_update_app_env_response& configuration_update_app_env_response::operator=(const configuration_update_app_env_response& other496) { + err = other496.err; + hint_message = other496.hint_message; + __isset = other496.__isset; + return *this; +} +configuration_update_app_env_response& configuration_update_app_env_response::operator=(configuration_update_app_env_response&& other497) { + err = std::move(other497.err); + hint_message = std::move(other497.hint_message); + __isset = std::move(other497.__isset); + return *this; +} +void configuration_update_app_env_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_update_app_env_response("; + out << "err=" << to_string(err); + out << ", " << "hint_message=" << to_string(hint_message); + out << ")"; +} + + +duplication_add_request::~duplication_add_request() throw() { +} + + +void duplication_add_request::__set_app_name(const std::string& val) { + this->app_name = val; +} + +void duplication_add_request::__set_remote_cluster_name(const std::string& val) { + this->remote_cluster_name = val; +} + +void duplication_add_request::__set_freezed(const bool val) { + this->freezed = val; +} + +uint32_t duplication_add_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->remote_cluster_name); + this->__isset.remote_cluster_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->freezed); + this->__isset.freezed = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t duplication_add_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_add_request"); + + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("remote_cluster_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->remote_cluster_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("freezed", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->freezed); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_add_request &a, duplication_add_request &b) { + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.remote_cluster_name, b.remote_cluster_name); + swap(a.freezed, b.freezed); + swap(a.__isset, b.__isset); +} + +duplication_add_request::duplication_add_request(const duplication_add_request& other498) { + app_name = other498.app_name; + remote_cluster_name = other498.remote_cluster_name; + freezed = other498.freezed; + __isset = other498.__isset; +} +duplication_add_request::duplication_add_request( duplication_add_request&& other499) { + app_name = std::move(other499.app_name); + remote_cluster_name = std::move(other499.remote_cluster_name); + freezed = std::move(other499.freezed); + __isset = std::move(other499.__isset); +} +duplication_add_request& duplication_add_request::operator=(const duplication_add_request& other500) { + app_name = other500.app_name; + remote_cluster_name = other500.remote_cluster_name; + freezed = other500.freezed; + __isset = other500.__isset; + return *this; +} +duplication_add_request& duplication_add_request::operator=(duplication_add_request&& other501) { + app_name = std::move(other501.app_name); + remote_cluster_name = std::move(other501.remote_cluster_name); + freezed = std::move(other501.freezed); + __isset = std::move(other501.__isset); + return *this; +} +void duplication_add_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "duplication_add_request("; + out << "app_name=" << to_string(app_name); + out << ", " << "remote_cluster_name=" << to_string(remote_cluster_name); + out << ", " << "freezed=" << to_string(freezed); + out << ")"; +} + + +duplication_add_response::~duplication_add_response() throw() { +} + + +void duplication_add_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void duplication_add_response::__set_appid(const int32_t val) { + this->appid = val; +} + +void duplication_add_response::__set_dupid(const int32_t val) { + this->dupid = val; +} + +void duplication_add_response::__set_hint(const std::string& val) { + this->hint = val; +__isset.hint = true; +} + +uint32_t duplication_add_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->appid); + this->__isset.appid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->dupid); + this->__isset.dupid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint); + this->__isset.hint = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t duplication_add_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_add_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->appid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->dupid); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.hint) { + xfer += oprot->writeFieldBegin("hint", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->hint); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_add_response &a, duplication_add_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.appid, b.appid); + swap(a.dupid, b.dupid); + swap(a.hint, b.hint); + swap(a.__isset, b.__isset); +} + +duplication_add_response::duplication_add_response(const duplication_add_response& other502) { + err = other502.err; + appid = other502.appid; + dupid = other502.dupid; + hint = other502.hint; + __isset = other502.__isset; +} +duplication_add_response::duplication_add_response( duplication_add_response&& other503) { + err = std::move(other503.err); + appid = std::move(other503.appid); + dupid = std::move(other503.dupid); + hint = std::move(other503.hint); + __isset = std::move(other503.__isset); +} +duplication_add_response& duplication_add_response::operator=(const duplication_add_response& other504) { + err = other504.err; + appid = other504.appid; + dupid = other504.dupid; + hint = other504.hint; + __isset = other504.__isset; + return *this; +} +duplication_add_response& duplication_add_response::operator=(duplication_add_response&& other505) { + err = std::move(other505.err); + appid = std::move(other505.appid); + dupid = std::move(other505.dupid); + hint = std::move(other505.hint); + __isset = std::move(other505.__isset); + return *this; +} +void duplication_add_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "duplication_add_response("; + out << "err=" << to_string(err); + out << ", " << "appid=" << to_string(appid); + out << ", " << "dupid=" << to_string(dupid); + out << ", " << "hint="; (__isset.hint ? (out << to_string(hint)) : (out << "")); + out << ")"; +} + + +duplication_modify_request::~duplication_modify_request() throw() { +} + + +void duplication_modify_request::__set_app_name(const std::string& val) { + this->app_name = val; +} + +void duplication_modify_request::__set_dupid(const int32_t val) { + this->dupid = val; +} + +void duplication_modify_request::__set_status(const duplication_status::type val) { + this->status = val; +__isset.status = true; +} + +void duplication_modify_request::__set_fail_mode(const duplication_fail_mode::type val) { + this->fail_mode = val; +__isset.fail_mode = true; +} + +uint32_t duplication_modify_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->dupid); + this->__isset.dupid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast506; + xfer += iprot->readI32(ecast506); + this->status = (duplication_status::type)ecast506; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast507; + xfer += iprot->readI32(ecast507); + this->fail_mode = (duplication_fail_mode::type)ecast507; + this->__isset.fail_mode = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t duplication_modify_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_modify_request"); + + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->dupid); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.status) { + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.fail_mode) { + xfer += oprot->writeFieldBegin("fail_mode", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((int32_t)this->fail_mode); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_modify_request &a, duplication_modify_request &b) { + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.dupid, b.dupid); + swap(a.status, b.status); + swap(a.fail_mode, b.fail_mode); + swap(a.__isset, b.__isset); +} + +duplication_modify_request::duplication_modify_request(const duplication_modify_request& other508) { + app_name = other508.app_name; + dupid = other508.dupid; + status = other508.status; + fail_mode = other508.fail_mode; + __isset = other508.__isset; +} +duplication_modify_request::duplication_modify_request( duplication_modify_request&& other509) { + app_name = std::move(other509.app_name); + dupid = std::move(other509.dupid); + status = std::move(other509.status); + fail_mode = std::move(other509.fail_mode); + __isset = std::move(other509.__isset); +} +duplication_modify_request& duplication_modify_request::operator=(const duplication_modify_request& other510) { + app_name = other510.app_name; + dupid = other510.dupid; + status = other510.status; + fail_mode = other510.fail_mode; + __isset = other510.__isset; + return *this; +} +duplication_modify_request& duplication_modify_request::operator=(duplication_modify_request&& other511) { + app_name = std::move(other511.app_name); + dupid = std::move(other511.dupid); + status = std::move(other511.status); + fail_mode = std::move(other511.fail_mode); + __isset = std::move(other511.__isset); + return *this; +} +void duplication_modify_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "duplication_modify_request("; + out << "app_name=" << to_string(app_name); + out << ", " << "dupid=" << to_string(dupid); + out << ", " << "status="; (__isset.status ? (out << to_string(status)) : (out << "")); + out << ", " << "fail_mode="; (__isset.fail_mode ? (out << to_string(fail_mode)) : (out << "")); + out << ")"; +} + + +duplication_modify_response::~duplication_modify_response() throw() { +} + + +void duplication_modify_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} + +void duplication_modify_response::__set_appid(const int32_t val) { + this->appid = val; +} + +uint32_t duplication_modify_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->appid); + this->__isset.appid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t duplication_modify_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_modify_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->appid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_modify_response &a, duplication_modify_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.appid, b.appid); + swap(a.__isset, b.__isset); +} + +duplication_modify_response::duplication_modify_response(const duplication_modify_response& other512) { + err = other512.err; + appid = other512.appid; + __isset = other512.__isset; +} +duplication_modify_response::duplication_modify_response( duplication_modify_response&& other513) { + err = std::move(other513.err); + appid = std::move(other513.appid); + __isset = std::move(other513.__isset); +} +duplication_modify_response& duplication_modify_response::operator=(const duplication_modify_response& other514) { + err = other514.err; + appid = other514.appid; + __isset = other514.__isset; + return *this; +} +duplication_modify_response& duplication_modify_response::operator=(duplication_modify_response&& other515) { + err = std::move(other515.err); + appid = std::move(other515.appid); + __isset = std::move(other515.__isset); + return *this; +} +void duplication_modify_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "duplication_modify_response("; + out << "err=" << to_string(err); + out << ", " << "appid=" << to_string(appid); + out << ")"; +} + + +duplication_entry::~duplication_entry() throw() { +} + + +void duplication_entry::__set_dupid(const int32_t val) { + this->dupid = val; +} + +void duplication_entry::__set_status(const duplication_status::type val) { + this->status = val; +} + +void duplication_entry::__set_remote(const std::string& val) { + this->remote = val; +} + +void duplication_entry::__set_create_ts(const int64_t val) { + this->create_ts = val; +} + +void duplication_entry::__set_progress(const std::map & val) { + this->progress = val; +__isset.progress = true; +} + +void duplication_entry::__set_fail_mode(const duplication_fail_mode::type val) { + this->fail_mode = val; +__isset.fail_mode = true; +} + +uint32_t duplication_entry::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->dupid); + this->__isset.dupid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast516; + xfer += iprot->readI32(ecast516); + this->status = (duplication_status::type)ecast516; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->remote); + this->__isset.remote = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->create_ts); + this->__isset.create_ts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->progress.clear(); + uint32_t _size517; + ::apache::thrift::protocol::TType _ktype518; + ::apache::thrift::protocol::TType _vtype519; + xfer += iprot->readMapBegin(_ktype518, _vtype519, _size517); + uint32_t _i521; + for (_i521 = 0; _i521 < _size517; ++_i521) + { + int32_t _key522; + xfer += iprot->readI32(_key522); + int64_t& _val523 = this->progress[_key522]; + xfer += iprot->readI64(_val523); + } + xfer += iprot->readMapEnd(); + } + this->__isset.progress = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast524; + xfer += iprot->readI32(ecast524); + this->fail_mode = (duplication_fail_mode::type)ecast524; + this->__isset.fail_mode = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); -void policy_entry::__set_backup_history_count_to_keep(const int32_t val) -{ - this->backup_history_count_to_keep = val; + return xfer; } -void policy_entry::__set_start_time(const std::string &val) { this->start_time = val; } +uint32_t duplication_entry::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_entry"); -void policy_entry::__set_is_disable(const bool val) { this->is_disable = val; } + xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->dupid); + xfer += oprot->writeFieldEnd(); -uint32_t policy_entry::read(::apache::thrift::protocol::TProtocol *iprot) -{ + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("remote", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->remote); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("create_ts", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->create_ts); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->backup_provider_type); - this->__isset.backup_provider_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->backup_interval_seconds); - this->__isset.backup_interval_seconds = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_SET) { - { - this->app_ids.clear(); - uint32_t _size391; - ::apache::thrift::protocol::TType _etype394; - xfer += iprot->readSetBegin(_etype394, _size391); - uint32_t _i395; - for (_i395 = 0; _i395 < _size391; ++_i395) { - int32_t _elem396; - xfer += iprot->readI32(_elem396); - this->app_ids.insert(_elem396); - } - xfer += iprot->readSetEnd(); - } - this->__isset.app_ids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->backup_history_count_to_keep); - this->__isset.backup_history_count_to_keep = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->start_time); - this->__isset.start_time = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_disable); - this->__isset.is_disable = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + if (this->__isset.progress) { + xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_I64, static_cast(this->progress.size())); + std::map ::const_iterator _iter525; + for (_iter525 = this->progress.begin(); _iter525 != this->progress.end(); ++_iter525) + { + xfer += oprot->writeI32(_iter525->first); + xfer += oprot->writeI64(_iter525->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.fail_mode) { + xfer += oprot->writeFieldBegin("fail_mode", ::apache::thrift::protocol::T_I32, 7); + xfer += oprot->writeI32((int32_t)this->fail_mode); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_entry &a, duplication_entry &b) { + using ::std::swap; + swap(a.dupid, b.dupid); + swap(a.status, b.status); + swap(a.remote, b.remote); + swap(a.create_ts, b.create_ts); + swap(a.progress, b.progress); + swap(a.fail_mode, b.fail_mode); + swap(a.__isset, b.__isset); +} + +duplication_entry::duplication_entry(const duplication_entry& other526) { + dupid = other526.dupid; + status = other526.status; + remote = other526.remote; + create_ts = other526.create_ts; + progress = other526.progress; + fail_mode = other526.fail_mode; + __isset = other526.__isset; +} +duplication_entry::duplication_entry( duplication_entry&& other527) { + dupid = std::move(other527.dupid); + status = std::move(other527.status); + remote = std::move(other527.remote); + create_ts = std::move(other527.create_ts); + progress = std::move(other527.progress); + fail_mode = std::move(other527.fail_mode); + __isset = std::move(other527.__isset); +} +duplication_entry& duplication_entry::operator=(const duplication_entry& other528) { + dupid = other528.dupid; + status = other528.status; + remote = other528.remote; + create_ts = other528.create_ts; + progress = other528.progress; + fail_mode = other528.fail_mode; + __isset = other528.__isset; + return *this; +} +duplication_entry& duplication_entry::operator=(duplication_entry&& other529) { + dupid = std::move(other529.dupid); + status = std::move(other529.status); + remote = std::move(other529.remote); + create_ts = std::move(other529.create_ts); + progress = std::move(other529.progress); + fail_mode = std::move(other529.fail_mode); + __isset = std::move(other529.__isset); + return *this; +} +void duplication_entry::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "duplication_entry("; + out << "dupid=" << to_string(dupid); + out << ", " << "status=" << to_string(status); + out << ", " << "remote=" << to_string(remote); + out << ", " << "create_ts=" << to_string(create_ts); + out << ", " << "progress="; (__isset.progress ? (out << to_string(progress)) : (out << "")); + out << ", " << "fail_mode="; (__isset.fail_mode ? (out << to_string(fail_mode)) : (out << "")); + out << ")"; +} + + +duplication_query_request::~duplication_query_request() throw() { +} + + +void duplication_query_request::__set_app_name(const std::string& val) { + this->app_name = val; +} + +uint32_t duplication_query_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t policy_entry::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("policy_entry"); +uint32_t duplication_query_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_query_request"); - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("backup_provider_type", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->backup_provider_type); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += - oprot->writeFieldBegin("backup_interval_seconds", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->backup_interval_seconds); - xfer += oprot->writeFieldEnd(); +void swap(duplication_query_request &a, duplication_query_request &b) { + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldBegin("app_ids", ::apache::thrift::protocol::T_SET, 4); - { - xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I32, - static_cast(this->app_ids.size())); - std::set::const_iterator _iter397; - for (_iter397 = this->app_ids.begin(); _iter397 != this->app_ids.end(); ++_iter397) { - xfer += oprot->writeI32((*_iter397)); - } - xfer += oprot->writeSetEnd(); - } - xfer += oprot->writeFieldEnd(); +duplication_query_request::duplication_query_request(const duplication_query_request& other530) { + app_name = other530.app_name; + __isset = other530.__isset; +} +duplication_query_request::duplication_query_request( duplication_query_request&& other531) { + app_name = std::move(other531.app_name); + __isset = std::move(other531.__isset); +} +duplication_query_request& duplication_query_request::operator=(const duplication_query_request& other532) { + app_name = other532.app_name; + __isset = other532.__isset; + return *this; +} +duplication_query_request& duplication_query_request::operator=(duplication_query_request&& other533) { + app_name = std::move(other533.app_name); + __isset = std::move(other533.__isset); + return *this; +} +void duplication_query_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "duplication_query_request("; + out << "app_name=" << to_string(app_name); + out << ")"; +} - xfer += oprot->writeFieldBegin( - "backup_history_count_to_keep", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32(this->backup_history_count_to_keep); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("start_time", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->start_time); - xfer += oprot->writeFieldEnd(); +duplication_query_response::~duplication_query_response() throw() { +} - xfer += oprot->writeFieldBegin("is_disable", ::apache::thrift::protocol::T_BOOL, 7); - xfer += oprot->writeBool(this->is_disable); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(policy_entry &a, policy_entry &b) -{ - using ::std::swap; - swap(a.policy_name, b.policy_name); - swap(a.backup_provider_type, b.backup_provider_type); - swap(a.backup_interval_seconds, b.backup_interval_seconds); - swap(a.app_ids, b.app_ids); - swap(a.backup_history_count_to_keep, b.backup_history_count_to_keep); - swap(a.start_time, b.start_time); - swap(a.is_disable, b.is_disable); - swap(a.__isset, b.__isset); -} - -policy_entry::policy_entry(const policy_entry &other398) -{ - policy_name = other398.policy_name; - backup_provider_type = other398.backup_provider_type; - backup_interval_seconds = other398.backup_interval_seconds; - app_ids = other398.app_ids; - backup_history_count_to_keep = other398.backup_history_count_to_keep; - start_time = other398.start_time; - is_disable = other398.is_disable; - __isset = other398.__isset; -} -policy_entry::policy_entry(policy_entry &&other399) -{ - policy_name = std::move(other399.policy_name); - backup_provider_type = std::move(other399.backup_provider_type); - backup_interval_seconds = std::move(other399.backup_interval_seconds); - app_ids = std::move(other399.app_ids); - backup_history_count_to_keep = std::move(other399.backup_history_count_to_keep); - start_time = std::move(other399.start_time); - is_disable = std::move(other399.is_disable); - __isset = std::move(other399.__isset); -} -policy_entry &policy_entry::operator=(const policy_entry &other400) -{ - policy_name = other400.policy_name; - backup_provider_type = other400.backup_provider_type; - backup_interval_seconds = other400.backup_interval_seconds; - app_ids = other400.app_ids; - backup_history_count_to_keep = other400.backup_history_count_to_keep; - start_time = other400.start_time; - is_disable = other400.is_disable; - __isset = other400.__isset; - return *this; -} -policy_entry &policy_entry::operator=(policy_entry &&other401) -{ - policy_name = std::move(other401.policy_name); - backup_provider_type = std::move(other401.backup_provider_type); - backup_interval_seconds = std::move(other401.backup_interval_seconds); - app_ids = std::move(other401.app_ids); - backup_history_count_to_keep = std::move(other401.backup_history_count_to_keep); - start_time = std::move(other401.start_time); - is_disable = std::move(other401.is_disable); - __isset = std::move(other401.__isset); - return *this; -} -void policy_entry::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "policy_entry("; - out << "policy_name=" << to_string(policy_name); - out << ", " - << "backup_provider_type=" << to_string(backup_provider_type); - out << ", " - << "backup_interval_seconds=" << to_string(backup_interval_seconds); - out << ", " - << "app_ids=" << to_string(app_ids); - out << ", " - << "backup_history_count_to_keep=" << to_string(backup_history_count_to_keep); - out << ", " - << "start_time=" << to_string(start_time); - out << ", " - << "is_disable=" << to_string(is_disable); - out << ")"; -} - -backup_entry::~backup_entry() throw() {} - -void backup_entry::__set_backup_id(const int64_t val) { this->backup_id = val; } - -void backup_entry::__set_start_time_ms(const int64_t val) { this->start_time_ms = val; } - -void backup_entry::__set_end_time_ms(const int64_t val) { this->end_time_ms = val; } - -void backup_entry::__set_app_ids(const std::set &val) { this->app_ids = val; } - -uint32_t backup_entry::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->backup_id); - this->__isset.backup_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->start_time_ms); - this->__isset.start_time_ms = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->end_time_ms); - this->__isset.end_time_ms = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_SET) { - { - this->app_ids.clear(); - uint32_t _size402; - ::apache::thrift::protocol::TType _etype405; - xfer += iprot->readSetBegin(_etype405, _size402); - uint32_t _i406; - for (_i406 = 0; _i406 < _size402; ++_i406) { - int32_t _elem407; - xfer += iprot->readI32(_elem407); - this->app_ids.insert(_elem407); - } - xfer += iprot->readSetEnd(); - } - this->__isset.app_ids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void duplication_query_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} - xfer += iprot->readStructEnd(); +void duplication_query_response::__set_appid(const int32_t val) { + this->appid = val; +} - return xfer; +void duplication_query_response::__set_entry_list(const std::vector & val) { + this->entry_list = val; } -uint32_t backup_entry::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("backup_entry"); +uint32_t duplication_query_response::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("backup_id", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->backup_id); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldBegin("start_time_ms", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->start_time_ms); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("end_time_ms", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->end_time_ms); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("app_ids", ::apache::thrift::protocol::T_SET, 4); - { - xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I32, - static_cast(this->app_ids.size())); - std::set::const_iterator _iter408; - for (_iter408 = this->app_ids.begin(); _iter408 != this->app_ids.end(); ++_iter408) { - xfer += oprot->writeI32((*_iter408)); - } - xfer += oprot->writeSetEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(backup_entry &a, backup_entry &b) -{ - using ::std::swap; - swap(a.backup_id, b.backup_id); - swap(a.start_time_ms, b.start_time_ms); - swap(a.end_time_ms, b.end_time_ms); - swap(a.app_ids, b.app_ids); - swap(a.__isset, b.__isset); -} - -backup_entry::backup_entry(const backup_entry &other409) -{ - backup_id = other409.backup_id; - start_time_ms = other409.start_time_ms; - end_time_ms = other409.end_time_ms; - app_ids = other409.app_ids; - __isset = other409.__isset; -} -backup_entry::backup_entry(backup_entry &&other410) -{ - backup_id = std::move(other410.backup_id); - start_time_ms = std::move(other410.start_time_ms); - end_time_ms = std::move(other410.end_time_ms); - app_ids = std::move(other410.app_ids); - __isset = std::move(other410.__isset); -} -backup_entry &backup_entry::operator=(const backup_entry &other411) -{ - backup_id = other411.backup_id; - start_time_ms = other411.start_time_ms; - end_time_ms = other411.end_time_ms; - app_ids = other411.app_ids; - __isset = other411.__isset; - return *this; -} -backup_entry &backup_entry::operator=(backup_entry &&other412) -{ - backup_id = std::move(other412.backup_id); - start_time_ms = std::move(other412.start_time_ms); - end_time_ms = std::move(other412.end_time_ms); - app_ids = std::move(other412.app_ids); - __isset = std::move(other412.__isset); - return *this; -} -void backup_entry::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "backup_entry("; - out << "backup_id=" << to_string(backup_id); - out << ", " - << "start_time_ms=" << to_string(start_time_ms); - out << ", " - << "end_time_ms=" << to_string(end_time_ms); - out << ", " - << "app_ids=" << to_string(app_ids); - out << ")"; -} - -configuration_query_backup_policy_request::~configuration_query_backup_policy_request() throw() {} - -void configuration_query_backup_policy_request::__set_policy_names( - const std::vector &val) -{ - this->policy_names = val; -} - -void configuration_query_backup_policy_request::__set_backup_info_count(const int32_t val) -{ - this->backup_info_count = val; -} - -uint32_t -configuration_query_backup_policy_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->policy_names.clear(); - uint32_t _size413; - ::apache::thrift::protocol::TType _etype416; - xfer += iprot->readListBegin(_etype416, _size413); - this->policy_names.resize(_size413); - uint32_t _i417; - for (_i417 = 0; _i417 < _size413; ++_i417) { - xfer += iprot->readString(this->policy_names[_i417]); - } - xfer += iprot->readListEnd(); - } - this->__isset.policy_names = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->backup_info_count); - this->__isset.backup_info_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t -configuration_query_backup_policy_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_backup_policy_request"); - - xfer += oprot->writeFieldBegin("policy_names", ::apache::thrift::protocol::T_LIST, 1); + switch (fid) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, - static_cast(this->policy_names.size())); - std::vector::const_iterator _iter418; - for (_iter418 = this->policy_names.begin(); _iter418 != this->policy_names.end(); - ++_iter418) { - xfer += oprot->writeString((*_iter418)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("backup_info_count", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->backup_info_count); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_query_backup_policy_request &a, - configuration_query_backup_policy_request &b) -{ - using ::std::swap; - swap(a.policy_names, b.policy_names); - swap(a.backup_info_count, b.backup_info_count); - swap(a.__isset, b.__isset); -} - -configuration_query_backup_policy_request::configuration_query_backup_policy_request( - const configuration_query_backup_policy_request &other419) -{ - policy_names = other419.policy_names; - backup_info_count = other419.backup_info_count; - __isset = other419.__isset; -} -configuration_query_backup_policy_request::configuration_query_backup_policy_request( - configuration_query_backup_policy_request &&other420) -{ - policy_names = std::move(other420.policy_names); - backup_info_count = std::move(other420.backup_info_count); - __isset = std::move(other420.__isset); -} -configuration_query_backup_policy_request &configuration_query_backup_policy_request:: -operator=(const configuration_query_backup_policy_request &other421) -{ - policy_names = other421.policy_names; - backup_info_count = other421.backup_info_count; - __isset = other421.__isset; - return *this; -} -configuration_query_backup_policy_request &configuration_query_backup_policy_request:: -operator=(configuration_query_backup_policy_request &&other422) -{ - policy_names = std::move(other422.policy_names); - backup_info_count = std::move(other422.backup_info_count); - __isset = std::move(other422.__isset); - return *this; -} -void configuration_query_backup_policy_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_query_backup_policy_request("; - out << "policy_names=" << to_string(policy_names); - out << ", " - << "backup_info_count=" << to_string(backup_info_count); - out << ")"; -} - -configuration_query_backup_policy_response::~configuration_query_backup_policy_response() throw() {} - -void configuration_query_backup_policy_response::__set_err(const ::dsn::error_code &val) -{ - this->err = val; -} - -void configuration_query_backup_policy_response::__set_policys(const std::vector &val) -{ - this->policys = val; -} - -void configuration_query_backup_policy_response::__set_backup_infos( - const std::vector> &val) -{ - this->backup_infos = val; -} - -void configuration_query_backup_policy_response::__set_hint_msg(const std::string &val) -{ - this->hint_msg = val; - __isset.hint_msg = true; -} - -uint32_t -configuration_query_backup_policy_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->policys.clear(); - uint32_t _size423; - ::apache::thrift::protocol::TType _etype426; - xfer += iprot->readListBegin(_etype426, _size423); - this->policys.resize(_size423); - uint32_t _i427; - for (_i427 = 0; _i427 < _size423; ++_i427) { - xfer += this->policys[_i427].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.policys = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->backup_infos.clear(); - uint32_t _size428; - ::apache::thrift::protocol::TType _etype431; - xfer += iprot->readListBegin(_etype431, _size428); - this->backup_infos.resize(_size428); - uint32_t _i432; - for (_i432 = 0; _i432 < _size428; ++_i432) { - { - this->backup_infos[_i432].clear(); - uint32_t _size433; - ::apache::thrift::protocol::TType _etype436; - xfer += iprot->readListBegin(_etype436, _size433); - this->backup_infos[_i432].resize(_size433); - uint32_t _i437; - for (_i437 = 0; _i437 < _size433; ++_i437) { - xfer += this->backup_infos[_i432][_i437].read(iprot); - } - xfer += iprot->readListEnd(); - } - } - xfer += iprot->readListEnd(); - } - this->__isset.backup_infos = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint_msg); - this->__isset.hint_msg = true; - } else { - xfer += iprot->skip(ftype); + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->appid); + this->__isset.appid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->entry_list.clear(); + uint32_t _size534; + ::apache::thrift::protocol::TType _etype537; + xfer += iprot->readListBegin(_etype537, _size534); + this->entry_list.resize(_size534); + uint32_t _i538; + for (_i538 = 0; _i538 < _size534; ++_i538) + { + xfer += this->entry_list[_i538].read(iprot); } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readListEnd(); + } + this->__isset.entry_list = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_query_backup_policy_response::write( - ::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_backup_policy_response"); +uint32_t duplication_query_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_query_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("policys", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->policys.size())); - std::vector::const_iterator _iter438; - for (_iter438 = this->policys.begin(); _iter438 != this->policys.end(); ++_iter438) { - xfer += (*_iter438).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->appid); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("backup_infos", ::apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("entry_list", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->entry_list.size())); + std::vector ::const_iterator _iter539; + for (_iter539 = this->entry_list.begin(); _iter539 != this->entry_list.end(); ++_iter539) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, - static_cast(this->backup_infos.size())); - std::vector>::const_iterator _iter439; - for (_iter439 = this->backup_infos.begin(); _iter439 != this->backup_infos.end(); - ++_iter439) { - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast((*_iter439).size())); - std::vector::const_iterator _iter440; - for (_iter440 = (*_iter439).begin(); _iter440 != (*_iter439).end(); ++_iter440) { - xfer += (*_iter440).write(oprot); - } - xfer += oprot->writeListEnd(); - } - } - xfer += oprot->writeListEnd(); + xfer += (*_iter539).write(oprot); } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - if (this->__isset.hint_msg) { - xfer += oprot->writeFieldBegin("hint_msg", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->hint_msg); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_query_backup_policy_response &a, - configuration_query_backup_policy_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.policys, b.policys); - swap(a.backup_infos, b.backup_infos); - swap(a.hint_msg, b.hint_msg); - swap(a.__isset, b.__isset); -} - -configuration_query_backup_policy_response::configuration_query_backup_policy_response( - const configuration_query_backup_policy_response &other441) -{ - err = other441.err; - policys = other441.policys; - backup_infos = other441.backup_infos; - hint_msg = other441.hint_msg; - __isset = other441.__isset; -} -configuration_query_backup_policy_response::configuration_query_backup_policy_response( - configuration_query_backup_policy_response &&other442) -{ - err = std::move(other442.err); - policys = std::move(other442.policys); - backup_infos = std::move(other442.backup_infos); - hint_msg = std::move(other442.hint_msg); - __isset = std::move(other442.__isset); -} -configuration_query_backup_policy_response &configuration_query_backup_policy_response:: -operator=(const configuration_query_backup_policy_response &other443) -{ - err = other443.err; - policys = other443.policys; - backup_infos = other443.backup_infos; - hint_msg = other443.hint_msg; - __isset = other443.__isset; - return *this; -} -configuration_query_backup_policy_response &configuration_query_backup_policy_response:: -operator=(configuration_query_backup_policy_response &&other444) -{ - err = std::move(other444.err); - policys = std::move(other444.policys); - backup_infos = std::move(other444.backup_infos); - hint_msg = std::move(other444.hint_msg); - __isset = std::move(other444.__isset); - return *this; -} -void configuration_query_backup_policy_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_query_backup_policy_response("; - out << "err=" << to_string(err); - out << ", " - << "policys=" << to_string(policys); - out << ", " - << "backup_infos=" << to_string(backup_infos); - out << ", " - << "hint_msg="; - (__isset.hint_msg ? (out << to_string(hint_msg)) : (out << "")); - out << ")"; -} - -configuration_report_restore_status_request::~configuration_report_restore_status_request() throw() -{ -} - -void configuration_report_restore_status_request::__set_pid(const ::dsn::gpid &val) -{ - this->pid = val; -} - -void configuration_report_restore_status_request::__set_restore_status(const ::dsn::error_code &val) -{ - this->restore_status = val; -} - -void configuration_report_restore_status_request::__set_progress(const int32_t val) -{ - this->progress = val; -} - -void configuration_report_restore_status_request::__set_reason(const std::string &val) -{ - this->reason = val; - __isset.reason = true; -} - -uint32_t -configuration_report_restore_status_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->restore_status.read(iprot); - this->__isset.restore_status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->progress); - this->__isset.progress = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->reason); - this->__isset.reason = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += iprot->readStructEnd(); +void swap(duplication_query_response &a, duplication_query_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.appid, b.appid); + swap(a.entry_list, b.entry_list); + swap(a.__isset, b.__isset); +} - return xfer; +duplication_query_response::duplication_query_response(const duplication_query_response& other540) { + err = other540.err; + appid = other540.appid; + entry_list = other540.entry_list; + __isset = other540.__isset; +} +duplication_query_response::duplication_query_response( duplication_query_response&& other541) { + err = std::move(other541.err); + appid = std::move(other541.appid); + entry_list = std::move(other541.entry_list); + __isset = std::move(other541.__isset); +} +duplication_query_response& duplication_query_response::operator=(const duplication_query_response& other542) { + err = other542.err; + appid = other542.appid; + entry_list = other542.entry_list; + __isset = other542.__isset; + return *this; +} +duplication_query_response& duplication_query_response::operator=(duplication_query_response&& other543) { + err = std::move(other543.err); + appid = std::move(other543.appid); + entry_list = std::move(other543.entry_list); + __isset = std::move(other543.__isset); + return *this; +} +void duplication_query_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "duplication_query_response("; + out << "err=" << to_string(err); + out << ", " << "appid=" << to_string(appid); + out << ", " << "entry_list=" << to_string(entry_list); + out << ")"; } -uint32_t configuration_report_restore_status_request::write( - ::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_report_restore_status_request"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); +duplication_confirm_entry::~duplication_confirm_entry() throw() { +} - xfer += oprot->writeFieldBegin("restore_status", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->restore_status.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->progress); - xfer += oprot->writeFieldEnd(); +void duplication_confirm_entry::__set_dupid(const int32_t val) { + this->dupid = val; +} - if (this->__isset.reason) { - xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->reason); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_report_restore_status_request &a, - configuration_report_restore_status_request &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.restore_status, b.restore_status); - swap(a.progress, b.progress); - swap(a.reason, b.reason); - swap(a.__isset, b.__isset); -} - -configuration_report_restore_status_request::configuration_report_restore_status_request( - const configuration_report_restore_status_request &other445) -{ - pid = other445.pid; - restore_status = other445.restore_status; - progress = other445.progress; - reason = other445.reason; - __isset = other445.__isset; -} -configuration_report_restore_status_request::configuration_report_restore_status_request( - configuration_report_restore_status_request &&other446) -{ - pid = std::move(other446.pid); - restore_status = std::move(other446.restore_status); - progress = std::move(other446.progress); - reason = std::move(other446.reason); - __isset = std::move(other446.__isset); -} -configuration_report_restore_status_request &configuration_report_restore_status_request:: -operator=(const configuration_report_restore_status_request &other447) -{ - pid = other447.pid; - restore_status = other447.restore_status; - progress = other447.progress; - reason = other447.reason; - __isset = other447.__isset; - return *this; -} -configuration_report_restore_status_request &configuration_report_restore_status_request:: -operator=(configuration_report_restore_status_request &&other448) -{ - pid = std::move(other448.pid); - restore_status = std::move(other448.restore_status); - progress = std::move(other448.progress); - reason = std::move(other448.reason); - __isset = std::move(other448.__isset); - return *this; -} -void configuration_report_restore_status_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_report_restore_status_request("; - out << "pid=" << to_string(pid); - out << ", " - << "restore_status=" << to_string(restore_status); - out << ", " - << "progress=" << to_string(progress); - out << ", " - << "reason="; - (__isset.reason ? (out << to_string(reason)) : (out << "")); - out << ")"; -} - -configuration_report_restore_status_response:: - ~configuration_report_restore_status_response() throw() -{ -} - -void configuration_report_restore_status_response::__set_err(const ::dsn::error_code &val) -{ - this->err = val; -} - -uint32_t -configuration_report_restore_status_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void duplication_confirm_entry::__set_confirmed_decree(const int64_t val) { + this->confirmed_decree = val; +} - xfer += iprot->readStructEnd(); +uint32_t duplication_confirm_entry::read(::apache::thrift::protocol::TProtocol* iprot) { - return xfer; -} + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -uint32_t configuration_report_restore_status_response::write( - ::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_report_restore_status_response"); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_report_restore_status_response &a, - configuration_report_restore_status_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.__isset, b.__isset); -} - -configuration_report_restore_status_response::configuration_report_restore_status_response( - const configuration_report_restore_status_response &other449) -{ - err = other449.err; - __isset = other449.__isset; -} -configuration_report_restore_status_response::configuration_report_restore_status_response( - configuration_report_restore_status_response &&other450) -{ - err = std::move(other450.err); - __isset = std::move(other450.__isset); -} -configuration_report_restore_status_response &configuration_report_restore_status_response:: -operator=(const configuration_report_restore_status_response &other451) -{ - err = other451.err; - __isset = other451.__isset; - return *this; -} -configuration_report_restore_status_response &configuration_report_restore_status_response:: -operator=(configuration_report_restore_status_response &&other452) -{ - err = std::move(other452.err); - __isset = std::move(other452.__isset); - return *this; -} -void configuration_report_restore_status_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_report_restore_status_response("; - out << "err=" << to_string(err); - out << ")"; -} - -configuration_query_restore_request::~configuration_query_restore_request() throw() {} - -void configuration_query_restore_request::__set_restore_app_id(const int32_t val) -{ - this->restore_app_id = val; -} - -uint32_t configuration_query_restore_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->restore_app_id); - this->__isset.restore_app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->dupid); + this->__isset.dupid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->confirmed_decree); + this->__isset.confirmed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t -configuration_query_restore_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_restore_request"); +uint32_t duplication_confirm_entry::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_confirm_entry"); - xfer += oprot->writeFieldBegin("restore_app_id", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->restore_app_id); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->dupid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("confirmed_decree", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->confirmed_decree); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_query_restore_request &a, configuration_query_restore_request &b) -{ - using ::std::swap; - swap(a.restore_app_id, b.restore_app_id); - swap(a.__isset, b.__isset); +void swap(duplication_confirm_entry &a, duplication_confirm_entry &b) { + using ::std::swap; + swap(a.dupid, b.dupid); + swap(a.confirmed_decree, b.confirmed_decree); + swap(a.__isset, b.__isset); } -configuration_query_restore_request::configuration_query_restore_request( - const configuration_query_restore_request &other453) -{ - restore_app_id = other453.restore_app_id; - __isset = other453.__isset; +duplication_confirm_entry::duplication_confirm_entry(const duplication_confirm_entry& other544) { + dupid = other544.dupid; + confirmed_decree = other544.confirmed_decree; + __isset = other544.__isset; } -configuration_query_restore_request::configuration_query_restore_request( - configuration_query_restore_request &&other454) -{ - restore_app_id = std::move(other454.restore_app_id); - __isset = std::move(other454.__isset); +duplication_confirm_entry::duplication_confirm_entry( duplication_confirm_entry&& other545) { + dupid = std::move(other545.dupid); + confirmed_decree = std::move(other545.confirmed_decree); + __isset = std::move(other545.__isset); } -configuration_query_restore_request &configuration_query_restore_request:: -operator=(const configuration_query_restore_request &other455) -{ - restore_app_id = other455.restore_app_id; - __isset = other455.__isset; - return *this; +duplication_confirm_entry& duplication_confirm_entry::operator=(const duplication_confirm_entry& other546) { + dupid = other546.dupid; + confirmed_decree = other546.confirmed_decree; + __isset = other546.__isset; + return *this; } -configuration_query_restore_request &configuration_query_restore_request:: -operator=(configuration_query_restore_request &&other456) -{ - restore_app_id = std::move(other456.restore_app_id); - __isset = std::move(other456.__isset); - return *this; +duplication_confirm_entry& duplication_confirm_entry::operator=(duplication_confirm_entry&& other547) { + dupid = std::move(other547.dupid); + confirmed_decree = std::move(other547.confirmed_decree); + __isset = std::move(other547.__isset); + return *this; } -void configuration_query_restore_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_query_restore_request("; - out << "restore_app_id=" << to_string(restore_app_id); - out << ")"; +void duplication_confirm_entry::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "duplication_confirm_entry("; + out << "dupid=" << to_string(dupid); + out << ", " << "confirmed_decree=" << to_string(confirmed_decree); + out << ")"; } -configuration_query_restore_response::~configuration_query_restore_response() throw() {} -void configuration_query_restore_response::__set_err(const ::dsn::error_code &val) -{ - this->err = val; +duplication_sync_request::~duplication_sync_request() throw() { } -void configuration_query_restore_response::__set_restore_status( - const std::vector<::dsn::error_code> &val) -{ - this->restore_status = val; + +void duplication_sync_request::__set_node(const ::dsn::rpc_address& val) { + this->node = val; } -void configuration_query_restore_response::__set_restore_progress(const std::vector &val) -{ - this->restore_progress = val; +void duplication_sync_request::__set_confirm_list(const std::map< ::dsn::gpid, std::vector > & val) { + this->confirm_list = val; } -uint32_t configuration_query_restore_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t duplication_sync_request::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->restore_status.clear(); - uint32_t _size457; - ::apache::thrift::protocol::TType _etype460; - xfer += iprot->readListBegin(_etype460, _size457); - this->restore_status.resize(_size457); - uint32_t _i461; - for (_i461 = 0; _i461 < _size457; ++_i461) { - xfer += this->restore_status[_i461].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.restore_status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->confirm_list.clear(); + uint32_t _size548; + ::apache::thrift::protocol::TType _ktype549; + ::apache::thrift::protocol::TType _vtype550; + xfer += iprot->readMapBegin(_ktype549, _vtype550, _size548); + uint32_t _i552; + for (_i552 = 0; _i552 < _size548; ++_i552) + { + ::dsn::gpid _key553; + xfer += _key553.read(iprot); + std::vector & _val554 = this->confirm_list[_key553]; + { + _val554.clear(); + uint32_t _size555; + ::apache::thrift::protocol::TType _etype558; + xfer += iprot->readListBegin(_etype558, _size555); + _val554.resize(_size555); + uint32_t _i559; + for (_i559 = 0; _i559 < _size555; ++_i559) { - this->restore_progress.clear(); - uint32_t _size462; - ::apache::thrift::protocol::TType _etype465; - xfer += iprot->readListBegin(_etype465, _size462); - this->restore_progress.resize(_size462); - uint32_t _i466; - for (_i466 = 0; _i466 < _size462; ++_i466) { - xfer += iprot->readI32(this->restore_progress[_i466]); - } - xfer += iprot->readListEnd(); + xfer += _val554[_i559].read(iprot); } - this->__isset.restore_progress = true; - } else { - xfer += iprot->skip(ftype); + xfer += iprot->readListEnd(); + } } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readMapEnd(); + } + this->__isset.confirm_list = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t -configuration_query_restore_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_restore_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t duplication_sync_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_sync_request"); - xfer += oprot->writeFieldBegin("restore_status", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->restore_status.size())); - std::vector<::dsn::error_code>::const_iterator _iter467; - for (_iter467 = this->restore_status.begin(); _iter467 != this->restore_status.end(); - ++_iter467) { - xfer += (*_iter467).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("restore_progress", ::apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("confirm_list", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_LIST, static_cast(this->confirm_list.size())); + std::map< ::dsn::gpid, std::vector > ::const_iterator _iter560; + for (_iter560 = this->confirm_list.begin(); _iter560 != this->confirm_list.end(); ++_iter560) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, - static_cast(this->restore_progress.size())); - std::vector::const_iterator _iter468; - for (_iter468 = this->restore_progress.begin(); _iter468 != this->restore_progress.end(); - ++_iter468) { - xfer += oprot->writeI32((*_iter468)); + xfer += _iter560->first.write(oprot); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter560->second.size())); + std::vector ::const_iterator _iter561; + for (_iter561 = _iter560->second.begin(); _iter561 != _iter560->second.end(); ++_iter561) + { + xfer += (*_iter561).write(oprot); } xfer += oprot->writeListEnd(); + } } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_query_restore_response &a, configuration_query_restore_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.restore_status, b.restore_status); - swap(a.restore_progress, b.restore_progress); - swap(a.__isset, b.__isset); -} - -configuration_query_restore_response::configuration_query_restore_response( - const configuration_query_restore_response &other469) -{ - err = other469.err; - restore_status = other469.restore_status; - restore_progress = other469.restore_progress; - __isset = other469.__isset; -} -configuration_query_restore_response::configuration_query_restore_response( - configuration_query_restore_response &&other470) -{ - err = std::move(other470.err); - restore_status = std::move(other470.restore_status); - restore_progress = std::move(other470.restore_progress); - __isset = std::move(other470.__isset); -} -configuration_query_restore_response &configuration_query_restore_response:: -operator=(const configuration_query_restore_response &other471) -{ - err = other471.err; - restore_status = other471.restore_status; - restore_progress = other471.restore_progress; - __isset = other471.__isset; - return *this; -} -configuration_query_restore_response &configuration_query_restore_response:: -operator=(configuration_query_restore_response &&other472) -{ - err = std::move(other472.err); - restore_status = std::move(other472.restore_status); - restore_progress = std::move(other472.restore_progress); - __isset = std::move(other472.__isset); - return *this; -} -void configuration_query_restore_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_query_restore_response("; - out << "err=" << to_string(err); - out << ", " - << "restore_status=" << to_string(restore_status); - out << ", " - << "restore_progress=" << to_string(restore_progress); - out << ")"; -} - -file_meta::~file_meta() throw() {} - -void file_meta::__set_name(const std::string &val) { this->name = val; } - -void file_meta::__set_size(const int64_t val) { this->size = val; } - -void file_meta::__set_md5(const std::string &val) { this->md5 = val; } - -uint32_t file_meta::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->size); - this->__isset.size = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->md5); - this->__isset.md5 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - return xfer; +void swap(duplication_sync_request &a, duplication_sync_request &b) { + using ::std::swap; + swap(a.node, b.node); + swap(a.confirm_list, b.confirm_list); + swap(a.__isset, b.__isset); } -uint32_t file_meta::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("file_meta"); +duplication_sync_request::duplication_sync_request(const duplication_sync_request& other562) { + node = other562.node; + confirm_list = other562.confirm_list; + __isset = other562.__isset; +} +duplication_sync_request::duplication_sync_request( duplication_sync_request&& other563) { + node = std::move(other563.node); + confirm_list = std::move(other563.confirm_list); + __isset = std::move(other563.__isset); +} +duplication_sync_request& duplication_sync_request::operator=(const duplication_sync_request& other564) { + node = other564.node; + confirm_list = other564.confirm_list; + __isset = other564.__isset; + return *this; +} +duplication_sync_request& duplication_sync_request::operator=(duplication_sync_request&& other565) { + node = std::move(other565.node); + confirm_list = std::move(other565.confirm_list); + __isset = std::move(other565.__isset); + return *this; +} +void duplication_sync_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "duplication_sync_request("; + out << "node=" << to_string(node); + out << ", " << "confirm_list=" << to_string(confirm_list); + out << ")"; +} - xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("size", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->size); - xfer += oprot->writeFieldEnd(); +duplication_sync_response::~duplication_sync_response() throw() { +} - xfer += oprot->writeFieldBegin("md5", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->md5); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; +void duplication_sync_response::__set_err(const ::dsn::error_code& val) { + this->err = val; } -void swap(file_meta &a, file_meta &b) -{ - using ::std::swap; - swap(a.name, b.name); - swap(a.size, b.size); - swap(a.md5, b.md5); - swap(a.__isset, b.__isset); -} - -file_meta::file_meta(const file_meta &other473) -{ - name = other473.name; - size = other473.size; - md5 = other473.md5; - __isset = other473.__isset; -} -file_meta::file_meta(file_meta &&other474) -{ - name = std::move(other474.name); - size = std::move(other474.size); - md5 = std::move(other474.md5); - __isset = std::move(other474.__isset); -} -file_meta &file_meta::operator=(const file_meta &other475) -{ - name = other475.name; - size = other475.size; - md5 = other475.md5; - __isset = other475.__isset; - return *this; -} -file_meta &file_meta::operator=(file_meta &&other476) -{ - name = std::move(other476.name); - size = std::move(other476.size); - md5 = std::move(other476.md5); - __isset = std::move(other476.__isset); - return *this; -} -void file_meta::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "file_meta("; - out << "name=" << to_string(name); - out << ", " - << "size=" << to_string(size); - out << ", " - << "md5=" << to_string(md5); - out << ")"; -} - -configuration_update_app_env_request::~configuration_update_app_env_request() throw() {} - -void configuration_update_app_env_request::__set_app_name(const std::string &val) -{ - this->app_name = val; -} - -void configuration_update_app_env_request::__set_op(const app_env_operation::type val) -{ - this->op = val; -} - -void configuration_update_app_env_request::__set_keys(const std::vector &val) -{ - this->keys = val; - __isset.keys = true; -} - -void configuration_update_app_env_request::__set_values(const std::vector &val) -{ - this->values = val; - __isset.values = true; -} - -void configuration_update_app_env_request::__set_clear_prefix(const std::string &val) -{ - this->clear_prefix = val; - __isset.clear_prefix = true; -} - -uint32_t configuration_update_app_env_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast477; - xfer += iprot->readI32(ecast477); - this->op = (app_env_operation::type)ecast477; - this->__isset.op = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->keys.clear(); - uint32_t _size478; - ::apache::thrift::protocol::TType _etype481; - xfer += iprot->readListBegin(_etype481, _size478); - this->keys.resize(_size478); - uint32_t _i482; - for (_i482 = 0; _i482 < _size478; ++_i482) { - xfer += iprot->readString(this->keys[_i482]); - } - xfer += iprot->readListEnd(); - } - this->__isset.keys = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->values.clear(); - uint32_t _size483; - ::apache::thrift::protocol::TType _etype486; - xfer += iprot->readListBegin(_etype486, _size483); - this->values.resize(_size483); - uint32_t _i487; - for (_i487 = 0; _i487 < _size483; ++_i487) { - xfer += iprot->readString(this->values[_i487]); - } - xfer += iprot->readListEnd(); - } - this->__isset.values = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->clear_prefix); - this->__isset.clear_prefix = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void duplication_sync_response::__set_dup_map(const std::map > & val) { + this->dup_map = val; +} - xfer += iprot->readStructEnd(); +uint32_t duplication_sync_response::read(::apache::thrift::protocol::TProtocol* iprot) { - return xfer; -} + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -uint32_t -configuration_update_app_env_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_update_app_env_request"); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("op", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->op); - xfer += oprot->writeFieldEnd(); - if (this->__isset.keys) { - xfer += oprot->writeFieldBegin("keys", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, - static_cast(this->keys.size())); - std::vector::const_iterator _iter488; - for (_iter488 = this->keys.begin(); _iter488 != this->keys.end(); ++_iter488) { - xfer += oprot->writeString((*_iter488)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - if (this->__isset.values) { - xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, - static_cast(this->values.size())); - std::vector::const_iterator _iter489; - for (_iter489 = this->values.begin(); _iter489 != this->values.end(); ++_iter489) { - xfer += oprot->writeString((*_iter489)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.clear_prefix) { - xfer += oprot->writeFieldBegin("clear_prefix", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->clear_prefix); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_update_app_env_request &a, configuration_update_app_env_request &b) -{ - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.op, b.op); - swap(a.keys, b.keys); - swap(a.values, b.values); - swap(a.clear_prefix, b.clear_prefix); - swap(a.__isset, b.__isset); -} - -configuration_update_app_env_request::configuration_update_app_env_request( - const configuration_update_app_env_request &other490) -{ - app_name = other490.app_name; - op = other490.op; - keys = other490.keys; - values = other490.values; - clear_prefix = other490.clear_prefix; - __isset = other490.__isset; -} -configuration_update_app_env_request::configuration_update_app_env_request( - configuration_update_app_env_request &&other491) -{ - app_name = std::move(other491.app_name); - op = std::move(other491.op); - keys = std::move(other491.keys); - values = std::move(other491.values); - clear_prefix = std::move(other491.clear_prefix); - __isset = std::move(other491.__isset); -} -configuration_update_app_env_request &configuration_update_app_env_request:: -operator=(const configuration_update_app_env_request &other492) -{ - app_name = other492.app_name; - op = other492.op; - keys = other492.keys; - values = other492.values; - clear_prefix = other492.clear_prefix; - __isset = other492.__isset; - return *this; -} -configuration_update_app_env_request &configuration_update_app_env_request:: -operator=(configuration_update_app_env_request &&other493) -{ - app_name = std::move(other493.app_name); - op = std::move(other493.op); - keys = std::move(other493.keys); - values = std::move(other493.values); - clear_prefix = std::move(other493.clear_prefix); - __isset = std::move(other493.__isset); - return *this; -} -void configuration_update_app_env_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_update_app_env_request("; - out << "app_name=" << to_string(app_name); - out << ", " - << "op=" << to_string(op); - out << ", " - << "keys="; - (__isset.keys ? (out << to_string(keys)) : (out << "")); - out << ", " - << "values="; - (__isset.values ? (out << to_string(values)) : (out << "")); - out << ", " - << "clear_prefix="; - (__isset.clear_prefix ? (out << to_string(clear_prefix)) : (out << "")); - out << ")"; -} - -configuration_update_app_env_response::~configuration_update_app_env_response() throw() {} - -void configuration_update_app_env_response::__set_err(const ::dsn::error_code &val) -{ - this->err = val; -} - -void configuration_update_app_env_response::__set_hint_message(const std::string &val) -{ - this->hint_message = val; -} - -uint32_t configuration_update_app_env_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint_message); - this->__isset.hint_message = true; - } else { - xfer += iprot->skip(ftype); + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->dup_map.clear(); + uint32_t _size566; + ::apache::thrift::protocol::TType _ktype567; + ::apache::thrift::protocol::TType _vtype568; + xfer += iprot->readMapBegin(_ktype567, _vtype568, _size566); + uint32_t _i570; + for (_i570 = 0; _i570 < _size566; ++_i570) + { + int32_t _key571; + xfer += iprot->readI32(_key571); + std::map & _val572 = this->dup_map[_key571]; + { + _val572.clear(); + uint32_t _size573; + ::apache::thrift::protocol::TType _ktype574; + ::apache::thrift::protocol::TType _vtype575; + xfer += iprot->readMapBegin(_ktype574, _vtype575, _size573); + uint32_t _i577; + for (_i577 = 0; _i577 < _size573; ++_i577) + { + int32_t _key578; + xfer += iprot->readI32(_key578); + duplication_entry& _val579 = _val572[_key578]; + xfer += _val579.read(iprot); + } + xfer += iprot->readMapEnd(); + } } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readMapEnd(); + } + this->__isset.dup_map = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t -configuration_update_app_env_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_update_app_env_response"); +uint32_t duplication_sync_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_sync_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->hint_message); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_update_app_env_response &a, configuration_update_app_env_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.hint_message, b.hint_message); - swap(a.__isset, b.__isset); -} - -configuration_update_app_env_response::configuration_update_app_env_response( - const configuration_update_app_env_response &other494) -{ - err = other494.err; - hint_message = other494.hint_message; - __isset = other494.__isset; -} -configuration_update_app_env_response::configuration_update_app_env_response( - configuration_update_app_env_response &&other495) -{ - err = std::move(other495.err); - hint_message = std::move(other495.hint_message); - __isset = std::move(other495.__isset); -} -configuration_update_app_env_response &configuration_update_app_env_response:: -operator=(const configuration_update_app_env_response &other496) -{ - err = other496.err; - hint_message = other496.hint_message; - __isset = other496.__isset; - return *this; -} -configuration_update_app_env_response &configuration_update_app_env_response:: -operator=(configuration_update_app_env_response &&other497) -{ - err = std::move(other497.err); - hint_message = std::move(other497.hint_message); - __isset = std::move(other497.__isset); - return *this; -} -void configuration_update_app_env_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_update_app_env_response("; - out << "err=" << to_string(err); - out << ", " - << "hint_message=" << to_string(hint_message); - out << ")"; -} - -duplication_add_request::~duplication_add_request() throw() {} - -void duplication_add_request::__set_app_name(const std::string &val) { this->app_name = val; } - -void duplication_add_request::__set_remote_cluster_name(const std::string &val) -{ - this->remote_cluster_name = val; -} - -void duplication_add_request::__set_freezed(const bool val) { this->freezed = val; } - -uint32_t duplication_add_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->remote_cluster_name); - this->__isset.remote_cluster_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->freezed); - this->__isset.freezed = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldBegin("dup_map", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_MAP, static_cast(this->dup_map.size())); + std::map > ::const_iterator _iter580; + for (_iter580 = this->dup_map.begin(); _iter580 != this->dup_map.end(); ++_iter580) + { + xfer += oprot->writeI32(_iter580->first); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_STRUCT, static_cast(_iter580->second.size())); + std::map ::const_iterator _iter581; + for (_iter581 = _iter580->second.begin(); _iter581 != _iter580->second.end(); ++_iter581) + { + xfer += oprot->writeI32(_iter581->first); + xfer += _iter581->second.write(oprot); } - xfer += iprot->readFieldEnd(); + xfer += oprot->writeMapEnd(); + } } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); - - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -uint32_t duplication_add_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_add_request"); - - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("remote_cluster_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->remote_cluster_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("freezed", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->freezed); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(duplication_add_request &a, duplication_add_request &b) -{ - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.remote_cluster_name, b.remote_cluster_name); - swap(a.freezed, b.freezed); - swap(a.__isset, b.__isset); -} - -duplication_add_request::duplication_add_request(const duplication_add_request &other498) -{ - app_name = other498.app_name; - remote_cluster_name = other498.remote_cluster_name; - freezed = other498.freezed; - __isset = other498.__isset; -} -duplication_add_request::duplication_add_request(duplication_add_request &&other499) -{ - app_name = std::move(other499.app_name); - remote_cluster_name = std::move(other499.remote_cluster_name); - freezed = std::move(other499.freezed); - __isset = std::move(other499.__isset); -} -duplication_add_request &duplication_add_request::operator=(const duplication_add_request &other500) -{ - app_name = other500.app_name; - remote_cluster_name = other500.remote_cluster_name; - freezed = other500.freezed; - __isset = other500.__isset; - return *this; -} -duplication_add_request &duplication_add_request::operator=(duplication_add_request &&other501) -{ - app_name = std::move(other501.app_name); - remote_cluster_name = std::move(other501.remote_cluster_name); - freezed = std::move(other501.freezed); - __isset = std::move(other501.__isset); - return *this; -} -void duplication_add_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "duplication_add_request("; - out << "app_name=" << to_string(app_name); - out << ", " - << "remote_cluster_name=" << to_string(remote_cluster_name); - out << ", " - << "freezed=" << to_string(freezed); - out << ")"; -} - -duplication_add_response::~duplication_add_response() throw() {} - -void duplication_add_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void duplication_add_response::__set_appid(const int32_t val) { this->appid = val; } - -void duplication_add_response::__set_dupid(const int32_t val) { this->dupid = val; } - -void duplication_add_response::__set_hint(const std::string &val) -{ - this->hint = val; - __isset.hint = true; -} - -uint32_t duplication_add_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->appid); - this->__isset.appid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->dupid); - this->__isset.dupid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint); - this->__isset.hint = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; +void swap(duplication_sync_response &a, duplication_sync_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.dup_map, b.dup_map); + swap(a.__isset, b.__isset); } -uint32_t duplication_add_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_add_response"); +duplication_sync_response::duplication_sync_response(const duplication_sync_response& other582) { + err = other582.err; + dup_map = other582.dup_map; + __isset = other582.__isset; +} +duplication_sync_response::duplication_sync_response( duplication_sync_response&& other583) { + err = std::move(other583.err); + dup_map = std::move(other583.dup_map); + __isset = std::move(other583.__isset); +} +duplication_sync_response& duplication_sync_response::operator=(const duplication_sync_response& other584) { + err = other584.err; + dup_map = other584.dup_map; + __isset = other584.__isset; + return *this; +} +duplication_sync_response& duplication_sync_response::operator=(duplication_sync_response&& other585) { + err = std::move(other585.err); + dup_map = std::move(other585.dup_map); + __isset = std::move(other585.__isset); + return *this; +} +void duplication_sync_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "duplication_sync_response("; + out << "err=" << to_string(err); + out << ", " << "dup_map=" << to_string(dup_map); + out << ")"; +} - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->appid); - xfer += oprot->writeFieldEnd(); +ddd_diagnose_request::~ddd_diagnose_request() throw() { +} - xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->dupid); - xfer += oprot->writeFieldEnd(); - if (this->__isset.hint) { - xfer += oprot->writeFieldBegin("hint", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->hint); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(duplication_add_response &a, duplication_add_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.appid, b.appid); - swap(a.dupid, b.dupid); - swap(a.hint, b.hint); - swap(a.__isset, b.__isset); -} - -duplication_add_response::duplication_add_response(const duplication_add_response &other502) -{ - err = other502.err; - appid = other502.appid; - dupid = other502.dupid; - hint = other502.hint; - __isset = other502.__isset; -} -duplication_add_response::duplication_add_response(duplication_add_response &&other503) -{ - err = std::move(other503.err); - appid = std::move(other503.appid); - dupid = std::move(other503.dupid); - hint = std::move(other503.hint); - __isset = std::move(other503.__isset); -} -duplication_add_response &duplication_add_response:: -operator=(const duplication_add_response &other504) -{ - err = other504.err; - appid = other504.appid; - dupid = other504.dupid; - hint = other504.hint; - __isset = other504.__isset; - return *this; -} -duplication_add_response &duplication_add_response::operator=(duplication_add_response &&other505) -{ - err = std::move(other505.err); - appid = std::move(other505.appid); - dupid = std::move(other505.dupid); - hint = std::move(other505.hint); - __isset = std::move(other505.__isset); - return *this; -} -void duplication_add_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "duplication_add_response("; - out << "err=" << to_string(err); - out << ", " - << "appid=" << to_string(appid); - out << ", " - << "dupid=" << to_string(dupid); - out << ", " - << "hint="; - (__isset.hint ? (out << to_string(hint)) : (out << "")); - out << ")"; -} - -duplication_modify_request::~duplication_modify_request() throw() {} - -void duplication_modify_request::__set_app_name(const std::string &val) { this->app_name = val; } - -void duplication_modify_request::__set_dupid(const int32_t val) { this->dupid = val; } - -void duplication_modify_request::__set_status(const duplication_status::type val) -{ - this->status = val; - __isset.status = true; -} - -void duplication_modify_request::__set_fail_mode(const duplication_fail_mode::type val) -{ - this->fail_mode = val; - __isset.fail_mode = true; -} - -uint32_t duplication_modify_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->dupid); - this->__isset.dupid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast506; - xfer += iprot->readI32(ecast506); - this->status = (duplication_status::type)ecast506; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast507; - xfer += iprot->readI32(ecast507); - this->fail_mode = (duplication_fail_mode::type)ecast507; - this->__isset.fail_mode = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void ddd_diagnose_request::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} - xfer += iprot->readStructEnd(); +uint32_t ddd_diagnose_request::read(::apache::thrift::protocol::TProtocol* iprot) { - return xfer; -} + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -uint32_t duplication_modify_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_modify_request"); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->dupid); - xfer += oprot->writeFieldEnd(); - if (this->__isset.status) { - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.fail_mode) { - xfer += oprot->writeFieldBegin("fail_mode", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32((int32_t)this->fail_mode); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(duplication_modify_request &a, duplication_modify_request &b) -{ - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.dupid, b.dupid); - swap(a.status, b.status); - swap(a.fail_mode, b.fail_mode); - swap(a.__isset, b.__isset); -} - -duplication_modify_request::duplication_modify_request(const duplication_modify_request &other508) -{ - app_name = other508.app_name; - dupid = other508.dupid; - status = other508.status; - fail_mode = other508.fail_mode; - __isset = other508.__isset; -} -duplication_modify_request::duplication_modify_request(duplication_modify_request &&other509) -{ - app_name = std::move(other509.app_name); - dupid = std::move(other509.dupid); - status = std::move(other509.status); - fail_mode = std::move(other509.fail_mode); - __isset = std::move(other509.__isset); -} -duplication_modify_request &duplication_modify_request:: -operator=(const duplication_modify_request &other510) -{ - app_name = other510.app_name; - dupid = other510.dupid; - status = other510.status; - fail_mode = other510.fail_mode; - __isset = other510.__isset; - return *this; -} -duplication_modify_request &duplication_modify_request:: -operator=(duplication_modify_request &&other511) -{ - app_name = std::move(other511.app_name); - dupid = std::move(other511.dupid); - status = std::move(other511.status); - fail_mode = std::move(other511.fail_mode); - __isset = std::move(other511.__isset); - return *this; -} -void duplication_modify_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "duplication_modify_request("; - out << "app_name=" << to_string(app_name); - out << ", " - << "dupid=" << to_string(dupid); - out << ", " - << "status="; - (__isset.status ? (out << to_string(status)) : (out << "")); - out << ", " - << "fail_mode="; - (__isset.fail_mode ? (out << to_string(fail_mode)) : (out << "")); - out << ")"; -} - -duplication_modify_response::~duplication_modify_response() throw() {} - -void duplication_modify_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void duplication_modify_response::__set_appid(const int32_t val) { this->appid = val; } - -uint32_t duplication_modify_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->appid); - this->__isset.appid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t duplication_modify_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_modify_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t ddd_diagnose_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ddd_diagnose_request"); - xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->appid); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(duplication_modify_response &a, duplication_modify_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.appid, b.appid); - swap(a.__isset, b.__isset); +void swap(ddd_diagnose_request &a, ddd_diagnose_request &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.__isset, b.__isset); } -duplication_modify_response::duplication_modify_response( - const duplication_modify_response &other512) -{ - err = other512.err; - appid = other512.appid; - __isset = other512.__isset; +ddd_diagnose_request::ddd_diagnose_request(const ddd_diagnose_request& other586) { + pid = other586.pid; + __isset = other586.__isset; } -duplication_modify_response::duplication_modify_response(duplication_modify_response &&other513) -{ - err = std::move(other513.err); - appid = std::move(other513.appid); - __isset = std::move(other513.__isset); +ddd_diagnose_request::ddd_diagnose_request( ddd_diagnose_request&& other587) { + pid = std::move(other587.pid); + __isset = std::move(other587.__isset); } -duplication_modify_response &duplication_modify_response:: -operator=(const duplication_modify_response &other514) -{ - err = other514.err; - appid = other514.appid; - __isset = other514.__isset; - return *this; +ddd_diagnose_request& ddd_diagnose_request::operator=(const ddd_diagnose_request& other588) { + pid = other588.pid; + __isset = other588.__isset; + return *this; } -duplication_modify_response &duplication_modify_response:: -operator=(duplication_modify_response &&other515) -{ - err = std::move(other515.err); - appid = std::move(other515.appid); - __isset = std::move(other515.__isset); - return *this; +ddd_diagnose_request& ddd_diagnose_request::operator=(ddd_diagnose_request&& other589) { + pid = std::move(other589.pid); + __isset = std::move(other589.__isset); + return *this; } -void duplication_modify_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "duplication_modify_response("; - out << "err=" << to_string(err); - out << ", " - << "appid=" << to_string(appid); - out << ")"; +void ddd_diagnose_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ddd_diagnose_request("; + out << "pid=" << to_string(pid); + out << ")"; } -duplication_entry::~duplication_entry() throw() {} - -void duplication_entry::__set_dupid(const int32_t val) { this->dupid = val; } -void duplication_entry::__set_status(const duplication_status::type val) { this->status = val; } - -void duplication_entry::__set_remote(const std::string &val) { this->remote = val; } +ddd_node_info::~ddd_node_info() throw() { +} -void duplication_entry::__set_create_ts(const int64_t val) { this->create_ts = val; } -void duplication_entry::__set_progress(const std::map &val) -{ - this->progress = val; - __isset.progress = true; +void ddd_node_info::__set_node(const ::dsn::rpc_address& val) { + this->node = val; } -void duplication_entry::__set_fail_mode(const duplication_fail_mode::type val) -{ - this->fail_mode = val; - __isset.fail_mode = true; +void ddd_node_info::__set_drop_time_ms(const int64_t val) { + this->drop_time_ms = val; } -uint32_t duplication_entry::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); +void ddd_node_info::__set_is_alive(const bool val) { + this->is_alive = val; +} - using ::apache::thrift::protocol::TProtocolException; +void ddd_node_info::__set_is_collected(const bool val) { + this->is_collected = val; +} - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->dupid); - this->__isset.dupid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast516; - xfer += iprot->readI32(ecast516); - this->status = (duplication_status::type)ecast516; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->remote); - this->__isset.remote = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->create_ts); - this->__isset.create_ts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->progress.clear(); - uint32_t _size517; - ::apache::thrift::protocol::TType _ktype518; - ::apache::thrift::protocol::TType _vtype519; - xfer += iprot->readMapBegin(_ktype518, _vtype519, _size517); - uint32_t _i521; - for (_i521 = 0; _i521 < _size517; ++_i521) { - int32_t _key522; - xfer += iprot->readI32(_key522); - int64_t &_val523 = this->progress[_key522]; - xfer += iprot->readI64(_val523); - } - xfer += iprot->readMapEnd(); - } - this->__isset.progress = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast524; - xfer += iprot->readI32(ecast524); - this->fail_mode = (duplication_fail_mode::type)ecast524; - this->__isset.fail_mode = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void ddd_node_info::__set_ballot(const int64_t val) { + this->ballot = val; +} - xfer += iprot->readStructEnd(); +void ddd_node_info::__set_last_committed_decree(const int64_t val) { + this->last_committed_decree = val; +} - return xfer; +void ddd_node_info::__set_last_prepared_decree(const int64_t val) { + this->last_prepared_decree = val; } -uint32_t duplication_entry::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_entry"); +uint32_t ddd_node_info::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->dupid); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("remote", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->remote); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("create_ts", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->create_ts); - xfer += oprot->writeFieldEnd(); - if (this->__isset.progress) { - xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_MAP, 5); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, - ::apache::thrift::protocol::T_I64, - static_cast(this->progress.size())); - std::map::const_iterator _iter525; - for (_iter525 = this->progress.begin(); _iter525 != this->progress.end(); ++_iter525) { - xfer += oprot->writeI32(_iter525->first); - xfer += oprot->writeI64(_iter525->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.fail_mode) { - xfer += oprot->writeFieldBegin("fail_mode", ::apache::thrift::protocol::T_I32, 7); - xfer += oprot->writeI32((int32_t)this->fail_mode); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(duplication_entry &a, duplication_entry &b) -{ - using ::std::swap; - swap(a.dupid, b.dupid); - swap(a.status, b.status); - swap(a.remote, b.remote); - swap(a.create_ts, b.create_ts); - swap(a.progress, b.progress); - swap(a.fail_mode, b.fail_mode); - swap(a.__isset, b.__isset); -} - -duplication_entry::duplication_entry(const duplication_entry &other526) -{ - dupid = other526.dupid; - status = other526.status; - remote = other526.remote; - create_ts = other526.create_ts; - progress = other526.progress; - fail_mode = other526.fail_mode; - __isset = other526.__isset; -} -duplication_entry::duplication_entry(duplication_entry &&other527) -{ - dupid = std::move(other527.dupid); - status = std::move(other527.status); - remote = std::move(other527.remote); - create_ts = std::move(other527.create_ts); - progress = std::move(other527.progress); - fail_mode = std::move(other527.fail_mode); - __isset = std::move(other527.__isset); -} -duplication_entry &duplication_entry::operator=(const duplication_entry &other528) -{ - dupid = other528.dupid; - status = other528.status; - remote = other528.remote; - create_ts = other528.create_ts; - progress = other528.progress; - fail_mode = other528.fail_mode; - __isset = other528.__isset; - return *this; -} -duplication_entry &duplication_entry::operator=(duplication_entry &&other529) -{ - dupid = std::move(other529.dupid); - status = std::move(other529.status); - remote = std::move(other529.remote); - create_ts = std::move(other529.create_ts); - progress = std::move(other529.progress); - fail_mode = std::move(other529.fail_mode); - __isset = std::move(other529.__isset); - return *this; -} -void duplication_entry::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "duplication_entry("; - out << "dupid=" << to_string(dupid); - out << ", " - << "status=" << to_string(status); - out << ", " - << "remote=" << to_string(remote); - out << ", " - << "create_ts=" << to_string(create_ts); - out << ", " - << "progress="; - (__isset.progress ? (out << to_string(progress)) : (out << "")); - out << ", " - << "fail_mode="; - (__isset.fail_mode ? (out << to_string(fail_mode)) : (out << "")); - out << ")"; -} - -duplication_query_request::~duplication_query_request() throw() {} - -void duplication_query_request::__set_app_name(const std::string &val) { this->app_name = val; } - -uint32_t duplication_query_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->drop_time_ms); + this->__isset.drop_time_ms = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_alive); + this->__isset.is_alive = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_collected); + this->__isset.is_collected = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_prepared_decree); + this->__isset.last_prepared_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ddd_node_info::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ddd_node_info"); + + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("drop_time_ms", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->drop_time_ms); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("is_alive", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_alive); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("is_collected", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->is_collected); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); - - return xfer; -} + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); -uint32_t duplication_query_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_query_request"); + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("last_prepared_decree", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64(this->last_prepared_decree); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(duplication_query_request &a, duplication_query_request &b) -{ - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.__isset, b.__isset); +void swap(ddd_node_info &a, ddd_node_info &b) { + using ::std::swap; + swap(a.node, b.node); + swap(a.drop_time_ms, b.drop_time_ms); + swap(a.is_alive, b.is_alive); + swap(a.is_collected, b.is_collected); + swap(a.ballot, b.ballot); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.last_prepared_decree, b.last_prepared_decree); + swap(a.__isset, b.__isset); } -duplication_query_request::duplication_query_request(const duplication_query_request &other530) -{ - app_name = other530.app_name; - __isset = other530.__isset; +ddd_node_info::ddd_node_info(const ddd_node_info& other590) { + node = other590.node; + drop_time_ms = other590.drop_time_ms; + is_alive = other590.is_alive; + is_collected = other590.is_collected; + ballot = other590.ballot; + last_committed_decree = other590.last_committed_decree; + last_prepared_decree = other590.last_prepared_decree; + __isset = other590.__isset; } -duplication_query_request::duplication_query_request(duplication_query_request &&other531) -{ - app_name = std::move(other531.app_name); - __isset = std::move(other531.__isset); +ddd_node_info::ddd_node_info( ddd_node_info&& other591) { + node = std::move(other591.node); + drop_time_ms = std::move(other591.drop_time_ms); + is_alive = std::move(other591.is_alive); + is_collected = std::move(other591.is_collected); + ballot = std::move(other591.ballot); + last_committed_decree = std::move(other591.last_committed_decree); + last_prepared_decree = std::move(other591.last_prepared_decree); + __isset = std::move(other591.__isset); } -duplication_query_request &duplication_query_request:: -operator=(const duplication_query_request &other532) -{ - app_name = other532.app_name; - __isset = other532.__isset; - return *this; +ddd_node_info& ddd_node_info::operator=(const ddd_node_info& other592) { + node = other592.node; + drop_time_ms = other592.drop_time_ms; + is_alive = other592.is_alive; + is_collected = other592.is_collected; + ballot = other592.ballot; + last_committed_decree = other592.last_committed_decree; + last_prepared_decree = other592.last_prepared_decree; + __isset = other592.__isset; + return *this; } -duplication_query_request &duplication_query_request:: -operator=(duplication_query_request &&other533) -{ - app_name = std::move(other533.app_name); - __isset = std::move(other533.__isset); - return *this; +ddd_node_info& ddd_node_info::operator=(ddd_node_info&& other593) { + node = std::move(other593.node); + drop_time_ms = std::move(other593.drop_time_ms); + is_alive = std::move(other593.is_alive); + is_collected = std::move(other593.is_collected); + ballot = std::move(other593.ballot); + last_committed_decree = std::move(other593.last_committed_decree); + last_prepared_decree = std::move(other593.last_prepared_decree); + __isset = std::move(other593.__isset); + return *this; } -void duplication_query_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "duplication_query_request("; - out << "app_name=" << to_string(app_name); - out << ")"; +void ddd_node_info::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ddd_node_info("; + out << "node=" << to_string(node); + out << ", " << "drop_time_ms=" << to_string(drop_time_ms); + out << ", " << "is_alive=" << to_string(is_alive); + out << ", " << "is_collected=" << to_string(is_collected); + out << ", " << "ballot=" << to_string(ballot); + out << ", " << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " << "last_prepared_decree=" << to_string(last_prepared_decree); + out << ")"; } -duplication_query_response::~duplication_query_response() throw() {} - -void duplication_query_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void duplication_query_response::__set_appid(const int32_t val) { this->appid = val; } - -void duplication_query_response::__set_entry_list(const std::vector &val) -{ - this->entry_list = val; + +ddd_partition_info::~ddd_partition_info() throw() { } -uint32_t duplication_query_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; +void ddd_partition_info::__set_config(const ::dsn::partition_configuration& val) { + this->config = val; +} + +void ddd_partition_info::__set_dropped(const std::vector & val) { + this->dropped = val; +} + +void ddd_partition_info::__set_reason(const std::string& val) { + this->reason = val; +} + +uint32_t ddd_partition_info::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->appid); - this->__isset.appid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->entry_list.clear(); - uint32_t _size534; - ::apache::thrift::protocol::TType _etype537; - xfer += iprot->readListBegin(_etype537, _size534); - this->entry_list.resize(_size534); - uint32_t _i538; - for (_i538 = 0; _i538 < _size534; ++_i538) { - xfer += this->entry_list[_i538].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.entry_list = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->dropped.clear(); + uint32_t _size594; + ::apache::thrift::protocol::TType _etype597; + xfer += iprot->readListBegin(_etype597, _size594); + this->dropped.resize(_size594); + uint32_t _i598; + for (_i598 = 0; _i598 < _size594; ++_i598) + { + xfer += this->dropped[_i598].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.dropped = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->reason); + this->__isset.reason = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t duplication_query_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_query_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t ddd_partition_info::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ddd_partition_info"); - xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->appid); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("entry_list", ::apache::thrift::protocol::T_LIST, 4); + xfer += oprot->writeFieldBegin("dropped", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->dropped.size())); + std::vector ::const_iterator _iter599; + for (_iter599 = this->dropped.begin(); _iter599 != this->dropped.end(); ++_iter599) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->entry_list.size())); - std::vector::const_iterator _iter539; - for (_iter539 = this->entry_list.begin(); _iter539 != this->entry_list.end(); ++_iter539) { - xfer += (*_iter539).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(duplication_query_response &a, duplication_query_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.appid, b.appid); - swap(a.entry_list, b.entry_list); - swap(a.__isset, b.__isset); -} - -duplication_query_response::duplication_query_response(const duplication_query_response &other540) -{ - err = other540.err; - appid = other540.appid; - entry_list = other540.entry_list; - __isset = other540.__isset; -} -duplication_query_response::duplication_query_response(duplication_query_response &&other541) -{ - err = std::move(other541.err); - appid = std::move(other541.appid); - entry_list = std::move(other541.entry_list); - __isset = std::move(other541.__isset); -} -duplication_query_response &duplication_query_response:: -operator=(const duplication_query_response &other542) -{ - err = other542.err; - appid = other542.appid; - entry_list = other542.entry_list; - __isset = other542.__isset; - return *this; -} -duplication_query_response &duplication_query_response:: -operator=(duplication_query_response &&other543) -{ - err = std::move(other543.err); - appid = std::move(other543.appid); - entry_list = std::move(other543.entry_list); - __isset = std::move(other543.__isset); - return *this; -} -void duplication_query_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "duplication_query_response("; - out << "err=" << to_string(err); - out << ", " - << "appid=" << to_string(appid); - out << ", " - << "entry_list=" << to_string(entry_list); - out << ")"; -} - -duplication_confirm_entry::~duplication_confirm_entry() throw() {} - -void duplication_confirm_entry::__set_dupid(const int32_t val) { this->dupid = val; } - -void duplication_confirm_entry::__set_confirmed_decree(const int64_t val) -{ - this->confirmed_decree = val; -} - -uint32_t duplication_confirm_entry::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->dupid); - this->__isset.dupid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->confirmed_decree); - this->__isset.confirmed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + xfer += (*_iter599).write(oprot); } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->reason); + xfer += oprot->writeFieldEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -uint32_t duplication_confirm_entry::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_confirm_entry"); - - xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->dupid); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("confirmed_decree", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->confirmed_decree); - xfer += oprot->writeFieldEnd(); +void swap(ddd_partition_info &a, ddd_partition_info &b) { + using ::std::swap; + swap(a.config, b.config); + swap(a.dropped, b.dropped); + swap(a.reason, b.reason); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(duplication_confirm_entry &a, duplication_confirm_entry &b) -{ - using ::std::swap; - swap(a.dupid, b.dupid); - swap(a.confirmed_decree, b.confirmed_decree); - swap(a.__isset, b.__isset); -} - -duplication_confirm_entry::duplication_confirm_entry(const duplication_confirm_entry &other544) -{ - dupid = other544.dupid; - confirmed_decree = other544.confirmed_decree; - __isset = other544.__isset; -} -duplication_confirm_entry::duplication_confirm_entry(duplication_confirm_entry &&other545) -{ - dupid = std::move(other545.dupid); - confirmed_decree = std::move(other545.confirmed_decree); - __isset = std::move(other545.__isset); -} -duplication_confirm_entry &duplication_confirm_entry:: -operator=(const duplication_confirm_entry &other546) -{ - dupid = other546.dupid; - confirmed_decree = other546.confirmed_decree; - __isset = other546.__isset; - return *this; -} -duplication_confirm_entry &duplication_confirm_entry:: -operator=(duplication_confirm_entry &&other547) -{ - dupid = std::move(other547.dupid); - confirmed_decree = std::move(other547.confirmed_decree); - __isset = std::move(other547.__isset); - return *this; -} -void duplication_confirm_entry::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "duplication_confirm_entry("; - out << "dupid=" << to_string(dupid); - out << ", " - << "confirmed_decree=" << to_string(confirmed_decree); - out << ")"; -} - -duplication_sync_request::~duplication_sync_request() throw() {} - -void duplication_sync_request::__set_node(const ::dsn::rpc_address &val) { this->node = val; } - -void duplication_sync_request::__set_confirm_list( - const std::map<::dsn::gpid, std::vector> &val) -{ - this->confirm_list = val; -} - -uint32_t duplication_sync_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->confirm_list.clear(); - uint32_t _size548; - ::apache::thrift::protocol::TType _ktype549; - ::apache::thrift::protocol::TType _vtype550; - xfer += iprot->readMapBegin(_ktype549, _vtype550, _size548); - uint32_t _i552; - for (_i552 = 0; _i552 < _size548; ++_i552) { - ::dsn::gpid _key553; - xfer += _key553.read(iprot); - std::vector &_val554 = - this->confirm_list[_key553]; - { - _val554.clear(); - uint32_t _size555; - ::apache::thrift::protocol::TType _etype558; - xfer += iprot->readListBegin(_etype558, _size555); - _val554.resize(_size555); - uint32_t _i559; - for (_i559 = 0; _i559 < _size555; ++_i559) { - xfer += _val554[_i559].read(iprot); - } - xfer += iprot->readListEnd(); - } - } - xfer += iprot->readMapEnd(); - } - this->__isset.confirm_list = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +ddd_partition_info::ddd_partition_info(const ddd_partition_info& other600) { + config = other600.config; + dropped = other600.dropped; + reason = other600.reason; + __isset = other600.__isset; +} +ddd_partition_info::ddd_partition_info( ddd_partition_info&& other601) { + config = std::move(other601.config); + dropped = std::move(other601.dropped); + reason = std::move(other601.reason); + __isset = std::move(other601.__isset); +} +ddd_partition_info& ddd_partition_info::operator=(const ddd_partition_info& other602) { + config = other602.config; + dropped = other602.dropped; + reason = other602.reason; + __isset = other602.__isset; + return *this; +} +ddd_partition_info& ddd_partition_info::operator=(ddd_partition_info&& other603) { + config = std::move(other603.config); + dropped = std::move(other603.dropped); + reason = std::move(other603.reason); + __isset = std::move(other603.__isset); + return *this; +} +void ddd_partition_info::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ddd_partition_info("; + out << "config=" << to_string(config); + out << ", " << "dropped=" << to_string(dropped); + out << ", " << "reason=" << to_string(reason); + out << ")"; +} - xfer += iprot->readStructEnd(); - return xfer; +ddd_diagnose_response::~ddd_diagnose_response() throw() { } -uint32_t duplication_sync_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_sync_request"); - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); +void ddd_diagnose_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} - xfer += oprot->writeFieldBegin("confirm_list", ::apache::thrift::protocol::T_MAP, 2); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, - ::apache::thrift::protocol::T_LIST, - static_cast(this->confirm_list.size())); - std::map<::dsn::gpid, std::vector>::const_iterator _iter560; - for (_iter560 = this->confirm_list.begin(); _iter560 != this->confirm_list.end(); - ++_iter560) { - xfer += _iter560->first.write(oprot); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(_iter560->second.size())); - std::vector::const_iterator _iter561; - for (_iter561 = _iter560->second.begin(); _iter561 != _iter560->second.end(); - ++_iter561) { - xfer += (*_iter561).write(oprot); - } - xfer += oprot->writeListEnd(); - } - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); +void ddd_diagnose_response::__set_partitions(const std::vector & val) { + this->partitions = val; +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(duplication_sync_request &a, duplication_sync_request &b) -{ - using ::std::swap; - swap(a.node, b.node); - swap(a.confirm_list, b.confirm_list); - swap(a.__isset, b.__isset); -} - -duplication_sync_request::duplication_sync_request(const duplication_sync_request &other562) -{ - node = other562.node; - confirm_list = other562.confirm_list; - __isset = other562.__isset; -} -duplication_sync_request::duplication_sync_request(duplication_sync_request &&other563) -{ - node = std::move(other563.node); - confirm_list = std::move(other563.confirm_list); - __isset = std::move(other563.__isset); -} -duplication_sync_request &duplication_sync_request:: -operator=(const duplication_sync_request &other564) -{ - node = other564.node; - confirm_list = other564.confirm_list; - __isset = other564.__isset; - return *this; -} -duplication_sync_request &duplication_sync_request::operator=(duplication_sync_request &&other565) -{ - node = std::move(other565.node); - confirm_list = std::move(other565.confirm_list); - __isset = std::move(other565.__isset); - return *this; -} -void duplication_sync_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "duplication_sync_request("; - out << "node=" << to_string(node); - out << ", " - << "confirm_list=" << to_string(confirm_list); - out << ")"; -} - -duplication_sync_response::~duplication_sync_response() throw() {} - -void duplication_sync_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void duplication_sync_response::__set_dup_map( - const std::map> &val) -{ - this->dup_map = val; -} - -uint32_t duplication_sync_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->dup_map.clear(); - uint32_t _size566; - ::apache::thrift::protocol::TType _ktype567; - ::apache::thrift::protocol::TType _vtype568; - xfer += iprot->readMapBegin(_ktype567, _vtype568, _size566); - uint32_t _i570; - for (_i570 = 0; _i570 < _size566; ++_i570) { - int32_t _key571; - xfer += iprot->readI32(_key571); - std::map &_val572 = this->dup_map[_key571]; - { - _val572.clear(); - uint32_t _size573; - ::apache::thrift::protocol::TType _ktype574; - ::apache::thrift::protocol::TType _vtype575; - xfer += iprot->readMapBegin(_ktype574, _vtype575, _size573); - uint32_t _i577; - for (_i577 = 0; _i577 < _size573; ++_i577) { - int32_t _key578; - xfer += iprot->readI32(_key578); - duplication_entry &_val579 = _val572[_key578]; - xfer += _val579.read(iprot); - } - xfer += iprot->readMapEnd(); - } - } - xfer += iprot->readMapEnd(); - } - this->__isset.dup_map = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +uint32_t ddd_diagnose_response::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += iprot->readStructEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - return xfer; -} + xfer += iprot->readStructBegin(fname); -uint32_t duplication_sync_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_sync_response"); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("dup_map", ::apache::thrift::protocol::T_MAP, 2); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, - ::apache::thrift::protocol::T_MAP, - static_cast(this->dup_map.size())); - std::map>::const_iterator _iter580; - for (_iter580 = this->dup_map.begin(); _iter580 != this->dup_map.end(); ++_iter580) { - xfer += oprot->writeI32(_iter580->first); + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitions.clear(); + uint32_t _size604; + ::apache::thrift::protocol::TType _etype607; + xfer += iprot->readListBegin(_etype607, _size604); + this->partitions.resize(_size604); + uint32_t _i608; + for (_i608 = 0; _i608 < _size604; ++_i608) { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, - ::apache::thrift::protocol::T_STRUCT, - static_cast(_iter580->second.size())); - std::map::const_iterator _iter581; - for (_iter581 = _iter580->second.begin(); _iter581 != _iter580->second.end(); - ++_iter581) { - xfer += oprot->writeI32(_iter581->first); - xfer += _iter581->second.write(oprot); - } - xfer += oprot->writeMapEnd(); - } - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(duplication_sync_response &a, duplication_sync_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.dup_map, b.dup_map); - swap(a.__isset, b.__isset); -} - -duplication_sync_response::duplication_sync_response(const duplication_sync_response &other582) -{ - err = other582.err; - dup_map = other582.dup_map; - __isset = other582.__isset; -} -duplication_sync_response::duplication_sync_response(duplication_sync_response &&other583) -{ - err = std::move(other583.err); - dup_map = std::move(other583.dup_map); - __isset = std::move(other583.__isset); -} -duplication_sync_response &duplication_sync_response:: -operator=(const duplication_sync_response &other584) -{ - err = other584.err; - dup_map = other584.dup_map; - __isset = other584.__isset; - return *this; -} -duplication_sync_response &duplication_sync_response:: -operator=(duplication_sync_response &&other585) -{ - err = std::move(other585.err); - dup_map = std::move(other585.dup_map); - __isset = std::move(other585.__isset); - return *this; -} -void duplication_sync_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "duplication_sync_response("; - out << "err=" << to_string(err); - out << ", " - << "dup_map=" << to_string(dup_map); - out << ")"; -} - -ddd_diagnose_request::~ddd_diagnose_request() throw() {} - -void ddd_diagnose_request::__set_pid(const ::dsn::gpid &val) { this->pid = val; } - -uint32_t ddd_diagnose_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); + xfer += this->partitions[_i608].read(iprot); } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readListEnd(); + } + this->__isset.partitions = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t ddd_diagnose_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ddd_diagnose_request"); +uint32_t ddd_diagnose_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ddd_diagnose_response"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); + std::vector ::const_iterator _iter609; + for (_iter609 = this->partitions.begin(); _iter609 != this->partitions.end(); ++_iter609) + { + xfer += (*_iter609).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(ddd_diagnose_request &a, ddd_diagnose_request &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.__isset, b.__isset); +void swap(ddd_diagnose_response &a, ddd_diagnose_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.partitions, b.partitions); + swap(a.__isset, b.__isset); } -ddd_diagnose_request::ddd_diagnose_request(const ddd_diagnose_request &other586) -{ - pid = other586.pid; - __isset = other586.__isset; +ddd_diagnose_response::ddd_diagnose_response(const ddd_diagnose_response& other610) { + err = other610.err; + partitions = other610.partitions; + __isset = other610.__isset; } -ddd_diagnose_request::ddd_diagnose_request(ddd_diagnose_request &&other587) -{ - pid = std::move(other587.pid); - __isset = std::move(other587.__isset); +ddd_diagnose_response::ddd_diagnose_response( ddd_diagnose_response&& other611) { + err = std::move(other611.err); + partitions = std::move(other611.partitions); + __isset = std::move(other611.__isset); } -ddd_diagnose_request &ddd_diagnose_request::operator=(const ddd_diagnose_request &other588) -{ - pid = other588.pid; - __isset = other588.__isset; - return *this; +ddd_diagnose_response& ddd_diagnose_response::operator=(const ddd_diagnose_response& other612) { + err = other612.err; + partitions = other612.partitions; + __isset = other612.__isset; + return *this; } -ddd_diagnose_request &ddd_diagnose_request::operator=(ddd_diagnose_request &&other589) -{ - pid = std::move(other589.pid); - __isset = std::move(other589.__isset); - return *this; +ddd_diagnose_response& ddd_diagnose_response::operator=(ddd_diagnose_response&& other613) { + err = std::move(other613.err); + partitions = std::move(other613.partitions); + __isset = std::move(other613.__isset); + return *this; } -void ddd_diagnose_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "ddd_diagnose_request("; - out << "pid=" << to_string(pid); - out << ")"; +void ddd_diagnose_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ddd_diagnose_response("; + out << "err=" << to_string(err); + out << ", " << "partitions=" << to_string(partitions); + out << ")"; } -ddd_node_info::~ddd_node_info() throw() {} - -void ddd_node_info::__set_node(const ::dsn::rpc_address &val) { this->node = val; } - -void ddd_node_info::__set_drop_time_ms(const int64_t val) { this->drop_time_ms = val; } - -void ddd_node_info::__set_is_alive(const bool val) { this->is_alive = val; } -void ddd_node_info::__set_is_collected(const bool val) { this->is_collected = val; } +app_partition_split_request::~app_partition_split_request() throw() { +} -void ddd_node_info::__set_ballot(const int64_t val) { this->ballot = val; } -void ddd_node_info::__set_last_committed_decree(const int64_t val) -{ - this->last_committed_decree = val; +void app_partition_split_request::__set_app_name(const std::string& val) { + this->app_name = val; } -void ddd_node_info::__set_last_prepared_decree(const int64_t val) -{ - this->last_prepared_decree = val; +void app_partition_split_request::__set_new_partition_count(const int32_t val) { + this->new_partition_count = val; } -uint32_t ddd_node_info::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t app_partition_split_request::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->drop_time_ms); - this->__isset.drop_time_ms = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_alive); - this->__isset.is_alive = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_collected); - this->__isset.is_collected = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_prepared_decree); - this->__isset.last_prepared_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->new_partition_count); + this->__isset.new_partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t ddd_node_info::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ddd_node_info"); - - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("drop_time_ms", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->drop_time_ms); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("is_alive", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->is_alive); - xfer += oprot->writeFieldEnd(); +uint32_t app_partition_split_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("app_partition_split_request"); - xfer += oprot->writeFieldBegin("is_collected", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->is_collected); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_partition_count", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->new_partition_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 6); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("last_prepared_decree", ::apache::thrift::protocol::T_I64, 7); - xfer += oprot->writeI64(this->last_prepared_decree); - xfer += oprot->writeFieldEnd(); +void swap(app_partition_split_request &a, app_partition_split_request &b) { + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.new_partition_count, b.new_partition_count); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ddd_node_info &a, ddd_node_info &b) -{ - using ::std::swap; - swap(a.node, b.node); - swap(a.drop_time_ms, b.drop_time_ms); - swap(a.is_alive, b.is_alive); - swap(a.is_collected, b.is_collected); - swap(a.ballot, b.ballot); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.last_prepared_decree, b.last_prepared_decree); - swap(a.__isset, b.__isset); -} - -ddd_node_info::ddd_node_info(const ddd_node_info &other590) -{ - node = other590.node; - drop_time_ms = other590.drop_time_ms; - is_alive = other590.is_alive; - is_collected = other590.is_collected; - ballot = other590.ballot; - last_committed_decree = other590.last_committed_decree; - last_prepared_decree = other590.last_prepared_decree; - __isset = other590.__isset; -} -ddd_node_info::ddd_node_info(ddd_node_info &&other591) -{ - node = std::move(other591.node); - drop_time_ms = std::move(other591.drop_time_ms); - is_alive = std::move(other591.is_alive); - is_collected = std::move(other591.is_collected); - ballot = std::move(other591.ballot); - last_committed_decree = std::move(other591.last_committed_decree); - last_prepared_decree = std::move(other591.last_prepared_decree); - __isset = std::move(other591.__isset); -} -ddd_node_info &ddd_node_info::operator=(const ddd_node_info &other592) -{ - node = other592.node; - drop_time_ms = other592.drop_time_ms; - is_alive = other592.is_alive; - is_collected = other592.is_collected; - ballot = other592.ballot; - last_committed_decree = other592.last_committed_decree; - last_prepared_decree = other592.last_prepared_decree; - __isset = other592.__isset; - return *this; -} -ddd_node_info &ddd_node_info::operator=(ddd_node_info &&other593) -{ - node = std::move(other593.node); - drop_time_ms = std::move(other593.drop_time_ms); - is_alive = std::move(other593.is_alive); - is_collected = std::move(other593.is_collected); - ballot = std::move(other593.ballot); - last_committed_decree = std::move(other593.last_committed_decree); - last_prepared_decree = std::move(other593.last_prepared_decree); - __isset = std::move(other593.__isset); - return *this; -} -void ddd_node_info::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "ddd_node_info("; - out << "node=" << to_string(node); - out << ", " - << "drop_time_ms=" << to_string(drop_time_ms); - out << ", " - << "is_alive=" << to_string(is_alive); - out << ", " - << "is_collected=" << to_string(is_collected); - out << ", " - << "ballot=" << to_string(ballot); - out << ", " - << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " - << "last_prepared_decree=" << to_string(last_prepared_decree); - out << ")"; -} - -ddd_partition_info::~ddd_partition_info() throw() {} - -void ddd_partition_info::__set_config(const ::dsn::partition_configuration &val) -{ - this->config = val; -} - -void ddd_partition_info::__set_dropped(const std::vector &val) -{ - this->dropped = val; -} - -void ddd_partition_info::__set_reason(const std::string &val) { this->reason = val; } - -uint32_t ddd_partition_info::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->config.read(iprot); - this->__isset.config = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->dropped.clear(); - uint32_t _size594; - ::apache::thrift::protocol::TType _etype597; - xfer += iprot->readListBegin(_etype597, _size594); - this->dropped.resize(_size594); - uint32_t _i598; - for (_i598 = 0; _i598 < _size594; ++_i598) { - xfer += this->dropped[_i598].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.dropped = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->reason); - this->__isset.reason = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +app_partition_split_request::app_partition_split_request(const app_partition_split_request& other614) { + app_name = other614.app_name; + new_partition_count = other614.new_partition_count; + __isset = other614.__isset; +} +app_partition_split_request::app_partition_split_request( app_partition_split_request&& other615) { + app_name = std::move(other615.app_name); + new_partition_count = std::move(other615.new_partition_count); + __isset = std::move(other615.__isset); +} +app_partition_split_request& app_partition_split_request::operator=(const app_partition_split_request& other616) { + app_name = other616.app_name; + new_partition_count = other616.new_partition_count; + __isset = other616.__isset; + return *this; +} +app_partition_split_request& app_partition_split_request::operator=(app_partition_split_request&& other617) { + app_name = std::move(other617.app_name); + new_partition_count = std::move(other617.new_partition_count); + __isset = std::move(other617.__isset); + return *this; +} +void app_partition_split_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "app_partition_split_request("; + out << "app_name=" << to_string(app_name); + out << ", " << "new_partition_count=" << to_string(new_partition_count); + out << ")"; +} - xfer += iprot->readStructEnd(); - return xfer; +app_partition_split_response::~app_partition_split_response() throw() { } -uint32_t ddd_partition_info::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ddd_partition_info"); - xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->config.write(oprot); - xfer += oprot->writeFieldEnd(); +void app_partition_split_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} - xfer += oprot->writeFieldBegin("dropped", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->dropped.size())); - std::vector::const_iterator _iter599; - for (_iter599 = this->dropped.begin(); _iter599 != this->dropped.end(); ++_iter599) { - xfer += (*_iter599).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); +void app_partition_split_response::__set_app_id(const int32_t val) { + this->app_id = val; +} - xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->reason); - xfer += oprot->writeFieldEnd(); +void app_partition_split_response::__set_partition_count(const int32_t val) { + this->partition_count = val; +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ddd_partition_info &a, ddd_partition_info &b) -{ - using ::std::swap; - swap(a.config, b.config); - swap(a.dropped, b.dropped); - swap(a.reason, b.reason); - swap(a.__isset, b.__isset); -} - -ddd_partition_info::ddd_partition_info(const ddd_partition_info &other600) -{ - config = other600.config; - dropped = other600.dropped; - reason = other600.reason; - __isset = other600.__isset; -} -ddd_partition_info::ddd_partition_info(ddd_partition_info &&other601) -{ - config = std::move(other601.config); - dropped = std::move(other601.dropped); - reason = std::move(other601.reason); - __isset = std::move(other601.__isset); -} -ddd_partition_info &ddd_partition_info::operator=(const ddd_partition_info &other602) -{ - config = other602.config; - dropped = other602.dropped; - reason = other602.reason; - __isset = other602.__isset; - return *this; -} -ddd_partition_info &ddd_partition_info::operator=(ddd_partition_info &&other603) -{ - config = std::move(other603.config); - dropped = std::move(other603.dropped); - reason = std::move(other603.reason); - __isset = std::move(other603.__isset); - return *this; -} -void ddd_partition_info::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "ddd_partition_info("; - out << "config=" << to_string(config); - out << ", " - << "dropped=" << to_string(dropped); - out << ", " - << "reason=" << to_string(reason); - out << ")"; -} - -ddd_diagnose_response::~ddd_diagnose_response() throw() {} - -void ddd_diagnose_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void ddd_diagnose_response::__set_partitions(const std::vector &val) -{ - this->partitions = val; -} - -uint32_t ddd_diagnose_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitions.clear(); - uint32_t _size604; - ::apache::thrift::protocol::TType _etype607; - xfer += iprot->readListBegin(_etype607, _size604); - this->partitions.resize(_size604); - uint32_t _i608; - for (_i608 = 0; _i608 < _size604; ++_i608) { - xfer += this->partitions[_i608].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.partitions = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +uint32_t app_partition_split_response::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += iprot->readStructEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - return xfer; -} + xfer += iprot->readStructBegin(fname); -uint32_t ddd_diagnose_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ddd_diagnose_response"); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->partitions.size())); - std::vector::const_iterator _iter609; - for (_iter609 = this->partitions.begin(); _iter609 != this->partitions.end(); ++_iter609) { - xfer += (*_iter609).write(oprot); - } - xfer += oprot->writeListEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ddd_diagnose_response &a, ddd_diagnose_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.partitions, b.partitions); - swap(a.__isset, b.__isset); -} - -ddd_diagnose_response::ddd_diagnose_response(const ddd_diagnose_response &other610) -{ - err = other610.err; - partitions = other610.partitions; - __isset = other610.__isset; -} -ddd_diagnose_response::ddd_diagnose_response(ddd_diagnose_response &&other611) -{ - err = std::move(other611.err); - partitions = std::move(other611.partitions); - __isset = std::move(other611.__isset); -} -ddd_diagnose_response &ddd_diagnose_response::operator=(const ddd_diagnose_response &other612) -{ - err = other612.err; - partitions = other612.partitions; - __isset = other612.__isset; - return *this; -} -ddd_diagnose_response &ddd_diagnose_response::operator=(ddd_diagnose_response &&other613) -{ - err = std::move(other613.err); - partitions = std::move(other613.partitions); - __isset = std::move(other613.__isset); - return *this; -} -void ddd_diagnose_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "ddd_diagnose_response("; - out << "err=" << to_string(err); - out << ", " - << "partitions=" << to_string(partitions); - out << ")"; -} - -app_partition_split_request::~app_partition_split_request() throw() {} - -void app_partition_split_request::__set_app_name(const std::string &val) { this->app_name = val; } - -void app_partition_split_request::__set_new_partition_count(const int32_t val) -{ - this->new_partition_count = val; -} - -uint32_t app_partition_split_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->new_partition_count); - this->__isset.new_partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_count); + this->__isset.partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t app_partition_split_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("app_partition_split_request"); +uint32_t app_partition_split_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("app_partition_split_response"); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_partition_count", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->new_partition_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(app_partition_split_request &a, app_partition_split_request &b) -{ - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.new_partition_count, b.new_partition_count); - swap(a.__isset, b.__isset); -} - -app_partition_split_request::app_partition_split_request( - const app_partition_split_request &other614) -{ - app_name = other614.app_name; - new_partition_count = other614.new_partition_count; - __isset = other614.__isset; -} -app_partition_split_request::app_partition_split_request(app_partition_split_request &&other615) -{ - app_name = std::move(other615.app_name); - new_partition_count = std::move(other615.new_partition_count); - __isset = std::move(other615.__isset); -} -app_partition_split_request &app_partition_split_request:: -operator=(const app_partition_split_request &other616) -{ - app_name = other616.app_name; - new_partition_count = other616.new_partition_count; - __isset = other616.__isset; - return *this; -} -app_partition_split_request &app_partition_split_request:: -operator=(app_partition_split_request &&other617) -{ - app_name = std::move(other617.app_name); - new_partition_count = std::move(other617.new_partition_count); - __isset = std::move(other617.__isset); - return *this; -} -void app_partition_split_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "app_partition_split_request("; - out << "app_name=" << to_string(app_name); - out << ", " - << "new_partition_count=" << to_string(new_partition_count); - out << ")"; -} - -app_partition_split_response::~app_partition_split_response() throw() {} - -void app_partition_split_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void app_partition_split_response::__set_app_id(const int32_t val) { this->app_id = val; } - -void app_partition_split_response::__set_partition_count(const int32_t val) -{ - this->partition_count = val; -} - -uint32_t app_partition_split_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_count); - this->__isset.partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } + xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->partition_count); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - return xfer; +void swap(app_partition_split_response &a, app_partition_split_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.app_id, b.app_id); + swap(a.partition_count, b.partition_count); + swap(a.__isset, b.__isset); } -uint32_t app_partition_split_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("app_partition_split_response"); +app_partition_split_response::app_partition_split_response(const app_partition_split_response& other618) { + err = other618.err; + app_id = other618.app_id; + partition_count = other618.partition_count; + __isset = other618.__isset; +} +app_partition_split_response::app_partition_split_response( app_partition_split_response&& other619) { + err = std::move(other619.err); + app_id = std::move(other619.app_id); + partition_count = std::move(other619.partition_count); + __isset = std::move(other619.__isset); +} +app_partition_split_response& app_partition_split_response::operator=(const app_partition_split_response& other620) { + err = other620.err; + app_id = other620.app_id; + partition_count = other620.partition_count; + __isset = other620.__isset; + return *this; +} +app_partition_split_response& app_partition_split_response::operator=(app_partition_split_response&& other621) { + err = std::move(other621.err); + app_id = std::move(other621.app_id); + partition_count = std::move(other621.partition_count); + __isset = std::move(other621.__isset); + return *this; +} +void app_partition_split_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "app_partition_split_response("; + out << "err=" << to_string(err); + out << ", " << "app_id=" << to_string(app_id); + out << ", " << "partition_count=" << to_string(partition_count); + out << ")"; +} - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); +notify_catch_up_request::~notify_catch_up_request() throw() { +} - xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->partition_count); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(app_partition_split_response &a, app_partition_split_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.app_id, b.app_id); - swap(a.partition_count, b.partition_count); - swap(a.__isset, b.__isset); -} - -app_partition_split_response::app_partition_split_response( - const app_partition_split_response &other618) -{ - err = other618.err; - app_id = other618.app_id; - partition_count = other618.partition_count; - __isset = other618.__isset; -} -app_partition_split_response::app_partition_split_response(app_partition_split_response &&other619) -{ - err = std::move(other619.err); - app_id = std::move(other619.app_id); - partition_count = std::move(other619.partition_count); - __isset = std::move(other619.__isset); -} -app_partition_split_response &app_partition_split_response:: -operator=(const app_partition_split_response &other620) -{ - err = other620.err; - app_id = other620.app_id; - partition_count = other620.partition_count; - __isset = other620.__isset; - return *this; -} -app_partition_split_response &app_partition_split_response:: -operator=(app_partition_split_response &&other621) -{ - err = std::move(other621.err); - app_id = std::move(other621.app_id); - partition_count = std::move(other621.partition_count); - __isset = std::move(other621.__isset); - return *this; -} -void app_partition_split_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "app_partition_split_response("; - out << "err=" << to_string(err); - out << ", " - << "app_id=" << to_string(app_id); - out << ", " - << "partition_count=" << to_string(partition_count); - out << ")"; -} - -notify_catch_up_request::~notify_catch_up_request() throw() {} - -void notify_catch_up_request::__set_parent_gpid(const ::dsn::gpid &val) { this->parent_gpid = val; } - -void notify_catch_up_request::__set_child_gpid(const ::dsn::gpid &val) { this->child_gpid = val; } - -void notify_catch_up_request::__set_child_ballot(const int64_t val) { this->child_ballot = val; } - -void notify_catch_up_request::__set_child_address(const ::dsn::rpc_address &val) -{ - this->child_address = val; -} - -uint32_t notify_catch_up_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->parent_gpid.read(iprot); - this->__isset.parent_gpid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->child_gpid.read(iprot); - this->__isset.child_gpid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->child_ballot); - this->__isset.child_ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->child_address.read(iprot); - this->__isset.child_address = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void notify_catch_up_request::__set_parent_gpid(const ::dsn::gpid& val) { + this->parent_gpid = val; +} - xfer += iprot->readStructEnd(); +void notify_catch_up_request::__set_child_gpid(const ::dsn::gpid& val) { + this->child_gpid = val; +} - return xfer; +void notify_catch_up_request::__set_child_ballot(const int64_t val) { + this->child_ballot = val; } -uint32_t notify_catch_up_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("notify_catch_up_request"); +void notify_catch_up_request::__set_child_address(const ::dsn::rpc_address& val) { + this->child_address = val; +} - xfer += oprot->writeFieldBegin("parent_gpid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->parent_gpid.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t notify_catch_up_request::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += oprot->writeFieldBegin("child_gpid", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->child_gpid.write(oprot); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldBegin("child_ballot", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->child_ballot); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("child_address", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->child_address.write(oprot); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(notify_catch_up_request &a, notify_catch_up_request &b) -{ - using ::std::swap; - swap(a.parent_gpid, b.parent_gpid); - swap(a.child_gpid, b.child_gpid); - swap(a.child_ballot, b.child_ballot); - swap(a.child_address, b.child_address); - swap(a.__isset, b.__isset); -} - -notify_catch_up_request::notify_catch_up_request(const notify_catch_up_request &other622) -{ - parent_gpid = other622.parent_gpid; - child_gpid = other622.child_gpid; - child_ballot = other622.child_ballot; - child_address = other622.child_address; - __isset = other622.__isset; -} -notify_catch_up_request::notify_catch_up_request(notify_catch_up_request &&other623) -{ - parent_gpid = std::move(other623.parent_gpid); - child_gpid = std::move(other623.child_gpid); - child_ballot = std::move(other623.child_ballot); - child_address = std::move(other623.child_address); - __isset = std::move(other623.__isset); -} -notify_catch_up_request ¬ify_catch_up_request::operator=(const notify_catch_up_request &other624) -{ - parent_gpid = other624.parent_gpid; - child_gpid = other624.child_gpid; - child_ballot = other624.child_ballot; - child_address = other624.child_address; - __isset = other624.__isset; - return *this; -} -notify_catch_up_request ¬ify_catch_up_request::operator=(notify_catch_up_request &&other625) -{ - parent_gpid = std::move(other625.parent_gpid); - child_gpid = std::move(other625.child_gpid); - child_ballot = std::move(other625.child_ballot); - child_address = std::move(other625.child_address); - __isset = std::move(other625.__isset); - return *this; -} -void notify_catch_up_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "notify_catch_up_request("; - out << "parent_gpid=" << to_string(parent_gpid); - out << ", " - << "child_gpid=" << to_string(child_gpid); - out << ", " - << "child_ballot=" << to_string(child_ballot); - out << ", " - << "child_address=" << to_string(child_address); - out << ")"; -} - -notify_cacth_up_response::~notify_cacth_up_response() throw() {} - -void notify_cacth_up_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -uint32_t notify_cacth_up_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->parent_gpid.read(iprot); + this->__isset.parent_gpid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->child_gpid.read(iprot); + this->__isset.child_gpid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->child_ballot); + this->__isset.child_ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->child_address.read(iprot); + this->__isset.child_address = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t notify_cacth_up_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("notify_cacth_up_response"); +uint32_t notify_catch_up_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("notify_catch_up_request"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parent_gpid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->parent_gpid.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("child_gpid", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->child_gpid.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("child_ballot", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->child_ballot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("child_address", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->child_address.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(notify_cacth_up_response &a, notify_cacth_up_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.__isset, b.__isset); +void swap(notify_catch_up_request &a, notify_catch_up_request &b) { + using ::std::swap; + swap(a.parent_gpid, b.parent_gpid); + swap(a.child_gpid, b.child_gpid); + swap(a.child_ballot, b.child_ballot); + swap(a.child_address, b.child_address); + swap(a.__isset, b.__isset); } -notify_cacth_up_response::notify_cacth_up_response(const notify_cacth_up_response &other626) -{ - err = other626.err; - __isset = other626.__isset; +notify_catch_up_request::notify_catch_up_request(const notify_catch_up_request& other622) { + parent_gpid = other622.parent_gpid; + child_gpid = other622.child_gpid; + child_ballot = other622.child_ballot; + child_address = other622.child_address; + __isset = other622.__isset; } -notify_cacth_up_response::notify_cacth_up_response(notify_cacth_up_response &&other627) -{ - err = std::move(other627.err); - __isset = std::move(other627.__isset); +notify_catch_up_request::notify_catch_up_request( notify_catch_up_request&& other623) { + parent_gpid = std::move(other623.parent_gpid); + child_gpid = std::move(other623.child_gpid); + child_ballot = std::move(other623.child_ballot); + child_address = std::move(other623.child_address); + __isset = std::move(other623.__isset); } -notify_cacth_up_response ¬ify_cacth_up_response:: -operator=(const notify_cacth_up_response &other628) -{ - err = other628.err; - __isset = other628.__isset; - return *this; +notify_catch_up_request& notify_catch_up_request::operator=(const notify_catch_up_request& other624) { + parent_gpid = other624.parent_gpid; + child_gpid = other624.child_gpid; + child_ballot = other624.child_ballot; + child_address = other624.child_address; + __isset = other624.__isset; + return *this; } -notify_cacth_up_response ¬ify_cacth_up_response::operator=(notify_cacth_up_response &&other629) -{ - err = std::move(other629.err); - __isset = std::move(other629.__isset); - return *this; +notify_catch_up_request& notify_catch_up_request::operator=(notify_catch_up_request&& other625) { + parent_gpid = std::move(other625.parent_gpid); + child_gpid = std::move(other625.child_gpid); + child_ballot = std::move(other625.child_ballot); + child_address = std::move(other625.child_address); + __isset = std::move(other625.__isset); + return *this; } -void notify_cacth_up_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "notify_cacth_up_response("; - out << "err=" << to_string(err); - out << ")"; +void notify_catch_up_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "notify_catch_up_request("; + out << "parent_gpid=" << to_string(parent_gpid); + out << ", " << "child_gpid=" << to_string(child_gpid); + out << ", " << "child_ballot=" << to_string(child_ballot); + out << ", " << "child_address=" << to_string(child_address); + out << ")"; } -bulk_load_metadata::~bulk_load_metadata() throw() {} -void bulk_load_metadata::__set_files(const std::vector &val) { this->files = val; } +notify_cacth_up_response::~notify_cacth_up_response() throw() { +} -void bulk_load_metadata::__set_file_total_size(const int64_t val) { this->file_total_size = val; } -uint32_t bulk_load_metadata::read(::apache::thrift::protocol::TProtocol *iprot) -{ +void notify_cacth_up_response::__set_err(const ::dsn::error_code& val) { + this->err = val; +} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t notify_cacth_up_response::read(::apache::thrift::protocol::TProtocol* iprot) { - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->files.clear(); - uint32_t _size630; - ::apache::thrift::protocol::TType _etype633; - xfer += iprot->readListBegin(_etype633, _size630); - this->files.resize(_size630); - uint32_t _i634; - for (_i634 = 0; _i634 < _size630; ++_i634) { - xfer += this->files[_i634].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.files = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->file_total_size); - this->__isset.file_total_size = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t bulk_load_metadata::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("bulk_load_metadata"); - - xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->files.size())); - std::vector::const_iterator _iter635; - for (_iter635 = this->files.begin(); _iter635 != this->files.end(); ++_iter635) { - xfer += (*_iter635).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); +uint32_t notify_cacth_up_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("notify_cacth_up_response"); - xfer += oprot->writeFieldBegin("file_total_size", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->file_total_size); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(bulk_load_metadata &a, bulk_load_metadata &b) -{ - using ::std::swap; - swap(a.files, b.files); - swap(a.file_total_size, b.file_total_size); - swap(a.__isset, b.__isset); +void swap(notify_cacth_up_response &a, notify_cacth_up_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.__isset, b.__isset); } -bulk_load_metadata::bulk_load_metadata(const bulk_load_metadata &other636) -{ - files = other636.files; - file_total_size = other636.file_total_size; - __isset = other636.__isset; +notify_cacth_up_response::notify_cacth_up_response(const notify_cacth_up_response& other626) { + err = other626.err; + __isset = other626.__isset; } -bulk_load_metadata::bulk_load_metadata(bulk_load_metadata &&other637) -{ - files = std::move(other637.files); - file_total_size = std::move(other637.file_total_size); - __isset = std::move(other637.__isset); +notify_cacth_up_response::notify_cacth_up_response( notify_cacth_up_response&& other627) { + err = std::move(other627.err); + __isset = std::move(other627.__isset); } -bulk_load_metadata &bulk_load_metadata::operator=(const bulk_load_metadata &other638) -{ - files = other638.files; - file_total_size = other638.file_total_size; - __isset = other638.__isset; - return *this; +notify_cacth_up_response& notify_cacth_up_response::operator=(const notify_cacth_up_response& other628) { + err = other628.err; + __isset = other628.__isset; + return *this; } -bulk_load_metadata &bulk_load_metadata::operator=(bulk_load_metadata &&other639) -{ - files = std::move(other639.files); - file_total_size = std::move(other639.file_total_size); - __isset = std::move(other639.__isset); - return *this; +notify_cacth_up_response& notify_cacth_up_response::operator=(notify_cacth_up_response&& other629) { + err = std::move(other629.err); + __isset = std::move(other629.__isset); + return *this; } -void bulk_load_metadata::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "bulk_load_metadata("; - out << "files=" << to_string(files); - out << ", " - << "file_total_size=" << to_string(file_total_size); - out << ")"; +void notify_cacth_up_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "notify_cacth_up_response("; + out << "err=" << to_string(err); + out << ")"; } -start_bulk_load_request::~start_bulk_load_request() throw() {} -void start_bulk_load_request::__set_app_name(const std::string &val) { this->app_name = val; } +bulk_load_metadata::~bulk_load_metadata() throw() { +} + -void start_bulk_load_request::__set_cluster_name(const std::string &val) -{ - this->cluster_name = val; +void bulk_load_metadata::__set_files(const std::vector & val) { + this->files = val; } -void start_bulk_load_request::__set_file_provider_type(const std::string &val) -{ - this->file_provider_type = val; +void bulk_load_metadata::__set_file_total_size(const int64_t val) { + this->file_total_size = val; } -uint32_t start_bulk_load_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t bulk_load_metadata::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->cluster_name); - this->__isset.cluster_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->file_provider_type); - this->__isset.file_provider_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->files.clear(); + uint32_t _size630; + ::apache::thrift::protocol::TType _etype633; + xfer += iprot->readListBegin(_etype633, _size630); + this->files.resize(_size630); + uint32_t _i634; + for (_i634 = 0; _i634 < _size630; ++_i634) + { + xfer += this->files[_i634].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.files = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->file_total_size); + this->__isset.file_total_size = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t start_bulk_load_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("start_bulk_load_request"); - - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("cluster_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->cluster_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("file_provider_type", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->file_provider_type); - xfer += oprot->writeFieldEnd(); +uint32_t bulk_load_metadata::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("bulk_load_metadata"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(start_bulk_load_request &a, start_bulk_load_request &b) -{ - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.cluster_name, b.cluster_name); - swap(a.file_provider_type, b.file_provider_type); - swap(a.__isset, b.__isset); -} - -start_bulk_load_request::start_bulk_load_request(const start_bulk_load_request &other640) -{ - app_name = other640.app_name; - cluster_name = other640.cluster_name; - file_provider_type = other640.file_provider_type; - __isset = other640.__isset; -} -start_bulk_load_request::start_bulk_load_request(start_bulk_load_request &&other641) -{ - app_name = std::move(other641.app_name); - cluster_name = std::move(other641.cluster_name); - file_provider_type = std::move(other641.file_provider_type); - __isset = std::move(other641.__isset); -} -start_bulk_load_request &start_bulk_load_request::operator=(const start_bulk_load_request &other642) -{ - app_name = other642.app_name; - cluster_name = other642.cluster_name; - file_provider_type = other642.file_provider_type; - __isset = other642.__isset; - return *this; -} -start_bulk_load_request &start_bulk_load_request::operator=(start_bulk_load_request &&other643) -{ - app_name = std::move(other643.app_name); - cluster_name = std::move(other643.cluster_name); - file_provider_type = std::move(other643.file_provider_type); - __isset = std::move(other643.__isset); - return *this; -} -void start_bulk_load_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "start_bulk_load_request("; - out << "app_name=" << to_string(app_name); - out << ", " - << "cluster_name=" << to_string(cluster_name); - out << ", " - << "file_provider_type=" << to_string(file_provider_type); - out << ")"; -} - -start_bulk_load_response::~start_bulk_load_response() throw() {} - -void start_bulk_load_response::__set_err(const ::dsn::error_code &val) { this->err = val; } - -void start_bulk_load_response::__set_hint_msg(const std::string &val) { this->hint_msg = val; } - -uint32_t start_bulk_load_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint_msg); - this->__isset.hint_msg = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->files.size())); + std::vector ::const_iterator _iter635; + for (_iter635 = this->files.begin(); _iter635 != this->files.end(); ++_iter635) + { + xfer += (*_iter635).write(oprot); } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldBegin("file_total_size", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->file_total_size); + xfer += oprot->writeFieldEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -uint32_t start_bulk_load_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("start_bulk_load_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); +void swap(bulk_load_metadata &a, bulk_load_metadata &b) { + using ::std::swap; + swap(a.files, b.files); + swap(a.file_total_size, b.file_total_size); + swap(a.__isset, b.__isset); +} - xfer += oprot->writeFieldBegin("hint_msg", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->hint_msg); - xfer += oprot->writeFieldEnd(); +bulk_load_metadata::bulk_load_metadata(const bulk_load_metadata& other636) { + files = other636.files; + file_total_size = other636.file_total_size; + __isset = other636.__isset; +} +bulk_load_metadata::bulk_load_metadata( bulk_load_metadata&& other637) { + files = std::move(other637.files); + file_total_size = std::move(other637.file_total_size); + __isset = std::move(other637.__isset); +} +bulk_load_metadata& bulk_load_metadata::operator=(const bulk_load_metadata& other638) { + files = other638.files; + file_total_size = other638.file_total_size; + __isset = other638.__isset; + return *this; +} +bulk_load_metadata& bulk_load_metadata::operator=(bulk_load_metadata&& other639) { + files = std::move(other639.files); + file_total_size = std::move(other639.file_total_size); + __isset = std::move(other639.__isset); + return *this; +} +void bulk_load_metadata::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "bulk_load_metadata("; + out << "files=" << to_string(files); + out << ", " << "file_total_size=" << to_string(file_total_size); + out << ")"; +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(start_bulk_load_response &a, start_bulk_load_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.hint_msg, b.hint_msg); - swap(a.__isset, b.__isset); -} - -start_bulk_load_response::start_bulk_load_response(const start_bulk_load_response &other644) -{ - err = other644.err; - hint_msg = other644.hint_msg; - __isset = other644.__isset; -} -start_bulk_load_response::start_bulk_load_response(start_bulk_load_response &&other645) -{ - err = std::move(other645.err); - hint_msg = std::move(other645.hint_msg); - __isset = std::move(other645.__isset); -} -start_bulk_load_response &start_bulk_load_response:: -operator=(const start_bulk_load_response &other646) -{ - err = other646.err; - hint_msg = other646.hint_msg; - __isset = other646.__isset; - return *this; -} -start_bulk_load_response &start_bulk_load_response::operator=(start_bulk_load_response &&other647) -{ - err = std::move(other647.err); - hint_msg = std::move(other647.hint_msg); - __isset = std::move(other647.__isset); - return *this; -} -void start_bulk_load_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "start_bulk_load_response("; - out << "err=" << to_string(err); - out << ", " - << "hint_msg=" << to_string(hint_msg); - out << ")"; -} -} -} // namespace +}} // namespace diff --git a/src/dist/replication/meta_server/meta_bulk_load_service.cpp b/src/dist/replication/meta_server/meta_bulk_load_service.cpp index a2744224e0..dfa4702006 100644 --- a/src/dist/replication/meta_server/meta_bulk_load_service.cpp +++ b/src/dist/replication/meta_server/meta_bulk_load_service.cpp @@ -3,7 +3,6 @@ // can be found in the LICENSE file in the root directory of this source tree. #include -#include #include "meta_bulk_load_service.h" @@ -30,12 +29,6 @@ void bulk_load_service::initialize_bulk_load_service() } } -// ThreadPool: THREAD_POOL_META_STATE -void bulk_load_service::on_start_bulk_load(start_bulk_load_rpc rpc) -{ - // TODO(heyuchen): TBD -} - // ThreadPool: THREAD_POOL_META_STATE void bulk_load_service::create_bulk_load_root_dir(error_code &err, task_tracker &tracker) { diff --git a/src/dist/replication/meta_server/meta_bulk_load_service.h b/src/dist/replication/meta_server/meta_bulk_load_service.h index 84634bea04..0b38a902ba 100644 --- a/src/dist/replication/meta_server/meta_bulk_load_service.h +++ b/src/dist/replication/meta_server/meta_bulk_load_service.h @@ -50,16 +50,13 @@ class bulk_load_service void initialize_bulk_load_service(); - // client -> meta server to start bulk load - void on_start_bulk_load(start_bulk_load_rpc rpc); +private: + void create_bulk_load_root_dir(error_code &err, task_tracker &tracker); -private: /// /// sync bulk load states from remote storage /// called when service initialized or meta server leader switch /// - void create_bulk_load_root_dir(error_code &err, task_tracker &tracker); - void sync_apps_bulk_load_from_remote_stroage(error_code &err, task_tracker &tracker); /// @@ -68,40 +65,6 @@ class bulk_load_service /// void try_to_continue_bulk_load(); - /// - /// helper functions - /// - inline std::string get_bulk_load_info_path(const std::string &app_name, - const std::string &cluster_name) const - { - std::ostringstream oss; - oss << _meta_svc->get_options().bulk_load_root << "/" << cluster_name << "/" << app_name - << "/" << bulk_load_constant::BULK_LOAD_INFO; - return oss.str(); - } - - inline std::string get_app_bulk_load_path(int32_t app_id) const - { - std::stringstream oss; - oss << _bulk_load_root << "/" << app_id; - return oss.str(); - } - - inline std::string get_partition_bulk_load_path(const std::string &app_bulk_load_path, - int partition_id) const - { - std::stringstream oss; - oss << app_bulk_load_path << "/" << partition_id; - return oss.str(); - } - - inline std::string get_partition_bulk_load_path(const gpid &pid) const - { - std::stringstream oss; - oss << get_app_bulk_load_path(pid.get_app_id()) << "/" << pid.get_partition_index(); - return oss.str(); - } - private: friend class bulk_load_service_test; diff --git a/src/dist/replication/meta_server/meta_service.cpp b/src/dist/replication/meta_server/meta_service.cpp index 504b4da213..f72344e680 100644 --- a/src/dist/replication/meta_server/meta_service.cpp +++ b/src/dist/replication/meta_server/meta_service.cpp @@ -384,8 +384,6 @@ void meta_service::register_rpc_handlers() RPC_CM_DDD_DIAGNOSE, "ddd_diagnose", &meta_service::ddd_diagnose); register_rpc_handler_with_rpc_holder( RPC_CM_APP_PARTITION_SPLIT, "app_partition_split", &meta_service::on_app_partition_split); - register_rpc_handler_with_rpc_holder( - RPC_CM_START_BULK_LOAD, "start_bulk_load", &meta_service::on_start_bulk_load); } int meta_service::check_leader(dsn::message_ex *req, dsn::rpc_address *forward_address) @@ -936,21 +934,5 @@ void meta_service::on_app_partition_split(app_partition_split_rpc rpc) server_state::sStateHash); } -void meta_service::on_start_bulk_load(start_bulk_load_rpc rpc) -{ - auto &response = rpc.response(); - RPC_CHECK_STATUS(rpc.dsn_request(), response); - - if (!_bulk_load_svc) { - derror("meta doesn't support bulk load"); - response.err = ERR_SERVICE_NOT_ACTIVE; - } else { - tasking::enqueue(LPC_META_STATE_NORMAL, - tracker(), - [this, rpc]() { _bulk_load_svc->on_start_bulk_load(std::move(rpc)); }, - server_state::sStateHash); - } -} - } // namespace replication } // namespace dsn diff --git a/src/dist/replication/meta_server/meta_service.h b/src/dist/replication/meta_server/meta_service.h index 87011a15fa..aeea5ed10c 100644 --- a/src/dist/replication/meta_server/meta_service.h +++ b/src/dist/replication/meta_server/meta_service.h @@ -186,9 +186,6 @@ class meta_service : public serverlet // split void on_app_partition_split(app_partition_split_rpc rpc); - // bulk load - void on_start_bulk_load(start_bulk_load_rpc rpc); - // common routines // ret: // 1. the meta is leader diff --git a/src/dist/replication/replication.thrift b/src/dist/replication/replication.thrift index f4fb396155..c0a152668e 100644 --- a/src/dist/replication/replication.thrift +++ b/src/dist/replication/replication.thrift @@ -882,30 +882,6 @@ struct bulk_load_metadata 2:i64 file_total_size; } -// client -> meta, start bulk load -struct start_bulk_load_request -{ - 1:string app_name; - 2:string cluster_name; - 3:string file_provider_type; -} - -struct start_bulk_load_response -{ - // Possible error: - // - ERR_OK: start bulk load succeed - // - ERR_APP_NOT_EXIST: app not exist - // - ERR_APP_DROPPED: app has been dropped - // - ERR_BUSY: app is already executing bulk load - // - ERR_INVALID_PARAMETERS: wrong file_provider type - // - ERR_FILE_OPERATION_FAILED: remote file_provider error - // - ERR_OBJECT_NOT_FOUND: bulk_load_info not exist on file_provider - // - ERR_INCOMPLETE_DATA: bulk_load_info is damaged on file_provider - // - ERR_INCONSISTENT_STATE: app_id or partition_count inconsistent - 1:dsn.error_code err; - 2:string hint_msg; -} - /* service replica_s { diff --git a/src/dist/replication/test/meta_test/unit_test/CMakeLists.txt b/src/dist/replication/test/meta_test/unit_test/CMakeLists.txt index 33708072fb..05b5204474 100644 --- a/src/dist/replication/test/meta_test/unit_test/CMakeLists.txt +++ b/src/dist/replication/test/meta_test/unit_test/CMakeLists.txt @@ -31,7 +31,7 @@ set(MY_PROJ_LIBS crypto gtest) -set(MY_BOOST_LIBS Boost::system Boost::filesystem Boost::regex) +set(MY_BOOST_LIBS Boost::system Boost::filesystem) # Extra files that will be installed set(MY_BINPLACES clear.sh run.sh config-ddl-test.ini config-test.ini suite1 suite2) From 046e4abb3c9cd63583f158a41dae60728c89cc71 Mon Sep 17 00:00:00 2001 From: heyuchen Date: Thu, 23 Apr 2020 13:37:35 +0800 Subject: [PATCH 4/9] format code --- .../serialization_helper/dsn.layer2_types.h | 854 +- include/dsn/dist/cli/cli_types.h | 73 +- include/dsn/dist/failure_detector/fd_types.h | 323 +- .../dsn/dist/replication/replication_types.h | 9213 +++--- src/core/core/dsn.layer2_types.cpp | 2237 +- .../replication/common/replication_types.cpp | 26090 ++++++++-------- .../meta_server/meta_bulk_load_service.cpp | 3 +- .../meta_server/meta_bulk_load_service.h | 2 +- .../test/meta_test/unit_test/meta_test_base.h | 6 +- 9 files changed, 19769 insertions(+), 19032 deletions(-) diff --git a/include/dsn/cpp/serialization_helper/dsn.layer2_types.h b/include/dsn/cpp/serialization_helper/dsn.layer2_types.h index d6b581816c..6ba23da9a1 100644 --- a/include/dsn/cpp/serialization_helper/dsn.layer2_types.h +++ b/include/dsn/cpp/serialization_helper/dsn.layer2_types.h @@ -17,23 +17,24 @@ #include - namespace dsn { -struct app_status { - enum type { - AS_INVALID = 0, - AS_AVAILABLE = 1, - AS_CREATING = 2, - AS_CREATE_FAILED = 3, - AS_DROPPING = 4, - AS_DROP_FAILED = 5, - AS_DROPPED = 6, - AS_RECALLING = 7 - }; +struct app_status +{ + enum type + { + AS_INVALID = 0, + AS_AVAILABLE = 1, + AS_CREATING = 2, + AS_CREATE_FAILED = 3, + AS_DROPPING = 4, + AS_DROP_FAILED = 5, + AS_DROPPED = 6, + AS_RECALLING = 7 + }; }; -extern const std::map _app_status_VALUES_TO_NAMES; +extern const std::map _app_status_VALUES_TO_NAMES; class partition_configuration; @@ -45,434 +46,491 @@ class app_info; class thrift_request_meta_v1; -typedef struct _partition_configuration__isset { - _partition_configuration__isset() : pid(false), ballot(false), max_replica_count(false), primary(false), secondaries(false), last_drops(false), last_committed_decree(false), partition_flags(false) {} - bool pid :1; - bool ballot :1; - bool max_replica_count :1; - bool primary :1; - bool secondaries :1; - bool last_drops :1; - bool last_committed_decree :1; - bool partition_flags :1; +typedef struct _partition_configuration__isset +{ + _partition_configuration__isset() + : pid(false), + ballot(false), + max_replica_count(false), + primary(false), + secondaries(false), + last_drops(false), + last_committed_decree(false), + partition_flags(false) + { + } + bool pid : 1; + bool ballot : 1; + bool max_replica_count : 1; + bool primary : 1; + bool secondaries : 1; + bool last_drops : 1; + bool last_committed_decree : 1; + bool partition_flags : 1; } _partition_configuration__isset; -class partition_configuration { - public: - - partition_configuration(const partition_configuration&); - partition_configuration(partition_configuration&&); - partition_configuration& operator=(const partition_configuration&); - partition_configuration& operator=(partition_configuration&&); - partition_configuration() : ballot(0), max_replica_count(0), last_committed_decree(0), partition_flags(0) { - } - - virtual ~partition_configuration() throw(); - ::dsn::gpid pid; - int64_t ballot; - int32_t max_replica_count; - ::dsn::rpc_address primary; - std::vector< ::dsn::rpc_address> secondaries; - std::vector< ::dsn::rpc_address> last_drops; - int64_t last_committed_decree; - int32_t partition_flags; - - _partition_configuration__isset __isset; - - void __set_pid(const ::dsn::gpid& val); - - void __set_ballot(const int64_t val); - - void __set_max_replica_count(const int32_t val); - - void __set_primary(const ::dsn::rpc_address& val); - - void __set_secondaries(const std::vector< ::dsn::rpc_address> & val); - - void __set_last_drops(const std::vector< ::dsn::rpc_address> & val); - - void __set_last_committed_decree(const int64_t val); - - void __set_partition_flags(const int32_t val); - - bool operator == (const partition_configuration & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(max_replica_count == rhs.max_replica_count)) - return false; - if (!(primary == rhs.primary)) - return false; - if (!(secondaries == rhs.secondaries)) - return false; - if (!(last_drops == rhs.last_drops)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (!(partition_flags == rhs.partition_flags)) - return false; - return true; - } - bool operator != (const partition_configuration &rhs) const { - return !(*this == rhs); - } - - bool operator < (const partition_configuration & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class partition_configuration +{ +public: + partition_configuration(const partition_configuration &); + partition_configuration(partition_configuration &&); + partition_configuration &operator=(const partition_configuration &); + partition_configuration &operator=(partition_configuration &&); + partition_configuration() + : ballot(0), max_replica_count(0), last_committed_decree(0), partition_flags(0) + { + } + + virtual ~partition_configuration() throw(); + ::dsn::gpid pid; + int64_t ballot; + int32_t max_replica_count; + ::dsn::rpc_address primary; + std::vector<::dsn::rpc_address> secondaries; + std::vector<::dsn::rpc_address> last_drops; + int64_t last_committed_decree; + int32_t partition_flags; + + _partition_configuration__isset __isset; + + void __set_pid(const ::dsn::gpid &val); + + void __set_ballot(const int64_t val); + + void __set_max_replica_count(const int32_t val); + + void __set_primary(const ::dsn::rpc_address &val); + + void __set_secondaries(const std::vector<::dsn::rpc_address> &val); + + void __set_last_drops(const std::vector<::dsn::rpc_address> &val); + + void __set_last_committed_decree(const int64_t val); + + void __set_partition_flags(const int32_t val); + + bool operator==(const partition_configuration &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(max_replica_count == rhs.max_replica_count)) + return false; + if (!(primary == rhs.primary)) + return false; + if (!(secondaries == rhs.secondaries)) + return false; + if (!(last_drops == rhs.last_drops)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (!(partition_flags == rhs.partition_flags)) + return false; + return true; + } + bool operator!=(const partition_configuration &rhs) const { return !(*this == rhs); } + + bool operator<(const partition_configuration &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(partition_configuration &a, partition_configuration &b); -inline std::ostream& operator<<(std::ostream& out, const partition_configuration& obj) +inline std::ostream &operator<<(std::ostream &out, const partition_configuration &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_by_index_request__isset { - _configuration_query_by_index_request__isset() : app_name(false), partition_indices(false) {} - bool app_name :1; - bool partition_indices :1; +typedef struct _configuration_query_by_index_request__isset +{ + _configuration_query_by_index_request__isset() : app_name(false), partition_indices(false) {} + bool app_name : 1; + bool partition_indices : 1; } _configuration_query_by_index_request__isset; -class configuration_query_by_index_request { - public: - - configuration_query_by_index_request(const configuration_query_by_index_request&); - configuration_query_by_index_request(configuration_query_by_index_request&&); - configuration_query_by_index_request& operator=(const configuration_query_by_index_request&); - configuration_query_by_index_request& operator=(configuration_query_by_index_request&&); - configuration_query_by_index_request() : app_name() { - } - - virtual ~configuration_query_by_index_request() throw(); - std::string app_name; - std::vector partition_indices; - - _configuration_query_by_index_request__isset __isset; - - void __set_app_name(const std::string& val); - - void __set_partition_indices(const std::vector & val); - - bool operator == (const configuration_query_by_index_request & rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(partition_indices == rhs.partition_indices)) - return false; - return true; - } - bool operator != (const configuration_query_by_index_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_query_by_index_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_query_by_index_request +{ +public: + configuration_query_by_index_request(const configuration_query_by_index_request &); + configuration_query_by_index_request(configuration_query_by_index_request &&); + configuration_query_by_index_request &operator=(const configuration_query_by_index_request &); + configuration_query_by_index_request &operator=(configuration_query_by_index_request &&); + configuration_query_by_index_request() : app_name() {} + + virtual ~configuration_query_by_index_request() throw(); + std::string app_name; + std::vector partition_indices; + + _configuration_query_by_index_request__isset __isset; + + void __set_app_name(const std::string &val); + + void __set_partition_indices(const std::vector &val); + + bool operator==(const configuration_query_by_index_request &rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(partition_indices == rhs.partition_indices)) + return false; + return true; + } + bool operator!=(const configuration_query_by_index_request &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_query_by_index_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_query_by_index_request &a, configuration_query_by_index_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_query_by_index_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_query_by_index_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_by_index_response__isset { - _configuration_query_by_index_response__isset() : err(false), app_id(false), partition_count(false), is_stateful(false), partitions(false) {} - bool err :1; - bool app_id :1; - bool partition_count :1; - bool is_stateful :1; - bool partitions :1; +typedef struct _configuration_query_by_index_response__isset +{ + _configuration_query_by_index_response__isset() + : err(false), app_id(false), partition_count(false), is_stateful(false), partitions(false) + { + } + bool err : 1; + bool app_id : 1; + bool partition_count : 1; + bool is_stateful : 1; + bool partitions : 1; } _configuration_query_by_index_response__isset; -class configuration_query_by_index_response { - public: - - configuration_query_by_index_response(const configuration_query_by_index_response&); - configuration_query_by_index_response(configuration_query_by_index_response&&); - configuration_query_by_index_response& operator=(const configuration_query_by_index_response&); - configuration_query_by_index_response& operator=(configuration_query_by_index_response&&); - configuration_query_by_index_response() : app_id(0), partition_count(0), is_stateful(0) { - } - - virtual ~configuration_query_by_index_response() throw(); - ::dsn::error_code err; - int32_t app_id; - int32_t partition_count; - bool is_stateful; - std::vector partitions; - - _configuration_query_by_index_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - void __set_app_id(const int32_t val); - - void __set_partition_count(const int32_t val); - - void __set_is_stateful(const bool val); - - void __set_partitions(const std::vector & val); - - bool operator == (const configuration_query_by_index_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(app_id == rhs.app_id)) - return false; - if (!(partition_count == rhs.partition_count)) - return false; - if (!(is_stateful == rhs.is_stateful)) - return false; - if (!(partitions == rhs.partitions)) - return false; - return true; - } - bool operator != (const configuration_query_by_index_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_query_by_index_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_query_by_index_response +{ +public: + configuration_query_by_index_response(const configuration_query_by_index_response &); + configuration_query_by_index_response(configuration_query_by_index_response &&); + configuration_query_by_index_response &operator=(const configuration_query_by_index_response &); + configuration_query_by_index_response &operator=(configuration_query_by_index_response &&); + configuration_query_by_index_response() : app_id(0), partition_count(0), is_stateful(0) {} + + virtual ~configuration_query_by_index_response() throw(); + ::dsn::error_code err; + int32_t app_id; + int32_t partition_count; + bool is_stateful; + std::vector partitions; + + _configuration_query_by_index_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_app_id(const int32_t val); + + void __set_partition_count(const int32_t val); + + void __set_is_stateful(const bool val); + + void __set_partitions(const std::vector &val); + + bool operator==(const configuration_query_by_index_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(app_id == rhs.app_id)) + return false; + if (!(partition_count == rhs.partition_count)) + return false; + if (!(is_stateful == rhs.is_stateful)) + return false; + if (!(partitions == rhs.partitions)) + return false; + return true; + } + bool operator!=(const configuration_query_by_index_response &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_query_by_index_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_query_by_index_response &a, configuration_query_by_index_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_query_by_index_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_query_by_index_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _app_info__isset { - _app_info__isset() : status(true), app_type(false), app_name(false), app_id(false), partition_count(false), envs(false), is_stateful(false), max_replica_count(false), expire_second(false), create_second(false), drop_second(false), duplicating(false), init_partition_count(true), is_bulk_loading(true) {} - bool status :1; - bool app_type :1; - bool app_name :1; - bool app_id :1; - bool partition_count :1; - bool envs :1; - bool is_stateful :1; - bool max_replica_count :1; - bool expire_second :1; - bool create_second :1; - bool drop_second :1; - bool duplicating :1; - bool init_partition_count :1; - bool is_bulk_loading :1; +typedef struct _app_info__isset +{ + _app_info__isset() + : status(true), + app_type(false), + app_name(false), + app_id(false), + partition_count(false), + envs(false), + is_stateful(false), + max_replica_count(false), + expire_second(false), + create_second(false), + drop_second(false), + duplicating(false), + init_partition_count(true), + is_bulk_loading(true) + { + } + bool status : 1; + bool app_type : 1; + bool app_name : 1; + bool app_id : 1; + bool partition_count : 1; + bool envs : 1; + bool is_stateful : 1; + bool max_replica_count : 1; + bool expire_second : 1; + bool create_second : 1; + bool drop_second : 1; + bool duplicating : 1; + bool init_partition_count : 1; + bool is_bulk_loading : 1; } _app_info__isset; -class app_info { - public: - - app_info(const app_info&); - app_info(app_info&&); - app_info& operator=(const app_info&); - app_info& operator=(app_info&&); - app_info() : status((app_status::type)0), app_type(), app_name(), app_id(0), partition_count(0), is_stateful(0), max_replica_count(0), expire_second(0), create_second(0), drop_second(0), duplicating(0), init_partition_count(-1), is_bulk_loading(false) { - status = (app_status::type)0; - - } - - virtual ~app_info() throw(); - app_status::type status; - std::string app_type; - std::string app_name; - int32_t app_id; - int32_t partition_count; - std::map envs; - bool is_stateful; - int32_t max_replica_count; - int64_t expire_second; - int64_t create_second; - int64_t drop_second; - bool duplicating; - int32_t init_partition_count; - bool is_bulk_loading; - - _app_info__isset __isset; - - void __set_status(const app_status::type val); - - void __set_app_type(const std::string& val); - - void __set_app_name(const std::string& val); - - void __set_app_id(const int32_t val); - - void __set_partition_count(const int32_t val); - - void __set_envs(const std::map & val); - - void __set_is_stateful(const bool val); - - void __set_max_replica_count(const int32_t val); - - void __set_expire_second(const int64_t val); - - void __set_create_second(const int64_t val); - - void __set_drop_second(const int64_t val); - - void __set_duplicating(const bool val); - - void __set_init_partition_count(const int32_t val); - - void __set_is_bulk_loading(const bool val); - - bool operator == (const app_info & rhs) const - { - if (!(status == rhs.status)) - return false; - if (!(app_type == rhs.app_type)) - return false; - if (!(app_name == rhs.app_name)) - return false; - if (!(app_id == rhs.app_id)) - return false; - if (!(partition_count == rhs.partition_count)) - return false; - if (!(envs == rhs.envs)) - return false; - if (!(is_stateful == rhs.is_stateful)) - return false; - if (!(max_replica_count == rhs.max_replica_count)) - return false; - if (!(expire_second == rhs.expire_second)) - return false; - if (!(create_second == rhs.create_second)) - return false; - if (!(drop_second == rhs.drop_second)) - return false; - if (__isset.duplicating != rhs.__isset.duplicating) - return false; - else if (__isset.duplicating && !(duplicating == rhs.duplicating)) - return false; - if (!(init_partition_count == rhs.init_partition_count)) - return false; - if (__isset.is_bulk_loading != rhs.__isset.is_bulk_loading) - return false; - else if (__isset.is_bulk_loading && !(is_bulk_loading == rhs.is_bulk_loading)) - return false; - return true; - } - bool operator != (const app_info &rhs) const { - return !(*this == rhs); - } - - bool operator < (const app_info & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class app_info +{ +public: + app_info(const app_info &); + app_info(app_info &&); + app_info &operator=(const app_info &); + app_info &operator=(app_info &&); + app_info() + : status((app_status::type)0), + app_type(), + app_name(), + app_id(0), + partition_count(0), + is_stateful(0), + max_replica_count(0), + expire_second(0), + create_second(0), + drop_second(0), + duplicating(0), + init_partition_count(-1), + is_bulk_loading(false) + { + status = (app_status::type)0; + } + + virtual ~app_info() throw(); + app_status::type status; + std::string app_type; + std::string app_name; + int32_t app_id; + int32_t partition_count; + std::map envs; + bool is_stateful; + int32_t max_replica_count; + int64_t expire_second; + int64_t create_second; + int64_t drop_second; + bool duplicating; + int32_t init_partition_count; + bool is_bulk_loading; + + _app_info__isset __isset; + + void __set_status(const app_status::type val); + + void __set_app_type(const std::string &val); + + void __set_app_name(const std::string &val); + + void __set_app_id(const int32_t val); + + void __set_partition_count(const int32_t val); + + void __set_envs(const std::map &val); + + void __set_is_stateful(const bool val); + + void __set_max_replica_count(const int32_t val); + + void __set_expire_second(const int64_t val); + + void __set_create_second(const int64_t val); + + void __set_drop_second(const int64_t val); + + void __set_duplicating(const bool val); + + void __set_init_partition_count(const int32_t val); + + void __set_is_bulk_loading(const bool val); + + bool operator==(const app_info &rhs) const + { + if (!(status == rhs.status)) + return false; + if (!(app_type == rhs.app_type)) + return false; + if (!(app_name == rhs.app_name)) + return false; + if (!(app_id == rhs.app_id)) + return false; + if (!(partition_count == rhs.partition_count)) + return false; + if (!(envs == rhs.envs)) + return false; + if (!(is_stateful == rhs.is_stateful)) + return false; + if (!(max_replica_count == rhs.max_replica_count)) + return false; + if (!(expire_second == rhs.expire_second)) + return false; + if (!(create_second == rhs.create_second)) + return false; + if (!(drop_second == rhs.drop_second)) + return false; + if (__isset.duplicating != rhs.__isset.duplicating) + return false; + else if (__isset.duplicating && !(duplicating == rhs.duplicating)) + return false; + if (!(init_partition_count == rhs.init_partition_count)) + return false; + if (__isset.is_bulk_loading != rhs.__isset.is_bulk_loading) + return false; + else if (__isset.is_bulk_loading && !(is_bulk_loading == rhs.is_bulk_loading)) + return false; + return true; + } + bool operator!=(const app_info &rhs) const { return !(*this == rhs); } + + bool operator<(const app_info &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(app_info &a, app_info &b); -inline std::ostream& operator<<(std::ostream& out, const app_info& obj) +inline std::ostream &operator<<(std::ostream &out, const app_info &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _thrift_request_meta_v1__isset { - _thrift_request_meta_v1__isset() : app_id(false), partition_index(false), client_timeout(false), client_partition_hash(false), is_backup_request(false) {} - bool app_id :1; - bool partition_index :1; - bool client_timeout :1; - bool client_partition_hash :1; - bool is_backup_request :1; +typedef struct _thrift_request_meta_v1__isset +{ + _thrift_request_meta_v1__isset() + : app_id(false), + partition_index(false), + client_timeout(false), + client_partition_hash(false), + is_backup_request(false) + { + } + bool app_id : 1; + bool partition_index : 1; + bool client_timeout : 1; + bool client_partition_hash : 1; + bool is_backup_request : 1; } _thrift_request_meta_v1__isset; -class thrift_request_meta_v1 { - public: - - thrift_request_meta_v1(const thrift_request_meta_v1&); - thrift_request_meta_v1(thrift_request_meta_v1&&); - thrift_request_meta_v1& operator=(const thrift_request_meta_v1&); - thrift_request_meta_v1& operator=(thrift_request_meta_v1&&); - thrift_request_meta_v1() : app_id(0), partition_index(0), client_timeout(0), client_partition_hash(0), is_backup_request(0) { - } - - virtual ~thrift_request_meta_v1() throw(); - int32_t app_id; - int32_t partition_index; - int32_t client_timeout; - int64_t client_partition_hash; - bool is_backup_request; - - _thrift_request_meta_v1__isset __isset; - - void __set_app_id(const int32_t val); - - void __set_partition_index(const int32_t val); - - void __set_client_timeout(const int32_t val); - - void __set_client_partition_hash(const int64_t val); - - void __set_is_backup_request(const bool val); - - bool operator == (const thrift_request_meta_v1 & rhs) const - { - if (__isset.app_id != rhs.__isset.app_id) - return false; - else if (__isset.app_id && !(app_id == rhs.app_id)) - return false; - if (__isset.partition_index != rhs.__isset.partition_index) - return false; - else if (__isset.partition_index && !(partition_index == rhs.partition_index)) - return false; - if (__isset.client_timeout != rhs.__isset.client_timeout) - return false; - else if (__isset.client_timeout && !(client_timeout == rhs.client_timeout)) - return false; - if (__isset.client_partition_hash != rhs.__isset.client_partition_hash) - return false; - else if (__isset.client_partition_hash && !(client_partition_hash == rhs.client_partition_hash)) - return false; - if (__isset.is_backup_request != rhs.__isset.is_backup_request) - return false; - else if (__isset.is_backup_request && !(is_backup_request == rhs.is_backup_request)) - return false; - return true; - } - bool operator != (const thrift_request_meta_v1 &rhs) const { - return !(*this == rhs); - } - - bool operator < (const thrift_request_meta_v1 & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class thrift_request_meta_v1 +{ +public: + thrift_request_meta_v1(const thrift_request_meta_v1 &); + thrift_request_meta_v1(thrift_request_meta_v1 &&); + thrift_request_meta_v1 &operator=(const thrift_request_meta_v1 &); + thrift_request_meta_v1 &operator=(thrift_request_meta_v1 &&); + thrift_request_meta_v1() + : app_id(0), + partition_index(0), + client_timeout(0), + client_partition_hash(0), + is_backup_request(0) + { + } + + virtual ~thrift_request_meta_v1() throw(); + int32_t app_id; + int32_t partition_index; + int32_t client_timeout; + int64_t client_partition_hash; + bool is_backup_request; + + _thrift_request_meta_v1__isset __isset; + + void __set_app_id(const int32_t val); + + void __set_partition_index(const int32_t val); + + void __set_client_timeout(const int32_t val); + + void __set_client_partition_hash(const int64_t val); + + void __set_is_backup_request(const bool val); + + bool operator==(const thrift_request_meta_v1 &rhs) const + { + if (__isset.app_id != rhs.__isset.app_id) + return false; + else if (__isset.app_id && !(app_id == rhs.app_id)) + return false; + if (__isset.partition_index != rhs.__isset.partition_index) + return false; + else if (__isset.partition_index && !(partition_index == rhs.partition_index)) + return false; + if (__isset.client_timeout != rhs.__isset.client_timeout) + return false; + else if (__isset.client_timeout && !(client_timeout == rhs.client_timeout)) + return false; + if (__isset.client_partition_hash != rhs.__isset.client_partition_hash) + return false; + else if (__isset.client_partition_hash && + !(client_partition_hash == rhs.client_partition_hash)) + return false; + if (__isset.is_backup_request != rhs.__isset.is_backup_request) + return false; + else if (__isset.is_backup_request && !(is_backup_request == rhs.is_backup_request)) + return false; + return true; + } + bool operator!=(const thrift_request_meta_v1 &rhs) const { return !(*this == rhs); } + + bool operator<(const thrift_request_meta_v1 &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(thrift_request_meta_v1 &a, thrift_request_meta_v1 &b); -inline std::ostream& operator<<(std::ostream& out, const thrift_request_meta_v1& obj) +inline std::ostream &operator<<(std::ostream &out, const thrift_request_meta_v1 &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } } // namespace diff --git a/include/dsn/dist/cli/cli_types.h b/include/dsn/dist/cli/cli_types.h index 2d14406223..08153ada1d 100644 --- a/include/dsn/dist/cli/cli_types.h +++ b/include/dsn/dist/cli/cli_types.h @@ -16,63 +16,60 @@ #include - namespace dsn { class command; -typedef struct _command__isset { - _command__isset() : cmd(false), arguments(false) {} - bool cmd :1; - bool arguments :1; +typedef struct _command__isset +{ + _command__isset() : cmd(false), arguments(false) {} + bool cmd : 1; + bool arguments : 1; } _command__isset; -class command { - public: - - command(const command&); - command(command&&); - command& operator=(const command&); - command& operator=(command&&); - command() : cmd() { - } +class command +{ +public: + command(const command &); + command(command &&); + command &operator=(const command &); + command &operator=(command &&); + command() : cmd() {} - virtual ~command() throw(); - std::string cmd; - std::vector arguments; + virtual ~command() throw(); + std::string cmd; + std::vector arguments; - _command__isset __isset; + _command__isset __isset; - void __set_cmd(const std::string& val); + void __set_cmd(const std::string &val); - void __set_arguments(const std::vector & val); + void __set_arguments(const std::vector &val); - bool operator == (const command & rhs) const - { - if (!(cmd == rhs.cmd)) - return false; - if (!(arguments == rhs.arguments)) - return false; - return true; - } - bool operator != (const command &rhs) const { - return !(*this == rhs); - } + bool operator==(const command &rhs) const + { + if (!(cmd == rhs.cmd)) + return false; + if (!(arguments == rhs.arguments)) + return false; + return true; + } + bool operator!=(const command &rhs) const { return !(*this == rhs); } - bool operator < (const command & ) const; + bool operator<(const command &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(command &a, command &b); -inline std::ostream& operator<<(std::ostream& out, const command& obj) +inline std::ostream &operator<<(std::ostream &out, const command &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } } // namespace diff --git a/include/dsn/dist/failure_detector/fd_types.h b/include/dsn/dist/failure_detector/fd_types.h index 23031a82de..28625de849 100644 --- a/include/dsn/dist/failure_detector/fd_types.h +++ b/include/dsn/dist/failure_detector/fd_types.h @@ -17,8 +17,8 @@ #include - -namespace dsn { namespace fd { +namespace dsn { +namespace fd { class beacon_msg; @@ -26,200 +26,197 @@ class beacon_ack; class config_master_message; -typedef struct _beacon_msg__isset { - _beacon_msg__isset() : time(false), from_addr(false), to_addr(false), start_time(false) {} - bool time :1; - bool from_addr :1; - bool to_addr :1; - bool start_time :1; +typedef struct _beacon_msg__isset +{ + _beacon_msg__isset() : time(false), from_addr(false), to_addr(false), start_time(false) {} + bool time : 1; + bool from_addr : 1; + bool to_addr : 1; + bool start_time : 1; } _beacon_msg__isset; -class beacon_msg { - public: - - beacon_msg(const beacon_msg&); - beacon_msg(beacon_msg&&); - beacon_msg& operator=(const beacon_msg&); - beacon_msg& operator=(beacon_msg&&); - beacon_msg() : time(0), start_time(0) { - } - - virtual ~beacon_msg() throw(); - int64_t time; - ::dsn::rpc_address from_addr; - ::dsn::rpc_address to_addr; - int64_t start_time; - - _beacon_msg__isset __isset; - - void __set_time(const int64_t val); - - void __set_from_addr(const ::dsn::rpc_address& val); - - void __set_to_addr(const ::dsn::rpc_address& val); - - void __set_start_time(const int64_t val); - - bool operator == (const beacon_msg & rhs) const - { - if (!(time == rhs.time)) - return false; - if (!(from_addr == rhs.from_addr)) - return false; - if (!(to_addr == rhs.to_addr)) - return false; - if (__isset.start_time != rhs.__isset.start_time) - return false; - else if (__isset.start_time && !(start_time == rhs.start_time)) - return false; - return true; - } - bool operator != (const beacon_msg &rhs) const { - return !(*this == rhs); - } - - bool operator < (const beacon_msg & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class beacon_msg +{ +public: + beacon_msg(const beacon_msg &); + beacon_msg(beacon_msg &&); + beacon_msg &operator=(const beacon_msg &); + beacon_msg &operator=(beacon_msg &&); + beacon_msg() : time(0), start_time(0) {} + + virtual ~beacon_msg() throw(); + int64_t time; + ::dsn::rpc_address from_addr; + ::dsn::rpc_address to_addr; + int64_t start_time; + + _beacon_msg__isset __isset; + + void __set_time(const int64_t val); + + void __set_from_addr(const ::dsn::rpc_address &val); + + void __set_to_addr(const ::dsn::rpc_address &val); + + void __set_start_time(const int64_t val); + + bool operator==(const beacon_msg &rhs) const + { + if (!(time == rhs.time)) + return false; + if (!(from_addr == rhs.from_addr)) + return false; + if (!(to_addr == rhs.to_addr)) + return false; + if (__isset.start_time != rhs.__isset.start_time) + return false; + else if (__isset.start_time && !(start_time == rhs.start_time)) + return false; + return true; + } + bool operator!=(const beacon_msg &rhs) const { return !(*this == rhs); } + + bool operator<(const beacon_msg &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(beacon_msg &a, beacon_msg &b); -inline std::ostream& operator<<(std::ostream& out, const beacon_msg& obj) +inline std::ostream &operator<<(std::ostream &out, const beacon_msg &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _beacon_ack__isset { - _beacon_ack__isset() : time(false), this_node(false), primary_node(false), is_master(false), allowed(false) {} - bool time :1; - bool this_node :1; - bool primary_node :1; - bool is_master :1; - bool allowed :1; +typedef struct _beacon_ack__isset +{ + _beacon_ack__isset() + : time(false), this_node(false), primary_node(false), is_master(false), allowed(false) + { + } + bool time : 1; + bool this_node : 1; + bool primary_node : 1; + bool is_master : 1; + bool allowed : 1; } _beacon_ack__isset; -class beacon_ack { - public: - - beacon_ack(const beacon_ack&); - beacon_ack(beacon_ack&&); - beacon_ack& operator=(const beacon_ack&); - beacon_ack& operator=(beacon_ack&&); - beacon_ack() : time(0), is_master(0), allowed(0) { - } - - virtual ~beacon_ack() throw(); - int64_t time; - ::dsn::rpc_address this_node; - ::dsn::rpc_address primary_node; - bool is_master; - bool allowed; - - _beacon_ack__isset __isset; - - void __set_time(const int64_t val); - - void __set_this_node(const ::dsn::rpc_address& val); - - void __set_primary_node(const ::dsn::rpc_address& val); - - void __set_is_master(const bool val); - - void __set_allowed(const bool val); - - bool operator == (const beacon_ack & rhs) const - { - if (!(time == rhs.time)) - return false; - if (!(this_node == rhs.this_node)) - return false; - if (!(primary_node == rhs.primary_node)) - return false; - if (!(is_master == rhs.is_master)) - return false; - if (!(allowed == rhs.allowed)) - return false; - return true; - } - bool operator != (const beacon_ack &rhs) const { - return !(*this == rhs); - } - - bool operator < (const beacon_ack & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class beacon_ack +{ +public: + beacon_ack(const beacon_ack &); + beacon_ack(beacon_ack &&); + beacon_ack &operator=(const beacon_ack &); + beacon_ack &operator=(beacon_ack &&); + beacon_ack() : time(0), is_master(0), allowed(0) {} + + virtual ~beacon_ack() throw(); + int64_t time; + ::dsn::rpc_address this_node; + ::dsn::rpc_address primary_node; + bool is_master; + bool allowed; + + _beacon_ack__isset __isset; + + void __set_time(const int64_t val); + + void __set_this_node(const ::dsn::rpc_address &val); + + void __set_primary_node(const ::dsn::rpc_address &val); + + void __set_is_master(const bool val); + + void __set_allowed(const bool val); + + bool operator==(const beacon_ack &rhs) const + { + if (!(time == rhs.time)) + return false; + if (!(this_node == rhs.this_node)) + return false; + if (!(primary_node == rhs.primary_node)) + return false; + if (!(is_master == rhs.is_master)) + return false; + if (!(allowed == rhs.allowed)) + return false; + return true; + } + bool operator!=(const beacon_ack &rhs) const { return !(*this == rhs); } + + bool operator<(const beacon_ack &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(beacon_ack &a, beacon_ack &b); -inline std::ostream& operator<<(std::ostream& out, const beacon_ack& obj) +inline std::ostream &operator<<(std::ostream &out, const beacon_ack &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _config_master_message__isset { - _config_master_message__isset() : master(false), is_register(false) {} - bool master :1; - bool is_register :1; +typedef struct _config_master_message__isset +{ + _config_master_message__isset() : master(false), is_register(false) {} + bool master : 1; + bool is_register : 1; } _config_master_message__isset; -class config_master_message { - public: - - config_master_message(const config_master_message&); - config_master_message(config_master_message&&); - config_master_message& operator=(const config_master_message&); - config_master_message& operator=(config_master_message&&); - config_master_message() : is_register(0) { - } +class config_master_message +{ +public: + config_master_message(const config_master_message &); + config_master_message(config_master_message &&); + config_master_message &operator=(const config_master_message &); + config_master_message &operator=(config_master_message &&); + config_master_message() : is_register(0) {} - virtual ~config_master_message() throw(); - ::dsn::rpc_address master; - bool is_register; + virtual ~config_master_message() throw(); + ::dsn::rpc_address master; + bool is_register; - _config_master_message__isset __isset; + _config_master_message__isset __isset; - void __set_master(const ::dsn::rpc_address& val); + void __set_master(const ::dsn::rpc_address &val); - void __set_is_register(const bool val); + void __set_is_register(const bool val); - bool operator == (const config_master_message & rhs) const - { - if (!(master == rhs.master)) - return false; - if (!(is_register == rhs.is_register)) - return false; - return true; - } - bool operator != (const config_master_message &rhs) const { - return !(*this == rhs); - } + bool operator==(const config_master_message &rhs) const + { + if (!(master == rhs.master)) + return false; + if (!(is_register == rhs.is_register)) + return false; + return true; + } + bool operator!=(const config_master_message &rhs) const { return !(*this == rhs); } - bool operator < (const config_master_message & ) const; + bool operator<(const config_master_message &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(config_master_message &a, config_master_message &b); -inline std::ostream& operator<<(std::ostream& out, const config_master_message& obj) +inline std::ostream &operator<<(std::ostream &out, const config_master_message &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } - -}} // namespace +} +} // namespace #endif diff --git a/include/dsn/dist/replication/replication_types.h b/include/dsn/dist/replication/replication_types.h index 7a45ebceaf..f5a9bf7935 100644 --- a/include/dsn/dist/replication/replication_types.h +++ b/include/dsn/dist/replication/replication_types.h @@ -17,156 +17,180 @@ #include +namespace dsn { +namespace replication { -namespace dsn { namespace replication { - -struct partition_status { - enum type { - PS_INVALID = 0, - PS_INACTIVE = 1, - PS_ERROR = 2, - PS_PRIMARY = 3, - PS_SECONDARY = 4, - PS_POTENTIAL_SECONDARY = 5, - PS_PARTITION_SPLIT = 6 - }; +struct partition_status +{ + enum type + { + PS_INVALID = 0, + PS_INACTIVE = 1, + PS_ERROR = 2, + PS_PRIMARY = 3, + PS_SECONDARY = 4, + PS_POTENTIAL_SECONDARY = 5, + PS_PARTITION_SPLIT = 6 + }; }; -extern const std::map _partition_status_VALUES_TO_NAMES; +extern const std::map _partition_status_VALUES_TO_NAMES; -struct read_semantic { - enum type { - ReadInvalid = 0, - ReadLastUpdate = 1, - ReadOutdated = 2, - ReadSnapshot = 3 - }; +struct read_semantic +{ + enum type + { + ReadInvalid = 0, + ReadLastUpdate = 1, + ReadOutdated = 2, + ReadSnapshot = 3 + }; }; -extern const std::map _read_semantic_VALUES_TO_NAMES; +extern const std::map _read_semantic_VALUES_TO_NAMES; -struct learn_type { - enum type { - LT_INVALID = 0, - LT_CACHE = 1, - LT_APP = 2, - LT_LOG = 3 - }; +struct learn_type +{ + enum type + { + LT_INVALID = 0, + LT_CACHE = 1, + LT_APP = 2, + LT_LOG = 3 + }; }; -extern const std::map _learn_type_VALUES_TO_NAMES; - -struct learner_status { - enum type { - LearningInvalid = 0, - LearningWithoutPrepare = 1, - LearningWithPrepareTransient = 2, - LearningWithPrepare = 3, - LearningSucceeded = 4, - LearningFailed = 5 - }; +extern const std::map _learn_type_VALUES_TO_NAMES; + +struct learner_status +{ + enum type + { + LearningInvalid = 0, + LearningWithoutPrepare = 1, + LearningWithPrepareTransient = 2, + LearningWithPrepare = 3, + LearningSucceeded = 4, + LearningFailed = 5 + }; }; -extern const std::map _learner_status_VALUES_TO_NAMES; - -struct config_type { - enum type { - CT_INVALID = 0, - CT_ASSIGN_PRIMARY = 1, - CT_UPGRADE_TO_PRIMARY = 2, - CT_ADD_SECONDARY = 3, - CT_UPGRADE_TO_SECONDARY = 4, - CT_DOWNGRADE_TO_SECONDARY = 5, - CT_DOWNGRADE_TO_INACTIVE = 6, - CT_REMOVE = 7, - CT_ADD_SECONDARY_FOR_LB = 8, - CT_PRIMARY_FORCE_UPDATE_BALLOT = 9, - CT_DROP_PARTITION = 10 - }; +extern const std::map _learner_status_VALUES_TO_NAMES; + +struct config_type +{ + enum type + { + CT_INVALID = 0, + CT_ASSIGN_PRIMARY = 1, + CT_UPGRADE_TO_PRIMARY = 2, + CT_ADD_SECONDARY = 3, + CT_UPGRADE_TO_SECONDARY = 4, + CT_DOWNGRADE_TO_SECONDARY = 5, + CT_DOWNGRADE_TO_INACTIVE = 6, + CT_REMOVE = 7, + CT_ADD_SECONDARY_FOR_LB = 8, + CT_PRIMARY_FORCE_UPDATE_BALLOT = 9, + CT_DROP_PARTITION = 10 + }; }; -extern const std::map _config_type_VALUES_TO_NAMES; +extern const std::map _config_type_VALUES_TO_NAMES; -struct node_status { - enum type { - NS_INVALID = 0, - NS_ALIVE = 1, - NS_UNALIVE = 2 - }; +struct node_status +{ + enum type + { + NS_INVALID = 0, + NS_ALIVE = 1, + NS_UNALIVE = 2 + }; }; -extern const std::map _node_status_VALUES_TO_NAMES; - -struct meta_function_level { - enum type { - fl_stopped = 100, - fl_blind = 200, - fl_freezed = 300, - fl_steady = 400, - fl_lively = 500, - fl_invalid = 10000 - }; +extern const std::map _node_status_VALUES_TO_NAMES; + +struct meta_function_level +{ + enum type + { + fl_stopped = 100, + fl_blind = 200, + fl_freezed = 300, + fl_steady = 400, + fl_lively = 500, + fl_invalid = 10000 + }; }; -extern const std::map _meta_function_level_VALUES_TO_NAMES; +extern const std::map _meta_function_level_VALUES_TO_NAMES; -struct balancer_request_type { - enum type { - move_primary = 0, - copy_primary = 1, - copy_secondary = 2 - }; +struct balancer_request_type +{ + enum type + { + move_primary = 0, + copy_primary = 1, + copy_secondary = 2 + }; }; -extern const std::map _balancer_request_type_VALUES_TO_NAMES; +extern const std::map _balancer_request_type_VALUES_TO_NAMES; -struct app_env_operation { - enum type { - APP_ENV_OP_INVALID = 0, - APP_ENV_OP_SET = 1, - APP_ENV_OP_DEL = 2, - APP_ENV_OP_CLEAR = 3 - }; +struct app_env_operation +{ + enum type + { + APP_ENV_OP_INVALID = 0, + APP_ENV_OP_SET = 1, + APP_ENV_OP_DEL = 2, + APP_ENV_OP_CLEAR = 3 + }; }; -extern const std::map _app_env_operation_VALUES_TO_NAMES; +extern const std::map _app_env_operation_VALUES_TO_NAMES; -struct duplication_status { - enum type { - DS_INIT = 0, - DS_START = 1, - DS_PAUSE = 2, - DS_REMOVED = 3 - }; +struct duplication_status +{ + enum type + { + DS_INIT = 0, + DS_START = 1, + DS_PAUSE = 2, + DS_REMOVED = 3 + }; }; -extern const std::map _duplication_status_VALUES_TO_NAMES; +extern const std::map _duplication_status_VALUES_TO_NAMES; -struct duplication_fail_mode { - enum type { - FAIL_SLOW = 0, - FAIL_SKIP = 1, - FAIL_FAST = 2 - }; +struct duplication_fail_mode +{ + enum type + { + FAIL_SLOW = 0, + FAIL_SKIP = 1, + FAIL_FAST = 2 + }; }; -extern const std::map _duplication_fail_mode_VALUES_TO_NAMES; - -struct bulk_load_status { - enum type { - BLS_INVALID = 0, - BLS_DOWNLOADING = 1, - BLS_DOWNLOADED = 2, - BLS_INGESTING = 3, - BLS_SUCCEED = 4, - BLS_FAILED = 5, - BLS_PAUSING = 6, - BLS_PAUSED = 7, - BLS_CANCELED = 8 - }; +extern const std::map _duplication_fail_mode_VALUES_TO_NAMES; + +struct bulk_load_status +{ + enum type + { + BLS_INVALID = 0, + BLS_DOWNLOADING = 1, + BLS_DOWNLOADED = 2, + BLS_INGESTING = 3, + BLS_SUCCEED = 4, + BLS_FAILED = 5, + BLS_PAUSING = 6, + BLS_PAUSED = 7, + BLS_CANCELED = 8 + }; }; -extern const std::map _bulk_load_status_VALUES_TO_NAMES; +extern const std::map _bulk_load_status_VALUES_TO_NAMES; class mutation_header; @@ -350,5623 +374,5808 @@ class notify_cacth_up_response; class bulk_load_metadata; -typedef struct _mutation_header__isset { - _mutation_header__isset() : pid(false), ballot(false), decree(false), log_offset(false), last_committed_decree(false), timestamp(false) {} - bool pid :1; - bool ballot :1; - bool decree :1; - bool log_offset :1; - bool last_committed_decree :1; - bool timestamp :1; +typedef struct _mutation_header__isset +{ + _mutation_header__isset() + : pid(false), + ballot(false), + decree(false), + log_offset(false), + last_committed_decree(false), + timestamp(false) + { + } + bool pid : 1; + bool ballot : 1; + bool decree : 1; + bool log_offset : 1; + bool last_committed_decree : 1; + bool timestamp : 1; } _mutation_header__isset; -class mutation_header { - public: - - mutation_header(const mutation_header&); - mutation_header(mutation_header&&); - mutation_header& operator=(const mutation_header&); - mutation_header& operator=(mutation_header&&); - mutation_header() : ballot(0), decree(0), log_offset(0), last_committed_decree(0), timestamp(0) { - } - - virtual ~mutation_header() throw(); - ::dsn::gpid pid; - int64_t ballot; - int64_t decree; - int64_t log_offset; - int64_t last_committed_decree; - int64_t timestamp; - - _mutation_header__isset __isset; - - void __set_pid(const ::dsn::gpid& val); - - void __set_ballot(const int64_t val); - - void __set_decree(const int64_t val); - - void __set_log_offset(const int64_t val); - - void __set_last_committed_decree(const int64_t val); - - void __set_timestamp(const int64_t val); - - bool operator == (const mutation_header & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(decree == rhs.decree)) - return false; - if (!(log_offset == rhs.log_offset)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (!(timestamp == rhs.timestamp)) - return false; - return true; - } - bool operator != (const mutation_header &rhs) const { - return !(*this == rhs); - } - - bool operator < (const mutation_header & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class mutation_header +{ +public: + mutation_header(const mutation_header &); + mutation_header(mutation_header &&); + mutation_header &operator=(const mutation_header &); + mutation_header &operator=(mutation_header &&); + mutation_header() : ballot(0), decree(0), log_offset(0), last_committed_decree(0), timestamp(0) + { + } + + virtual ~mutation_header() throw(); + ::dsn::gpid pid; + int64_t ballot; + int64_t decree; + int64_t log_offset; + int64_t last_committed_decree; + int64_t timestamp; + + _mutation_header__isset __isset; + + void __set_pid(const ::dsn::gpid &val); + + void __set_ballot(const int64_t val); + + void __set_decree(const int64_t val); + + void __set_log_offset(const int64_t val); + + void __set_last_committed_decree(const int64_t val); + + void __set_timestamp(const int64_t val); + + bool operator==(const mutation_header &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(decree == rhs.decree)) + return false; + if (!(log_offset == rhs.log_offset)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + return true; + } + bool operator!=(const mutation_header &rhs) const { return !(*this == rhs); } + + bool operator<(const mutation_header &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(mutation_header &a, mutation_header &b); -inline std::ostream& operator<<(std::ostream& out, const mutation_header& obj) +inline std::ostream &operator<<(std::ostream &out, const mutation_header &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _mutation_update__isset { - _mutation_update__isset() : code(false), serialization_type(false), data(false), start_time_ns(false) {} - bool code :1; - bool serialization_type :1; - bool data :1; - bool start_time_ns :1; +typedef struct _mutation_update__isset +{ + _mutation_update__isset() + : code(false), serialization_type(false), data(false), start_time_ns(false) + { + } + bool code : 1; + bool serialization_type : 1; + bool data : 1; + bool start_time_ns : 1; } _mutation_update__isset; -class mutation_update { - public: - - mutation_update(const mutation_update&); - mutation_update(mutation_update&&); - mutation_update& operator=(const mutation_update&); - mutation_update& operator=(mutation_update&&); - mutation_update() : serialization_type(0), start_time_ns(0) { - } - - virtual ~mutation_update() throw(); - ::dsn::task_code code; - int32_t serialization_type; - ::dsn::blob data; - int64_t start_time_ns; - - _mutation_update__isset __isset; - - void __set_code(const ::dsn::task_code& val); - - void __set_serialization_type(const int32_t val); - - void __set_data(const ::dsn::blob& val); - - void __set_start_time_ns(const int64_t val); - - bool operator == (const mutation_update & rhs) const - { - if (!(code == rhs.code)) - return false; - if (!(serialization_type == rhs.serialization_type)) - return false; - if (!(data == rhs.data)) - return false; - if (__isset.start_time_ns != rhs.__isset.start_time_ns) - return false; - else if (__isset.start_time_ns && !(start_time_ns == rhs.start_time_ns)) - return false; - return true; - } - bool operator != (const mutation_update &rhs) const { - return !(*this == rhs); - } - - bool operator < (const mutation_update & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class mutation_update +{ +public: + mutation_update(const mutation_update &); + mutation_update(mutation_update &&); + mutation_update &operator=(const mutation_update &); + mutation_update &operator=(mutation_update &&); + mutation_update() : serialization_type(0), start_time_ns(0) {} + + virtual ~mutation_update() throw(); + ::dsn::task_code code; + int32_t serialization_type; + ::dsn::blob data; + int64_t start_time_ns; + + _mutation_update__isset __isset; + + void __set_code(const ::dsn::task_code &val); + + void __set_serialization_type(const int32_t val); + + void __set_data(const ::dsn::blob &val); + + void __set_start_time_ns(const int64_t val); + + bool operator==(const mutation_update &rhs) const + { + if (!(code == rhs.code)) + return false; + if (!(serialization_type == rhs.serialization_type)) + return false; + if (!(data == rhs.data)) + return false; + if (__isset.start_time_ns != rhs.__isset.start_time_ns) + return false; + else if (__isset.start_time_ns && !(start_time_ns == rhs.start_time_ns)) + return false; + return true; + } + bool operator!=(const mutation_update &rhs) const { return !(*this == rhs); } + + bool operator<(const mutation_update &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(mutation_update &a, mutation_update &b); -inline std::ostream& operator<<(std::ostream& out, const mutation_update& obj) +inline std::ostream &operator<<(std::ostream &out, const mutation_update &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _mutation_data__isset { - _mutation_data__isset() : header(false), updates(false) {} - bool header :1; - bool updates :1; +typedef struct _mutation_data__isset +{ + _mutation_data__isset() : header(false), updates(false) {} + bool header : 1; + bool updates : 1; } _mutation_data__isset; -class mutation_data { - public: - - mutation_data(const mutation_data&); - mutation_data(mutation_data&&); - mutation_data& operator=(const mutation_data&); - mutation_data& operator=(mutation_data&&); - mutation_data() { - } +class mutation_data +{ +public: + mutation_data(const mutation_data &); + mutation_data(mutation_data &&); + mutation_data &operator=(const mutation_data &); + mutation_data &operator=(mutation_data &&); + mutation_data() {} - virtual ~mutation_data() throw(); - mutation_header header; - std::vector updates; + virtual ~mutation_data() throw(); + mutation_header header; + std::vector updates; - _mutation_data__isset __isset; + _mutation_data__isset __isset; - void __set_header(const mutation_header& val); + void __set_header(const mutation_header &val); - void __set_updates(const std::vector & val); + void __set_updates(const std::vector &val); - bool operator == (const mutation_data & rhs) const - { - if (!(header == rhs.header)) - return false; - if (!(updates == rhs.updates)) - return false; - return true; - } - bool operator != (const mutation_data &rhs) const { - return !(*this == rhs); - } + bool operator==(const mutation_data &rhs) const + { + if (!(header == rhs.header)) + return false; + if (!(updates == rhs.updates)) + return false; + return true; + } + bool operator!=(const mutation_data &rhs) const { return !(*this == rhs); } - bool operator < (const mutation_data & ) const; + bool operator<(const mutation_data &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(mutation_data &a, mutation_data &b); -inline std::ostream& operator<<(std::ostream& out, const mutation_data& obj) +inline std::ostream &operator<<(std::ostream &out, const mutation_data &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _replica_configuration__isset { - _replica_configuration__isset() : pid(false), ballot(false), primary(false), status(true), learner_signature(false) {} - bool pid :1; - bool ballot :1; - bool primary :1; - bool status :1; - bool learner_signature :1; +typedef struct _replica_configuration__isset +{ + _replica_configuration__isset() + : pid(false), ballot(false), primary(false), status(true), learner_signature(false) + { + } + bool pid : 1; + bool ballot : 1; + bool primary : 1; + bool status : 1; + bool learner_signature : 1; } _replica_configuration__isset; -class replica_configuration { - public: - - replica_configuration(const replica_configuration&); - replica_configuration(replica_configuration&&); - replica_configuration& operator=(const replica_configuration&); - replica_configuration& operator=(replica_configuration&&); - replica_configuration() : ballot(0), status((partition_status::type)0), learner_signature(0) { - status = (partition_status::type)0; - - } - - virtual ~replica_configuration() throw(); - ::dsn::gpid pid; - int64_t ballot; - ::dsn::rpc_address primary; - partition_status::type status; - int64_t learner_signature; - - _replica_configuration__isset __isset; - - void __set_pid(const ::dsn::gpid& val); - - void __set_ballot(const int64_t val); - - void __set_primary(const ::dsn::rpc_address& val); - - void __set_status(const partition_status::type val); - - void __set_learner_signature(const int64_t val); - - bool operator == (const replica_configuration & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(primary == rhs.primary)) - return false; - if (!(status == rhs.status)) - return false; - if (!(learner_signature == rhs.learner_signature)) - return false; - return true; - } - bool operator != (const replica_configuration &rhs) const { - return !(*this == rhs); - } - - bool operator < (const replica_configuration & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class replica_configuration +{ +public: + replica_configuration(const replica_configuration &); + replica_configuration(replica_configuration &&); + replica_configuration &operator=(const replica_configuration &); + replica_configuration &operator=(replica_configuration &&); + replica_configuration() : ballot(0), status((partition_status::type)0), learner_signature(0) + { + status = (partition_status::type)0; + } + + virtual ~replica_configuration() throw(); + ::dsn::gpid pid; + int64_t ballot; + ::dsn::rpc_address primary; + partition_status::type status; + int64_t learner_signature; + + _replica_configuration__isset __isset; + + void __set_pid(const ::dsn::gpid &val); + + void __set_ballot(const int64_t val); + + void __set_primary(const ::dsn::rpc_address &val); + + void __set_status(const partition_status::type val); + + void __set_learner_signature(const int64_t val); + + bool operator==(const replica_configuration &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(primary == rhs.primary)) + return false; + if (!(status == rhs.status)) + return false; + if (!(learner_signature == rhs.learner_signature)) + return false; + return true; + } + bool operator!=(const replica_configuration &rhs) const { return !(*this == rhs); } + + bool operator<(const replica_configuration &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(replica_configuration &a, replica_configuration &b); -inline std::ostream& operator<<(std::ostream& out, const replica_configuration& obj) +inline std::ostream &operator<<(std::ostream &out, const replica_configuration &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _prepare_msg__isset { - _prepare_msg__isset() : config(false), mu(false) {} - bool config :1; - bool mu :1; +typedef struct _prepare_msg__isset +{ + _prepare_msg__isset() : config(false), mu(false) {} + bool config : 1; + bool mu : 1; } _prepare_msg__isset; -class prepare_msg { - public: - - prepare_msg(const prepare_msg&); - prepare_msg(prepare_msg&&); - prepare_msg& operator=(const prepare_msg&); - prepare_msg& operator=(prepare_msg&&); - prepare_msg() { - } +class prepare_msg +{ +public: + prepare_msg(const prepare_msg &); + prepare_msg(prepare_msg &&); + prepare_msg &operator=(const prepare_msg &); + prepare_msg &operator=(prepare_msg &&); + prepare_msg() {} - virtual ~prepare_msg() throw(); - replica_configuration config; - mutation_data mu; + virtual ~prepare_msg() throw(); + replica_configuration config; + mutation_data mu; - _prepare_msg__isset __isset; + _prepare_msg__isset __isset; - void __set_config(const replica_configuration& val); + void __set_config(const replica_configuration &val); - void __set_mu(const mutation_data& val); + void __set_mu(const mutation_data &val); - bool operator == (const prepare_msg & rhs) const - { - if (!(config == rhs.config)) - return false; - if (!(mu == rhs.mu)) - return false; - return true; - } - bool operator != (const prepare_msg &rhs) const { - return !(*this == rhs); - } + bool operator==(const prepare_msg &rhs) const + { + if (!(config == rhs.config)) + return false; + if (!(mu == rhs.mu)) + return false; + return true; + } + bool operator!=(const prepare_msg &rhs) const { return !(*this == rhs); } - bool operator < (const prepare_msg & ) const; + bool operator<(const prepare_msg &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(prepare_msg &a, prepare_msg &b); -inline std::ostream& operator<<(std::ostream& out, const prepare_msg& obj) +inline std::ostream &operator<<(std::ostream &out, const prepare_msg &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _read_request_header__isset { - _read_request_header__isset() : pid(false), code(false), semantic(true), version_decree(true) {} - bool pid :1; - bool code :1; - bool semantic :1; - bool version_decree :1; +typedef struct _read_request_header__isset +{ + _read_request_header__isset() : pid(false), code(false), semantic(true), version_decree(true) {} + bool pid : 1; + bool code : 1; + bool semantic : 1; + bool version_decree : 1; } _read_request_header__isset; -class read_request_header { - public: - - read_request_header(const read_request_header&); - read_request_header(read_request_header&&); - read_request_header& operator=(const read_request_header&); - read_request_header& operator=(read_request_header&&); - read_request_header() : semantic((read_semantic::type)1), version_decree(-1LL) { - semantic = (read_semantic::type)1; - - } - - virtual ~read_request_header() throw(); - ::dsn::gpid pid; - ::dsn::task_code code; - read_semantic::type semantic; - int64_t version_decree; - - _read_request_header__isset __isset; - - void __set_pid(const ::dsn::gpid& val); - - void __set_code(const ::dsn::task_code& val); - - void __set_semantic(const read_semantic::type val); - - void __set_version_decree(const int64_t val); - - bool operator == (const read_request_header & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(code == rhs.code)) - return false; - if (!(semantic == rhs.semantic)) - return false; - if (!(version_decree == rhs.version_decree)) - return false; - return true; - } - bool operator != (const read_request_header &rhs) const { - return !(*this == rhs); - } - - bool operator < (const read_request_header & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class read_request_header +{ +public: + read_request_header(const read_request_header &); + read_request_header(read_request_header &&); + read_request_header &operator=(const read_request_header &); + read_request_header &operator=(read_request_header &&); + read_request_header() : semantic((read_semantic::type)1), version_decree(-1LL) + { + semantic = (read_semantic::type)1; + } + + virtual ~read_request_header() throw(); + ::dsn::gpid pid; + ::dsn::task_code code; + read_semantic::type semantic; + int64_t version_decree; + + _read_request_header__isset __isset; + + void __set_pid(const ::dsn::gpid &val); + + void __set_code(const ::dsn::task_code &val); + + void __set_semantic(const read_semantic::type val); + + void __set_version_decree(const int64_t val); + + bool operator==(const read_request_header &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(code == rhs.code)) + return false; + if (!(semantic == rhs.semantic)) + return false; + if (!(version_decree == rhs.version_decree)) + return false; + return true; + } + bool operator!=(const read_request_header &rhs) const { return !(*this == rhs); } + + bool operator<(const read_request_header &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(read_request_header &a, read_request_header &b); -inline std::ostream& operator<<(std::ostream& out, const read_request_header& obj) +inline std::ostream &operator<<(std::ostream &out, const read_request_header &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _write_request_header__isset { - _write_request_header__isset() : pid(false), code(false) {} - bool pid :1; - bool code :1; +typedef struct _write_request_header__isset +{ + _write_request_header__isset() : pid(false), code(false) {} + bool pid : 1; + bool code : 1; } _write_request_header__isset; -class write_request_header { - public: - - write_request_header(const write_request_header&); - write_request_header(write_request_header&&); - write_request_header& operator=(const write_request_header&); - write_request_header& operator=(write_request_header&&); - write_request_header() { - } +class write_request_header +{ +public: + write_request_header(const write_request_header &); + write_request_header(write_request_header &&); + write_request_header &operator=(const write_request_header &); + write_request_header &operator=(write_request_header &&); + write_request_header() {} - virtual ~write_request_header() throw(); - ::dsn::gpid pid; - ::dsn::task_code code; + virtual ~write_request_header() throw(); + ::dsn::gpid pid; + ::dsn::task_code code; - _write_request_header__isset __isset; + _write_request_header__isset __isset; - void __set_pid(const ::dsn::gpid& val); + void __set_pid(const ::dsn::gpid &val); - void __set_code(const ::dsn::task_code& val); + void __set_code(const ::dsn::task_code &val); - bool operator == (const write_request_header & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(code == rhs.code)) - return false; - return true; - } - bool operator != (const write_request_header &rhs) const { - return !(*this == rhs); - } + bool operator==(const write_request_header &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(code == rhs.code)) + return false; + return true; + } + bool operator!=(const write_request_header &rhs) const { return !(*this == rhs); } - bool operator < (const write_request_header & ) const; + bool operator<(const write_request_header &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(write_request_header &a, write_request_header &b); -inline std::ostream& operator<<(std::ostream& out, const write_request_header& obj) +inline std::ostream &operator<<(std::ostream &out, const write_request_header &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _rw_response_header__isset { - _rw_response_header__isset() : err(false) {} - bool err :1; +typedef struct _rw_response_header__isset +{ + _rw_response_header__isset() : err(false) {} + bool err : 1; } _rw_response_header__isset; -class rw_response_header { - public: - - rw_response_header(const rw_response_header&); - rw_response_header(rw_response_header&&); - rw_response_header& operator=(const rw_response_header&); - rw_response_header& operator=(rw_response_header&&); - rw_response_header() { - } +class rw_response_header +{ +public: + rw_response_header(const rw_response_header &); + rw_response_header(rw_response_header &&); + rw_response_header &operator=(const rw_response_header &); + rw_response_header &operator=(rw_response_header &&); + rw_response_header() {} - virtual ~rw_response_header() throw(); - ::dsn::error_code err; + virtual ~rw_response_header() throw(); + ::dsn::error_code err; - _rw_response_header__isset __isset; + _rw_response_header__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - bool operator == (const rw_response_header & rhs) const - { - if (!(err == rhs.err)) - return false; - return true; - } - bool operator != (const rw_response_header &rhs) const { - return !(*this == rhs); - } + bool operator==(const rw_response_header &rhs) const + { + if (!(err == rhs.err)) + return false; + return true; + } + bool operator!=(const rw_response_header &rhs) const { return !(*this == rhs); } - bool operator < (const rw_response_header & ) const; + bool operator<(const rw_response_header &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(rw_response_header &a, rw_response_header &b); -inline std::ostream& operator<<(std::ostream& out, const rw_response_header& obj) +inline std::ostream &operator<<(std::ostream &out, const rw_response_header &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _prepare_ack__isset { - _prepare_ack__isset() : pid(false), err(false), ballot(false), decree(false), last_committed_decree_in_app(false), last_committed_decree_in_prepare_list(false) {} - bool pid :1; - bool err :1; - bool ballot :1; - bool decree :1; - bool last_committed_decree_in_app :1; - bool last_committed_decree_in_prepare_list :1; +typedef struct _prepare_ack__isset +{ + _prepare_ack__isset() + : pid(false), + err(false), + ballot(false), + decree(false), + last_committed_decree_in_app(false), + last_committed_decree_in_prepare_list(false) + { + } + bool pid : 1; + bool err : 1; + bool ballot : 1; + bool decree : 1; + bool last_committed_decree_in_app : 1; + bool last_committed_decree_in_prepare_list : 1; } _prepare_ack__isset; -class prepare_ack { - public: - - prepare_ack(const prepare_ack&); - prepare_ack(prepare_ack&&); - prepare_ack& operator=(const prepare_ack&); - prepare_ack& operator=(prepare_ack&&); - prepare_ack() : ballot(0), decree(0), last_committed_decree_in_app(0), last_committed_decree_in_prepare_list(0) { - } - - virtual ~prepare_ack() throw(); - ::dsn::gpid pid; - ::dsn::error_code err; - int64_t ballot; - int64_t decree; - int64_t last_committed_decree_in_app; - int64_t last_committed_decree_in_prepare_list; - - _prepare_ack__isset __isset; - - void __set_pid(const ::dsn::gpid& val); - - void __set_err(const ::dsn::error_code& val); - - void __set_ballot(const int64_t val); - - void __set_decree(const int64_t val); - - void __set_last_committed_decree_in_app(const int64_t val); - - void __set_last_committed_decree_in_prepare_list(const int64_t val); - - bool operator == (const prepare_ack & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(err == rhs.err)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(decree == rhs.decree)) - return false; - if (!(last_committed_decree_in_app == rhs.last_committed_decree_in_app)) - return false; - if (!(last_committed_decree_in_prepare_list == rhs.last_committed_decree_in_prepare_list)) - return false; - return true; - } - bool operator != (const prepare_ack &rhs) const { - return !(*this == rhs); - } - - bool operator < (const prepare_ack & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class prepare_ack +{ +public: + prepare_ack(const prepare_ack &); + prepare_ack(prepare_ack &&); + prepare_ack &operator=(const prepare_ack &); + prepare_ack &operator=(prepare_ack &&); + prepare_ack() + : ballot(0), + decree(0), + last_committed_decree_in_app(0), + last_committed_decree_in_prepare_list(0) + { + } + + virtual ~prepare_ack() throw(); + ::dsn::gpid pid; + ::dsn::error_code err; + int64_t ballot; + int64_t decree; + int64_t last_committed_decree_in_app; + int64_t last_committed_decree_in_prepare_list; + + _prepare_ack__isset __isset; + + void __set_pid(const ::dsn::gpid &val); + + void __set_err(const ::dsn::error_code &val); + + void __set_ballot(const int64_t val); + + void __set_decree(const int64_t val); + + void __set_last_committed_decree_in_app(const int64_t val); + + void __set_last_committed_decree_in_prepare_list(const int64_t val); + + bool operator==(const prepare_ack &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(err == rhs.err)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(decree == rhs.decree)) + return false; + if (!(last_committed_decree_in_app == rhs.last_committed_decree_in_app)) + return false; + if (!(last_committed_decree_in_prepare_list == rhs.last_committed_decree_in_prepare_list)) + return false; + return true; + } + bool operator!=(const prepare_ack &rhs) const { return !(*this == rhs); } + + bool operator<(const prepare_ack &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(prepare_ack &a, prepare_ack &b); -inline std::ostream& operator<<(std::ostream& out, const prepare_ack& obj) +inline std::ostream &operator<<(std::ostream &out, const prepare_ack &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _learn_state__isset { - _learn_state__isset() : from_decree_excluded(false), to_decree_included(false), meta(false), files(false), learn_start_decree(false) {} - bool from_decree_excluded :1; - bool to_decree_included :1; - bool meta :1; - bool files :1; - bool learn_start_decree :1; +typedef struct _learn_state__isset +{ + _learn_state__isset() + : from_decree_excluded(false), + to_decree_included(false), + meta(false), + files(false), + learn_start_decree(false) + { + } + bool from_decree_excluded : 1; + bool to_decree_included : 1; + bool meta : 1; + bool files : 1; + bool learn_start_decree : 1; } _learn_state__isset; -class learn_state { - public: - - learn_state(const learn_state&); - learn_state(learn_state&&); - learn_state& operator=(const learn_state&); - learn_state& operator=(learn_state&&); - learn_state() : from_decree_excluded(0), to_decree_included(0), learn_start_decree(0) { - } - - virtual ~learn_state() throw(); - int64_t from_decree_excluded; - int64_t to_decree_included; - ::dsn::blob meta; - std::vector files; - int64_t learn_start_decree; - - _learn_state__isset __isset; - - void __set_from_decree_excluded(const int64_t val); - - void __set_to_decree_included(const int64_t val); - - void __set_meta(const ::dsn::blob& val); - - void __set_files(const std::vector & val); - - void __set_learn_start_decree(const int64_t val); - - bool operator == (const learn_state & rhs) const - { - if (!(from_decree_excluded == rhs.from_decree_excluded)) - return false; - if (!(to_decree_included == rhs.to_decree_included)) - return false; - if (!(meta == rhs.meta)) - return false; - if (!(files == rhs.files)) - return false; - if (__isset.learn_start_decree != rhs.__isset.learn_start_decree) - return false; - else if (__isset.learn_start_decree && !(learn_start_decree == rhs.learn_start_decree)) - return false; - return true; - } - bool operator != (const learn_state &rhs) const { - return !(*this == rhs); - } - - bool operator < (const learn_state & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class learn_state +{ +public: + learn_state(const learn_state &); + learn_state(learn_state &&); + learn_state &operator=(const learn_state &); + learn_state &operator=(learn_state &&); + learn_state() : from_decree_excluded(0), to_decree_included(0), learn_start_decree(0) {} + + virtual ~learn_state() throw(); + int64_t from_decree_excluded; + int64_t to_decree_included; + ::dsn::blob meta; + std::vector files; + int64_t learn_start_decree; + + _learn_state__isset __isset; + + void __set_from_decree_excluded(const int64_t val); + + void __set_to_decree_included(const int64_t val); + + void __set_meta(const ::dsn::blob &val); + + void __set_files(const std::vector &val); + + void __set_learn_start_decree(const int64_t val); + + bool operator==(const learn_state &rhs) const + { + if (!(from_decree_excluded == rhs.from_decree_excluded)) + return false; + if (!(to_decree_included == rhs.to_decree_included)) + return false; + if (!(meta == rhs.meta)) + return false; + if (!(files == rhs.files)) + return false; + if (__isset.learn_start_decree != rhs.__isset.learn_start_decree) + return false; + else if (__isset.learn_start_decree && !(learn_start_decree == rhs.learn_start_decree)) + return false; + return true; + } + bool operator!=(const learn_state &rhs) const { return !(*this == rhs); } + + bool operator<(const learn_state &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(learn_state &a, learn_state &b); -inline std::ostream& operator<<(std::ostream& out, const learn_state& obj) +inline std::ostream &operator<<(std::ostream &out, const learn_state &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _learn_request__isset { - _learn_request__isset() : pid(false), learner(false), signature(false), last_committed_decree_in_app(false), last_committed_decree_in_prepare_list(false), app_specific_learn_request(false), max_gced_decree(false) {} - bool pid :1; - bool learner :1; - bool signature :1; - bool last_committed_decree_in_app :1; - bool last_committed_decree_in_prepare_list :1; - bool app_specific_learn_request :1; - bool max_gced_decree :1; +typedef struct _learn_request__isset +{ + _learn_request__isset() + : pid(false), + learner(false), + signature(false), + last_committed_decree_in_app(false), + last_committed_decree_in_prepare_list(false), + app_specific_learn_request(false), + max_gced_decree(false) + { + } + bool pid : 1; + bool learner : 1; + bool signature : 1; + bool last_committed_decree_in_app : 1; + bool last_committed_decree_in_prepare_list : 1; + bool app_specific_learn_request : 1; + bool max_gced_decree : 1; } _learn_request__isset; -class learn_request { - public: - - learn_request(const learn_request&); - learn_request(learn_request&&); - learn_request& operator=(const learn_request&); - learn_request& operator=(learn_request&&); - learn_request() : signature(0), last_committed_decree_in_app(0), last_committed_decree_in_prepare_list(0), max_gced_decree(0) { - } - - virtual ~learn_request() throw(); - ::dsn::gpid pid; - ::dsn::rpc_address learner; - int64_t signature; - int64_t last_committed_decree_in_app; - int64_t last_committed_decree_in_prepare_list; - ::dsn::blob app_specific_learn_request; - int64_t max_gced_decree; - - _learn_request__isset __isset; - - void __set_pid(const ::dsn::gpid& val); - - void __set_learner(const ::dsn::rpc_address& val); - - void __set_signature(const int64_t val); - - void __set_last_committed_decree_in_app(const int64_t val); - - void __set_last_committed_decree_in_prepare_list(const int64_t val); - - void __set_app_specific_learn_request(const ::dsn::blob& val); - - void __set_max_gced_decree(const int64_t val); - - bool operator == (const learn_request & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(learner == rhs.learner)) - return false; - if (!(signature == rhs.signature)) - return false; - if (!(last_committed_decree_in_app == rhs.last_committed_decree_in_app)) - return false; - if (!(last_committed_decree_in_prepare_list == rhs.last_committed_decree_in_prepare_list)) - return false; - if (!(app_specific_learn_request == rhs.app_specific_learn_request)) - return false; - if (__isset.max_gced_decree != rhs.__isset.max_gced_decree) - return false; - else if (__isset.max_gced_decree && !(max_gced_decree == rhs.max_gced_decree)) - return false; - return true; - } - bool operator != (const learn_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const learn_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class learn_request +{ +public: + learn_request(const learn_request &); + learn_request(learn_request &&); + learn_request &operator=(const learn_request &); + learn_request &operator=(learn_request &&); + learn_request() + : signature(0), + last_committed_decree_in_app(0), + last_committed_decree_in_prepare_list(0), + max_gced_decree(0) + { + } + + virtual ~learn_request() throw(); + ::dsn::gpid pid; + ::dsn::rpc_address learner; + int64_t signature; + int64_t last_committed_decree_in_app; + int64_t last_committed_decree_in_prepare_list; + ::dsn::blob app_specific_learn_request; + int64_t max_gced_decree; + + _learn_request__isset __isset; + + void __set_pid(const ::dsn::gpid &val); + + void __set_learner(const ::dsn::rpc_address &val); + + void __set_signature(const int64_t val); + + void __set_last_committed_decree_in_app(const int64_t val); + + void __set_last_committed_decree_in_prepare_list(const int64_t val); + + void __set_app_specific_learn_request(const ::dsn::blob &val); + + void __set_max_gced_decree(const int64_t val); + + bool operator==(const learn_request &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(learner == rhs.learner)) + return false; + if (!(signature == rhs.signature)) + return false; + if (!(last_committed_decree_in_app == rhs.last_committed_decree_in_app)) + return false; + if (!(last_committed_decree_in_prepare_list == rhs.last_committed_decree_in_prepare_list)) + return false; + if (!(app_specific_learn_request == rhs.app_specific_learn_request)) + return false; + if (__isset.max_gced_decree != rhs.__isset.max_gced_decree) + return false; + else if (__isset.max_gced_decree && !(max_gced_decree == rhs.max_gced_decree)) + return false; + return true; + } + bool operator!=(const learn_request &rhs) const { return !(*this == rhs); } + + bool operator<(const learn_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(learn_request &a, learn_request &b); -inline std::ostream& operator<<(std::ostream& out, const learn_request& obj) +inline std::ostream &operator<<(std::ostream &out, const learn_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _learn_response__isset { - _learn_response__isset() : err(false), config(false), last_committed_decree(false), prepare_start_decree(false), type(true), state(false), address(false), base_local_dir(false) {} - bool err :1; - bool config :1; - bool last_committed_decree :1; - bool prepare_start_decree :1; - bool type :1; - bool state :1; - bool address :1; - bool base_local_dir :1; +typedef struct _learn_response__isset +{ + _learn_response__isset() + : err(false), + config(false), + last_committed_decree(false), + prepare_start_decree(false), + type(true), + state(false), + address(false), + base_local_dir(false) + { + } + bool err : 1; + bool config : 1; + bool last_committed_decree : 1; + bool prepare_start_decree : 1; + bool type : 1; + bool state : 1; + bool address : 1; + bool base_local_dir : 1; } _learn_response__isset; -class learn_response { - public: - - learn_response(const learn_response&); - learn_response(learn_response&&); - learn_response& operator=(const learn_response&); - learn_response& operator=(learn_response&&); - learn_response() : last_committed_decree(0), prepare_start_decree(0), type((learn_type::type)0), base_local_dir() { - type = (learn_type::type)0; - - } - - virtual ~learn_response() throw(); - ::dsn::error_code err; - replica_configuration config; - int64_t last_committed_decree; - int64_t prepare_start_decree; - learn_type::type type; - learn_state state; - ::dsn::rpc_address address; - std::string base_local_dir; - - _learn_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - void __set_config(const replica_configuration& val); - - void __set_last_committed_decree(const int64_t val); - - void __set_prepare_start_decree(const int64_t val); - - void __set_type(const learn_type::type val); - - void __set_state(const learn_state& val); - - void __set_address(const ::dsn::rpc_address& val); - - void __set_base_local_dir(const std::string& val); - - bool operator == (const learn_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(config == rhs.config)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (!(prepare_start_decree == rhs.prepare_start_decree)) - return false; - if (!(type == rhs.type)) - return false; - if (!(state == rhs.state)) - return false; - if (!(address == rhs.address)) - return false; - if (!(base_local_dir == rhs.base_local_dir)) - return false; - return true; - } - bool operator != (const learn_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const learn_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class learn_response +{ +public: + learn_response(const learn_response &); + learn_response(learn_response &&); + learn_response &operator=(const learn_response &); + learn_response &operator=(learn_response &&); + learn_response() + : last_committed_decree(0), + prepare_start_decree(0), + type((learn_type::type)0), + base_local_dir() + { + type = (learn_type::type)0; + } + + virtual ~learn_response() throw(); + ::dsn::error_code err; + replica_configuration config; + int64_t last_committed_decree; + int64_t prepare_start_decree; + learn_type::type type; + learn_state state; + ::dsn::rpc_address address; + std::string base_local_dir; + + _learn_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_config(const replica_configuration &val); + + void __set_last_committed_decree(const int64_t val); + + void __set_prepare_start_decree(const int64_t val); + + void __set_type(const learn_type::type val); + + void __set_state(const learn_state &val); + + void __set_address(const ::dsn::rpc_address &val); + + void __set_base_local_dir(const std::string &val); + + bool operator==(const learn_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(config == rhs.config)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (!(prepare_start_decree == rhs.prepare_start_decree)) + return false; + if (!(type == rhs.type)) + return false; + if (!(state == rhs.state)) + return false; + if (!(address == rhs.address)) + return false; + if (!(base_local_dir == rhs.base_local_dir)) + return false; + return true; + } + bool operator!=(const learn_response &rhs) const { return !(*this == rhs); } + + bool operator<(const learn_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(learn_response &a, learn_response &b); -inline std::ostream& operator<<(std::ostream& out, const learn_response& obj) +inline std::ostream &operator<<(std::ostream &out, const learn_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _learn_notify_response__isset { - _learn_notify_response__isset() : pid(false), err(false), signature(false) {} - bool pid :1; - bool err :1; - bool signature :1; +typedef struct _learn_notify_response__isset +{ + _learn_notify_response__isset() : pid(false), err(false), signature(false) {} + bool pid : 1; + bool err : 1; + bool signature : 1; } _learn_notify_response__isset; -class learn_notify_response { - public: - - learn_notify_response(const learn_notify_response&); - learn_notify_response(learn_notify_response&&); - learn_notify_response& operator=(const learn_notify_response&); - learn_notify_response& operator=(learn_notify_response&&); - learn_notify_response() : signature(0) { - } +class learn_notify_response +{ +public: + learn_notify_response(const learn_notify_response &); + learn_notify_response(learn_notify_response &&); + learn_notify_response &operator=(const learn_notify_response &); + learn_notify_response &operator=(learn_notify_response &&); + learn_notify_response() : signature(0) {} - virtual ~learn_notify_response() throw(); - ::dsn::gpid pid; - ::dsn::error_code err; - int64_t signature; + virtual ~learn_notify_response() throw(); + ::dsn::gpid pid; + ::dsn::error_code err; + int64_t signature; - _learn_notify_response__isset __isset; + _learn_notify_response__isset __isset; - void __set_pid(const ::dsn::gpid& val); + void __set_pid(const ::dsn::gpid &val); - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_signature(const int64_t val); + void __set_signature(const int64_t val); - bool operator == (const learn_notify_response & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(err == rhs.err)) - return false; - if (!(signature == rhs.signature)) - return false; - return true; - } - bool operator != (const learn_notify_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const learn_notify_response &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(err == rhs.err)) + return false; + if (!(signature == rhs.signature)) + return false; + return true; + } + bool operator!=(const learn_notify_response &rhs) const { return !(*this == rhs); } - bool operator < (const learn_notify_response & ) const; + bool operator<(const learn_notify_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(learn_notify_response &a, learn_notify_response &b); -inline std::ostream& operator<<(std::ostream& out, const learn_notify_response& obj) +inline std::ostream &operator<<(std::ostream &out, const learn_notify_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _group_check_request__isset { - _group_check_request__isset() : app(false), node(false), config(false), last_committed_decree(false), confirmed_decree(false), child_gpid(false) {} - bool app :1; - bool node :1; - bool config :1; - bool last_committed_decree :1; - bool confirmed_decree :1; - bool child_gpid :1; +typedef struct _group_check_request__isset +{ + _group_check_request__isset() + : app(false), + node(false), + config(false), + last_committed_decree(false), + confirmed_decree(false), + child_gpid(false) + { + } + bool app : 1; + bool node : 1; + bool config : 1; + bool last_committed_decree : 1; + bool confirmed_decree : 1; + bool child_gpid : 1; } _group_check_request__isset; -class group_check_request { - public: - - group_check_request(const group_check_request&); - group_check_request(group_check_request&&); - group_check_request& operator=(const group_check_request&); - group_check_request& operator=(group_check_request&&); - group_check_request() : last_committed_decree(0), confirmed_decree(0) { - } - - virtual ~group_check_request() throw(); - ::dsn::app_info app; - ::dsn::rpc_address node; - replica_configuration config; - int64_t last_committed_decree; - int64_t confirmed_decree; - ::dsn::gpid child_gpid; - - _group_check_request__isset __isset; - - void __set_app(const ::dsn::app_info& val); - - void __set_node(const ::dsn::rpc_address& val); - - void __set_config(const replica_configuration& val); - - void __set_last_committed_decree(const int64_t val); - - void __set_confirmed_decree(const int64_t val); - - void __set_child_gpid(const ::dsn::gpid& val); - - bool operator == (const group_check_request & rhs) const - { - if (!(app == rhs.app)) - return false; - if (!(node == rhs.node)) - return false; - if (!(config == rhs.config)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (__isset.confirmed_decree != rhs.__isset.confirmed_decree) - return false; - else if (__isset.confirmed_decree && !(confirmed_decree == rhs.confirmed_decree)) - return false; - if (__isset.child_gpid != rhs.__isset.child_gpid) - return false; - else if (__isset.child_gpid && !(child_gpid == rhs.child_gpid)) - return false; - return true; - } - bool operator != (const group_check_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const group_check_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class group_check_request +{ +public: + group_check_request(const group_check_request &); + group_check_request(group_check_request &&); + group_check_request &operator=(const group_check_request &); + group_check_request &operator=(group_check_request &&); + group_check_request() : last_committed_decree(0), confirmed_decree(0) {} + + virtual ~group_check_request() throw(); + ::dsn::app_info app; + ::dsn::rpc_address node; + replica_configuration config; + int64_t last_committed_decree; + int64_t confirmed_decree; + ::dsn::gpid child_gpid; + + _group_check_request__isset __isset; + + void __set_app(const ::dsn::app_info &val); + + void __set_node(const ::dsn::rpc_address &val); + + void __set_config(const replica_configuration &val); + + void __set_last_committed_decree(const int64_t val); + + void __set_confirmed_decree(const int64_t val); + + void __set_child_gpid(const ::dsn::gpid &val); + + bool operator==(const group_check_request &rhs) const + { + if (!(app == rhs.app)) + return false; + if (!(node == rhs.node)) + return false; + if (!(config == rhs.config)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (__isset.confirmed_decree != rhs.__isset.confirmed_decree) + return false; + else if (__isset.confirmed_decree && !(confirmed_decree == rhs.confirmed_decree)) + return false; + if (__isset.child_gpid != rhs.__isset.child_gpid) + return false; + else if (__isset.child_gpid && !(child_gpid == rhs.child_gpid)) + return false; + return true; + } + bool operator!=(const group_check_request &rhs) const { return !(*this == rhs); } + + bool operator<(const group_check_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(group_check_request &a, group_check_request &b); -inline std::ostream& operator<<(std::ostream& out, const group_check_request& obj) +inline std::ostream &operator<<(std::ostream &out, const group_check_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _group_check_response__isset { - _group_check_response__isset() : pid(false), err(false), last_committed_decree_in_app(false), last_committed_decree_in_prepare_list(false), learner_status_(true), learner_signature(false), node(false) {} - bool pid :1; - bool err :1; - bool last_committed_decree_in_app :1; - bool last_committed_decree_in_prepare_list :1; - bool learner_status_ :1; - bool learner_signature :1; - bool node :1; +typedef struct _group_check_response__isset +{ + _group_check_response__isset() + : pid(false), + err(false), + last_committed_decree_in_app(false), + last_committed_decree_in_prepare_list(false), + learner_status_(true), + learner_signature(false), + node(false) + { + } + bool pid : 1; + bool err : 1; + bool last_committed_decree_in_app : 1; + bool last_committed_decree_in_prepare_list : 1; + bool learner_status_ : 1; + bool learner_signature : 1; + bool node : 1; } _group_check_response__isset; -class group_check_response { - public: - - group_check_response(const group_check_response&); - group_check_response(group_check_response&&); - group_check_response& operator=(const group_check_response&); - group_check_response& operator=(group_check_response&&); - group_check_response() : last_committed_decree_in_app(0), last_committed_decree_in_prepare_list(0), learner_status_((learner_status::type)0), learner_signature(0) { - learner_status_ = (learner_status::type)0; - - } - - virtual ~group_check_response() throw(); - ::dsn::gpid pid; - ::dsn::error_code err; - int64_t last_committed_decree_in_app; - int64_t last_committed_decree_in_prepare_list; - learner_status::type learner_status_; - int64_t learner_signature; - ::dsn::rpc_address node; - - _group_check_response__isset __isset; - - void __set_pid(const ::dsn::gpid& val); - - void __set_err(const ::dsn::error_code& val); - - void __set_last_committed_decree_in_app(const int64_t val); - - void __set_last_committed_decree_in_prepare_list(const int64_t val); - - void __set_learner_status_(const learner_status::type val); - - void __set_learner_signature(const int64_t val); - - void __set_node(const ::dsn::rpc_address& val); - - bool operator == (const group_check_response & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(err == rhs.err)) - return false; - if (!(last_committed_decree_in_app == rhs.last_committed_decree_in_app)) - return false; - if (!(last_committed_decree_in_prepare_list == rhs.last_committed_decree_in_prepare_list)) - return false; - if (!(learner_status_ == rhs.learner_status_)) - return false; - if (!(learner_signature == rhs.learner_signature)) - return false; - if (!(node == rhs.node)) - return false; - return true; - } - bool operator != (const group_check_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const group_check_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class group_check_response +{ +public: + group_check_response(const group_check_response &); + group_check_response(group_check_response &&); + group_check_response &operator=(const group_check_response &); + group_check_response &operator=(group_check_response &&); + group_check_response() + : last_committed_decree_in_app(0), + last_committed_decree_in_prepare_list(0), + learner_status_((learner_status::type)0), + learner_signature(0) + { + learner_status_ = (learner_status::type)0; + } + + virtual ~group_check_response() throw(); + ::dsn::gpid pid; + ::dsn::error_code err; + int64_t last_committed_decree_in_app; + int64_t last_committed_decree_in_prepare_list; + learner_status::type learner_status_; + int64_t learner_signature; + ::dsn::rpc_address node; + + _group_check_response__isset __isset; + + void __set_pid(const ::dsn::gpid &val); + + void __set_err(const ::dsn::error_code &val); + + void __set_last_committed_decree_in_app(const int64_t val); + + void __set_last_committed_decree_in_prepare_list(const int64_t val); + + void __set_learner_status_(const learner_status::type val); + + void __set_learner_signature(const int64_t val); + + void __set_node(const ::dsn::rpc_address &val); + + bool operator==(const group_check_response &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(err == rhs.err)) + return false; + if (!(last_committed_decree_in_app == rhs.last_committed_decree_in_app)) + return false; + if (!(last_committed_decree_in_prepare_list == rhs.last_committed_decree_in_prepare_list)) + return false; + if (!(learner_status_ == rhs.learner_status_)) + return false; + if (!(learner_signature == rhs.learner_signature)) + return false; + if (!(node == rhs.node)) + return false; + return true; + } + bool operator!=(const group_check_response &rhs) const { return !(*this == rhs); } + + bool operator<(const group_check_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(group_check_response &a, group_check_response &b); -inline std::ostream& operator<<(std::ostream& out, const group_check_response& obj) +inline std::ostream &operator<<(std::ostream &out, const group_check_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _node_info__isset { - _node_info__isset() : status(true), address(false) {} - bool status :1; - bool address :1; +typedef struct _node_info__isset +{ + _node_info__isset() : status(true), address(false) {} + bool status : 1; + bool address : 1; } _node_info__isset; -class node_info { - public: - - node_info(const node_info&); - node_info(node_info&&); - node_info& operator=(const node_info&); - node_info& operator=(node_info&&); - node_info() : status((node_status::type)0) { - status = (node_status::type)0; - - } +class node_info +{ +public: + node_info(const node_info &); + node_info(node_info &&); + node_info &operator=(const node_info &); + node_info &operator=(node_info &&); + node_info() : status((node_status::type)0) { status = (node_status::type)0; } - virtual ~node_info() throw(); - node_status::type status; - ::dsn::rpc_address address; + virtual ~node_info() throw(); + node_status::type status; + ::dsn::rpc_address address; - _node_info__isset __isset; + _node_info__isset __isset; - void __set_status(const node_status::type val); + void __set_status(const node_status::type val); - void __set_address(const ::dsn::rpc_address& val); + void __set_address(const ::dsn::rpc_address &val); - bool operator == (const node_info & rhs) const - { - if (!(status == rhs.status)) - return false; - if (!(address == rhs.address)) - return false; - return true; - } - bool operator != (const node_info &rhs) const { - return !(*this == rhs); - } + bool operator==(const node_info &rhs) const + { + if (!(status == rhs.status)) + return false; + if (!(address == rhs.address)) + return false; + return true; + } + bool operator!=(const node_info &rhs) const { return !(*this == rhs); } - bool operator < (const node_info & ) const; + bool operator<(const node_info &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(node_info &a, node_info &b); -inline std::ostream& operator<<(std::ostream& out, const node_info& obj) +inline std::ostream &operator<<(std::ostream &out, const node_info &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_update_request__isset { - _configuration_update_request__isset() : info(false), config(false), type(true), node(false), host_node(false) {} - bool info :1; - bool config :1; - bool type :1; - bool node :1; - bool host_node :1; +typedef struct _configuration_update_request__isset +{ + _configuration_update_request__isset() + : info(false), config(false), type(true), node(false), host_node(false) + { + } + bool info : 1; + bool config : 1; + bool type : 1; + bool node : 1; + bool host_node : 1; } _configuration_update_request__isset; -class configuration_update_request { - public: - - configuration_update_request(const configuration_update_request&); - configuration_update_request(configuration_update_request&&); - configuration_update_request& operator=(const configuration_update_request&); - configuration_update_request& operator=(configuration_update_request&&); - configuration_update_request() : type((config_type::type)0) { - type = (config_type::type)0; - - } - - virtual ~configuration_update_request() throw(); - ::dsn::app_info info; - ::dsn::partition_configuration config; - config_type::type type; - ::dsn::rpc_address node; - ::dsn::rpc_address host_node; - - _configuration_update_request__isset __isset; - - void __set_info(const ::dsn::app_info& val); - - void __set_config(const ::dsn::partition_configuration& val); - - void __set_type(const config_type::type val); - - void __set_node(const ::dsn::rpc_address& val); - - void __set_host_node(const ::dsn::rpc_address& val); - - bool operator == (const configuration_update_request & rhs) const - { - if (!(info == rhs.info)) - return false; - if (!(config == rhs.config)) - return false; - if (!(type == rhs.type)) - return false; - if (!(node == rhs.node)) - return false; - if (!(host_node == rhs.host_node)) - return false; - return true; - } - bool operator != (const configuration_update_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_update_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_update_request +{ +public: + configuration_update_request(const configuration_update_request &); + configuration_update_request(configuration_update_request &&); + configuration_update_request &operator=(const configuration_update_request &); + configuration_update_request &operator=(configuration_update_request &&); + configuration_update_request() : type((config_type::type)0) { type = (config_type::type)0; } + + virtual ~configuration_update_request() throw(); + ::dsn::app_info info; + ::dsn::partition_configuration config; + config_type::type type; + ::dsn::rpc_address node; + ::dsn::rpc_address host_node; + + _configuration_update_request__isset __isset; + + void __set_info(const ::dsn::app_info &val); + + void __set_config(const ::dsn::partition_configuration &val); + + void __set_type(const config_type::type val); + + void __set_node(const ::dsn::rpc_address &val); + + void __set_host_node(const ::dsn::rpc_address &val); + + bool operator==(const configuration_update_request &rhs) const + { + if (!(info == rhs.info)) + return false; + if (!(config == rhs.config)) + return false; + if (!(type == rhs.type)) + return false; + if (!(node == rhs.node)) + return false; + if (!(host_node == rhs.host_node)) + return false; + return true; + } + bool operator!=(const configuration_update_request &rhs) const { return !(*this == rhs); } + + bool operator<(const configuration_update_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_update_request &a, configuration_update_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_update_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_update_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_update_response__isset { - _configuration_update_response__isset() : err(false), config(false) {} - bool err :1; - bool config :1; +typedef struct _configuration_update_response__isset +{ + _configuration_update_response__isset() : err(false), config(false) {} + bool err : 1; + bool config : 1; } _configuration_update_response__isset; -class configuration_update_response { - public: - - configuration_update_response(const configuration_update_response&); - configuration_update_response(configuration_update_response&&); - configuration_update_response& operator=(const configuration_update_response&); - configuration_update_response& operator=(configuration_update_response&&); - configuration_update_response() { - } +class configuration_update_response +{ +public: + configuration_update_response(const configuration_update_response &); + configuration_update_response(configuration_update_response &&); + configuration_update_response &operator=(const configuration_update_response &); + configuration_update_response &operator=(configuration_update_response &&); + configuration_update_response() {} - virtual ~configuration_update_response() throw(); - ::dsn::error_code err; - ::dsn::partition_configuration config; + virtual ~configuration_update_response() throw(); + ::dsn::error_code err; + ::dsn::partition_configuration config; - _configuration_update_response__isset __isset; + _configuration_update_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_config(const ::dsn::partition_configuration& val); + void __set_config(const ::dsn::partition_configuration &val); - bool operator == (const configuration_update_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(config == rhs.config)) - return false; - return true; - } - bool operator != (const configuration_update_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_update_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(config == rhs.config)) + return false; + return true; + } + bool operator!=(const configuration_update_response &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_update_response & ) const; + bool operator<(const configuration_update_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_update_response &a, configuration_update_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_update_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_update_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _replica_server_info__isset { - _replica_server_info__isset() : geo_tags(false), total_capacity_mb(false) {} - bool geo_tags :1; - bool total_capacity_mb :1; +typedef struct _replica_server_info__isset +{ + _replica_server_info__isset() : geo_tags(false), total_capacity_mb(false) {} + bool geo_tags : 1; + bool total_capacity_mb : 1; } _replica_server_info__isset; -class replica_server_info { - public: - - replica_server_info(const replica_server_info&); - replica_server_info(replica_server_info&&); - replica_server_info& operator=(const replica_server_info&); - replica_server_info& operator=(replica_server_info&&); - replica_server_info() : total_capacity_mb(0) { - } +class replica_server_info +{ +public: + replica_server_info(const replica_server_info &); + replica_server_info(replica_server_info &&); + replica_server_info &operator=(const replica_server_info &); + replica_server_info &operator=(replica_server_info &&); + replica_server_info() : total_capacity_mb(0) {} - virtual ~replica_server_info() throw(); - std::map geo_tags; - int64_t total_capacity_mb; + virtual ~replica_server_info() throw(); + std::map geo_tags; + int64_t total_capacity_mb; - _replica_server_info__isset __isset; + _replica_server_info__isset __isset; - void __set_geo_tags(const std::map & val); + void __set_geo_tags(const std::map &val); - void __set_total_capacity_mb(const int64_t val); + void __set_total_capacity_mb(const int64_t val); - bool operator == (const replica_server_info & rhs) const - { - if (!(geo_tags == rhs.geo_tags)) - return false; - if (!(total_capacity_mb == rhs.total_capacity_mb)) - return false; - return true; - } - bool operator != (const replica_server_info &rhs) const { - return !(*this == rhs); - } + bool operator==(const replica_server_info &rhs) const + { + if (!(geo_tags == rhs.geo_tags)) + return false; + if (!(total_capacity_mb == rhs.total_capacity_mb)) + return false; + return true; + } + bool operator!=(const replica_server_info &rhs) const { return !(*this == rhs); } - bool operator < (const replica_server_info & ) const; + bool operator<(const replica_server_info &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(replica_server_info &a, replica_server_info &b); -inline std::ostream& operator<<(std::ostream& out, const replica_server_info& obj) +inline std::ostream &operator<<(std::ostream &out, const replica_server_info &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_by_node_request__isset { - _configuration_query_by_node_request__isset() : node(false), stored_replicas(false), info(false) {} - bool node :1; - bool stored_replicas :1; - bool info :1; +typedef struct _configuration_query_by_node_request__isset +{ + _configuration_query_by_node_request__isset() : node(false), stored_replicas(false), info(false) + { + } + bool node : 1; + bool stored_replicas : 1; + bool info : 1; } _configuration_query_by_node_request__isset; -class configuration_query_by_node_request { - public: - - configuration_query_by_node_request(const configuration_query_by_node_request&); - configuration_query_by_node_request(configuration_query_by_node_request&&); - configuration_query_by_node_request& operator=(const configuration_query_by_node_request&); - configuration_query_by_node_request& operator=(configuration_query_by_node_request&&); - configuration_query_by_node_request() { - } - - virtual ~configuration_query_by_node_request() throw(); - ::dsn::rpc_address node; - std::vector stored_replicas; - replica_server_info info; - - _configuration_query_by_node_request__isset __isset; - - void __set_node(const ::dsn::rpc_address& val); - - void __set_stored_replicas(const std::vector & val); - - void __set_info(const replica_server_info& val); - - bool operator == (const configuration_query_by_node_request & rhs) const - { - if (!(node == rhs.node)) - return false; - if (__isset.stored_replicas != rhs.__isset.stored_replicas) - return false; - else if (__isset.stored_replicas && !(stored_replicas == rhs.stored_replicas)) - return false; - if (__isset.info != rhs.__isset.info) - return false; - else if (__isset.info && !(info == rhs.info)) - return false; - return true; - } - bool operator != (const configuration_query_by_node_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_query_by_node_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_query_by_node_request +{ +public: + configuration_query_by_node_request(const configuration_query_by_node_request &); + configuration_query_by_node_request(configuration_query_by_node_request &&); + configuration_query_by_node_request &operator=(const configuration_query_by_node_request &); + configuration_query_by_node_request &operator=(configuration_query_by_node_request &&); + configuration_query_by_node_request() {} + + virtual ~configuration_query_by_node_request() throw(); + ::dsn::rpc_address node; + std::vector stored_replicas; + replica_server_info info; + + _configuration_query_by_node_request__isset __isset; + + void __set_node(const ::dsn::rpc_address &val); + + void __set_stored_replicas(const std::vector &val); + + void __set_info(const replica_server_info &val); + + bool operator==(const configuration_query_by_node_request &rhs) const + { + if (!(node == rhs.node)) + return false; + if (__isset.stored_replicas != rhs.__isset.stored_replicas) + return false; + else if (__isset.stored_replicas && !(stored_replicas == rhs.stored_replicas)) + return false; + if (__isset.info != rhs.__isset.info) + return false; + else if (__isset.info && !(info == rhs.info)) + return false; + return true; + } + bool operator!=(const configuration_query_by_node_request &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_query_by_node_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_query_by_node_request &a, configuration_query_by_node_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_query_by_node_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_query_by_node_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_by_node_response__isset { - _configuration_query_by_node_response__isset() : err(false), partitions(false), gc_replicas(false) {} - bool err :1; - bool partitions :1; - bool gc_replicas :1; +typedef struct _configuration_query_by_node_response__isset +{ + _configuration_query_by_node_response__isset() + : err(false), partitions(false), gc_replicas(false) + { + } + bool err : 1; + bool partitions : 1; + bool gc_replicas : 1; } _configuration_query_by_node_response__isset; -class configuration_query_by_node_response { - public: - - configuration_query_by_node_response(const configuration_query_by_node_response&); - configuration_query_by_node_response(configuration_query_by_node_response&&); - configuration_query_by_node_response& operator=(const configuration_query_by_node_response&); - configuration_query_by_node_response& operator=(configuration_query_by_node_response&&); - configuration_query_by_node_response() { - } - - virtual ~configuration_query_by_node_response() throw(); - ::dsn::error_code err; - std::vector partitions; - std::vector gc_replicas; - - _configuration_query_by_node_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - void __set_partitions(const std::vector & val); - - void __set_gc_replicas(const std::vector & val); - - bool operator == (const configuration_query_by_node_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(partitions == rhs.partitions)) - return false; - if (__isset.gc_replicas != rhs.__isset.gc_replicas) - return false; - else if (__isset.gc_replicas && !(gc_replicas == rhs.gc_replicas)) - return false; - return true; - } - bool operator != (const configuration_query_by_node_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_query_by_node_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_query_by_node_response +{ +public: + configuration_query_by_node_response(const configuration_query_by_node_response &); + configuration_query_by_node_response(configuration_query_by_node_response &&); + configuration_query_by_node_response &operator=(const configuration_query_by_node_response &); + configuration_query_by_node_response &operator=(configuration_query_by_node_response &&); + configuration_query_by_node_response() {} + + virtual ~configuration_query_by_node_response() throw(); + ::dsn::error_code err; + std::vector partitions; + std::vector gc_replicas; + + _configuration_query_by_node_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_partitions(const std::vector &val); + + void __set_gc_replicas(const std::vector &val); + + bool operator==(const configuration_query_by_node_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(partitions == rhs.partitions)) + return false; + if (__isset.gc_replicas != rhs.__isset.gc_replicas) + return false; + else if (__isset.gc_replicas && !(gc_replicas == rhs.gc_replicas)) + return false; + return true; + } + bool operator!=(const configuration_query_by_node_response &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_query_by_node_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_query_by_node_response &a, configuration_query_by_node_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_query_by_node_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_query_by_node_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _create_app_options__isset { - _create_app_options__isset() : partition_count(false), replica_count(false), success_if_exist(false), app_type(false), is_stateful(false), envs(false) {} - bool partition_count :1; - bool replica_count :1; - bool success_if_exist :1; - bool app_type :1; - bool is_stateful :1; - bool envs :1; +typedef struct _create_app_options__isset +{ + _create_app_options__isset() + : partition_count(false), + replica_count(false), + success_if_exist(false), + app_type(false), + is_stateful(false), + envs(false) + { + } + bool partition_count : 1; + bool replica_count : 1; + bool success_if_exist : 1; + bool app_type : 1; + bool is_stateful : 1; + bool envs : 1; } _create_app_options__isset; -class create_app_options { - public: - - create_app_options(const create_app_options&); - create_app_options(create_app_options&&); - create_app_options& operator=(const create_app_options&); - create_app_options& operator=(create_app_options&&); - create_app_options() : partition_count(0), replica_count(0), success_if_exist(0), app_type(), is_stateful(0) { - } - - virtual ~create_app_options() throw(); - int32_t partition_count; - int32_t replica_count; - bool success_if_exist; - std::string app_type; - bool is_stateful; - std::map envs; - - _create_app_options__isset __isset; - - void __set_partition_count(const int32_t val); - - void __set_replica_count(const int32_t val); - - void __set_success_if_exist(const bool val); - - void __set_app_type(const std::string& val); - - void __set_is_stateful(const bool val); - - void __set_envs(const std::map & val); - - bool operator == (const create_app_options & rhs) const - { - if (!(partition_count == rhs.partition_count)) - return false; - if (!(replica_count == rhs.replica_count)) - return false; - if (!(success_if_exist == rhs.success_if_exist)) - return false; - if (!(app_type == rhs.app_type)) - return false; - if (!(is_stateful == rhs.is_stateful)) - return false; - if (!(envs == rhs.envs)) - return false; - return true; - } - bool operator != (const create_app_options &rhs) const { - return !(*this == rhs); - } - - bool operator < (const create_app_options & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class create_app_options +{ +public: + create_app_options(const create_app_options &); + create_app_options(create_app_options &&); + create_app_options &operator=(const create_app_options &); + create_app_options &operator=(create_app_options &&); + create_app_options() + : partition_count(0), replica_count(0), success_if_exist(0), app_type(), is_stateful(0) + { + } + + virtual ~create_app_options() throw(); + int32_t partition_count; + int32_t replica_count; + bool success_if_exist; + std::string app_type; + bool is_stateful; + std::map envs; + + _create_app_options__isset __isset; + + void __set_partition_count(const int32_t val); + + void __set_replica_count(const int32_t val); + + void __set_success_if_exist(const bool val); + + void __set_app_type(const std::string &val); + + void __set_is_stateful(const bool val); + + void __set_envs(const std::map &val); + + bool operator==(const create_app_options &rhs) const + { + if (!(partition_count == rhs.partition_count)) + return false; + if (!(replica_count == rhs.replica_count)) + return false; + if (!(success_if_exist == rhs.success_if_exist)) + return false; + if (!(app_type == rhs.app_type)) + return false; + if (!(is_stateful == rhs.is_stateful)) + return false; + if (!(envs == rhs.envs)) + return false; + return true; + } + bool operator!=(const create_app_options &rhs) const { return !(*this == rhs); } + + bool operator<(const create_app_options &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(create_app_options &a, create_app_options &b); -inline std::ostream& operator<<(std::ostream& out, const create_app_options& obj) +inline std::ostream &operator<<(std::ostream &out, const create_app_options &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_create_app_request__isset { - _configuration_create_app_request__isset() : app_name(false), options(false) {} - bool app_name :1; - bool options :1; +typedef struct _configuration_create_app_request__isset +{ + _configuration_create_app_request__isset() : app_name(false), options(false) {} + bool app_name : 1; + bool options : 1; } _configuration_create_app_request__isset; -class configuration_create_app_request { - public: - - configuration_create_app_request(const configuration_create_app_request&); - configuration_create_app_request(configuration_create_app_request&&); - configuration_create_app_request& operator=(const configuration_create_app_request&); - configuration_create_app_request& operator=(configuration_create_app_request&&); - configuration_create_app_request() : app_name() { - } +class configuration_create_app_request +{ +public: + configuration_create_app_request(const configuration_create_app_request &); + configuration_create_app_request(configuration_create_app_request &&); + configuration_create_app_request &operator=(const configuration_create_app_request &); + configuration_create_app_request &operator=(configuration_create_app_request &&); + configuration_create_app_request() : app_name() {} - virtual ~configuration_create_app_request() throw(); - std::string app_name; - create_app_options options; + virtual ~configuration_create_app_request() throw(); + std::string app_name; + create_app_options options; - _configuration_create_app_request__isset __isset; + _configuration_create_app_request__isset __isset; - void __set_app_name(const std::string& val); + void __set_app_name(const std::string &val); - void __set_options(const create_app_options& val); + void __set_options(const create_app_options &val); - bool operator == (const configuration_create_app_request & rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(options == rhs.options)) - return false; - return true; - } - bool operator != (const configuration_create_app_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_create_app_request &rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(options == rhs.options)) + return false; + return true; + } + bool operator!=(const configuration_create_app_request &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_create_app_request & ) const; + bool operator<(const configuration_create_app_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_create_app_request &a, configuration_create_app_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_create_app_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_create_app_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _drop_app_options__isset { - _drop_app_options__isset() : success_if_not_exist(false), reserve_seconds(false) {} - bool success_if_not_exist :1; - bool reserve_seconds :1; +typedef struct _drop_app_options__isset +{ + _drop_app_options__isset() : success_if_not_exist(false), reserve_seconds(false) {} + bool success_if_not_exist : 1; + bool reserve_seconds : 1; } _drop_app_options__isset; -class drop_app_options { - public: - - drop_app_options(const drop_app_options&); - drop_app_options(drop_app_options&&); - drop_app_options& operator=(const drop_app_options&); - drop_app_options& operator=(drop_app_options&&); - drop_app_options() : success_if_not_exist(0), reserve_seconds(0) { - } +class drop_app_options +{ +public: + drop_app_options(const drop_app_options &); + drop_app_options(drop_app_options &&); + drop_app_options &operator=(const drop_app_options &); + drop_app_options &operator=(drop_app_options &&); + drop_app_options() : success_if_not_exist(0), reserve_seconds(0) {} - virtual ~drop_app_options() throw(); - bool success_if_not_exist; - int64_t reserve_seconds; + virtual ~drop_app_options() throw(); + bool success_if_not_exist; + int64_t reserve_seconds; - _drop_app_options__isset __isset; + _drop_app_options__isset __isset; - void __set_success_if_not_exist(const bool val); + void __set_success_if_not_exist(const bool val); - void __set_reserve_seconds(const int64_t val); + void __set_reserve_seconds(const int64_t val); - bool operator == (const drop_app_options & rhs) const - { - if (!(success_if_not_exist == rhs.success_if_not_exist)) - return false; - if (__isset.reserve_seconds != rhs.__isset.reserve_seconds) - return false; - else if (__isset.reserve_seconds && !(reserve_seconds == rhs.reserve_seconds)) - return false; - return true; - } - bool operator != (const drop_app_options &rhs) const { - return !(*this == rhs); - } + bool operator==(const drop_app_options &rhs) const + { + if (!(success_if_not_exist == rhs.success_if_not_exist)) + return false; + if (__isset.reserve_seconds != rhs.__isset.reserve_seconds) + return false; + else if (__isset.reserve_seconds && !(reserve_seconds == rhs.reserve_seconds)) + return false; + return true; + } + bool operator!=(const drop_app_options &rhs) const { return !(*this == rhs); } - bool operator < (const drop_app_options & ) const; + bool operator<(const drop_app_options &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(drop_app_options &a, drop_app_options &b); -inline std::ostream& operator<<(std::ostream& out, const drop_app_options& obj) +inline std::ostream &operator<<(std::ostream &out, const drop_app_options &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_drop_app_request__isset { - _configuration_drop_app_request__isset() : app_name(false), options(false) {} - bool app_name :1; - bool options :1; +typedef struct _configuration_drop_app_request__isset +{ + _configuration_drop_app_request__isset() : app_name(false), options(false) {} + bool app_name : 1; + bool options : 1; } _configuration_drop_app_request__isset; -class configuration_drop_app_request { - public: - - configuration_drop_app_request(const configuration_drop_app_request&); - configuration_drop_app_request(configuration_drop_app_request&&); - configuration_drop_app_request& operator=(const configuration_drop_app_request&); - configuration_drop_app_request& operator=(configuration_drop_app_request&&); - configuration_drop_app_request() : app_name() { - } +class configuration_drop_app_request +{ +public: + configuration_drop_app_request(const configuration_drop_app_request &); + configuration_drop_app_request(configuration_drop_app_request &&); + configuration_drop_app_request &operator=(const configuration_drop_app_request &); + configuration_drop_app_request &operator=(configuration_drop_app_request &&); + configuration_drop_app_request() : app_name() {} - virtual ~configuration_drop_app_request() throw(); - std::string app_name; - drop_app_options options; + virtual ~configuration_drop_app_request() throw(); + std::string app_name; + drop_app_options options; - _configuration_drop_app_request__isset __isset; + _configuration_drop_app_request__isset __isset; - void __set_app_name(const std::string& val); + void __set_app_name(const std::string &val); - void __set_options(const drop_app_options& val); + void __set_options(const drop_app_options &val); - bool operator == (const configuration_drop_app_request & rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(options == rhs.options)) - return false; - return true; - } - bool operator != (const configuration_drop_app_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_drop_app_request &rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(options == rhs.options)) + return false; + return true; + } + bool operator!=(const configuration_drop_app_request &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_drop_app_request & ) const; + bool operator<(const configuration_drop_app_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_drop_app_request &a, configuration_drop_app_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_drop_app_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_drop_app_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_list_apps_request__isset { - _configuration_list_apps_request__isset() : status(true) {} - bool status :1; +typedef struct _configuration_list_apps_request__isset +{ + _configuration_list_apps_request__isset() : status(true) {} + bool status : 1; } _configuration_list_apps_request__isset; -class configuration_list_apps_request { - public: - - configuration_list_apps_request(const configuration_list_apps_request&); - configuration_list_apps_request(configuration_list_apps_request&&); - configuration_list_apps_request& operator=(const configuration_list_apps_request&); - configuration_list_apps_request& operator=(configuration_list_apps_request&&); - configuration_list_apps_request() : status(( ::dsn::app_status::type)0) { - status = ( ::dsn::app_status::type)0; - - } +class configuration_list_apps_request +{ +public: + configuration_list_apps_request(const configuration_list_apps_request &); + configuration_list_apps_request(configuration_list_apps_request &&); + configuration_list_apps_request &operator=(const configuration_list_apps_request &); + configuration_list_apps_request &operator=(configuration_list_apps_request &&); + configuration_list_apps_request() : status((::dsn::app_status::type)0) + { + status = (::dsn::app_status::type)0; + } - virtual ~configuration_list_apps_request() throw(); - ::dsn::app_status::type status; + virtual ~configuration_list_apps_request() throw(); + ::dsn::app_status::type status; - _configuration_list_apps_request__isset __isset; + _configuration_list_apps_request__isset __isset; - void __set_status(const ::dsn::app_status::type val); + void __set_status(const ::dsn::app_status::type val); - bool operator == (const configuration_list_apps_request & rhs) const - { - if (!(status == rhs.status)) - return false; - return true; - } - bool operator != (const configuration_list_apps_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_list_apps_request &rhs) const + { + if (!(status == rhs.status)) + return false; + return true; + } + bool operator!=(const configuration_list_apps_request &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_list_apps_request & ) const; + bool operator<(const configuration_list_apps_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_list_apps_request &a, configuration_list_apps_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_list_apps_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_list_apps_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_list_nodes_request__isset { - _configuration_list_nodes_request__isset() : status(true) {} - bool status :1; +typedef struct _configuration_list_nodes_request__isset +{ + _configuration_list_nodes_request__isset() : status(true) {} + bool status : 1; } _configuration_list_nodes_request__isset; -class configuration_list_nodes_request { - public: - - configuration_list_nodes_request(const configuration_list_nodes_request&); - configuration_list_nodes_request(configuration_list_nodes_request&&); - configuration_list_nodes_request& operator=(const configuration_list_nodes_request&); - configuration_list_nodes_request& operator=(configuration_list_nodes_request&&); - configuration_list_nodes_request() : status((node_status::type)0) { - status = (node_status::type)0; - - } +class configuration_list_nodes_request +{ +public: + configuration_list_nodes_request(const configuration_list_nodes_request &); + configuration_list_nodes_request(configuration_list_nodes_request &&); + configuration_list_nodes_request &operator=(const configuration_list_nodes_request &); + configuration_list_nodes_request &operator=(configuration_list_nodes_request &&); + configuration_list_nodes_request() : status((node_status::type)0) + { + status = (node_status::type)0; + } - virtual ~configuration_list_nodes_request() throw(); - node_status::type status; + virtual ~configuration_list_nodes_request() throw(); + node_status::type status; - _configuration_list_nodes_request__isset __isset; + _configuration_list_nodes_request__isset __isset; - void __set_status(const node_status::type val); + void __set_status(const node_status::type val); - bool operator == (const configuration_list_nodes_request & rhs) const - { - if (!(status == rhs.status)) - return false; - return true; - } - bool operator != (const configuration_list_nodes_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_list_nodes_request &rhs) const + { + if (!(status == rhs.status)) + return false; + return true; + } + bool operator!=(const configuration_list_nodes_request &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_list_nodes_request & ) const; + bool operator<(const configuration_list_nodes_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_list_nodes_request &a, configuration_list_nodes_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_list_nodes_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_list_nodes_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } +class configuration_cluster_info_request +{ +public: + configuration_cluster_info_request(const configuration_cluster_info_request &); + configuration_cluster_info_request(configuration_cluster_info_request &&); + configuration_cluster_info_request &operator=(const configuration_cluster_info_request &); + configuration_cluster_info_request &operator=(configuration_cluster_info_request &&); + configuration_cluster_info_request() {} -class configuration_cluster_info_request { - public: - - configuration_cluster_info_request(const configuration_cluster_info_request&); - configuration_cluster_info_request(configuration_cluster_info_request&&); - configuration_cluster_info_request& operator=(const configuration_cluster_info_request&); - configuration_cluster_info_request& operator=(configuration_cluster_info_request&&); - configuration_cluster_info_request() { - } - - virtual ~configuration_cluster_info_request() throw(); + virtual ~configuration_cluster_info_request() throw(); - bool operator == (const configuration_cluster_info_request & /* rhs */) const - { - return true; - } - bool operator != (const configuration_cluster_info_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_cluster_info_request & /* rhs */) const { return true; } + bool operator!=(const configuration_cluster_info_request &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_cluster_info_request & ) const; + bool operator<(const configuration_cluster_info_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_cluster_info_request &a, configuration_cluster_info_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_cluster_info_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_cluster_info_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_recall_app_request__isset { - _configuration_recall_app_request__isset() : app_id(false), new_app_name(false) {} - bool app_id :1; - bool new_app_name :1; +typedef struct _configuration_recall_app_request__isset +{ + _configuration_recall_app_request__isset() : app_id(false), new_app_name(false) {} + bool app_id : 1; + bool new_app_name : 1; } _configuration_recall_app_request__isset; -class configuration_recall_app_request { - public: - - configuration_recall_app_request(const configuration_recall_app_request&); - configuration_recall_app_request(configuration_recall_app_request&&); - configuration_recall_app_request& operator=(const configuration_recall_app_request&); - configuration_recall_app_request& operator=(configuration_recall_app_request&&); - configuration_recall_app_request() : app_id(0), new_app_name() { - } +class configuration_recall_app_request +{ +public: + configuration_recall_app_request(const configuration_recall_app_request &); + configuration_recall_app_request(configuration_recall_app_request &&); + configuration_recall_app_request &operator=(const configuration_recall_app_request &); + configuration_recall_app_request &operator=(configuration_recall_app_request &&); + configuration_recall_app_request() : app_id(0), new_app_name() {} - virtual ~configuration_recall_app_request() throw(); - int32_t app_id; - std::string new_app_name; + virtual ~configuration_recall_app_request() throw(); + int32_t app_id; + std::string new_app_name; - _configuration_recall_app_request__isset __isset; + _configuration_recall_app_request__isset __isset; - void __set_app_id(const int32_t val); + void __set_app_id(const int32_t val); - void __set_new_app_name(const std::string& val); + void __set_new_app_name(const std::string &val); - bool operator == (const configuration_recall_app_request & rhs) const - { - if (!(app_id == rhs.app_id)) - return false; - if (!(new_app_name == rhs.new_app_name)) - return false; - return true; - } - bool operator != (const configuration_recall_app_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_recall_app_request &rhs) const + { + if (!(app_id == rhs.app_id)) + return false; + if (!(new_app_name == rhs.new_app_name)) + return false; + return true; + } + bool operator!=(const configuration_recall_app_request &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_recall_app_request & ) const; + bool operator<(const configuration_recall_app_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_recall_app_request &a, configuration_recall_app_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_recall_app_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_recall_app_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_create_app_response__isset { - _configuration_create_app_response__isset() : err(false), appid(false) {} - bool err :1; - bool appid :1; +typedef struct _configuration_create_app_response__isset +{ + _configuration_create_app_response__isset() : err(false), appid(false) {} + bool err : 1; + bool appid : 1; } _configuration_create_app_response__isset; -class configuration_create_app_response { - public: - - configuration_create_app_response(const configuration_create_app_response&); - configuration_create_app_response(configuration_create_app_response&&); - configuration_create_app_response& operator=(const configuration_create_app_response&); - configuration_create_app_response& operator=(configuration_create_app_response&&); - configuration_create_app_response() : appid(0) { - } +class configuration_create_app_response +{ +public: + configuration_create_app_response(const configuration_create_app_response &); + configuration_create_app_response(configuration_create_app_response &&); + configuration_create_app_response &operator=(const configuration_create_app_response &); + configuration_create_app_response &operator=(configuration_create_app_response &&); + configuration_create_app_response() : appid(0) {} - virtual ~configuration_create_app_response() throw(); - ::dsn::error_code err; - int32_t appid; + virtual ~configuration_create_app_response() throw(); + ::dsn::error_code err; + int32_t appid; - _configuration_create_app_response__isset __isset; + _configuration_create_app_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_appid(const int32_t val); + void __set_appid(const int32_t val); - bool operator == (const configuration_create_app_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(appid == rhs.appid)) - return false; - return true; - } - bool operator != (const configuration_create_app_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_create_app_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(appid == rhs.appid)) + return false; + return true; + } + bool operator!=(const configuration_create_app_response &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_create_app_response & ) const; + bool operator<(const configuration_create_app_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_create_app_response &a, configuration_create_app_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_create_app_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_create_app_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_meta_control_request__isset { - _configuration_meta_control_request__isset() : level(false) {} - bool level :1; +typedef struct _configuration_meta_control_request__isset +{ + _configuration_meta_control_request__isset() : level(false) {} + bool level : 1; } _configuration_meta_control_request__isset; -class configuration_meta_control_request { - public: - - configuration_meta_control_request(const configuration_meta_control_request&); - configuration_meta_control_request(configuration_meta_control_request&&); - configuration_meta_control_request& operator=(const configuration_meta_control_request&); - configuration_meta_control_request& operator=(configuration_meta_control_request&&); - configuration_meta_control_request() : level((meta_function_level::type)0) { - } +class configuration_meta_control_request +{ +public: + configuration_meta_control_request(const configuration_meta_control_request &); + configuration_meta_control_request(configuration_meta_control_request &&); + configuration_meta_control_request &operator=(const configuration_meta_control_request &); + configuration_meta_control_request &operator=(configuration_meta_control_request &&); + configuration_meta_control_request() : level((meta_function_level::type)0) {} - virtual ~configuration_meta_control_request() throw(); - meta_function_level::type level; + virtual ~configuration_meta_control_request() throw(); + meta_function_level::type level; - _configuration_meta_control_request__isset __isset; + _configuration_meta_control_request__isset __isset; - void __set_level(const meta_function_level::type val); + void __set_level(const meta_function_level::type val); - bool operator == (const configuration_meta_control_request & rhs) const - { - if (!(level == rhs.level)) - return false; - return true; - } - bool operator != (const configuration_meta_control_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_meta_control_request &rhs) const + { + if (!(level == rhs.level)) + return false; + return true; + } + bool operator!=(const configuration_meta_control_request &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_meta_control_request & ) const; + bool operator<(const configuration_meta_control_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_meta_control_request &a, configuration_meta_control_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_meta_control_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_meta_control_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_meta_control_response__isset { - _configuration_meta_control_response__isset() : err(false), old_level(false) {} - bool err :1; - bool old_level :1; +typedef struct _configuration_meta_control_response__isset +{ + _configuration_meta_control_response__isset() : err(false), old_level(false) {} + bool err : 1; + bool old_level : 1; } _configuration_meta_control_response__isset; -class configuration_meta_control_response { - public: - - configuration_meta_control_response(const configuration_meta_control_response&); - configuration_meta_control_response(configuration_meta_control_response&&); - configuration_meta_control_response& operator=(const configuration_meta_control_response&); - configuration_meta_control_response& operator=(configuration_meta_control_response&&); - configuration_meta_control_response() : old_level((meta_function_level::type)0) { - } - - virtual ~configuration_meta_control_response() throw(); - ::dsn::error_code err; - meta_function_level::type old_level; - - _configuration_meta_control_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - void __set_old_level(const meta_function_level::type val); - - bool operator == (const configuration_meta_control_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(old_level == rhs.old_level)) - return false; - return true; - } - bool operator != (const configuration_meta_control_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_meta_control_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_meta_control_response +{ +public: + configuration_meta_control_response(const configuration_meta_control_response &); + configuration_meta_control_response(configuration_meta_control_response &&); + configuration_meta_control_response &operator=(const configuration_meta_control_response &); + configuration_meta_control_response &operator=(configuration_meta_control_response &&); + configuration_meta_control_response() : old_level((meta_function_level::type)0) {} + + virtual ~configuration_meta_control_response() throw(); + ::dsn::error_code err; + meta_function_level::type old_level; + + _configuration_meta_control_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_old_level(const meta_function_level::type val); + + bool operator==(const configuration_meta_control_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(old_level == rhs.old_level)) + return false; + return true; + } + bool operator!=(const configuration_meta_control_response &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_meta_control_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_meta_control_response &a, configuration_meta_control_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_meta_control_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_meta_control_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_proposal_action__isset { - _configuration_proposal_action__isset() : target(false), node(false), type(false) {} - bool target :1; - bool node :1; - bool type :1; +typedef struct _configuration_proposal_action__isset +{ + _configuration_proposal_action__isset() : target(false), node(false), type(false) {} + bool target : 1; + bool node : 1; + bool type : 1; } _configuration_proposal_action__isset; -class configuration_proposal_action { - public: - configuration_proposal_action(::dsn::rpc_address t, ::dsn::rpc_address n, config_type::type tp): target(t), node(n), type(tp) {} - - configuration_proposal_action(const configuration_proposal_action&); - configuration_proposal_action(configuration_proposal_action&&); - configuration_proposal_action& operator=(const configuration_proposal_action&); - configuration_proposal_action& operator=(configuration_proposal_action&&); - configuration_proposal_action() : type((config_type::type)0) { - } - - virtual ~configuration_proposal_action() throw(); - ::dsn::rpc_address target; - ::dsn::rpc_address node; - config_type::type type; - - _configuration_proposal_action__isset __isset; - - void __set_target(const ::dsn::rpc_address& val); - - void __set_node(const ::dsn::rpc_address& val); - - void __set_type(const config_type::type val); - - bool operator == (const configuration_proposal_action & rhs) const - { - if (!(target == rhs.target)) - return false; - if (!(node == rhs.node)) - return false; - if (!(type == rhs.type)) - return false; - return true; - } - bool operator != (const configuration_proposal_action &rhs) const { - return !(*this == rhs); - } - - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_proposal_action +{ +public: + configuration_proposal_action(::dsn::rpc_address t, ::dsn::rpc_address n, config_type::type tp) + : target(t), node(n), type(tp) + { + } + + configuration_proposal_action(const configuration_proposal_action &); + configuration_proposal_action(configuration_proposal_action &&); + configuration_proposal_action &operator=(const configuration_proposal_action &); + configuration_proposal_action &operator=(configuration_proposal_action &&); + configuration_proposal_action() : type((config_type::type)0) {} + + virtual ~configuration_proposal_action() throw(); + ::dsn::rpc_address target; + ::dsn::rpc_address node; + config_type::type type; + + _configuration_proposal_action__isset __isset; + + void __set_target(const ::dsn::rpc_address &val); + + void __set_node(const ::dsn::rpc_address &val); + + void __set_type(const config_type::type val); + + bool operator==(const configuration_proposal_action &rhs) const + { + if (!(target == rhs.target)) + return false; + if (!(node == rhs.node)) + return false; + if (!(type == rhs.type)) + return false; + return true; + } + bool operator!=(const configuration_proposal_action &rhs) const { return !(*this == rhs); } + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_proposal_action &a, configuration_proposal_action &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_proposal_action& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_proposal_action &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_balancer_request__isset { - _configuration_balancer_request__isset() : gpid(false), action_list(false), force(true), balance_type(false) {} - bool gpid :1; - bool action_list :1; - bool force :1; - bool balance_type :1; +typedef struct _configuration_balancer_request__isset +{ + _configuration_balancer_request__isset() + : gpid(false), action_list(false), force(true), balance_type(false) + { + } + bool gpid : 1; + bool action_list : 1; + bool force : 1; + bool balance_type : 1; } _configuration_balancer_request__isset; -class configuration_balancer_request { - public: - - configuration_balancer_request(const configuration_balancer_request&); - configuration_balancer_request(configuration_balancer_request&&); - configuration_balancer_request& operator=(const configuration_balancer_request&); - configuration_balancer_request& operator=(configuration_balancer_request&&); - configuration_balancer_request() : force(false), balance_type((balancer_request_type::type)0) { - } - - virtual ~configuration_balancer_request() throw(); - ::dsn::gpid gpid; - std::vector action_list; - bool force; - balancer_request_type::type balance_type; - - _configuration_balancer_request__isset __isset; - - void __set_gpid(const ::dsn::gpid& val); - - void __set_action_list(const std::vector & val); - - void __set_force(const bool val); - - void __set_balance_type(const balancer_request_type::type val); - - bool operator == (const configuration_balancer_request & rhs) const - { - if (!(gpid == rhs.gpid)) - return false; - if (!(action_list == rhs.action_list)) - return false; - if (__isset.force != rhs.__isset.force) - return false; - else if (__isset.force && !(force == rhs.force)) - return false; - if (__isset.balance_type != rhs.__isset.balance_type) - return false; - else if (__isset.balance_type && !(balance_type == rhs.balance_type)) - return false; - return true; - } - bool operator != (const configuration_balancer_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_balancer_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_balancer_request +{ +public: + configuration_balancer_request(const configuration_balancer_request &); + configuration_balancer_request(configuration_balancer_request &&); + configuration_balancer_request &operator=(const configuration_balancer_request &); + configuration_balancer_request &operator=(configuration_balancer_request &&); + configuration_balancer_request() : force(false), balance_type((balancer_request_type::type)0) {} + + virtual ~configuration_balancer_request() throw(); + ::dsn::gpid gpid; + std::vector action_list; + bool force; + balancer_request_type::type balance_type; + + _configuration_balancer_request__isset __isset; + + void __set_gpid(const ::dsn::gpid &val); + + void __set_action_list(const std::vector &val); + + void __set_force(const bool val); + + void __set_balance_type(const balancer_request_type::type val); + + bool operator==(const configuration_balancer_request &rhs) const + { + if (!(gpid == rhs.gpid)) + return false; + if (!(action_list == rhs.action_list)) + return false; + if (__isset.force != rhs.__isset.force) + return false; + else if (__isset.force && !(force == rhs.force)) + return false; + if (__isset.balance_type != rhs.__isset.balance_type) + return false; + else if (__isset.balance_type && !(balance_type == rhs.balance_type)) + return false; + return true; + } + bool operator!=(const configuration_balancer_request &rhs) const { return !(*this == rhs); } + + bool operator<(const configuration_balancer_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_balancer_request &a, configuration_balancer_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_balancer_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_balancer_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_balancer_response__isset { - _configuration_balancer_response__isset() : err(false) {} - bool err :1; +typedef struct _configuration_balancer_response__isset +{ + _configuration_balancer_response__isset() : err(false) {} + bool err : 1; } _configuration_balancer_response__isset; -class configuration_balancer_response { - public: - - configuration_balancer_response(const configuration_balancer_response&); - configuration_balancer_response(configuration_balancer_response&&); - configuration_balancer_response& operator=(const configuration_balancer_response&); - configuration_balancer_response& operator=(configuration_balancer_response&&); - configuration_balancer_response() { - } +class configuration_balancer_response +{ +public: + configuration_balancer_response(const configuration_balancer_response &); + configuration_balancer_response(configuration_balancer_response &&); + configuration_balancer_response &operator=(const configuration_balancer_response &); + configuration_balancer_response &operator=(configuration_balancer_response &&); + configuration_balancer_response() {} - virtual ~configuration_balancer_response() throw(); - ::dsn::error_code err; + virtual ~configuration_balancer_response() throw(); + ::dsn::error_code err; - _configuration_balancer_response__isset __isset; + _configuration_balancer_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - bool operator == (const configuration_balancer_response & rhs) const - { - if (!(err == rhs.err)) - return false; - return true; - } - bool operator != (const configuration_balancer_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_balancer_response &rhs) const + { + if (!(err == rhs.err)) + return false; + return true; + } + bool operator!=(const configuration_balancer_response &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_balancer_response & ) const; + bool operator<(const configuration_balancer_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_balancer_response &a, configuration_balancer_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_balancer_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_balancer_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_drop_app_response__isset { - _configuration_drop_app_response__isset() : err(false) {} - bool err :1; +typedef struct _configuration_drop_app_response__isset +{ + _configuration_drop_app_response__isset() : err(false) {} + bool err : 1; } _configuration_drop_app_response__isset; -class configuration_drop_app_response { - public: - - configuration_drop_app_response(const configuration_drop_app_response&); - configuration_drop_app_response(configuration_drop_app_response&&); - configuration_drop_app_response& operator=(const configuration_drop_app_response&); - configuration_drop_app_response& operator=(configuration_drop_app_response&&); - configuration_drop_app_response() { - } +class configuration_drop_app_response +{ +public: + configuration_drop_app_response(const configuration_drop_app_response &); + configuration_drop_app_response(configuration_drop_app_response &&); + configuration_drop_app_response &operator=(const configuration_drop_app_response &); + configuration_drop_app_response &operator=(configuration_drop_app_response &&); + configuration_drop_app_response() {} - virtual ~configuration_drop_app_response() throw(); - ::dsn::error_code err; + virtual ~configuration_drop_app_response() throw(); + ::dsn::error_code err; - _configuration_drop_app_response__isset __isset; + _configuration_drop_app_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - bool operator == (const configuration_drop_app_response & rhs) const - { - if (!(err == rhs.err)) - return false; - return true; - } - bool operator != (const configuration_drop_app_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_drop_app_response &rhs) const + { + if (!(err == rhs.err)) + return false; + return true; + } + bool operator!=(const configuration_drop_app_response &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_drop_app_response & ) const; + bool operator<(const configuration_drop_app_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_drop_app_response &a, configuration_drop_app_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_drop_app_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_drop_app_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_list_apps_response__isset { - _configuration_list_apps_response__isset() : err(false), infos(false) {} - bool err :1; - bool infos :1; +typedef struct _configuration_list_apps_response__isset +{ + _configuration_list_apps_response__isset() : err(false), infos(false) {} + bool err : 1; + bool infos : 1; } _configuration_list_apps_response__isset; -class configuration_list_apps_response { - public: - - configuration_list_apps_response(const configuration_list_apps_response&); - configuration_list_apps_response(configuration_list_apps_response&&); - configuration_list_apps_response& operator=(const configuration_list_apps_response&); - configuration_list_apps_response& operator=(configuration_list_apps_response&&); - configuration_list_apps_response() { - } +class configuration_list_apps_response +{ +public: + configuration_list_apps_response(const configuration_list_apps_response &); + configuration_list_apps_response(configuration_list_apps_response &&); + configuration_list_apps_response &operator=(const configuration_list_apps_response &); + configuration_list_apps_response &operator=(configuration_list_apps_response &&); + configuration_list_apps_response() {} - virtual ~configuration_list_apps_response() throw(); - ::dsn::error_code err; - std::vector< ::dsn::app_info> infos; + virtual ~configuration_list_apps_response() throw(); + ::dsn::error_code err; + std::vector<::dsn::app_info> infos; - _configuration_list_apps_response__isset __isset; + _configuration_list_apps_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_infos(const std::vector< ::dsn::app_info> & val); + void __set_infos(const std::vector<::dsn::app_info> &val); - bool operator == (const configuration_list_apps_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(infos == rhs.infos)) - return false; - return true; - } - bool operator != (const configuration_list_apps_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_list_apps_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(infos == rhs.infos)) + return false; + return true; + } + bool operator!=(const configuration_list_apps_response &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_list_apps_response & ) const; + bool operator<(const configuration_list_apps_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_list_apps_response &a, configuration_list_apps_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_list_apps_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_list_apps_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_list_nodes_response__isset { - _configuration_list_nodes_response__isset() : err(false), infos(false) {} - bool err :1; - bool infos :1; +typedef struct _configuration_list_nodes_response__isset +{ + _configuration_list_nodes_response__isset() : err(false), infos(false) {} + bool err : 1; + bool infos : 1; } _configuration_list_nodes_response__isset; -class configuration_list_nodes_response { - public: - - configuration_list_nodes_response(const configuration_list_nodes_response&); - configuration_list_nodes_response(configuration_list_nodes_response&&); - configuration_list_nodes_response& operator=(const configuration_list_nodes_response&); - configuration_list_nodes_response& operator=(configuration_list_nodes_response&&); - configuration_list_nodes_response() { - } +class configuration_list_nodes_response +{ +public: + configuration_list_nodes_response(const configuration_list_nodes_response &); + configuration_list_nodes_response(configuration_list_nodes_response &&); + configuration_list_nodes_response &operator=(const configuration_list_nodes_response &); + configuration_list_nodes_response &operator=(configuration_list_nodes_response &&); + configuration_list_nodes_response() {} - virtual ~configuration_list_nodes_response() throw(); - ::dsn::error_code err; - std::vector infos; + virtual ~configuration_list_nodes_response() throw(); + ::dsn::error_code err; + std::vector infos; - _configuration_list_nodes_response__isset __isset; + _configuration_list_nodes_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_infos(const std::vector & val); + void __set_infos(const std::vector &val); - bool operator == (const configuration_list_nodes_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(infos == rhs.infos)) - return false; - return true; - } - bool operator != (const configuration_list_nodes_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_list_nodes_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(infos == rhs.infos)) + return false; + return true; + } + bool operator!=(const configuration_list_nodes_response &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_list_nodes_response & ) const; + bool operator<(const configuration_list_nodes_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_list_nodes_response &a, configuration_list_nodes_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_list_nodes_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_list_nodes_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_cluster_info_response__isset { - _configuration_cluster_info_response__isset() : err(false), keys(false), values(false) {} - bool err :1; - bool keys :1; - bool values :1; +typedef struct _configuration_cluster_info_response__isset +{ + _configuration_cluster_info_response__isset() : err(false), keys(false), values(false) {} + bool err : 1; + bool keys : 1; + bool values : 1; } _configuration_cluster_info_response__isset; -class configuration_cluster_info_response { - public: - - configuration_cluster_info_response(const configuration_cluster_info_response&); - configuration_cluster_info_response(configuration_cluster_info_response&&); - configuration_cluster_info_response& operator=(const configuration_cluster_info_response&); - configuration_cluster_info_response& operator=(configuration_cluster_info_response&&); - configuration_cluster_info_response() { - } - - virtual ~configuration_cluster_info_response() throw(); - ::dsn::error_code err; - std::vector keys; - std::vector values; - - _configuration_cluster_info_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - void __set_keys(const std::vector & val); - - void __set_values(const std::vector & val); - - bool operator == (const configuration_cluster_info_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(keys == rhs.keys)) - return false; - if (!(values == rhs.values)) - return false; - return true; - } - bool operator != (const configuration_cluster_info_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_cluster_info_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_cluster_info_response +{ +public: + configuration_cluster_info_response(const configuration_cluster_info_response &); + configuration_cluster_info_response(configuration_cluster_info_response &&); + configuration_cluster_info_response &operator=(const configuration_cluster_info_response &); + configuration_cluster_info_response &operator=(configuration_cluster_info_response &&); + configuration_cluster_info_response() {} + + virtual ~configuration_cluster_info_response() throw(); + ::dsn::error_code err; + std::vector keys; + std::vector values; + + _configuration_cluster_info_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_keys(const std::vector &val); + + void __set_values(const std::vector &val); + + bool operator==(const configuration_cluster_info_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(keys == rhs.keys)) + return false; + if (!(values == rhs.values)) + return false; + return true; + } + bool operator!=(const configuration_cluster_info_response &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_cluster_info_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_cluster_info_response &a, configuration_cluster_info_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_cluster_info_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_cluster_info_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_recall_app_response__isset { - _configuration_recall_app_response__isset() : err(false), info(false) {} - bool err :1; - bool info :1; +typedef struct _configuration_recall_app_response__isset +{ + _configuration_recall_app_response__isset() : err(false), info(false) {} + bool err : 1; + bool info : 1; } _configuration_recall_app_response__isset; -class configuration_recall_app_response { - public: - - configuration_recall_app_response(const configuration_recall_app_response&); - configuration_recall_app_response(configuration_recall_app_response&&); - configuration_recall_app_response& operator=(const configuration_recall_app_response&); - configuration_recall_app_response& operator=(configuration_recall_app_response&&); - configuration_recall_app_response() { - } +class configuration_recall_app_response +{ +public: + configuration_recall_app_response(const configuration_recall_app_response &); + configuration_recall_app_response(configuration_recall_app_response &&); + configuration_recall_app_response &operator=(const configuration_recall_app_response &); + configuration_recall_app_response &operator=(configuration_recall_app_response &&); + configuration_recall_app_response() {} - virtual ~configuration_recall_app_response() throw(); - ::dsn::error_code err; - ::dsn::app_info info; + virtual ~configuration_recall_app_response() throw(); + ::dsn::error_code err; + ::dsn::app_info info; - _configuration_recall_app_response__isset __isset; + _configuration_recall_app_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_info(const ::dsn::app_info& val); + void __set_info(const ::dsn::app_info &val); - bool operator == (const configuration_recall_app_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(info == rhs.info)) - return false; - return true; - } - bool operator != (const configuration_recall_app_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_recall_app_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(info == rhs.info)) + return false; + return true; + } + bool operator!=(const configuration_recall_app_response &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_recall_app_response & ) const; + bool operator<(const configuration_recall_app_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_recall_app_response &a, configuration_recall_app_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_recall_app_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_recall_app_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_replica_decree_request__isset { - _query_replica_decree_request__isset() : pid(false), node(false) {} - bool pid :1; - bool node :1; +typedef struct _query_replica_decree_request__isset +{ + _query_replica_decree_request__isset() : pid(false), node(false) {} + bool pid : 1; + bool node : 1; } _query_replica_decree_request__isset; -class query_replica_decree_request { - public: - - query_replica_decree_request(const query_replica_decree_request&); - query_replica_decree_request(query_replica_decree_request&&); - query_replica_decree_request& operator=(const query_replica_decree_request&); - query_replica_decree_request& operator=(query_replica_decree_request&&); - query_replica_decree_request() { - } +class query_replica_decree_request +{ +public: + query_replica_decree_request(const query_replica_decree_request &); + query_replica_decree_request(query_replica_decree_request &&); + query_replica_decree_request &operator=(const query_replica_decree_request &); + query_replica_decree_request &operator=(query_replica_decree_request &&); + query_replica_decree_request() {} - virtual ~query_replica_decree_request() throw(); - ::dsn::gpid pid; - ::dsn::rpc_address node; + virtual ~query_replica_decree_request() throw(); + ::dsn::gpid pid; + ::dsn::rpc_address node; - _query_replica_decree_request__isset __isset; + _query_replica_decree_request__isset __isset; - void __set_pid(const ::dsn::gpid& val); + void __set_pid(const ::dsn::gpid &val); - void __set_node(const ::dsn::rpc_address& val); + void __set_node(const ::dsn::rpc_address &val); - bool operator == (const query_replica_decree_request & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(node == rhs.node)) - return false; - return true; - } - bool operator != (const query_replica_decree_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const query_replica_decree_request &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(node == rhs.node)) + return false; + return true; + } + bool operator!=(const query_replica_decree_request &rhs) const { return !(*this == rhs); } - bool operator < (const query_replica_decree_request & ) const; + bool operator<(const query_replica_decree_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(query_replica_decree_request &a, query_replica_decree_request &b); -inline std::ostream& operator<<(std::ostream& out, const query_replica_decree_request& obj) +inline std::ostream &operator<<(std::ostream &out, const query_replica_decree_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_replica_decree_response__isset { - _query_replica_decree_response__isset() : err(false), last_decree(false) {} - bool err :1; - bool last_decree :1; +typedef struct _query_replica_decree_response__isset +{ + _query_replica_decree_response__isset() : err(false), last_decree(false) {} + bool err : 1; + bool last_decree : 1; } _query_replica_decree_response__isset; -class query_replica_decree_response { - public: - - query_replica_decree_response(const query_replica_decree_response&); - query_replica_decree_response(query_replica_decree_response&&); - query_replica_decree_response& operator=(const query_replica_decree_response&); - query_replica_decree_response& operator=(query_replica_decree_response&&); - query_replica_decree_response() : last_decree(0) { - } +class query_replica_decree_response +{ +public: + query_replica_decree_response(const query_replica_decree_response &); + query_replica_decree_response(query_replica_decree_response &&); + query_replica_decree_response &operator=(const query_replica_decree_response &); + query_replica_decree_response &operator=(query_replica_decree_response &&); + query_replica_decree_response() : last_decree(0) {} - virtual ~query_replica_decree_response() throw(); - ::dsn::error_code err; - int64_t last_decree; + virtual ~query_replica_decree_response() throw(); + ::dsn::error_code err; + int64_t last_decree; - _query_replica_decree_response__isset __isset; + _query_replica_decree_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_last_decree(const int64_t val); + void __set_last_decree(const int64_t val); - bool operator == (const query_replica_decree_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(last_decree == rhs.last_decree)) - return false; - return true; - } - bool operator != (const query_replica_decree_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const query_replica_decree_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(last_decree == rhs.last_decree)) + return false; + return true; + } + bool operator!=(const query_replica_decree_response &rhs) const { return !(*this == rhs); } - bool operator < (const query_replica_decree_response & ) const; + bool operator<(const query_replica_decree_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(query_replica_decree_response &a, query_replica_decree_response &b); -inline std::ostream& operator<<(std::ostream& out, const query_replica_decree_response& obj) +inline std::ostream &operator<<(std::ostream &out, const query_replica_decree_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _replica_info__isset { - _replica_info__isset() : pid(false), ballot(false), status(false), last_committed_decree(false), last_prepared_decree(false), last_durable_decree(false), app_type(false), disk_tag(false) {} - bool pid :1; - bool ballot :1; - bool status :1; - bool last_committed_decree :1; - bool last_prepared_decree :1; - bool last_durable_decree :1; - bool app_type :1; - bool disk_tag :1; +typedef struct _replica_info__isset +{ + _replica_info__isset() + : pid(false), + ballot(false), + status(false), + last_committed_decree(false), + last_prepared_decree(false), + last_durable_decree(false), + app_type(false), + disk_tag(false) + { + } + bool pid : 1; + bool ballot : 1; + bool status : 1; + bool last_committed_decree : 1; + bool last_prepared_decree : 1; + bool last_durable_decree : 1; + bool app_type : 1; + bool disk_tag : 1; } _replica_info__isset; -class replica_info { - public: - - replica_info(const replica_info&); - replica_info(replica_info&&); - replica_info& operator=(const replica_info&); - replica_info& operator=(replica_info&&); - replica_info() : ballot(0), status((partition_status::type)0), last_committed_decree(0), last_prepared_decree(0), last_durable_decree(0), app_type(), disk_tag() { - } - - virtual ~replica_info() throw(); - ::dsn::gpid pid; - int64_t ballot; - partition_status::type status; - int64_t last_committed_decree; - int64_t last_prepared_decree; - int64_t last_durable_decree; - std::string app_type; - std::string disk_tag; - - _replica_info__isset __isset; - - void __set_pid(const ::dsn::gpid& val); - - void __set_ballot(const int64_t val); - - void __set_status(const partition_status::type val); - - void __set_last_committed_decree(const int64_t val); - - void __set_last_prepared_decree(const int64_t val); - - void __set_last_durable_decree(const int64_t val); - - void __set_app_type(const std::string& val); - - void __set_disk_tag(const std::string& val); - - bool operator == (const replica_info & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(status == rhs.status)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (!(last_prepared_decree == rhs.last_prepared_decree)) - return false; - if (!(last_durable_decree == rhs.last_durable_decree)) - return false; - if (!(app_type == rhs.app_type)) - return false; - if (!(disk_tag == rhs.disk_tag)) - return false; - return true; - } - bool operator != (const replica_info &rhs) const { - return !(*this == rhs); - } - - bool operator < (const replica_info & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class replica_info +{ +public: + replica_info(const replica_info &); + replica_info(replica_info &&); + replica_info &operator=(const replica_info &); + replica_info &operator=(replica_info &&); + replica_info() + : ballot(0), + status((partition_status::type)0), + last_committed_decree(0), + last_prepared_decree(0), + last_durable_decree(0), + app_type(), + disk_tag() + { + } + + virtual ~replica_info() throw(); + ::dsn::gpid pid; + int64_t ballot; + partition_status::type status; + int64_t last_committed_decree; + int64_t last_prepared_decree; + int64_t last_durable_decree; + std::string app_type; + std::string disk_tag; + + _replica_info__isset __isset; + + void __set_pid(const ::dsn::gpid &val); + + void __set_ballot(const int64_t val); + + void __set_status(const partition_status::type val); + + void __set_last_committed_decree(const int64_t val); + + void __set_last_prepared_decree(const int64_t val); + + void __set_last_durable_decree(const int64_t val); + + void __set_app_type(const std::string &val); + + void __set_disk_tag(const std::string &val); + + bool operator==(const replica_info &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(status == rhs.status)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (!(last_prepared_decree == rhs.last_prepared_decree)) + return false; + if (!(last_durable_decree == rhs.last_durable_decree)) + return false; + if (!(app_type == rhs.app_type)) + return false; + if (!(disk_tag == rhs.disk_tag)) + return false; + return true; + } + bool operator!=(const replica_info &rhs) const { return !(*this == rhs); } + + bool operator<(const replica_info &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(replica_info &a, replica_info &b); -inline std::ostream& operator<<(std::ostream& out, const replica_info& obj) +inline std::ostream &operator<<(std::ostream &out, const replica_info &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_replica_info_request__isset { - _query_replica_info_request__isset() : node(false) {} - bool node :1; +typedef struct _query_replica_info_request__isset +{ + _query_replica_info_request__isset() : node(false) {} + bool node : 1; } _query_replica_info_request__isset; -class query_replica_info_request { - public: - - query_replica_info_request(const query_replica_info_request&); - query_replica_info_request(query_replica_info_request&&); - query_replica_info_request& operator=(const query_replica_info_request&); - query_replica_info_request& operator=(query_replica_info_request&&); - query_replica_info_request() { - } +class query_replica_info_request +{ +public: + query_replica_info_request(const query_replica_info_request &); + query_replica_info_request(query_replica_info_request &&); + query_replica_info_request &operator=(const query_replica_info_request &); + query_replica_info_request &operator=(query_replica_info_request &&); + query_replica_info_request() {} - virtual ~query_replica_info_request() throw(); - ::dsn::rpc_address node; + virtual ~query_replica_info_request() throw(); + ::dsn::rpc_address node; - _query_replica_info_request__isset __isset; + _query_replica_info_request__isset __isset; - void __set_node(const ::dsn::rpc_address& val); + void __set_node(const ::dsn::rpc_address &val); - bool operator == (const query_replica_info_request & rhs) const - { - if (!(node == rhs.node)) - return false; - return true; - } - bool operator != (const query_replica_info_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const query_replica_info_request &rhs) const + { + if (!(node == rhs.node)) + return false; + return true; + } + bool operator!=(const query_replica_info_request &rhs) const { return !(*this == rhs); } - bool operator < (const query_replica_info_request & ) const; + bool operator<(const query_replica_info_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(query_replica_info_request &a, query_replica_info_request &b); -inline std::ostream& operator<<(std::ostream& out, const query_replica_info_request& obj) +inline std::ostream &operator<<(std::ostream &out, const query_replica_info_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_replica_info_response__isset { - _query_replica_info_response__isset() : err(false), replicas(false) {} - bool err :1; - bool replicas :1; +typedef struct _query_replica_info_response__isset +{ + _query_replica_info_response__isset() : err(false), replicas(false) {} + bool err : 1; + bool replicas : 1; } _query_replica_info_response__isset; -class query_replica_info_response { - public: - - query_replica_info_response(const query_replica_info_response&); - query_replica_info_response(query_replica_info_response&&); - query_replica_info_response& operator=(const query_replica_info_response&); - query_replica_info_response& operator=(query_replica_info_response&&); - query_replica_info_response() { - } +class query_replica_info_response +{ +public: + query_replica_info_response(const query_replica_info_response &); + query_replica_info_response(query_replica_info_response &&); + query_replica_info_response &operator=(const query_replica_info_response &); + query_replica_info_response &operator=(query_replica_info_response &&); + query_replica_info_response() {} - virtual ~query_replica_info_response() throw(); - ::dsn::error_code err; - std::vector replicas; + virtual ~query_replica_info_response() throw(); + ::dsn::error_code err; + std::vector replicas; - _query_replica_info_response__isset __isset; + _query_replica_info_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_replicas(const std::vector & val); + void __set_replicas(const std::vector &val); - bool operator == (const query_replica_info_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(replicas == rhs.replicas)) - return false; - return true; - } - bool operator != (const query_replica_info_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const query_replica_info_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(replicas == rhs.replicas)) + return false; + return true; + } + bool operator!=(const query_replica_info_response &rhs) const { return !(*this == rhs); } - bool operator < (const query_replica_info_response & ) const; + bool operator<(const query_replica_info_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(query_replica_info_response &a, query_replica_info_response &b); -inline std::ostream& operator<<(std::ostream& out, const query_replica_info_response& obj) +inline std::ostream &operator<<(std::ostream &out, const query_replica_info_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _disk_info__isset { - _disk_info__isset() : tag(false), full_dir(false), disk_capacity_mb(false), disk_available_mb(false), holding_primary_replica_counts(false), holding_secondary_replica_counts(false) {} - bool tag :1; - bool full_dir :1; - bool disk_capacity_mb :1; - bool disk_available_mb :1; - bool holding_primary_replica_counts :1; - bool holding_secondary_replica_counts :1; +typedef struct _disk_info__isset +{ + _disk_info__isset() + : tag(false), + full_dir(false), + disk_capacity_mb(false), + disk_available_mb(false), + holding_primary_replica_counts(false), + holding_secondary_replica_counts(false) + { + } + bool tag : 1; + bool full_dir : 1; + bool disk_capacity_mb : 1; + bool disk_available_mb : 1; + bool holding_primary_replica_counts : 1; + bool holding_secondary_replica_counts : 1; } _disk_info__isset; -class disk_info { - public: - - disk_info(const disk_info&); - disk_info(disk_info&&); - disk_info& operator=(const disk_info&); - disk_info& operator=(disk_info&&); - disk_info() : tag(), full_dir(), disk_capacity_mb(0), disk_available_mb(0) { - } - - virtual ~disk_info() throw(); - std::string tag; - std::string full_dir; - int64_t disk_capacity_mb; - int64_t disk_available_mb; - std::map holding_primary_replica_counts; - std::map holding_secondary_replica_counts; - - _disk_info__isset __isset; - - void __set_tag(const std::string& val); - - void __set_full_dir(const std::string& val); - - void __set_disk_capacity_mb(const int64_t val); - - void __set_disk_available_mb(const int64_t val); - - void __set_holding_primary_replica_counts(const std::map & val); - - void __set_holding_secondary_replica_counts(const std::map & val); - - bool operator == (const disk_info & rhs) const - { - if (!(tag == rhs.tag)) - return false; - if (!(full_dir == rhs.full_dir)) - return false; - if (!(disk_capacity_mb == rhs.disk_capacity_mb)) - return false; - if (!(disk_available_mb == rhs.disk_available_mb)) - return false; - if (!(holding_primary_replica_counts == rhs.holding_primary_replica_counts)) - return false; - if (!(holding_secondary_replica_counts == rhs.holding_secondary_replica_counts)) - return false; - return true; - } - bool operator != (const disk_info &rhs) const { - return !(*this == rhs); - } - - bool operator < (const disk_info & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class disk_info +{ +public: + disk_info(const disk_info &); + disk_info(disk_info &&); + disk_info &operator=(const disk_info &); + disk_info &operator=(disk_info &&); + disk_info() : tag(), full_dir(), disk_capacity_mb(0), disk_available_mb(0) {} + + virtual ~disk_info() throw(); + std::string tag; + std::string full_dir; + int64_t disk_capacity_mb; + int64_t disk_available_mb; + std::map holding_primary_replica_counts; + std::map holding_secondary_replica_counts; + + _disk_info__isset __isset; + + void __set_tag(const std::string &val); + + void __set_full_dir(const std::string &val); + + void __set_disk_capacity_mb(const int64_t val); + + void __set_disk_available_mb(const int64_t val); + + void __set_holding_primary_replica_counts(const std::map &val); + + void __set_holding_secondary_replica_counts(const std::map &val); + + bool operator==(const disk_info &rhs) const + { + if (!(tag == rhs.tag)) + return false; + if (!(full_dir == rhs.full_dir)) + return false; + if (!(disk_capacity_mb == rhs.disk_capacity_mb)) + return false; + if (!(disk_available_mb == rhs.disk_available_mb)) + return false; + if (!(holding_primary_replica_counts == rhs.holding_primary_replica_counts)) + return false; + if (!(holding_secondary_replica_counts == rhs.holding_secondary_replica_counts)) + return false; + return true; + } + bool operator!=(const disk_info &rhs) const { return !(*this == rhs); } + + bool operator<(const disk_info &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(disk_info &a, disk_info &b); -inline std::ostream& operator<<(std::ostream& out, const disk_info& obj) +inline std::ostream &operator<<(std::ostream &out, const disk_info &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_disk_info_request__isset { - _query_disk_info_request__isset() : node(false), app_name(false) {} - bool node :1; - bool app_name :1; +typedef struct _query_disk_info_request__isset +{ + _query_disk_info_request__isset() : node(false), app_name(false) {} + bool node : 1; + bool app_name : 1; } _query_disk_info_request__isset; -class query_disk_info_request { - public: - - query_disk_info_request(const query_disk_info_request&); - query_disk_info_request(query_disk_info_request&&); - query_disk_info_request& operator=(const query_disk_info_request&); - query_disk_info_request& operator=(query_disk_info_request&&); - query_disk_info_request() : app_name() { - } +class query_disk_info_request +{ +public: + query_disk_info_request(const query_disk_info_request &); + query_disk_info_request(query_disk_info_request &&); + query_disk_info_request &operator=(const query_disk_info_request &); + query_disk_info_request &operator=(query_disk_info_request &&); + query_disk_info_request() : app_name() {} - virtual ~query_disk_info_request() throw(); - ::dsn::rpc_address node; - std::string app_name; + virtual ~query_disk_info_request() throw(); + ::dsn::rpc_address node; + std::string app_name; - _query_disk_info_request__isset __isset; + _query_disk_info_request__isset __isset; - void __set_node(const ::dsn::rpc_address& val); + void __set_node(const ::dsn::rpc_address &val); - void __set_app_name(const std::string& val); + void __set_app_name(const std::string &val); - bool operator == (const query_disk_info_request & rhs) const - { - if (!(node == rhs.node)) - return false; - if (!(app_name == rhs.app_name)) - return false; - return true; - } - bool operator != (const query_disk_info_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const query_disk_info_request &rhs) const + { + if (!(node == rhs.node)) + return false; + if (!(app_name == rhs.app_name)) + return false; + return true; + } + bool operator!=(const query_disk_info_request &rhs) const { return !(*this == rhs); } - bool operator < (const query_disk_info_request & ) const; + bool operator<(const query_disk_info_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(query_disk_info_request &a, query_disk_info_request &b); -inline std::ostream& operator<<(std::ostream& out, const query_disk_info_request& obj) +inline std::ostream &operator<<(std::ostream &out, const query_disk_info_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_disk_info_response__isset { - _query_disk_info_response__isset() : err(false), total_capacity_mb(false), total_available_mb(false), disk_infos(false) {} - bool err :1; - bool total_capacity_mb :1; - bool total_available_mb :1; - bool disk_infos :1; +typedef struct _query_disk_info_response__isset +{ + _query_disk_info_response__isset() + : err(false), total_capacity_mb(false), total_available_mb(false), disk_infos(false) + { + } + bool err : 1; + bool total_capacity_mb : 1; + bool total_available_mb : 1; + bool disk_infos : 1; } _query_disk_info_response__isset; -class query_disk_info_response { - public: - - query_disk_info_response(const query_disk_info_response&); - query_disk_info_response(query_disk_info_response&&); - query_disk_info_response& operator=(const query_disk_info_response&); - query_disk_info_response& operator=(query_disk_info_response&&); - query_disk_info_response() : total_capacity_mb(0), total_available_mb(0) { - } +class query_disk_info_response +{ +public: + query_disk_info_response(const query_disk_info_response &); + query_disk_info_response(query_disk_info_response &&); + query_disk_info_response &operator=(const query_disk_info_response &); + query_disk_info_response &operator=(query_disk_info_response &&); + query_disk_info_response() : total_capacity_mb(0), total_available_mb(0) {} - virtual ~query_disk_info_response() throw(); - ::dsn::error_code err; - int64_t total_capacity_mb; - int64_t total_available_mb; - std::vector disk_infos; + virtual ~query_disk_info_response() throw(); + ::dsn::error_code err; + int64_t total_capacity_mb; + int64_t total_available_mb; + std::vector disk_infos; - _query_disk_info_response__isset __isset; + _query_disk_info_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_total_capacity_mb(const int64_t val); + void __set_total_capacity_mb(const int64_t val); - void __set_total_available_mb(const int64_t val); + void __set_total_available_mb(const int64_t val); - void __set_disk_infos(const std::vector & val); + void __set_disk_infos(const std::vector &val); - bool operator == (const query_disk_info_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(total_capacity_mb == rhs.total_capacity_mb)) - return false; - if (!(total_available_mb == rhs.total_available_mb)) - return false; - if (!(disk_infos == rhs.disk_infos)) - return false; - return true; - } - bool operator != (const query_disk_info_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const query_disk_info_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(total_capacity_mb == rhs.total_capacity_mb)) + return false; + if (!(total_available_mb == rhs.total_available_mb)) + return false; + if (!(disk_infos == rhs.disk_infos)) + return false; + return true; + } + bool operator!=(const query_disk_info_response &rhs) const { return !(*this == rhs); } - bool operator < (const query_disk_info_response & ) const; + bool operator<(const query_disk_info_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(query_disk_info_response &a, query_disk_info_response &b); -inline std::ostream& operator<<(std::ostream& out, const query_disk_info_response& obj) +inline std::ostream &operator<<(std::ostream &out, const query_disk_info_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_app_info_request__isset { - _query_app_info_request__isset() : meta_server(false) {} - bool meta_server :1; +typedef struct _query_app_info_request__isset +{ + _query_app_info_request__isset() : meta_server(false) {} + bool meta_server : 1; } _query_app_info_request__isset; -class query_app_info_request { - public: - - query_app_info_request(const query_app_info_request&); - query_app_info_request(query_app_info_request&&); - query_app_info_request& operator=(const query_app_info_request&); - query_app_info_request& operator=(query_app_info_request&&); - query_app_info_request() { - } +class query_app_info_request +{ +public: + query_app_info_request(const query_app_info_request &); + query_app_info_request(query_app_info_request &&); + query_app_info_request &operator=(const query_app_info_request &); + query_app_info_request &operator=(query_app_info_request &&); + query_app_info_request() {} - virtual ~query_app_info_request() throw(); - ::dsn::rpc_address meta_server; + virtual ~query_app_info_request() throw(); + ::dsn::rpc_address meta_server; - _query_app_info_request__isset __isset; + _query_app_info_request__isset __isset; - void __set_meta_server(const ::dsn::rpc_address& val); + void __set_meta_server(const ::dsn::rpc_address &val); - bool operator == (const query_app_info_request & rhs) const - { - if (!(meta_server == rhs.meta_server)) - return false; - return true; - } - bool operator != (const query_app_info_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const query_app_info_request &rhs) const + { + if (!(meta_server == rhs.meta_server)) + return false; + return true; + } + bool operator!=(const query_app_info_request &rhs) const { return !(*this == rhs); } - bool operator < (const query_app_info_request & ) const; + bool operator<(const query_app_info_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(query_app_info_request &a, query_app_info_request &b); -inline std::ostream& operator<<(std::ostream& out, const query_app_info_request& obj) +inline std::ostream &operator<<(std::ostream &out, const query_app_info_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _query_app_info_response__isset { - _query_app_info_response__isset() : err(false), apps(false) {} - bool err :1; - bool apps :1; +typedef struct _query_app_info_response__isset +{ + _query_app_info_response__isset() : err(false), apps(false) {} + bool err : 1; + bool apps : 1; } _query_app_info_response__isset; -class query_app_info_response { - public: - - query_app_info_response(const query_app_info_response&); - query_app_info_response(query_app_info_response&&); - query_app_info_response& operator=(const query_app_info_response&); - query_app_info_response& operator=(query_app_info_response&&); - query_app_info_response() { - } +class query_app_info_response +{ +public: + query_app_info_response(const query_app_info_response &); + query_app_info_response(query_app_info_response &&); + query_app_info_response &operator=(const query_app_info_response &); + query_app_info_response &operator=(query_app_info_response &&); + query_app_info_response() {} - virtual ~query_app_info_response() throw(); - ::dsn::error_code err; - std::vector< ::dsn::app_info> apps; + virtual ~query_app_info_response() throw(); + ::dsn::error_code err; + std::vector<::dsn::app_info> apps; - _query_app_info_response__isset __isset; + _query_app_info_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_apps(const std::vector< ::dsn::app_info> & val); + void __set_apps(const std::vector<::dsn::app_info> &val); - bool operator == (const query_app_info_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(apps == rhs.apps)) - return false; - return true; - } - bool operator != (const query_app_info_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const query_app_info_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(apps == rhs.apps)) + return false; + return true; + } + bool operator!=(const query_app_info_response &rhs) const { return !(*this == rhs); } - bool operator < (const query_app_info_response & ) const; + bool operator<(const query_app_info_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(query_app_info_response &a, query_app_info_response &b); -inline std::ostream& operator<<(std::ostream& out, const query_app_info_response& obj) +inline std::ostream &operator<<(std::ostream &out, const query_app_info_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_recovery_request__isset { - _configuration_recovery_request__isset() : recovery_set(false), skip_bad_nodes(false), skip_lost_partitions(false) {} - bool recovery_set :1; - bool skip_bad_nodes :1; - bool skip_lost_partitions :1; +typedef struct _configuration_recovery_request__isset +{ + _configuration_recovery_request__isset() + : recovery_set(false), skip_bad_nodes(false), skip_lost_partitions(false) + { + } + bool recovery_set : 1; + bool skip_bad_nodes : 1; + bool skip_lost_partitions : 1; } _configuration_recovery_request__isset; -class configuration_recovery_request { - public: - - configuration_recovery_request(const configuration_recovery_request&); - configuration_recovery_request(configuration_recovery_request&&); - configuration_recovery_request& operator=(const configuration_recovery_request&); - configuration_recovery_request& operator=(configuration_recovery_request&&); - configuration_recovery_request() : skip_bad_nodes(0), skip_lost_partitions(0) { - } +class configuration_recovery_request +{ +public: + configuration_recovery_request(const configuration_recovery_request &); + configuration_recovery_request(configuration_recovery_request &&); + configuration_recovery_request &operator=(const configuration_recovery_request &); + configuration_recovery_request &operator=(configuration_recovery_request &&); + configuration_recovery_request() : skip_bad_nodes(0), skip_lost_partitions(0) {} - virtual ~configuration_recovery_request() throw(); - std::vector< ::dsn::rpc_address> recovery_set; - bool skip_bad_nodes; - bool skip_lost_partitions; + virtual ~configuration_recovery_request() throw(); + std::vector<::dsn::rpc_address> recovery_set; + bool skip_bad_nodes; + bool skip_lost_partitions; - _configuration_recovery_request__isset __isset; + _configuration_recovery_request__isset __isset; - void __set_recovery_set(const std::vector< ::dsn::rpc_address> & val); + void __set_recovery_set(const std::vector<::dsn::rpc_address> &val); - void __set_skip_bad_nodes(const bool val); + void __set_skip_bad_nodes(const bool val); - void __set_skip_lost_partitions(const bool val); + void __set_skip_lost_partitions(const bool val); - bool operator == (const configuration_recovery_request & rhs) const - { - if (!(recovery_set == rhs.recovery_set)) - return false; - if (!(skip_bad_nodes == rhs.skip_bad_nodes)) - return false; - if (!(skip_lost_partitions == rhs.skip_lost_partitions)) - return false; - return true; - } - bool operator != (const configuration_recovery_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_recovery_request &rhs) const + { + if (!(recovery_set == rhs.recovery_set)) + return false; + if (!(skip_bad_nodes == rhs.skip_bad_nodes)) + return false; + if (!(skip_lost_partitions == rhs.skip_lost_partitions)) + return false; + return true; + } + bool operator!=(const configuration_recovery_request &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_recovery_request & ) const; + bool operator<(const configuration_recovery_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_recovery_request &a, configuration_recovery_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_recovery_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_recovery_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_recovery_response__isset { - _configuration_recovery_response__isset() : err(false), hint_message(false) {} - bool err :1; - bool hint_message :1; +typedef struct _configuration_recovery_response__isset +{ + _configuration_recovery_response__isset() : err(false), hint_message(false) {} + bool err : 1; + bool hint_message : 1; } _configuration_recovery_response__isset; -class configuration_recovery_response { - public: - - configuration_recovery_response(const configuration_recovery_response&); - configuration_recovery_response(configuration_recovery_response&&); - configuration_recovery_response& operator=(const configuration_recovery_response&); - configuration_recovery_response& operator=(configuration_recovery_response&&); - configuration_recovery_response() : hint_message() { - } +class configuration_recovery_response +{ +public: + configuration_recovery_response(const configuration_recovery_response &); + configuration_recovery_response(configuration_recovery_response &&); + configuration_recovery_response &operator=(const configuration_recovery_response &); + configuration_recovery_response &operator=(configuration_recovery_response &&); + configuration_recovery_response() : hint_message() {} - virtual ~configuration_recovery_response() throw(); - ::dsn::error_code err; - std::string hint_message; + virtual ~configuration_recovery_response() throw(); + ::dsn::error_code err; + std::string hint_message; - _configuration_recovery_response__isset __isset; + _configuration_recovery_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_hint_message(const std::string& val); + void __set_hint_message(const std::string &val); - bool operator == (const configuration_recovery_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(hint_message == rhs.hint_message)) - return false; - return true; - } - bool operator != (const configuration_recovery_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_recovery_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(hint_message == rhs.hint_message)) + return false; + return true; + } + bool operator!=(const configuration_recovery_response &rhs) const { return !(*this == rhs); } - bool operator < (const configuration_recovery_response & ) const; + bool operator<(const configuration_recovery_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_recovery_response &a, configuration_recovery_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_recovery_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_recovery_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _policy_info__isset { - _policy_info__isset() : policy_name(false), backup_provider_type(false) {} - bool policy_name :1; - bool backup_provider_type :1; +typedef struct _policy_info__isset +{ + _policy_info__isset() : policy_name(false), backup_provider_type(false) {} + bool policy_name : 1; + bool backup_provider_type : 1; } _policy_info__isset; -class policy_info { - public: - - policy_info(const policy_info&); - policy_info(policy_info&&); - policy_info& operator=(const policy_info&); - policy_info& operator=(policy_info&&); - policy_info() : policy_name(), backup_provider_type() { - } +class policy_info +{ +public: + policy_info(const policy_info &); + policy_info(policy_info &&); + policy_info &operator=(const policy_info &); + policy_info &operator=(policy_info &&); + policy_info() : policy_name(), backup_provider_type() {} - virtual ~policy_info() throw(); - std::string policy_name; - std::string backup_provider_type; + virtual ~policy_info() throw(); + std::string policy_name; + std::string backup_provider_type; - _policy_info__isset __isset; + _policy_info__isset __isset; - void __set_policy_name(const std::string& val); + void __set_policy_name(const std::string &val); - void __set_backup_provider_type(const std::string& val); + void __set_backup_provider_type(const std::string &val); - bool operator == (const policy_info & rhs) const - { - if (!(policy_name == rhs.policy_name)) - return false; - if (!(backup_provider_type == rhs.backup_provider_type)) - return false; - return true; - } - bool operator != (const policy_info &rhs) const { - return !(*this == rhs); - } + bool operator==(const policy_info &rhs) const + { + if (!(policy_name == rhs.policy_name)) + return false; + if (!(backup_provider_type == rhs.backup_provider_type)) + return false; + return true; + } + bool operator!=(const policy_info &rhs) const { return !(*this == rhs); } - bool operator < (const policy_info & ) const; + bool operator<(const policy_info &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(policy_info &a, policy_info &b); -inline std::ostream& operator<<(std::ostream& out, const policy_info& obj) +inline std::ostream &operator<<(std::ostream &out, const policy_info &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_restore_request__isset { - _configuration_restore_request__isset() : cluster_name(false), policy_name(false), time_stamp(false), app_name(false), app_id(false), new_app_name(false), backup_provider_name(false), skip_bad_partition(false) {} - bool cluster_name :1; - bool policy_name :1; - bool time_stamp :1; - bool app_name :1; - bool app_id :1; - bool new_app_name :1; - bool backup_provider_name :1; - bool skip_bad_partition :1; +typedef struct _configuration_restore_request__isset +{ + _configuration_restore_request__isset() + : cluster_name(false), + policy_name(false), + time_stamp(false), + app_name(false), + app_id(false), + new_app_name(false), + backup_provider_name(false), + skip_bad_partition(false) + { + } + bool cluster_name : 1; + bool policy_name : 1; + bool time_stamp : 1; + bool app_name : 1; + bool app_id : 1; + bool new_app_name : 1; + bool backup_provider_name : 1; + bool skip_bad_partition : 1; } _configuration_restore_request__isset; -class configuration_restore_request { - public: - - configuration_restore_request(const configuration_restore_request&); - configuration_restore_request(configuration_restore_request&&); - configuration_restore_request& operator=(const configuration_restore_request&); - configuration_restore_request& operator=(configuration_restore_request&&); - configuration_restore_request() : cluster_name(), policy_name(), time_stamp(0), app_name(), app_id(0), new_app_name(), backup_provider_name(), skip_bad_partition(0) { - } - - virtual ~configuration_restore_request() throw(); - std::string cluster_name; - std::string policy_name; - int64_t time_stamp; - std::string app_name; - int32_t app_id; - std::string new_app_name; - std::string backup_provider_name; - bool skip_bad_partition; - - _configuration_restore_request__isset __isset; - - void __set_cluster_name(const std::string& val); - - void __set_policy_name(const std::string& val); - - void __set_time_stamp(const int64_t val); - - void __set_app_name(const std::string& val); - - void __set_app_id(const int32_t val); - - void __set_new_app_name(const std::string& val); - - void __set_backup_provider_name(const std::string& val); - - void __set_skip_bad_partition(const bool val); - - bool operator == (const configuration_restore_request & rhs) const - { - if (!(cluster_name == rhs.cluster_name)) - return false; - if (!(policy_name == rhs.policy_name)) - return false; - if (!(time_stamp == rhs.time_stamp)) - return false; - if (!(app_name == rhs.app_name)) - return false; - if (!(app_id == rhs.app_id)) - return false; - if (!(new_app_name == rhs.new_app_name)) - return false; - if (!(backup_provider_name == rhs.backup_provider_name)) - return false; - if (!(skip_bad_partition == rhs.skip_bad_partition)) - return false; - return true; - } - bool operator != (const configuration_restore_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_restore_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_restore_request +{ +public: + configuration_restore_request(const configuration_restore_request &); + configuration_restore_request(configuration_restore_request &&); + configuration_restore_request &operator=(const configuration_restore_request &); + configuration_restore_request &operator=(configuration_restore_request &&); + configuration_restore_request() + : cluster_name(), + policy_name(), + time_stamp(0), + app_name(), + app_id(0), + new_app_name(), + backup_provider_name(), + skip_bad_partition(0) + { + } + + virtual ~configuration_restore_request() throw(); + std::string cluster_name; + std::string policy_name; + int64_t time_stamp; + std::string app_name; + int32_t app_id; + std::string new_app_name; + std::string backup_provider_name; + bool skip_bad_partition; + + _configuration_restore_request__isset __isset; + + void __set_cluster_name(const std::string &val); + + void __set_policy_name(const std::string &val); + + void __set_time_stamp(const int64_t val); + + void __set_app_name(const std::string &val); + + void __set_app_id(const int32_t val); + + void __set_new_app_name(const std::string &val); + + void __set_backup_provider_name(const std::string &val); + + void __set_skip_bad_partition(const bool val); + + bool operator==(const configuration_restore_request &rhs) const + { + if (!(cluster_name == rhs.cluster_name)) + return false; + if (!(policy_name == rhs.policy_name)) + return false; + if (!(time_stamp == rhs.time_stamp)) + return false; + if (!(app_name == rhs.app_name)) + return false; + if (!(app_id == rhs.app_id)) + return false; + if (!(new_app_name == rhs.new_app_name)) + return false; + if (!(backup_provider_name == rhs.backup_provider_name)) + return false; + if (!(skip_bad_partition == rhs.skip_bad_partition)) + return false; + return true; + } + bool operator!=(const configuration_restore_request &rhs) const { return !(*this == rhs); } + + bool operator<(const configuration_restore_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_restore_request &a, configuration_restore_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_restore_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_restore_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _backup_request__isset { - _backup_request__isset() : pid(false), policy(false), app_name(false), backup_id(false) {} - bool pid :1; - bool policy :1; - bool app_name :1; - bool backup_id :1; +typedef struct _backup_request__isset +{ + _backup_request__isset() : pid(false), policy(false), app_name(false), backup_id(false) {} + bool pid : 1; + bool policy : 1; + bool app_name : 1; + bool backup_id : 1; } _backup_request__isset; -class backup_request { - public: - - backup_request(const backup_request&); - backup_request(backup_request&&); - backup_request& operator=(const backup_request&); - backup_request& operator=(backup_request&&); - backup_request() : app_name(), backup_id(0) { - } +class backup_request +{ +public: + backup_request(const backup_request &); + backup_request(backup_request &&); + backup_request &operator=(const backup_request &); + backup_request &operator=(backup_request &&); + backup_request() : app_name(), backup_id(0) {} - virtual ~backup_request() throw(); - ::dsn::gpid pid; - policy_info policy; - std::string app_name; - int64_t backup_id; + virtual ~backup_request() throw(); + ::dsn::gpid pid; + policy_info policy; + std::string app_name; + int64_t backup_id; - _backup_request__isset __isset; + _backup_request__isset __isset; - void __set_pid(const ::dsn::gpid& val); + void __set_pid(const ::dsn::gpid &val); - void __set_policy(const policy_info& val); + void __set_policy(const policy_info &val); - void __set_app_name(const std::string& val); + void __set_app_name(const std::string &val); - void __set_backup_id(const int64_t val); + void __set_backup_id(const int64_t val); - bool operator == (const backup_request & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(policy == rhs.policy)) - return false; - if (!(app_name == rhs.app_name)) - return false; - if (!(backup_id == rhs.backup_id)) - return false; - return true; - } - bool operator != (const backup_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const backup_request &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(policy == rhs.policy)) + return false; + if (!(app_name == rhs.app_name)) + return false; + if (!(backup_id == rhs.backup_id)) + return false; + return true; + } + bool operator!=(const backup_request &rhs) const { return !(*this == rhs); } - bool operator < (const backup_request & ) const; + bool operator<(const backup_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(backup_request &a, backup_request &b); -inline std::ostream& operator<<(std::ostream& out, const backup_request& obj) +inline std::ostream &operator<<(std::ostream &out, const backup_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _backup_response__isset { - _backup_response__isset() : err(false), pid(false), progress(false), policy_name(false), backup_id(false), checkpoint_total_size(false) {} - bool err :1; - bool pid :1; - bool progress :1; - bool policy_name :1; - bool backup_id :1; - bool checkpoint_total_size :1; +typedef struct _backup_response__isset +{ + _backup_response__isset() + : err(false), + pid(false), + progress(false), + policy_name(false), + backup_id(false), + checkpoint_total_size(false) + { + } + bool err : 1; + bool pid : 1; + bool progress : 1; + bool policy_name : 1; + bool backup_id : 1; + bool checkpoint_total_size : 1; } _backup_response__isset; -class backup_response { - public: - - backup_response(const backup_response&); - backup_response(backup_response&&); - backup_response& operator=(const backup_response&); - backup_response& operator=(backup_response&&); - backup_response() : progress(0), policy_name(), backup_id(0), checkpoint_total_size(0) { - } - - virtual ~backup_response() throw(); - ::dsn::error_code err; - ::dsn::gpid pid; - int32_t progress; - std::string policy_name; - int64_t backup_id; - int64_t checkpoint_total_size; - - _backup_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - void __set_pid(const ::dsn::gpid& val); - - void __set_progress(const int32_t val); - - void __set_policy_name(const std::string& val); - - void __set_backup_id(const int64_t val); - - void __set_checkpoint_total_size(const int64_t val); - - bool operator == (const backup_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(pid == rhs.pid)) - return false; - if (!(progress == rhs.progress)) - return false; - if (!(policy_name == rhs.policy_name)) - return false; - if (!(backup_id == rhs.backup_id)) - return false; - if (!(checkpoint_total_size == rhs.checkpoint_total_size)) - return false; - return true; - } - bool operator != (const backup_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const backup_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class backup_response +{ +public: + backup_response(const backup_response &); + backup_response(backup_response &&); + backup_response &operator=(const backup_response &); + backup_response &operator=(backup_response &&); + backup_response() : progress(0), policy_name(), backup_id(0), checkpoint_total_size(0) {} + + virtual ~backup_response() throw(); + ::dsn::error_code err; + ::dsn::gpid pid; + int32_t progress; + std::string policy_name; + int64_t backup_id; + int64_t checkpoint_total_size; + + _backup_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_pid(const ::dsn::gpid &val); + + void __set_progress(const int32_t val); + + void __set_policy_name(const std::string &val); + + void __set_backup_id(const int64_t val); + + void __set_checkpoint_total_size(const int64_t val); + + bool operator==(const backup_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(pid == rhs.pid)) + return false; + if (!(progress == rhs.progress)) + return false; + if (!(policy_name == rhs.policy_name)) + return false; + if (!(backup_id == rhs.backup_id)) + return false; + if (!(checkpoint_total_size == rhs.checkpoint_total_size)) + return false; + return true; + } + bool operator!=(const backup_response &rhs) const { return !(*this == rhs); } + + bool operator<(const backup_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(backup_response &a, backup_response &b); -inline std::ostream& operator<<(std::ostream& out, const backup_response& obj) +inline std::ostream &operator<<(std::ostream &out, const backup_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _backup_clear_request__isset { - _backup_clear_request__isset() : pid(false), policy_name(false) {} - bool pid :1; - bool policy_name :1; +typedef struct _backup_clear_request__isset +{ + _backup_clear_request__isset() : pid(false), policy_name(false) {} + bool pid : 1; + bool policy_name : 1; } _backup_clear_request__isset; -class backup_clear_request { - public: - - backup_clear_request(const backup_clear_request&); - backup_clear_request(backup_clear_request&&); - backup_clear_request& operator=(const backup_clear_request&); - backup_clear_request& operator=(backup_clear_request&&); - backup_clear_request() : policy_name() { - } +class backup_clear_request +{ +public: + backup_clear_request(const backup_clear_request &); + backup_clear_request(backup_clear_request &&); + backup_clear_request &operator=(const backup_clear_request &); + backup_clear_request &operator=(backup_clear_request &&); + backup_clear_request() : policy_name() {} - virtual ~backup_clear_request() throw(); - ::dsn::gpid pid; - std::string policy_name; + virtual ~backup_clear_request() throw(); + ::dsn::gpid pid; + std::string policy_name; - _backup_clear_request__isset __isset; + _backup_clear_request__isset __isset; - void __set_pid(const ::dsn::gpid& val); + void __set_pid(const ::dsn::gpid &val); - void __set_policy_name(const std::string& val); + void __set_policy_name(const std::string &val); - bool operator == (const backup_clear_request & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(policy_name == rhs.policy_name)) - return false; - return true; - } - bool operator != (const backup_clear_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const backup_clear_request &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(policy_name == rhs.policy_name)) + return false; + return true; + } + bool operator!=(const backup_clear_request &rhs) const { return !(*this == rhs); } - bool operator < (const backup_clear_request & ) const; + bool operator<(const backup_clear_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(backup_clear_request &a, backup_clear_request &b); -inline std::ostream& operator<<(std::ostream& out, const backup_clear_request& obj) +inline std::ostream &operator<<(std::ostream &out, const backup_clear_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_modify_backup_policy_request__isset { - _configuration_modify_backup_policy_request__isset() : policy_name(false), add_appids(false), removal_appids(false), new_backup_interval_sec(false), backup_history_count_to_keep(false), is_disable(false), start_time(false) {} - bool policy_name :1; - bool add_appids :1; - bool removal_appids :1; - bool new_backup_interval_sec :1; - bool backup_history_count_to_keep :1; - bool is_disable :1; - bool start_time :1; +typedef struct _configuration_modify_backup_policy_request__isset +{ + _configuration_modify_backup_policy_request__isset() + : policy_name(false), + add_appids(false), + removal_appids(false), + new_backup_interval_sec(false), + backup_history_count_to_keep(false), + is_disable(false), + start_time(false) + { + } + bool policy_name : 1; + bool add_appids : 1; + bool removal_appids : 1; + bool new_backup_interval_sec : 1; + bool backup_history_count_to_keep : 1; + bool is_disable : 1; + bool start_time : 1; } _configuration_modify_backup_policy_request__isset; -class configuration_modify_backup_policy_request { - public: - - configuration_modify_backup_policy_request(const configuration_modify_backup_policy_request&); - configuration_modify_backup_policy_request(configuration_modify_backup_policy_request&&); - configuration_modify_backup_policy_request& operator=(const configuration_modify_backup_policy_request&); - configuration_modify_backup_policy_request& operator=(configuration_modify_backup_policy_request&&); - configuration_modify_backup_policy_request() : policy_name(), new_backup_interval_sec(0), backup_history_count_to_keep(0), is_disable(0), start_time() { - } - - virtual ~configuration_modify_backup_policy_request() throw(); - std::string policy_name; - std::vector add_appids; - std::vector removal_appids; - int64_t new_backup_interval_sec; - int32_t backup_history_count_to_keep; - bool is_disable; - std::string start_time; - - _configuration_modify_backup_policy_request__isset __isset; - - void __set_policy_name(const std::string& val); - - void __set_add_appids(const std::vector & val); - - void __set_removal_appids(const std::vector & val); - - void __set_new_backup_interval_sec(const int64_t val); - - void __set_backup_history_count_to_keep(const int32_t val); - - void __set_is_disable(const bool val); - - void __set_start_time(const std::string& val); - - bool operator == (const configuration_modify_backup_policy_request & rhs) const - { - if (!(policy_name == rhs.policy_name)) - return false; - if (__isset.add_appids != rhs.__isset.add_appids) - return false; - else if (__isset.add_appids && !(add_appids == rhs.add_appids)) - return false; - if (__isset.removal_appids != rhs.__isset.removal_appids) - return false; - else if (__isset.removal_appids && !(removal_appids == rhs.removal_appids)) - return false; - if (__isset.new_backup_interval_sec != rhs.__isset.new_backup_interval_sec) - return false; - else if (__isset.new_backup_interval_sec && !(new_backup_interval_sec == rhs.new_backup_interval_sec)) - return false; - if (__isset.backup_history_count_to_keep != rhs.__isset.backup_history_count_to_keep) - return false; - else if (__isset.backup_history_count_to_keep && !(backup_history_count_to_keep == rhs.backup_history_count_to_keep)) - return false; - if (__isset.is_disable != rhs.__isset.is_disable) - return false; - else if (__isset.is_disable && !(is_disable == rhs.is_disable)) - return false; - if (__isset.start_time != rhs.__isset.start_time) - return false; - else if (__isset.start_time && !(start_time == rhs.start_time)) - return false; - return true; - } - bool operator != (const configuration_modify_backup_policy_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_modify_backup_policy_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_modify_backup_policy_request +{ +public: + configuration_modify_backup_policy_request(const configuration_modify_backup_policy_request &); + configuration_modify_backup_policy_request(configuration_modify_backup_policy_request &&); + configuration_modify_backup_policy_request & + operator=(const configuration_modify_backup_policy_request &); + configuration_modify_backup_policy_request & + operator=(configuration_modify_backup_policy_request &&); + configuration_modify_backup_policy_request() + : policy_name(), + new_backup_interval_sec(0), + backup_history_count_to_keep(0), + is_disable(0), + start_time() + { + } + + virtual ~configuration_modify_backup_policy_request() throw(); + std::string policy_name; + std::vector add_appids; + std::vector removal_appids; + int64_t new_backup_interval_sec; + int32_t backup_history_count_to_keep; + bool is_disable; + std::string start_time; + + _configuration_modify_backup_policy_request__isset __isset; + + void __set_policy_name(const std::string &val); + + void __set_add_appids(const std::vector &val); + + void __set_removal_appids(const std::vector &val); + + void __set_new_backup_interval_sec(const int64_t val); + + void __set_backup_history_count_to_keep(const int32_t val); + + void __set_is_disable(const bool val); + + void __set_start_time(const std::string &val); + + bool operator==(const configuration_modify_backup_policy_request &rhs) const + { + if (!(policy_name == rhs.policy_name)) + return false; + if (__isset.add_appids != rhs.__isset.add_appids) + return false; + else if (__isset.add_appids && !(add_appids == rhs.add_appids)) + return false; + if (__isset.removal_appids != rhs.__isset.removal_appids) + return false; + else if (__isset.removal_appids && !(removal_appids == rhs.removal_appids)) + return false; + if (__isset.new_backup_interval_sec != rhs.__isset.new_backup_interval_sec) + return false; + else if (__isset.new_backup_interval_sec && + !(new_backup_interval_sec == rhs.new_backup_interval_sec)) + return false; + if (__isset.backup_history_count_to_keep != rhs.__isset.backup_history_count_to_keep) + return false; + else if (__isset.backup_history_count_to_keep && + !(backup_history_count_to_keep == rhs.backup_history_count_to_keep)) + return false; + if (__isset.is_disable != rhs.__isset.is_disable) + return false; + else if (__isset.is_disable && !(is_disable == rhs.is_disable)) + return false; + if (__isset.start_time != rhs.__isset.start_time) + return false; + else if (__isset.start_time && !(start_time == rhs.start_time)) + return false; + return true; + } + bool operator!=(const configuration_modify_backup_policy_request &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_modify_backup_policy_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; -void swap(configuration_modify_backup_policy_request &a, configuration_modify_backup_policy_request &b); +void swap(configuration_modify_backup_policy_request &a, + configuration_modify_backup_policy_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_modify_backup_policy_request& obj) +inline std::ostream &operator<<(std::ostream &out, + const configuration_modify_backup_policy_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_modify_backup_policy_response__isset { - _configuration_modify_backup_policy_response__isset() : err(false), hint_message(false) {} - bool err :1; - bool hint_message :1; +typedef struct _configuration_modify_backup_policy_response__isset +{ + _configuration_modify_backup_policy_response__isset() : err(false), hint_message(false) {} + bool err : 1; + bool hint_message : 1; } _configuration_modify_backup_policy_response__isset; -class configuration_modify_backup_policy_response { - public: - - configuration_modify_backup_policy_response(const configuration_modify_backup_policy_response&); - configuration_modify_backup_policy_response(configuration_modify_backup_policy_response&&); - configuration_modify_backup_policy_response& operator=(const configuration_modify_backup_policy_response&); - configuration_modify_backup_policy_response& operator=(configuration_modify_backup_policy_response&&); - configuration_modify_backup_policy_response() : hint_message() { - } - - virtual ~configuration_modify_backup_policy_response() throw(); - ::dsn::error_code err; - std::string hint_message; - - _configuration_modify_backup_policy_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - void __set_hint_message(const std::string& val); - - bool operator == (const configuration_modify_backup_policy_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(hint_message == rhs.hint_message)) - return false; - return true; - } - bool operator != (const configuration_modify_backup_policy_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_modify_backup_policy_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_modify_backup_policy_response +{ +public: + configuration_modify_backup_policy_response( + const configuration_modify_backup_policy_response &); + configuration_modify_backup_policy_response(configuration_modify_backup_policy_response &&); + configuration_modify_backup_policy_response & + operator=(const configuration_modify_backup_policy_response &); + configuration_modify_backup_policy_response & + operator=(configuration_modify_backup_policy_response &&); + configuration_modify_backup_policy_response() : hint_message() {} + + virtual ~configuration_modify_backup_policy_response() throw(); + ::dsn::error_code err; + std::string hint_message; + + _configuration_modify_backup_policy_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_hint_message(const std::string &val); + + bool operator==(const configuration_modify_backup_policy_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(hint_message == rhs.hint_message)) + return false; + return true; + } + bool operator!=(const configuration_modify_backup_policy_response &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_modify_backup_policy_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; -void swap(configuration_modify_backup_policy_response &a, configuration_modify_backup_policy_response &b); +void swap(configuration_modify_backup_policy_response &a, + configuration_modify_backup_policy_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_modify_backup_policy_response& obj) +inline std::ostream &operator<<(std::ostream &out, + const configuration_modify_backup_policy_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_add_backup_policy_request__isset { - _configuration_add_backup_policy_request__isset() : backup_provider_type(false), policy_name(false), app_ids(false), backup_interval_seconds(false), backup_history_count_to_keep(false), start_time(false) {} - bool backup_provider_type :1; - bool policy_name :1; - bool app_ids :1; - bool backup_interval_seconds :1; - bool backup_history_count_to_keep :1; - bool start_time :1; +typedef struct _configuration_add_backup_policy_request__isset +{ + _configuration_add_backup_policy_request__isset() + : backup_provider_type(false), + policy_name(false), + app_ids(false), + backup_interval_seconds(false), + backup_history_count_to_keep(false), + start_time(false) + { + } + bool backup_provider_type : 1; + bool policy_name : 1; + bool app_ids : 1; + bool backup_interval_seconds : 1; + bool backup_history_count_to_keep : 1; + bool start_time : 1; } _configuration_add_backup_policy_request__isset; -class configuration_add_backup_policy_request { - public: - - configuration_add_backup_policy_request(const configuration_add_backup_policy_request&); - configuration_add_backup_policy_request(configuration_add_backup_policy_request&&); - configuration_add_backup_policy_request& operator=(const configuration_add_backup_policy_request&); - configuration_add_backup_policy_request& operator=(configuration_add_backup_policy_request&&); - configuration_add_backup_policy_request() : backup_provider_type(), policy_name(), backup_interval_seconds(0), backup_history_count_to_keep(0), start_time() { - } - - virtual ~configuration_add_backup_policy_request() throw(); - std::string backup_provider_type; - std::string policy_name; - std::vector app_ids; - int64_t backup_interval_seconds; - int32_t backup_history_count_to_keep; - std::string start_time; - - _configuration_add_backup_policy_request__isset __isset; - - void __set_backup_provider_type(const std::string& val); - - void __set_policy_name(const std::string& val); - - void __set_app_ids(const std::vector & val); - - void __set_backup_interval_seconds(const int64_t val); - - void __set_backup_history_count_to_keep(const int32_t val); - - void __set_start_time(const std::string& val); - - bool operator == (const configuration_add_backup_policy_request & rhs) const - { - if (!(backup_provider_type == rhs.backup_provider_type)) - return false; - if (!(policy_name == rhs.policy_name)) - return false; - if (!(app_ids == rhs.app_ids)) - return false; - if (!(backup_interval_seconds == rhs.backup_interval_seconds)) - return false; - if (!(backup_history_count_to_keep == rhs.backup_history_count_to_keep)) - return false; - if (!(start_time == rhs.start_time)) - return false; - return true; - } - bool operator != (const configuration_add_backup_policy_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_add_backup_policy_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_add_backup_policy_request +{ +public: + configuration_add_backup_policy_request(const configuration_add_backup_policy_request &); + configuration_add_backup_policy_request(configuration_add_backup_policy_request &&); + configuration_add_backup_policy_request & + operator=(const configuration_add_backup_policy_request &); + configuration_add_backup_policy_request &operator=(configuration_add_backup_policy_request &&); + configuration_add_backup_policy_request() + : backup_provider_type(), + policy_name(), + backup_interval_seconds(0), + backup_history_count_to_keep(0), + start_time() + { + } + + virtual ~configuration_add_backup_policy_request() throw(); + std::string backup_provider_type; + std::string policy_name; + std::vector app_ids; + int64_t backup_interval_seconds; + int32_t backup_history_count_to_keep; + std::string start_time; + + _configuration_add_backup_policy_request__isset __isset; + + void __set_backup_provider_type(const std::string &val); + + void __set_policy_name(const std::string &val); + + void __set_app_ids(const std::vector &val); + + void __set_backup_interval_seconds(const int64_t val); + + void __set_backup_history_count_to_keep(const int32_t val); + + void __set_start_time(const std::string &val); + + bool operator==(const configuration_add_backup_policy_request &rhs) const + { + if (!(backup_provider_type == rhs.backup_provider_type)) + return false; + if (!(policy_name == rhs.policy_name)) + return false; + if (!(app_ids == rhs.app_ids)) + return false; + if (!(backup_interval_seconds == rhs.backup_interval_seconds)) + return false; + if (!(backup_history_count_to_keep == rhs.backup_history_count_to_keep)) + return false; + if (!(start_time == rhs.start_time)) + return false; + return true; + } + bool operator!=(const configuration_add_backup_policy_request &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_add_backup_policy_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_add_backup_policy_request &a, configuration_add_backup_policy_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_add_backup_policy_request& obj) +inline std::ostream &operator<<(std::ostream &out, + const configuration_add_backup_policy_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_add_backup_policy_response__isset { - _configuration_add_backup_policy_response__isset() : err(false), hint_message(false) {} - bool err :1; - bool hint_message :1; +typedef struct _configuration_add_backup_policy_response__isset +{ + _configuration_add_backup_policy_response__isset() : err(false), hint_message(false) {} + bool err : 1; + bool hint_message : 1; } _configuration_add_backup_policy_response__isset; -class configuration_add_backup_policy_response { - public: - - configuration_add_backup_policy_response(const configuration_add_backup_policy_response&); - configuration_add_backup_policy_response(configuration_add_backup_policy_response&&); - configuration_add_backup_policy_response& operator=(const configuration_add_backup_policy_response&); - configuration_add_backup_policy_response& operator=(configuration_add_backup_policy_response&&); - configuration_add_backup_policy_response() : hint_message() { - } - - virtual ~configuration_add_backup_policy_response() throw(); - ::dsn::error_code err; - std::string hint_message; - - _configuration_add_backup_policy_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - void __set_hint_message(const std::string& val); - - bool operator == (const configuration_add_backup_policy_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(hint_message == rhs.hint_message)) - return false; - return true; - } - bool operator != (const configuration_add_backup_policy_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_add_backup_policy_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_add_backup_policy_response +{ +public: + configuration_add_backup_policy_response(const configuration_add_backup_policy_response &); + configuration_add_backup_policy_response(configuration_add_backup_policy_response &&); + configuration_add_backup_policy_response & + operator=(const configuration_add_backup_policy_response &); + configuration_add_backup_policy_response & + operator=(configuration_add_backup_policy_response &&); + configuration_add_backup_policy_response() : hint_message() {} + + virtual ~configuration_add_backup_policy_response() throw(); + ::dsn::error_code err; + std::string hint_message; + + _configuration_add_backup_policy_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_hint_message(const std::string &val); + + bool operator==(const configuration_add_backup_policy_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(hint_message == rhs.hint_message)) + return false; + return true; + } + bool operator!=(const configuration_add_backup_policy_response &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_add_backup_policy_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_add_backup_policy_response &a, configuration_add_backup_policy_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_add_backup_policy_response& obj) +inline std::ostream &operator<<(std::ostream &out, + const configuration_add_backup_policy_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _policy_entry__isset { - _policy_entry__isset() : policy_name(false), backup_provider_type(false), backup_interval_seconds(false), app_ids(false), backup_history_count_to_keep(false), start_time(false), is_disable(false) {} - bool policy_name :1; - bool backup_provider_type :1; - bool backup_interval_seconds :1; - bool app_ids :1; - bool backup_history_count_to_keep :1; - bool start_time :1; - bool is_disable :1; +typedef struct _policy_entry__isset +{ + _policy_entry__isset() + : policy_name(false), + backup_provider_type(false), + backup_interval_seconds(false), + app_ids(false), + backup_history_count_to_keep(false), + start_time(false), + is_disable(false) + { + } + bool policy_name : 1; + bool backup_provider_type : 1; + bool backup_interval_seconds : 1; + bool app_ids : 1; + bool backup_history_count_to_keep : 1; + bool start_time : 1; + bool is_disable : 1; } _policy_entry__isset; -class policy_entry { - public: - - policy_entry(const policy_entry&); - policy_entry(policy_entry&&); - policy_entry& operator=(const policy_entry&); - policy_entry& operator=(policy_entry&&); - policy_entry() : policy_name(), backup_provider_type(), backup_interval_seconds(), backup_history_count_to_keep(0), start_time(), is_disable(0) { - } - - virtual ~policy_entry() throw(); - std::string policy_name; - std::string backup_provider_type; - std::string backup_interval_seconds; - std::set app_ids; - int32_t backup_history_count_to_keep; - std::string start_time; - bool is_disable; - - _policy_entry__isset __isset; - - void __set_policy_name(const std::string& val); - - void __set_backup_provider_type(const std::string& val); - - void __set_backup_interval_seconds(const std::string& val); - - void __set_app_ids(const std::set & val); - - void __set_backup_history_count_to_keep(const int32_t val); - - void __set_start_time(const std::string& val); - - void __set_is_disable(const bool val); - - bool operator == (const policy_entry & rhs) const - { - if (!(policy_name == rhs.policy_name)) - return false; - if (!(backup_provider_type == rhs.backup_provider_type)) - return false; - if (!(backup_interval_seconds == rhs.backup_interval_seconds)) - return false; - if (!(app_ids == rhs.app_ids)) - return false; - if (!(backup_history_count_to_keep == rhs.backup_history_count_to_keep)) - return false; - if (!(start_time == rhs.start_time)) - return false; - if (!(is_disable == rhs.is_disable)) - return false; - return true; - } - bool operator != (const policy_entry &rhs) const { - return !(*this == rhs); - } - - bool operator < (const policy_entry & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class policy_entry +{ +public: + policy_entry(const policy_entry &); + policy_entry(policy_entry &&); + policy_entry &operator=(const policy_entry &); + policy_entry &operator=(policy_entry &&); + policy_entry() + : policy_name(), + backup_provider_type(), + backup_interval_seconds(), + backup_history_count_to_keep(0), + start_time(), + is_disable(0) + { + } + + virtual ~policy_entry() throw(); + std::string policy_name; + std::string backup_provider_type; + std::string backup_interval_seconds; + std::set app_ids; + int32_t backup_history_count_to_keep; + std::string start_time; + bool is_disable; + + _policy_entry__isset __isset; + + void __set_policy_name(const std::string &val); + + void __set_backup_provider_type(const std::string &val); + + void __set_backup_interval_seconds(const std::string &val); + + void __set_app_ids(const std::set &val); + + void __set_backup_history_count_to_keep(const int32_t val); + + void __set_start_time(const std::string &val); + + void __set_is_disable(const bool val); + + bool operator==(const policy_entry &rhs) const + { + if (!(policy_name == rhs.policy_name)) + return false; + if (!(backup_provider_type == rhs.backup_provider_type)) + return false; + if (!(backup_interval_seconds == rhs.backup_interval_seconds)) + return false; + if (!(app_ids == rhs.app_ids)) + return false; + if (!(backup_history_count_to_keep == rhs.backup_history_count_to_keep)) + return false; + if (!(start_time == rhs.start_time)) + return false; + if (!(is_disable == rhs.is_disable)) + return false; + return true; + } + bool operator!=(const policy_entry &rhs) const { return !(*this == rhs); } + + bool operator<(const policy_entry &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(policy_entry &a, policy_entry &b); -inline std::ostream& operator<<(std::ostream& out, const policy_entry& obj) +inline std::ostream &operator<<(std::ostream &out, const policy_entry &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _backup_entry__isset { - _backup_entry__isset() : backup_id(false), start_time_ms(false), end_time_ms(false), app_ids(false) {} - bool backup_id :1; - bool start_time_ms :1; - bool end_time_ms :1; - bool app_ids :1; +typedef struct _backup_entry__isset +{ + _backup_entry__isset() + : backup_id(false), start_time_ms(false), end_time_ms(false), app_ids(false) + { + } + bool backup_id : 1; + bool start_time_ms : 1; + bool end_time_ms : 1; + bool app_ids : 1; } _backup_entry__isset; -class backup_entry { - public: - - backup_entry(const backup_entry&); - backup_entry(backup_entry&&); - backup_entry& operator=(const backup_entry&); - backup_entry& operator=(backup_entry&&); - backup_entry() : backup_id(0), start_time_ms(0), end_time_ms(0) { - } +class backup_entry +{ +public: + backup_entry(const backup_entry &); + backup_entry(backup_entry &&); + backup_entry &operator=(const backup_entry &); + backup_entry &operator=(backup_entry &&); + backup_entry() : backup_id(0), start_time_ms(0), end_time_ms(0) {} - virtual ~backup_entry() throw(); - int64_t backup_id; - int64_t start_time_ms; - int64_t end_time_ms; - std::set app_ids; + virtual ~backup_entry() throw(); + int64_t backup_id; + int64_t start_time_ms; + int64_t end_time_ms; + std::set app_ids; - _backup_entry__isset __isset; + _backup_entry__isset __isset; - void __set_backup_id(const int64_t val); + void __set_backup_id(const int64_t val); - void __set_start_time_ms(const int64_t val); + void __set_start_time_ms(const int64_t val); - void __set_end_time_ms(const int64_t val); + void __set_end_time_ms(const int64_t val); - void __set_app_ids(const std::set & val); + void __set_app_ids(const std::set &val); - bool operator == (const backup_entry & rhs) const - { - if (!(backup_id == rhs.backup_id)) - return false; - if (!(start_time_ms == rhs.start_time_ms)) - return false; - if (!(end_time_ms == rhs.end_time_ms)) - return false; - if (!(app_ids == rhs.app_ids)) - return false; - return true; - } - bool operator != (const backup_entry &rhs) const { - return !(*this == rhs); - } + bool operator==(const backup_entry &rhs) const + { + if (!(backup_id == rhs.backup_id)) + return false; + if (!(start_time_ms == rhs.start_time_ms)) + return false; + if (!(end_time_ms == rhs.end_time_ms)) + return false; + if (!(app_ids == rhs.app_ids)) + return false; + return true; + } + bool operator!=(const backup_entry &rhs) const { return !(*this == rhs); } - bool operator < (const backup_entry & ) const; + bool operator<(const backup_entry &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(backup_entry &a, backup_entry &b); -inline std::ostream& operator<<(std::ostream& out, const backup_entry& obj) +inline std::ostream &operator<<(std::ostream &out, const backup_entry &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_backup_policy_request__isset { - _configuration_query_backup_policy_request__isset() : policy_names(false), backup_info_count(false) {} - bool policy_names :1; - bool backup_info_count :1; +typedef struct _configuration_query_backup_policy_request__isset +{ + _configuration_query_backup_policy_request__isset() + : policy_names(false), backup_info_count(false) + { + } + bool policy_names : 1; + bool backup_info_count : 1; } _configuration_query_backup_policy_request__isset; -class configuration_query_backup_policy_request { - public: - - configuration_query_backup_policy_request(const configuration_query_backup_policy_request&); - configuration_query_backup_policy_request(configuration_query_backup_policy_request&&); - configuration_query_backup_policy_request& operator=(const configuration_query_backup_policy_request&); - configuration_query_backup_policy_request& operator=(configuration_query_backup_policy_request&&); - configuration_query_backup_policy_request() : backup_info_count(0) { - } - - virtual ~configuration_query_backup_policy_request() throw(); - std::vector policy_names; - int32_t backup_info_count; - - _configuration_query_backup_policy_request__isset __isset; - - void __set_policy_names(const std::vector & val); - - void __set_backup_info_count(const int32_t val); - - bool operator == (const configuration_query_backup_policy_request & rhs) const - { - if (!(policy_names == rhs.policy_names)) - return false; - if (!(backup_info_count == rhs.backup_info_count)) - return false; - return true; - } - bool operator != (const configuration_query_backup_policy_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_query_backup_policy_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_query_backup_policy_request +{ +public: + configuration_query_backup_policy_request(const configuration_query_backup_policy_request &); + configuration_query_backup_policy_request(configuration_query_backup_policy_request &&); + configuration_query_backup_policy_request & + operator=(const configuration_query_backup_policy_request &); + configuration_query_backup_policy_request & + operator=(configuration_query_backup_policy_request &&); + configuration_query_backup_policy_request() : backup_info_count(0) {} + + virtual ~configuration_query_backup_policy_request() throw(); + std::vector policy_names; + int32_t backup_info_count; + + _configuration_query_backup_policy_request__isset __isset; + + void __set_policy_names(const std::vector &val); + + void __set_backup_info_count(const int32_t val); + + bool operator==(const configuration_query_backup_policy_request &rhs) const + { + if (!(policy_names == rhs.policy_names)) + return false; + if (!(backup_info_count == rhs.backup_info_count)) + return false; + return true; + } + bool operator!=(const configuration_query_backup_policy_request &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_query_backup_policy_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; -void swap(configuration_query_backup_policy_request &a, configuration_query_backup_policy_request &b); +void swap(configuration_query_backup_policy_request &a, + configuration_query_backup_policy_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_query_backup_policy_request& obj) +inline std::ostream &operator<<(std::ostream &out, + const configuration_query_backup_policy_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_backup_policy_response__isset { - _configuration_query_backup_policy_response__isset() : err(false), policys(false), backup_infos(false), hint_msg(false) {} - bool err :1; - bool policys :1; - bool backup_infos :1; - bool hint_msg :1; +typedef struct _configuration_query_backup_policy_response__isset +{ + _configuration_query_backup_policy_response__isset() + : err(false), policys(false), backup_infos(false), hint_msg(false) + { + } + bool err : 1; + bool policys : 1; + bool backup_infos : 1; + bool hint_msg : 1; } _configuration_query_backup_policy_response__isset; -class configuration_query_backup_policy_response { - public: - - configuration_query_backup_policy_response(const configuration_query_backup_policy_response&); - configuration_query_backup_policy_response(configuration_query_backup_policy_response&&); - configuration_query_backup_policy_response& operator=(const configuration_query_backup_policy_response&); - configuration_query_backup_policy_response& operator=(configuration_query_backup_policy_response&&); - configuration_query_backup_policy_response() : hint_msg() { - } - - virtual ~configuration_query_backup_policy_response() throw(); - ::dsn::error_code err; - std::vector policys; - std::vector > backup_infos; - std::string hint_msg; - - _configuration_query_backup_policy_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - void __set_policys(const std::vector & val); - - void __set_backup_infos(const std::vector > & val); - - void __set_hint_msg(const std::string& val); - - bool operator == (const configuration_query_backup_policy_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(policys == rhs.policys)) - return false; - if (!(backup_infos == rhs.backup_infos)) - return false; - if (__isset.hint_msg != rhs.__isset.hint_msg) - return false; - else if (__isset.hint_msg && !(hint_msg == rhs.hint_msg)) - return false; - return true; - } - bool operator != (const configuration_query_backup_policy_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_query_backup_policy_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_query_backup_policy_response +{ +public: + configuration_query_backup_policy_response(const configuration_query_backup_policy_response &); + configuration_query_backup_policy_response(configuration_query_backup_policy_response &&); + configuration_query_backup_policy_response & + operator=(const configuration_query_backup_policy_response &); + configuration_query_backup_policy_response & + operator=(configuration_query_backup_policy_response &&); + configuration_query_backup_policy_response() : hint_msg() {} + + virtual ~configuration_query_backup_policy_response() throw(); + ::dsn::error_code err; + std::vector policys; + std::vector> backup_infos; + std::string hint_msg; + + _configuration_query_backup_policy_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_policys(const std::vector &val); + + void __set_backup_infos(const std::vector> &val); + + void __set_hint_msg(const std::string &val); + + bool operator==(const configuration_query_backup_policy_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(policys == rhs.policys)) + return false; + if (!(backup_infos == rhs.backup_infos)) + return false; + if (__isset.hint_msg != rhs.__isset.hint_msg) + return false; + else if (__isset.hint_msg && !(hint_msg == rhs.hint_msg)) + return false; + return true; + } + bool operator!=(const configuration_query_backup_policy_response &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_query_backup_policy_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; -void swap(configuration_query_backup_policy_response &a, configuration_query_backup_policy_response &b); +void swap(configuration_query_backup_policy_response &a, + configuration_query_backup_policy_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_query_backup_policy_response& obj) +inline std::ostream &operator<<(std::ostream &out, + const configuration_query_backup_policy_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_report_restore_status_request__isset { - _configuration_report_restore_status_request__isset() : pid(false), restore_status(false), progress(false), reason(false) {} - bool pid :1; - bool restore_status :1; - bool progress :1; - bool reason :1; +typedef struct _configuration_report_restore_status_request__isset +{ + _configuration_report_restore_status_request__isset() + : pid(false), restore_status(false), progress(false), reason(false) + { + } + bool pid : 1; + bool restore_status : 1; + bool progress : 1; + bool reason : 1; } _configuration_report_restore_status_request__isset; -class configuration_report_restore_status_request { - public: - - configuration_report_restore_status_request(const configuration_report_restore_status_request&); - configuration_report_restore_status_request(configuration_report_restore_status_request&&); - configuration_report_restore_status_request& operator=(const configuration_report_restore_status_request&); - configuration_report_restore_status_request& operator=(configuration_report_restore_status_request&&); - configuration_report_restore_status_request() : progress(0), reason() { - } - - virtual ~configuration_report_restore_status_request() throw(); - ::dsn::gpid pid; - ::dsn::error_code restore_status; - int32_t progress; - std::string reason; - - _configuration_report_restore_status_request__isset __isset; - - void __set_pid(const ::dsn::gpid& val); - - void __set_restore_status(const ::dsn::error_code& val); - - void __set_progress(const int32_t val); - - void __set_reason(const std::string& val); - - bool operator == (const configuration_report_restore_status_request & rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(restore_status == rhs.restore_status)) - return false; - if (!(progress == rhs.progress)) - return false; - if (__isset.reason != rhs.__isset.reason) - return false; - else if (__isset.reason && !(reason == rhs.reason)) - return false; - return true; - } - bool operator != (const configuration_report_restore_status_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_report_restore_status_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_report_restore_status_request +{ +public: + configuration_report_restore_status_request( + const configuration_report_restore_status_request &); + configuration_report_restore_status_request(configuration_report_restore_status_request &&); + configuration_report_restore_status_request & + operator=(const configuration_report_restore_status_request &); + configuration_report_restore_status_request & + operator=(configuration_report_restore_status_request &&); + configuration_report_restore_status_request() : progress(0), reason() {} + + virtual ~configuration_report_restore_status_request() throw(); + ::dsn::gpid pid; + ::dsn::error_code restore_status; + int32_t progress; + std::string reason; + + _configuration_report_restore_status_request__isset __isset; + + void __set_pid(const ::dsn::gpid &val); + + void __set_restore_status(const ::dsn::error_code &val); + + void __set_progress(const int32_t val); + + void __set_reason(const std::string &val); + + bool operator==(const configuration_report_restore_status_request &rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(restore_status == rhs.restore_status)) + return false; + if (!(progress == rhs.progress)) + return false; + if (__isset.reason != rhs.__isset.reason) + return false; + else if (__isset.reason && !(reason == rhs.reason)) + return false; + return true; + } + bool operator!=(const configuration_report_restore_status_request &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_report_restore_status_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; -void swap(configuration_report_restore_status_request &a, configuration_report_restore_status_request &b); +void swap(configuration_report_restore_status_request &a, + configuration_report_restore_status_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_report_restore_status_request& obj) +inline std::ostream &operator<<(std::ostream &out, + const configuration_report_restore_status_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_report_restore_status_response__isset { - _configuration_report_restore_status_response__isset() : err(false) {} - bool err :1; +typedef struct _configuration_report_restore_status_response__isset +{ + _configuration_report_restore_status_response__isset() : err(false) {} + bool err : 1; } _configuration_report_restore_status_response__isset; -class configuration_report_restore_status_response { - public: - - configuration_report_restore_status_response(const configuration_report_restore_status_response&); - configuration_report_restore_status_response(configuration_report_restore_status_response&&); - configuration_report_restore_status_response& operator=(const configuration_report_restore_status_response&); - configuration_report_restore_status_response& operator=(configuration_report_restore_status_response&&); - configuration_report_restore_status_response() { - } - - virtual ~configuration_report_restore_status_response() throw(); - ::dsn::error_code err; - - _configuration_report_restore_status_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - bool operator == (const configuration_report_restore_status_response & rhs) const - { - if (!(err == rhs.err)) - return false; - return true; - } - bool operator != (const configuration_report_restore_status_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_report_restore_status_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_report_restore_status_response +{ +public: + configuration_report_restore_status_response( + const configuration_report_restore_status_response &); + configuration_report_restore_status_response(configuration_report_restore_status_response &&); + configuration_report_restore_status_response & + operator=(const configuration_report_restore_status_response &); + configuration_report_restore_status_response & + operator=(configuration_report_restore_status_response &&); + configuration_report_restore_status_response() {} + + virtual ~configuration_report_restore_status_response() throw(); + ::dsn::error_code err; + + _configuration_report_restore_status_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + bool operator==(const configuration_report_restore_status_response &rhs) const + { + if (!(err == rhs.err)) + return false; + return true; + } + bool operator!=(const configuration_report_restore_status_response &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_report_restore_status_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; -void swap(configuration_report_restore_status_response &a, configuration_report_restore_status_response &b); +void swap(configuration_report_restore_status_response &a, + configuration_report_restore_status_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_report_restore_status_response& obj) +inline std::ostream &operator<<(std::ostream &out, + const configuration_report_restore_status_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_restore_request__isset { - _configuration_query_restore_request__isset() : restore_app_id(false) {} - bool restore_app_id :1; +typedef struct _configuration_query_restore_request__isset +{ + _configuration_query_restore_request__isset() : restore_app_id(false) {} + bool restore_app_id : 1; } _configuration_query_restore_request__isset; -class configuration_query_restore_request { - public: - - configuration_query_restore_request(const configuration_query_restore_request&); - configuration_query_restore_request(configuration_query_restore_request&&); - configuration_query_restore_request& operator=(const configuration_query_restore_request&); - configuration_query_restore_request& operator=(configuration_query_restore_request&&); - configuration_query_restore_request() : restore_app_id(0) { - } +class configuration_query_restore_request +{ +public: + configuration_query_restore_request(const configuration_query_restore_request &); + configuration_query_restore_request(configuration_query_restore_request &&); + configuration_query_restore_request &operator=(const configuration_query_restore_request &); + configuration_query_restore_request &operator=(configuration_query_restore_request &&); + configuration_query_restore_request() : restore_app_id(0) {} - virtual ~configuration_query_restore_request() throw(); - int32_t restore_app_id; + virtual ~configuration_query_restore_request() throw(); + int32_t restore_app_id; - _configuration_query_restore_request__isset __isset; + _configuration_query_restore_request__isset __isset; - void __set_restore_app_id(const int32_t val); + void __set_restore_app_id(const int32_t val); - bool operator == (const configuration_query_restore_request & rhs) const - { - if (!(restore_app_id == rhs.restore_app_id)) - return false; - return true; - } - bool operator != (const configuration_query_restore_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const configuration_query_restore_request &rhs) const + { + if (!(restore_app_id == rhs.restore_app_id)) + return false; + return true; + } + bool operator!=(const configuration_query_restore_request &rhs) const + { + return !(*this == rhs); + } - bool operator < (const configuration_query_restore_request & ) const; + bool operator<(const configuration_query_restore_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(configuration_query_restore_request &a, configuration_query_restore_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_query_restore_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_query_restore_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_restore_response__isset { - _configuration_query_restore_response__isset() : err(false), restore_status(false), restore_progress(false) {} - bool err :1; - bool restore_status :1; - bool restore_progress :1; +typedef struct _configuration_query_restore_response__isset +{ + _configuration_query_restore_response__isset() + : err(false), restore_status(false), restore_progress(false) + { + } + bool err : 1; + bool restore_status : 1; + bool restore_progress : 1; } _configuration_query_restore_response__isset; -class configuration_query_restore_response { - public: - - configuration_query_restore_response(const configuration_query_restore_response&); - configuration_query_restore_response(configuration_query_restore_response&&); - configuration_query_restore_response& operator=(const configuration_query_restore_response&); - configuration_query_restore_response& operator=(configuration_query_restore_response&&); - configuration_query_restore_response() { - } - - virtual ~configuration_query_restore_response() throw(); - ::dsn::error_code err; - std::vector< ::dsn::error_code> restore_status; - std::vector restore_progress; - - _configuration_query_restore_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - void __set_restore_status(const std::vector< ::dsn::error_code> & val); - - void __set_restore_progress(const std::vector & val); - - bool operator == (const configuration_query_restore_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(restore_status == rhs.restore_status)) - return false; - if (!(restore_progress == rhs.restore_progress)) - return false; - return true; - } - bool operator != (const configuration_query_restore_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_query_restore_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_query_restore_response +{ +public: + configuration_query_restore_response(const configuration_query_restore_response &); + configuration_query_restore_response(configuration_query_restore_response &&); + configuration_query_restore_response &operator=(const configuration_query_restore_response &); + configuration_query_restore_response &operator=(configuration_query_restore_response &&); + configuration_query_restore_response() {} + + virtual ~configuration_query_restore_response() throw(); + ::dsn::error_code err; + std::vector<::dsn::error_code> restore_status; + std::vector restore_progress; + + _configuration_query_restore_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_restore_status(const std::vector<::dsn::error_code> &val); + + void __set_restore_progress(const std::vector &val); + + bool operator==(const configuration_query_restore_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(restore_status == rhs.restore_status)) + return false; + if (!(restore_progress == rhs.restore_progress)) + return false; + return true; + } + bool operator!=(const configuration_query_restore_response &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_query_restore_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_query_restore_response &a, configuration_query_restore_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_query_restore_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_query_restore_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _file_meta__isset { - _file_meta__isset() : name(false), size(false), md5(false) {} - bool name :1; - bool size :1; - bool md5 :1; +typedef struct _file_meta__isset +{ + _file_meta__isset() : name(false), size(false), md5(false) {} + bool name : 1; + bool size : 1; + bool md5 : 1; } _file_meta__isset; -class file_meta { - public: - - file_meta(const file_meta&); - file_meta(file_meta&&); - file_meta& operator=(const file_meta&); - file_meta& operator=(file_meta&&); - file_meta() : name(), size(0), md5() { - } +class file_meta +{ +public: + file_meta(const file_meta &); + file_meta(file_meta &&); + file_meta &operator=(const file_meta &); + file_meta &operator=(file_meta &&); + file_meta() : name(), size(0), md5() {} - virtual ~file_meta() throw(); - std::string name; - int64_t size; - std::string md5; + virtual ~file_meta() throw(); + std::string name; + int64_t size; + std::string md5; - _file_meta__isset __isset; + _file_meta__isset __isset; - void __set_name(const std::string& val); + void __set_name(const std::string &val); - void __set_size(const int64_t val); + void __set_size(const int64_t val); - void __set_md5(const std::string& val); + void __set_md5(const std::string &val); - bool operator == (const file_meta & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(size == rhs.size)) - return false; - if (!(md5 == rhs.md5)) - return false; - return true; - } - bool operator != (const file_meta &rhs) const { - return !(*this == rhs); - } + bool operator==(const file_meta &rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(size == rhs.size)) + return false; + if (!(md5 == rhs.md5)) + return false; + return true; + } + bool operator!=(const file_meta &rhs) const { return !(*this == rhs); } - bool operator < (const file_meta & ) const; + bool operator<(const file_meta &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(file_meta &a, file_meta &b); -inline std::ostream& operator<<(std::ostream& out, const file_meta& obj) +inline std::ostream &operator<<(std::ostream &out, const file_meta &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_update_app_env_request__isset { - _configuration_update_app_env_request__isset() : app_name(false), op(true), keys(false), values(false), clear_prefix(false) {} - bool app_name :1; - bool op :1; - bool keys :1; - bool values :1; - bool clear_prefix :1; +typedef struct _configuration_update_app_env_request__isset +{ + _configuration_update_app_env_request__isset() + : app_name(false), op(true), keys(false), values(false), clear_prefix(false) + { + } + bool app_name : 1; + bool op : 1; + bool keys : 1; + bool values : 1; + bool clear_prefix : 1; } _configuration_update_app_env_request__isset; -class configuration_update_app_env_request { - public: - - configuration_update_app_env_request(const configuration_update_app_env_request&); - configuration_update_app_env_request(configuration_update_app_env_request&&); - configuration_update_app_env_request& operator=(const configuration_update_app_env_request&); - configuration_update_app_env_request& operator=(configuration_update_app_env_request&&); - configuration_update_app_env_request() : app_name(), op((app_env_operation::type)0), clear_prefix() { - op = (app_env_operation::type)0; - - } - - virtual ~configuration_update_app_env_request() throw(); - std::string app_name; - app_env_operation::type op; - std::vector keys; - std::vector values; - std::string clear_prefix; - - _configuration_update_app_env_request__isset __isset; - - void __set_app_name(const std::string& val); - - void __set_op(const app_env_operation::type val); - - void __set_keys(const std::vector & val); - - void __set_values(const std::vector & val); - - void __set_clear_prefix(const std::string& val); - - bool operator == (const configuration_update_app_env_request & rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(op == rhs.op)) - return false; - if (__isset.keys != rhs.__isset.keys) - return false; - else if (__isset.keys && !(keys == rhs.keys)) - return false; - if (__isset.values != rhs.__isset.values) - return false; - else if (__isset.values && !(values == rhs.values)) - return false; - if (__isset.clear_prefix != rhs.__isset.clear_prefix) - return false; - else if (__isset.clear_prefix && !(clear_prefix == rhs.clear_prefix)) - return false; - return true; - } - bool operator != (const configuration_update_app_env_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_update_app_env_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_update_app_env_request +{ +public: + configuration_update_app_env_request(const configuration_update_app_env_request &); + configuration_update_app_env_request(configuration_update_app_env_request &&); + configuration_update_app_env_request &operator=(const configuration_update_app_env_request &); + configuration_update_app_env_request &operator=(configuration_update_app_env_request &&); + configuration_update_app_env_request() + : app_name(), op((app_env_operation::type)0), clear_prefix() + { + op = (app_env_operation::type)0; + } + + virtual ~configuration_update_app_env_request() throw(); + std::string app_name; + app_env_operation::type op; + std::vector keys; + std::vector values; + std::string clear_prefix; + + _configuration_update_app_env_request__isset __isset; + + void __set_app_name(const std::string &val); + + void __set_op(const app_env_operation::type val); + + void __set_keys(const std::vector &val); + + void __set_values(const std::vector &val); + + void __set_clear_prefix(const std::string &val); + + bool operator==(const configuration_update_app_env_request &rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(op == rhs.op)) + return false; + if (__isset.keys != rhs.__isset.keys) + return false; + else if (__isset.keys && !(keys == rhs.keys)) + return false; + if (__isset.values != rhs.__isset.values) + return false; + else if (__isset.values && !(values == rhs.values)) + return false; + if (__isset.clear_prefix != rhs.__isset.clear_prefix) + return false; + else if (__isset.clear_prefix && !(clear_prefix == rhs.clear_prefix)) + return false; + return true; + } + bool operator!=(const configuration_update_app_env_request &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_update_app_env_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_update_app_env_request &a, configuration_update_app_env_request &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_update_app_env_request& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_update_app_env_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_update_app_env_response__isset { - _configuration_update_app_env_response__isset() : err(false), hint_message(false) {} - bool err :1; - bool hint_message :1; +typedef struct _configuration_update_app_env_response__isset +{ + _configuration_update_app_env_response__isset() : err(false), hint_message(false) {} + bool err : 1; + bool hint_message : 1; } _configuration_update_app_env_response__isset; -class configuration_update_app_env_response { - public: - - configuration_update_app_env_response(const configuration_update_app_env_response&); - configuration_update_app_env_response(configuration_update_app_env_response&&); - configuration_update_app_env_response& operator=(const configuration_update_app_env_response&); - configuration_update_app_env_response& operator=(configuration_update_app_env_response&&); - configuration_update_app_env_response() : hint_message() { - } - - virtual ~configuration_update_app_env_response() throw(); - ::dsn::error_code err; - std::string hint_message; - - _configuration_update_app_env_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - void __set_hint_message(const std::string& val); - - bool operator == (const configuration_update_app_env_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(hint_message == rhs.hint_message)) - return false; - return true; - } - bool operator != (const configuration_update_app_env_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const configuration_update_app_env_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class configuration_update_app_env_response +{ +public: + configuration_update_app_env_response(const configuration_update_app_env_response &); + configuration_update_app_env_response(configuration_update_app_env_response &&); + configuration_update_app_env_response &operator=(const configuration_update_app_env_response &); + configuration_update_app_env_response &operator=(configuration_update_app_env_response &&); + configuration_update_app_env_response() : hint_message() {} + + virtual ~configuration_update_app_env_response() throw(); + ::dsn::error_code err; + std::string hint_message; + + _configuration_update_app_env_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_hint_message(const std::string &val); + + bool operator==(const configuration_update_app_env_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(hint_message == rhs.hint_message)) + return false; + return true; + } + bool operator!=(const configuration_update_app_env_response &rhs) const + { + return !(*this == rhs); + } + + bool operator<(const configuration_update_app_env_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(configuration_update_app_env_response &a, configuration_update_app_env_response &b); -inline std::ostream& operator<<(std::ostream& out, const configuration_update_app_env_response& obj) +inline std::ostream &operator<<(std::ostream &out, const configuration_update_app_env_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_add_request__isset { - _duplication_add_request__isset() : app_name(false), remote_cluster_name(false), freezed(false) {} - bool app_name :1; - bool remote_cluster_name :1; - bool freezed :1; +typedef struct _duplication_add_request__isset +{ + _duplication_add_request__isset() : app_name(false), remote_cluster_name(false), freezed(false) + { + } + bool app_name : 1; + bool remote_cluster_name : 1; + bool freezed : 1; } _duplication_add_request__isset; -class duplication_add_request { - public: - - duplication_add_request(const duplication_add_request&); - duplication_add_request(duplication_add_request&&); - duplication_add_request& operator=(const duplication_add_request&); - duplication_add_request& operator=(duplication_add_request&&); - duplication_add_request() : app_name(), remote_cluster_name(), freezed(0) { - } +class duplication_add_request +{ +public: + duplication_add_request(const duplication_add_request &); + duplication_add_request(duplication_add_request &&); + duplication_add_request &operator=(const duplication_add_request &); + duplication_add_request &operator=(duplication_add_request &&); + duplication_add_request() : app_name(), remote_cluster_name(), freezed(0) {} - virtual ~duplication_add_request() throw(); - std::string app_name; - std::string remote_cluster_name; - bool freezed; + virtual ~duplication_add_request() throw(); + std::string app_name; + std::string remote_cluster_name; + bool freezed; - _duplication_add_request__isset __isset; + _duplication_add_request__isset __isset; - void __set_app_name(const std::string& val); + void __set_app_name(const std::string &val); - void __set_remote_cluster_name(const std::string& val); + void __set_remote_cluster_name(const std::string &val); - void __set_freezed(const bool val); + void __set_freezed(const bool val); - bool operator == (const duplication_add_request & rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(remote_cluster_name == rhs.remote_cluster_name)) - return false; - if (!(freezed == rhs.freezed)) - return false; - return true; - } - bool operator != (const duplication_add_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const duplication_add_request &rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(remote_cluster_name == rhs.remote_cluster_name)) + return false; + if (!(freezed == rhs.freezed)) + return false; + return true; + } + bool operator!=(const duplication_add_request &rhs) const { return !(*this == rhs); } - bool operator < (const duplication_add_request & ) const; + bool operator<(const duplication_add_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(duplication_add_request &a, duplication_add_request &b); -inline std::ostream& operator<<(std::ostream& out, const duplication_add_request& obj) +inline std::ostream &operator<<(std::ostream &out, const duplication_add_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_add_response__isset { - _duplication_add_response__isset() : err(false), appid(false), dupid(false), hint(false) {} - bool err :1; - bool appid :1; - bool dupid :1; - bool hint :1; +typedef struct _duplication_add_response__isset +{ + _duplication_add_response__isset() : err(false), appid(false), dupid(false), hint(false) {} + bool err : 1; + bool appid : 1; + bool dupid : 1; + bool hint : 1; } _duplication_add_response__isset; -class duplication_add_response { - public: - - duplication_add_response(const duplication_add_response&); - duplication_add_response(duplication_add_response&&); - duplication_add_response& operator=(const duplication_add_response&); - duplication_add_response& operator=(duplication_add_response&&); - duplication_add_response() : appid(0), dupid(0), hint() { - } - - virtual ~duplication_add_response() throw(); - ::dsn::error_code err; - int32_t appid; - int32_t dupid; - std::string hint; - - _duplication_add_response__isset __isset; - - void __set_err(const ::dsn::error_code& val); - - void __set_appid(const int32_t val); - - void __set_dupid(const int32_t val); - - void __set_hint(const std::string& val); - - bool operator == (const duplication_add_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(appid == rhs.appid)) - return false; - if (!(dupid == rhs.dupid)) - return false; - if (__isset.hint != rhs.__isset.hint) - return false; - else if (__isset.hint && !(hint == rhs.hint)) - return false; - return true; - } - bool operator != (const duplication_add_response &rhs) const { - return !(*this == rhs); - } - - bool operator < (const duplication_add_response & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class duplication_add_response +{ +public: + duplication_add_response(const duplication_add_response &); + duplication_add_response(duplication_add_response &&); + duplication_add_response &operator=(const duplication_add_response &); + duplication_add_response &operator=(duplication_add_response &&); + duplication_add_response() : appid(0), dupid(0), hint() {} + + virtual ~duplication_add_response() throw(); + ::dsn::error_code err; + int32_t appid; + int32_t dupid; + std::string hint; + + _duplication_add_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_appid(const int32_t val); + + void __set_dupid(const int32_t val); + + void __set_hint(const std::string &val); + + bool operator==(const duplication_add_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(appid == rhs.appid)) + return false; + if (!(dupid == rhs.dupid)) + return false; + if (__isset.hint != rhs.__isset.hint) + return false; + else if (__isset.hint && !(hint == rhs.hint)) + return false; + return true; + } + bool operator!=(const duplication_add_response &rhs) const { return !(*this == rhs); } + + bool operator<(const duplication_add_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(duplication_add_response &a, duplication_add_response &b); -inline std::ostream& operator<<(std::ostream& out, const duplication_add_response& obj) +inline std::ostream &operator<<(std::ostream &out, const duplication_add_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_modify_request__isset { - _duplication_modify_request__isset() : app_name(false), dupid(false), status(false), fail_mode(false) {} - bool app_name :1; - bool dupid :1; - bool status :1; - bool fail_mode :1; +typedef struct _duplication_modify_request__isset +{ + _duplication_modify_request__isset() + : app_name(false), dupid(false), status(false), fail_mode(false) + { + } + bool app_name : 1; + bool dupid : 1; + bool status : 1; + bool fail_mode : 1; } _duplication_modify_request__isset; -class duplication_modify_request { - public: - - duplication_modify_request(const duplication_modify_request&); - duplication_modify_request(duplication_modify_request&&); - duplication_modify_request& operator=(const duplication_modify_request&); - duplication_modify_request& operator=(duplication_modify_request&&); - duplication_modify_request() : app_name(), dupid(0), status((duplication_status::type)0), fail_mode((duplication_fail_mode::type)0) { - } - - virtual ~duplication_modify_request() throw(); - std::string app_name; - int32_t dupid; - duplication_status::type status; - duplication_fail_mode::type fail_mode; - - _duplication_modify_request__isset __isset; - - void __set_app_name(const std::string& val); - - void __set_dupid(const int32_t val); - - void __set_status(const duplication_status::type val); - - void __set_fail_mode(const duplication_fail_mode::type val); - - bool operator == (const duplication_modify_request & rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(dupid == rhs.dupid)) - return false; - if (__isset.status != rhs.__isset.status) - return false; - else if (__isset.status && !(status == rhs.status)) - return false; - if (__isset.fail_mode != rhs.__isset.fail_mode) - return false; - else if (__isset.fail_mode && !(fail_mode == rhs.fail_mode)) - return false; - return true; - } - bool operator != (const duplication_modify_request &rhs) const { - return !(*this == rhs); - } - - bool operator < (const duplication_modify_request & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class duplication_modify_request +{ +public: + duplication_modify_request(const duplication_modify_request &); + duplication_modify_request(duplication_modify_request &&); + duplication_modify_request &operator=(const duplication_modify_request &); + duplication_modify_request &operator=(duplication_modify_request &&); + duplication_modify_request() + : app_name(), + dupid(0), + status((duplication_status::type)0), + fail_mode((duplication_fail_mode::type)0) + { + } + + virtual ~duplication_modify_request() throw(); + std::string app_name; + int32_t dupid; + duplication_status::type status; + duplication_fail_mode::type fail_mode; + + _duplication_modify_request__isset __isset; + + void __set_app_name(const std::string &val); + + void __set_dupid(const int32_t val); + + void __set_status(const duplication_status::type val); + + void __set_fail_mode(const duplication_fail_mode::type val); + + bool operator==(const duplication_modify_request &rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(dupid == rhs.dupid)) + return false; + if (__isset.status != rhs.__isset.status) + return false; + else if (__isset.status && !(status == rhs.status)) + return false; + if (__isset.fail_mode != rhs.__isset.fail_mode) + return false; + else if (__isset.fail_mode && !(fail_mode == rhs.fail_mode)) + return false; + return true; + } + bool operator!=(const duplication_modify_request &rhs) const { return !(*this == rhs); } + + bool operator<(const duplication_modify_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(duplication_modify_request &a, duplication_modify_request &b); -inline std::ostream& operator<<(std::ostream& out, const duplication_modify_request& obj) +inline std::ostream &operator<<(std::ostream &out, const duplication_modify_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_modify_response__isset { - _duplication_modify_response__isset() : err(false), appid(false) {} - bool err :1; - bool appid :1; +typedef struct _duplication_modify_response__isset +{ + _duplication_modify_response__isset() : err(false), appid(false) {} + bool err : 1; + bool appid : 1; } _duplication_modify_response__isset; -class duplication_modify_response { - public: - - duplication_modify_response(const duplication_modify_response&); - duplication_modify_response(duplication_modify_response&&); - duplication_modify_response& operator=(const duplication_modify_response&); - duplication_modify_response& operator=(duplication_modify_response&&); - duplication_modify_response() : appid(0) { - } +class duplication_modify_response +{ +public: + duplication_modify_response(const duplication_modify_response &); + duplication_modify_response(duplication_modify_response &&); + duplication_modify_response &operator=(const duplication_modify_response &); + duplication_modify_response &operator=(duplication_modify_response &&); + duplication_modify_response() : appid(0) {} - virtual ~duplication_modify_response() throw(); - ::dsn::error_code err; - int32_t appid; + virtual ~duplication_modify_response() throw(); + ::dsn::error_code err; + int32_t appid; - _duplication_modify_response__isset __isset; + _duplication_modify_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_appid(const int32_t val); + void __set_appid(const int32_t val); - bool operator == (const duplication_modify_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(appid == rhs.appid)) - return false; - return true; - } - bool operator != (const duplication_modify_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const duplication_modify_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(appid == rhs.appid)) + return false; + return true; + } + bool operator!=(const duplication_modify_response &rhs) const { return !(*this == rhs); } - bool operator < (const duplication_modify_response & ) const; + bool operator<(const duplication_modify_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(duplication_modify_response &a, duplication_modify_response &b); -inline std::ostream& operator<<(std::ostream& out, const duplication_modify_response& obj) +inline std::ostream &operator<<(std::ostream &out, const duplication_modify_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_entry__isset { - _duplication_entry__isset() : dupid(false), status(false), remote(false), create_ts(false), progress(false), fail_mode(false) {} - bool dupid :1; - bool status :1; - bool remote :1; - bool create_ts :1; - bool progress :1; - bool fail_mode :1; +typedef struct _duplication_entry__isset +{ + _duplication_entry__isset() + : dupid(false), + status(false), + remote(false), + create_ts(false), + progress(false), + fail_mode(false) + { + } + bool dupid : 1; + bool status : 1; + bool remote : 1; + bool create_ts : 1; + bool progress : 1; + bool fail_mode : 1; } _duplication_entry__isset; -class duplication_entry { - public: - - duplication_entry(const duplication_entry&); - duplication_entry(duplication_entry&&); - duplication_entry& operator=(const duplication_entry&); - duplication_entry& operator=(duplication_entry&&); - duplication_entry() : dupid(0), status((duplication_status::type)0), remote(), create_ts(0), fail_mode((duplication_fail_mode::type)0) { - } - - virtual ~duplication_entry() throw(); - int32_t dupid; - duplication_status::type status; - std::string remote; - int64_t create_ts; - std::map progress; - duplication_fail_mode::type fail_mode; - - _duplication_entry__isset __isset; - - void __set_dupid(const int32_t val); - - void __set_status(const duplication_status::type val); - - void __set_remote(const std::string& val); - - void __set_create_ts(const int64_t val); - - void __set_progress(const std::map & val); - - void __set_fail_mode(const duplication_fail_mode::type val); - - bool operator == (const duplication_entry & rhs) const - { - if (!(dupid == rhs.dupid)) - return false; - if (!(status == rhs.status)) - return false; - if (!(remote == rhs.remote)) - return false; - if (!(create_ts == rhs.create_ts)) - return false; - if (__isset.progress != rhs.__isset.progress) - return false; - else if (__isset.progress && !(progress == rhs.progress)) - return false; - if (__isset.fail_mode != rhs.__isset.fail_mode) - return false; - else if (__isset.fail_mode && !(fail_mode == rhs.fail_mode)) - return false; - return true; - } - bool operator != (const duplication_entry &rhs) const { - return !(*this == rhs); - } - - bool operator < (const duplication_entry & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class duplication_entry +{ +public: + duplication_entry(const duplication_entry &); + duplication_entry(duplication_entry &&); + duplication_entry &operator=(const duplication_entry &); + duplication_entry &operator=(duplication_entry &&); + duplication_entry() + : dupid(0), + status((duplication_status::type)0), + remote(), + create_ts(0), + fail_mode((duplication_fail_mode::type)0) + { + } + + virtual ~duplication_entry() throw(); + int32_t dupid; + duplication_status::type status; + std::string remote; + int64_t create_ts; + std::map progress; + duplication_fail_mode::type fail_mode; + + _duplication_entry__isset __isset; + + void __set_dupid(const int32_t val); + + void __set_status(const duplication_status::type val); + + void __set_remote(const std::string &val); + + void __set_create_ts(const int64_t val); + + void __set_progress(const std::map &val); + + void __set_fail_mode(const duplication_fail_mode::type val); + + bool operator==(const duplication_entry &rhs) const + { + if (!(dupid == rhs.dupid)) + return false; + if (!(status == rhs.status)) + return false; + if (!(remote == rhs.remote)) + return false; + if (!(create_ts == rhs.create_ts)) + return false; + if (__isset.progress != rhs.__isset.progress) + return false; + else if (__isset.progress && !(progress == rhs.progress)) + return false; + if (__isset.fail_mode != rhs.__isset.fail_mode) + return false; + else if (__isset.fail_mode && !(fail_mode == rhs.fail_mode)) + return false; + return true; + } + bool operator!=(const duplication_entry &rhs) const { return !(*this == rhs); } + + bool operator<(const duplication_entry &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(duplication_entry &a, duplication_entry &b); -inline std::ostream& operator<<(std::ostream& out, const duplication_entry& obj) +inline std::ostream &operator<<(std::ostream &out, const duplication_entry &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_query_request__isset { - _duplication_query_request__isset() : app_name(false) {} - bool app_name :1; +typedef struct _duplication_query_request__isset +{ + _duplication_query_request__isset() : app_name(false) {} + bool app_name : 1; } _duplication_query_request__isset; -class duplication_query_request { - public: - - duplication_query_request(const duplication_query_request&); - duplication_query_request(duplication_query_request&&); - duplication_query_request& operator=(const duplication_query_request&); - duplication_query_request& operator=(duplication_query_request&&); - duplication_query_request() : app_name() { - } +class duplication_query_request +{ +public: + duplication_query_request(const duplication_query_request &); + duplication_query_request(duplication_query_request &&); + duplication_query_request &operator=(const duplication_query_request &); + duplication_query_request &operator=(duplication_query_request &&); + duplication_query_request() : app_name() {} - virtual ~duplication_query_request() throw(); - std::string app_name; + virtual ~duplication_query_request() throw(); + std::string app_name; - _duplication_query_request__isset __isset; + _duplication_query_request__isset __isset; - void __set_app_name(const std::string& val); + void __set_app_name(const std::string &val); - bool operator == (const duplication_query_request & rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - return true; - } - bool operator != (const duplication_query_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const duplication_query_request &rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + return true; + } + bool operator!=(const duplication_query_request &rhs) const { return !(*this == rhs); } - bool operator < (const duplication_query_request & ) const; + bool operator<(const duplication_query_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(duplication_query_request &a, duplication_query_request &b); -inline std::ostream& operator<<(std::ostream& out, const duplication_query_request& obj) +inline std::ostream &operator<<(std::ostream &out, const duplication_query_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_query_response__isset { - _duplication_query_response__isset() : err(false), appid(false), entry_list(false) {} - bool err :1; - bool appid :1; - bool entry_list :1; +typedef struct _duplication_query_response__isset +{ + _duplication_query_response__isset() : err(false), appid(false), entry_list(false) {} + bool err : 1; + bool appid : 1; + bool entry_list : 1; } _duplication_query_response__isset; -class duplication_query_response { - public: - - duplication_query_response(const duplication_query_response&); - duplication_query_response(duplication_query_response&&); - duplication_query_response& operator=(const duplication_query_response&); - duplication_query_response& operator=(duplication_query_response&&); - duplication_query_response() : appid(0) { - } +class duplication_query_response +{ +public: + duplication_query_response(const duplication_query_response &); + duplication_query_response(duplication_query_response &&); + duplication_query_response &operator=(const duplication_query_response &); + duplication_query_response &operator=(duplication_query_response &&); + duplication_query_response() : appid(0) {} - virtual ~duplication_query_response() throw(); - ::dsn::error_code err; - int32_t appid; - std::vector entry_list; + virtual ~duplication_query_response() throw(); + ::dsn::error_code err; + int32_t appid; + std::vector entry_list; - _duplication_query_response__isset __isset; + _duplication_query_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_appid(const int32_t val); + void __set_appid(const int32_t val); - void __set_entry_list(const std::vector & val); + void __set_entry_list(const std::vector &val); - bool operator == (const duplication_query_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(appid == rhs.appid)) - return false; - if (!(entry_list == rhs.entry_list)) - return false; - return true; - } - bool operator != (const duplication_query_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const duplication_query_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(appid == rhs.appid)) + return false; + if (!(entry_list == rhs.entry_list)) + return false; + return true; + } + bool operator!=(const duplication_query_response &rhs) const { return !(*this == rhs); } - bool operator < (const duplication_query_response & ) const; + bool operator<(const duplication_query_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(duplication_query_response &a, duplication_query_response &b); -inline std::ostream& operator<<(std::ostream& out, const duplication_query_response& obj) +inline std::ostream &operator<<(std::ostream &out, const duplication_query_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_confirm_entry__isset { - _duplication_confirm_entry__isset() : dupid(false), confirmed_decree(false) {} - bool dupid :1; - bool confirmed_decree :1; +typedef struct _duplication_confirm_entry__isset +{ + _duplication_confirm_entry__isset() : dupid(false), confirmed_decree(false) {} + bool dupid : 1; + bool confirmed_decree : 1; } _duplication_confirm_entry__isset; -class duplication_confirm_entry { - public: - - duplication_confirm_entry(const duplication_confirm_entry&); - duplication_confirm_entry(duplication_confirm_entry&&); - duplication_confirm_entry& operator=(const duplication_confirm_entry&); - duplication_confirm_entry& operator=(duplication_confirm_entry&&); - duplication_confirm_entry() : dupid(0), confirmed_decree(0) { - } +class duplication_confirm_entry +{ +public: + duplication_confirm_entry(const duplication_confirm_entry &); + duplication_confirm_entry(duplication_confirm_entry &&); + duplication_confirm_entry &operator=(const duplication_confirm_entry &); + duplication_confirm_entry &operator=(duplication_confirm_entry &&); + duplication_confirm_entry() : dupid(0), confirmed_decree(0) {} - virtual ~duplication_confirm_entry() throw(); - int32_t dupid; - int64_t confirmed_decree; + virtual ~duplication_confirm_entry() throw(); + int32_t dupid; + int64_t confirmed_decree; - _duplication_confirm_entry__isset __isset; + _duplication_confirm_entry__isset __isset; - void __set_dupid(const int32_t val); + void __set_dupid(const int32_t val); - void __set_confirmed_decree(const int64_t val); + void __set_confirmed_decree(const int64_t val); - bool operator == (const duplication_confirm_entry & rhs) const - { - if (!(dupid == rhs.dupid)) - return false; - if (!(confirmed_decree == rhs.confirmed_decree)) - return false; - return true; - } - bool operator != (const duplication_confirm_entry &rhs) const { - return !(*this == rhs); - } + bool operator==(const duplication_confirm_entry &rhs) const + { + if (!(dupid == rhs.dupid)) + return false; + if (!(confirmed_decree == rhs.confirmed_decree)) + return false; + return true; + } + bool operator!=(const duplication_confirm_entry &rhs) const { return !(*this == rhs); } - bool operator < (const duplication_confirm_entry & ) const; + bool operator<(const duplication_confirm_entry &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(duplication_confirm_entry &a, duplication_confirm_entry &b); -inline std::ostream& operator<<(std::ostream& out, const duplication_confirm_entry& obj) +inline std::ostream &operator<<(std::ostream &out, const duplication_confirm_entry &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_sync_request__isset { - _duplication_sync_request__isset() : node(false), confirm_list(false) {} - bool node :1; - bool confirm_list :1; +typedef struct _duplication_sync_request__isset +{ + _duplication_sync_request__isset() : node(false), confirm_list(false) {} + bool node : 1; + bool confirm_list : 1; } _duplication_sync_request__isset; -class duplication_sync_request { - public: - - duplication_sync_request(const duplication_sync_request&); - duplication_sync_request(duplication_sync_request&&); - duplication_sync_request& operator=(const duplication_sync_request&); - duplication_sync_request& operator=(duplication_sync_request&&); - duplication_sync_request() { - } +class duplication_sync_request +{ +public: + duplication_sync_request(const duplication_sync_request &); + duplication_sync_request(duplication_sync_request &&); + duplication_sync_request &operator=(const duplication_sync_request &); + duplication_sync_request &operator=(duplication_sync_request &&); + duplication_sync_request() {} - virtual ~duplication_sync_request() throw(); - ::dsn::rpc_address node; - std::map< ::dsn::gpid, std::vector > confirm_list; + virtual ~duplication_sync_request() throw(); + ::dsn::rpc_address node; + std::map<::dsn::gpid, std::vector> confirm_list; - _duplication_sync_request__isset __isset; + _duplication_sync_request__isset __isset; - void __set_node(const ::dsn::rpc_address& val); + void __set_node(const ::dsn::rpc_address &val); - void __set_confirm_list(const std::map< ::dsn::gpid, std::vector > & val); + void + __set_confirm_list(const std::map<::dsn::gpid, std::vector> &val); - bool operator == (const duplication_sync_request & rhs) const - { - if (!(node == rhs.node)) - return false; - if (!(confirm_list == rhs.confirm_list)) - return false; - return true; - } - bool operator != (const duplication_sync_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const duplication_sync_request &rhs) const + { + if (!(node == rhs.node)) + return false; + if (!(confirm_list == rhs.confirm_list)) + return false; + return true; + } + bool operator!=(const duplication_sync_request &rhs) const { return !(*this == rhs); } - bool operator < (const duplication_sync_request & ) const; + bool operator<(const duplication_sync_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(duplication_sync_request &a, duplication_sync_request &b); -inline std::ostream& operator<<(std::ostream& out, const duplication_sync_request& obj) +inline std::ostream &operator<<(std::ostream &out, const duplication_sync_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _duplication_sync_response__isset { - _duplication_sync_response__isset() : err(false), dup_map(false) {} - bool err :1; - bool dup_map :1; +typedef struct _duplication_sync_response__isset +{ + _duplication_sync_response__isset() : err(false), dup_map(false) {} + bool err : 1; + bool dup_map : 1; } _duplication_sync_response__isset; -class duplication_sync_response { - public: - - duplication_sync_response(const duplication_sync_response&); - duplication_sync_response(duplication_sync_response&&); - duplication_sync_response& operator=(const duplication_sync_response&); - duplication_sync_response& operator=(duplication_sync_response&&); - duplication_sync_response() { - } +class duplication_sync_response +{ +public: + duplication_sync_response(const duplication_sync_response &); + duplication_sync_response(duplication_sync_response &&); + duplication_sync_response &operator=(const duplication_sync_response &); + duplication_sync_response &operator=(duplication_sync_response &&); + duplication_sync_response() {} - virtual ~duplication_sync_response() throw(); - ::dsn::error_code err; - std::map > dup_map; + virtual ~duplication_sync_response() throw(); + ::dsn::error_code err; + std::map> dup_map; - _duplication_sync_response__isset __isset; + _duplication_sync_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_dup_map(const std::map > & val); + void __set_dup_map(const std::map> &val); - bool operator == (const duplication_sync_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(dup_map == rhs.dup_map)) - return false; - return true; - } - bool operator != (const duplication_sync_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const duplication_sync_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(dup_map == rhs.dup_map)) + return false; + return true; + } + bool operator!=(const duplication_sync_response &rhs) const { return !(*this == rhs); } - bool operator < (const duplication_sync_response & ) const; + bool operator<(const duplication_sync_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(duplication_sync_response &a, duplication_sync_response &b); -inline std::ostream& operator<<(std::ostream& out, const duplication_sync_response& obj) +inline std::ostream &operator<<(std::ostream &out, const duplication_sync_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _ddd_diagnose_request__isset { - _ddd_diagnose_request__isset() : pid(false) {} - bool pid :1; +typedef struct _ddd_diagnose_request__isset +{ + _ddd_diagnose_request__isset() : pid(false) {} + bool pid : 1; } _ddd_diagnose_request__isset; -class ddd_diagnose_request { - public: - - ddd_diagnose_request(const ddd_diagnose_request&); - ddd_diagnose_request(ddd_diagnose_request&&); - ddd_diagnose_request& operator=(const ddd_diagnose_request&); - ddd_diagnose_request& operator=(ddd_diagnose_request&&); - ddd_diagnose_request() { - } +class ddd_diagnose_request +{ +public: + ddd_diagnose_request(const ddd_diagnose_request &); + ddd_diagnose_request(ddd_diagnose_request &&); + ddd_diagnose_request &operator=(const ddd_diagnose_request &); + ddd_diagnose_request &operator=(ddd_diagnose_request &&); + ddd_diagnose_request() {} - virtual ~ddd_diagnose_request() throw(); - ::dsn::gpid pid; + virtual ~ddd_diagnose_request() throw(); + ::dsn::gpid pid; - _ddd_diagnose_request__isset __isset; + _ddd_diagnose_request__isset __isset; - void __set_pid(const ::dsn::gpid& val); + void __set_pid(const ::dsn::gpid &val); - bool operator == (const ddd_diagnose_request & rhs) const - { - if (!(pid == rhs.pid)) - return false; - return true; - } - bool operator != (const ddd_diagnose_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const ddd_diagnose_request &rhs) const + { + if (!(pid == rhs.pid)) + return false; + return true; + } + bool operator!=(const ddd_diagnose_request &rhs) const { return !(*this == rhs); } - bool operator < (const ddd_diagnose_request & ) const; + bool operator<(const ddd_diagnose_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(ddd_diagnose_request &a, ddd_diagnose_request &b); -inline std::ostream& operator<<(std::ostream& out, const ddd_diagnose_request& obj) +inline std::ostream &operator<<(std::ostream &out, const ddd_diagnose_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _ddd_node_info__isset { - _ddd_node_info__isset() : node(false), drop_time_ms(false), is_alive(false), is_collected(false), ballot(false), last_committed_decree(false), last_prepared_decree(false) {} - bool node :1; - bool drop_time_ms :1; - bool is_alive :1; - bool is_collected :1; - bool ballot :1; - bool last_committed_decree :1; - bool last_prepared_decree :1; +typedef struct _ddd_node_info__isset +{ + _ddd_node_info__isset() + : node(false), + drop_time_ms(false), + is_alive(false), + is_collected(false), + ballot(false), + last_committed_decree(false), + last_prepared_decree(false) + { + } + bool node : 1; + bool drop_time_ms : 1; + bool is_alive : 1; + bool is_collected : 1; + bool ballot : 1; + bool last_committed_decree : 1; + bool last_prepared_decree : 1; } _ddd_node_info__isset; -class ddd_node_info { - public: - - ddd_node_info(const ddd_node_info&); - ddd_node_info(ddd_node_info&&); - ddd_node_info& operator=(const ddd_node_info&); - ddd_node_info& operator=(ddd_node_info&&); - ddd_node_info() : drop_time_ms(0), is_alive(0), is_collected(0), ballot(0), last_committed_decree(0), last_prepared_decree(0) { - } - - virtual ~ddd_node_info() throw(); - ::dsn::rpc_address node; - int64_t drop_time_ms; - bool is_alive; - bool is_collected; - int64_t ballot; - int64_t last_committed_decree; - int64_t last_prepared_decree; - - _ddd_node_info__isset __isset; - - void __set_node(const ::dsn::rpc_address& val); - - void __set_drop_time_ms(const int64_t val); - - void __set_is_alive(const bool val); - - void __set_is_collected(const bool val); - - void __set_ballot(const int64_t val); - - void __set_last_committed_decree(const int64_t val); - - void __set_last_prepared_decree(const int64_t val); - - bool operator == (const ddd_node_info & rhs) const - { - if (!(node == rhs.node)) - return false; - if (!(drop_time_ms == rhs.drop_time_ms)) - return false; - if (!(is_alive == rhs.is_alive)) - return false; - if (!(is_collected == rhs.is_collected)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (!(last_prepared_decree == rhs.last_prepared_decree)) - return false; - return true; - } - bool operator != (const ddd_node_info &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ddd_node_info & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; +class ddd_node_info +{ +public: + ddd_node_info(const ddd_node_info &); + ddd_node_info(ddd_node_info &&); + ddd_node_info &operator=(const ddd_node_info &); + ddd_node_info &operator=(ddd_node_info &&); + ddd_node_info() + : drop_time_ms(0), + is_alive(0), + is_collected(0), + ballot(0), + last_committed_decree(0), + last_prepared_decree(0) + { + } + + virtual ~ddd_node_info() throw(); + ::dsn::rpc_address node; + int64_t drop_time_ms; + bool is_alive; + bool is_collected; + int64_t ballot; + int64_t last_committed_decree; + int64_t last_prepared_decree; + + _ddd_node_info__isset __isset; + + void __set_node(const ::dsn::rpc_address &val); + + void __set_drop_time_ms(const int64_t val); + + void __set_is_alive(const bool val); + + void __set_is_collected(const bool val); + + void __set_ballot(const int64_t val); + + void __set_last_committed_decree(const int64_t val); + + void __set_last_prepared_decree(const int64_t val); + + bool operator==(const ddd_node_info &rhs) const + { + if (!(node == rhs.node)) + return false; + if (!(drop_time_ms == rhs.drop_time_ms)) + return false; + if (!(is_alive == rhs.is_alive)) + return false; + if (!(is_collected == rhs.is_collected)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (!(last_prepared_decree == rhs.last_prepared_decree)) + return false; + return true; + } + bool operator!=(const ddd_node_info &rhs) const { return !(*this == rhs); } + + bool operator<(const ddd_node_info &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; }; void swap(ddd_node_info &a, ddd_node_info &b); -inline std::ostream& operator<<(std::ostream& out, const ddd_node_info& obj) +inline std::ostream &operator<<(std::ostream &out, const ddd_node_info &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _ddd_partition_info__isset { - _ddd_partition_info__isset() : config(false), dropped(false), reason(false) {} - bool config :1; - bool dropped :1; - bool reason :1; +typedef struct _ddd_partition_info__isset +{ + _ddd_partition_info__isset() : config(false), dropped(false), reason(false) {} + bool config : 1; + bool dropped : 1; + bool reason : 1; } _ddd_partition_info__isset; -class ddd_partition_info { - public: - - ddd_partition_info(const ddd_partition_info&); - ddd_partition_info(ddd_partition_info&&); - ddd_partition_info& operator=(const ddd_partition_info&); - ddd_partition_info& operator=(ddd_partition_info&&); - ddd_partition_info() : reason() { - } +class ddd_partition_info +{ +public: + ddd_partition_info(const ddd_partition_info &); + ddd_partition_info(ddd_partition_info &&); + ddd_partition_info &operator=(const ddd_partition_info &); + ddd_partition_info &operator=(ddd_partition_info &&); + ddd_partition_info() : reason() {} - virtual ~ddd_partition_info() throw(); - ::dsn::partition_configuration config; - std::vector dropped; - std::string reason; + virtual ~ddd_partition_info() throw(); + ::dsn::partition_configuration config; + std::vector dropped; + std::string reason; - _ddd_partition_info__isset __isset; + _ddd_partition_info__isset __isset; - void __set_config(const ::dsn::partition_configuration& val); + void __set_config(const ::dsn::partition_configuration &val); - void __set_dropped(const std::vector & val); + void __set_dropped(const std::vector &val); - void __set_reason(const std::string& val); + void __set_reason(const std::string &val); - bool operator == (const ddd_partition_info & rhs) const - { - if (!(config == rhs.config)) - return false; - if (!(dropped == rhs.dropped)) - return false; - if (!(reason == rhs.reason)) - return false; - return true; - } - bool operator != (const ddd_partition_info &rhs) const { - return !(*this == rhs); - } + bool operator==(const ddd_partition_info &rhs) const + { + if (!(config == rhs.config)) + return false; + if (!(dropped == rhs.dropped)) + return false; + if (!(reason == rhs.reason)) + return false; + return true; + } + bool operator!=(const ddd_partition_info &rhs) const { return !(*this == rhs); } - bool operator < (const ddd_partition_info & ) const; + bool operator<(const ddd_partition_info &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(ddd_partition_info &a, ddd_partition_info &b); -inline std::ostream& operator<<(std::ostream& out, const ddd_partition_info& obj) +inline std::ostream &operator<<(std::ostream &out, const ddd_partition_info &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _ddd_diagnose_response__isset { - _ddd_diagnose_response__isset() : err(false), partitions(false) {} - bool err :1; - bool partitions :1; +typedef struct _ddd_diagnose_response__isset +{ + _ddd_diagnose_response__isset() : err(false), partitions(false) {} + bool err : 1; + bool partitions : 1; } _ddd_diagnose_response__isset; -class ddd_diagnose_response { - public: - - ddd_diagnose_response(const ddd_diagnose_response&); - ddd_diagnose_response(ddd_diagnose_response&&); - ddd_diagnose_response& operator=(const ddd_diagnose_response&); - ddd_diagnose_response& operator=(ddd_diagnose_response&&); - ddd_diagnose_response() { - } +class ddd_diagnose_response +{ +public: + ddd_diagnose_response(const ddd_diagnose_response &); + ddd_diagnose_response(ddd_diagnose_response &&); + ddd_diagnose_response &operator=(const ddd_diagnose_response &); + ddd_diagnose_response &operator=(ddd_diagnose_response &&); + ddd_diagnose_response() {} - virtual ~ddd_diagnose_response() throw(); - ::dsn::error_code err; - std::vector partitions; + virtual ~ddd_diagnose_response() throw(); + ::dsn::error_code err; + std::vector partitions; - _ddd_diagnose_response__isset __isset; + _ddd_diagnose_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_partitions(const std::vector & val); + void __set_partitions(const std::vector &val); - bool operator == (const ddd_diagnose_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(partitions == rhs.partitions)) - return false; - return true; - } - bool operator != (const ddd_diagnose_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const ddd_diagnose_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(partitions == rhs.partitions)) + return false; + return true; + } + bool operator!=(const ddd_diagnose_response &rhs) const { return !(*this == rhs); } - bool operator < (const ddd_diagnose_response & ) const; + bool operator<(const ddd_diagnose_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(ddd_diagnose_response &a, ddd_diagnose_response &b); -inline std::ostream& operator<<(std::ostream& out, const ddd_diagnose_response& obj) +inline std::ostream &operator<<(std::ostream &out, const ddd_diagnose_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _app_partition_split_request__isset { - _app_partition_split_request__isset() : app_name(false), new_partition_count(false) {} - bool app_name :1; - bool new_partition_count :1; +typedef struct _app_partition_split_request__isset +{ + _app_partition_split_request__isset() : app_name(false), new_partition_count(false) {} + bool app_name : 1; + bool new_partition_count : 1; } _app_partition_split_request__isset; -class app_partition_split_request { - public: - - app_partition_split_request(const app_partition_split_request&); - app_partition_split_request(app_partition_split_request&&); - app_partition_split_request& operator=(const app_partition_split_request&); - app_partition_split_request& operator=(app_partition_split_request&&); - app_partition_split_request() : app_name(), new_partition_count(0) { - } +class app_partition_split_request +{ +public: + app_partition_split_request(const app_partition_split_request &); + app_partition_split_request(app_partition_split_request &&); + app_partition_split_request &operator=(const app_partition_split_request &); + app_partition_split_request &operator=(app_partition_split_request &&); + app_partition_split_request() : app_name(), new_partition_count(0) {} - virtual ~app_partition_split_request() throw(); - std::string app_name; - int32_t new_partition_count; + virtual ~app_partition_split_request() throw(); + std::string app_name; + int32_t new_partition_count; - _app_partition_split_request__isset __isset; + _app_partition_split_request__isset __isset; - void __set_app_name(const std::string& val); + void __set_app_name(const std::string &val); - void __set_new_partition_count(const int32_t val); + void __set_new_partition_count(const int32_t val); - bool operator == (const app_partition_split_request & rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(new_partition_count == rhs.new_partition_count)) - return false; - return true; - } - bool operator != (const app_partition_split_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const app_partition_split_request &rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(new_partition_count == rhs.new_partition_count)) + return false; + return true; + } + bool operator!=(const app_partition_split_request &rhs) const { return !(*this == rhs); } - bool operator < (const app_partition_split_request & ) const; + bool operator<(const app_partition_split_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(app_partition_split_request &a, app_partition_split_request &b); -inline std::ostream& operator<<(std::ostream& out, const app_partition_split_request& obj) +inline std::ostream &operator<<(std::ostream &out, const app_partition_split_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _app_partition_split_response__isset { - _app_partition_split_response__isset() : err(false), app_id(false), partition_count(false) {} - bool err :1; - bool app_id :1; - bool partition_count :1; +typedef struct _app_partition_split_response__isset +{ + _app_partition_split_response__isset() : err(false), app_id(false), partition_count(false) {} + bool err : 1; + bool app_id : 1; + bool partition_count : 1; } _app_partition_split_response__isset; -class app_partition_split_response { - public: - - app_partition_split_response(const app_partition_split_response&); - app_partition_split_response(app_partition_split_response&&); - app_partition_split_response& operator=(const app_partition_split_response&); - app_partition_split_response& operator=(app_partition_split_response&&); - app_partition_split_response() : app_id(0), partition_count(0) { - } +class app_partition_split_response +{ +public: + app_partition_split_response(const app_partition_split_response &); + app_partition_split_response(app_partition_split_response &&); + app_partition_split_response &operator=(const app_partition_split_response &); + app_partition_split_response &operator=(app_partition_split_response &&); + app_partition_split_response() : app_id(0), partition_count(0) {} - virtual ~app_partition_split_response() throw(); - ::dsn::error_code err; - int32_t app_id; - int32_t partition_count; + virtual ~app_partition_split_response() throw(); + ::dsn::error_code err; + int32_t app_id; + int32_t partition_count; - _app_partition_split_response__isset __isset; + _app_partition_split_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - void __set_app_id(const int32_t val); + void __set_app_id(const int32_t val); - void __set_partition_count(const int32_t val); + void __set_partition_count(const int32_t val); - bool operator == (const app_partition_split_response & rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(app_id == rhs.app_id)) - return false; - if (!(partition_count == rhs.partition_count)) - return false; - return true; - } - bool operator != (const app_partition_split_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const app_partition_split_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(app_id == rhs.app_id)) + return false; + if (!(partition_count == rhs.partition_count)) + return false; + return true; + } + bool operator!=(const app_partition_split_response &rhs) const { return !(*this == rhs); } - bool operator < (const app_partition_split_response & ) const; + bool operator<(const app_partition_split_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(app_partition_split_response &a, app_partition_split_response &b); -inline std::ostream& operator<<(std::ostream& out, const app_partition_split_response& obj) +inline std::ostream &operator<<(std::ostream &out, const app_partition_split_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _notify_catch_up_request__isset { - _notify_catch_up_request__isset() : parent_gpid(false), child_gpid(false), child_ballot(false), child_address(false) {} - bool parent_gpid :1; - bool child_gpid :1; - bool child_ballot :1; - bool child_address :1; +typedef struct _notify_catch_up_request__isset +{ + _notify_catch_up_request__isset() + : parent_gpid(false), child_gpid(false), child_ballot(false), child_address(false) + { + } + bool parent_gpid : 1; + bool child_gpid : 1; + bool child_ballot : 1; + bool child_address : 1; } _notify_catch_up_request__isset; -class notify_catch_up_request { - public: - - notify_catch_up_request(const notify_catch_up_request&); - notify_catch_up_request(notify_catch_up_request&&); - notify_catch_up_request& operator=(const notify_catch_up_request&); - notify_catch_up_request& operator=(notify_catch_up_request&&); - notify_catch_up_request() : child_ballot(0) { - } +class notify_catch_up_request +{ +public: + notify_catch_up_request(const notify_catch_up_request &); + notify_catch_up_request(notify_catch_up_request &&); + notify_catch_up_request &operator=(const notify_catch_up_request &); + notify_catch_up_request &operator=(notify_catch_up_request &&); + notify_catch_up_request() : child_ballot(0) {} - virtual ~notify_catch_up_request() throw(); - ::dsn::gpid parent_gpid; - ::dsn::gpid child_gpid; - int64_t child_ballot; - ::dsn::rpc_address child_address; + virtual ~notify_catch_up_request() throw(); + ::dsn::gpid parent_gpid; + ::dsn::gpid child_gpid; + int64_t child_ballot; + ::dsn::rpc_address child_address; - _notify_catch_up_request__isset __isset; + _notify_catch_up_request__isset __isset; - void __set_parent_gpid(const ::dsn::gpid& val); + void __set_parent_gpid(const ::dsn::gpid &val); - void __set_child_gpid(const ::dsn::gpid& val); + void __set_child_gpid(const ::dsn::gpid &val); - void __set_child_ballot(const int64_t val); + void __set_child_ballot(const int64_t val); - void __set_child_address(const ::dsn::rpc_address& val); + void __set_child_address(const ::dsn::rpc_address &val); - bool operator == (const notify_catch_up_request & rhs) const - { - if (!(parent_gpid == rhs.parent_gpid)) - return false; - if (!(child_gpid == rhs.child_gpid)) - return false; - if (!(child_ballot == rhs.child_ballot)) - return false; - if (!(child_address == rhs.child_address)) - return false; - return true; - } - bool operator != (const notify_catch_up_request &rhs) const { - return !(*this == rhs); - } + bool operator==(const notify_catch_up_request &rhs) const + { + if (!(parent_gpid == rhs.parent_gpid)) + return false; + if (!(child_gpid == rhs.child_gpid)) + return false; + if (!(child_ballot == rhs.child_ballot)) + return false; + if (!(child_address == rhs.child_address)) + return false; + return true; + } + bool operator!=(const notify_catch_up_request &rhs) const { return !(*this == rhs); } - bool operator < (const notify_catch_up_request & ) const; + bool operator<(const notify_catch_up_request &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(notify_catch_up_request &a, notify_catch_up_request &b); -inline std::ostream& operator<<(std::ostream& out, const notify_catch_up_request& obj) +inline std::ostream &operator<<(std::ostream &out, const notify_catch_up_request &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _notify_cacth_up_response__isset { - _notify_cacth_up_response__isset() : err(false) {} - bool err :1; +typedef struct _notify_cacth_up_response__isset +{ + _notify_cacth_up_response__isset() : err(false) {} + bool err : 1; } _notify_cacth_up_response__isset; -class notify_cacth_up_response { - public: - - notify_cacth_up_response(const notify_cacth_up_response&); - notify_cacth_up_response(notify_cacth_up_response&&); - notify_cacth_up_response& operator=(const notify_cacth_up_response&); - notify_cacth_up_response& operator=(notify_cacth_up_response&&); - notify_cacth_up_response() { - } +class notify_cacth_up_response +{ +public: + notify_cacth_up_response(const notify_cacth_up_response &); + notify_cacth_up_response(notify_cacth_up_response &&); + notify_cacth_up_response &operator=(const notify_cacth_up_response &); + notify_cacth_up_response &operator=(notify_cacth_up_response &&); + notify_cacth_up_response() {} - virtual ~notify_cacth_up_response() throw(); - ::dsn::error_code err; + virtual ~notify_cacth_up_response() throw(); + ::dsn::error_code err; - _notify_cacth_up_response__isset __isset; + _notify_cacth_up_response__isset __isset; - void __set_err(const ::dsn::error_code& val); + void __set_err(const ::dsn::error_code &val); - bool operator == (const notify_cacth_up_response & rhs) const - { - if (!(err == rhs.err)) - return false; - return true; - } - bool operator != (const notify_cacth_up_response &rhs) const { - return !(*this == rhs); - } + bool operator==(const notify_cacth_up_response &rhs) const + { + if (!(err == rhs.err)) + return false; + return true; + } + bool operator!=(const notify_cacth_up_response &rhs) const { return !(*this == rhs); } - bool operator < (const notify_cacth_up_response & ) const; + bool operator<(const notify_cacth_up_response &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(notify_cacth_up_response &a, notify_cacth_up_response &b); -inline std::ostream& operator<<(std::ostream& out, const notify_cacth_up_response& obj) +inline std::ostream &operator<<(std::ostream &out, const notify_cacth_up_response &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _bulk_load_metadata__isset { - _bulk_load_metadata__isset() : files(false), file_total_size(false) {} - bool files :1; - bool file_total_size :1; +typedef struct _bulk_load_metadata__isset +{ + _bulk_load_metadata__isset() : files(false), file_total_size(false) {} + bool files : 1; + bool file_total_size : 1; } _bulk_load_metadata__isset; -class bulk_load_metadata { - public: - - bulk_load_metadata(const bulk_load_metadata&); - bulk_load_metadata(bulk_load_metadata&&); - bulk_load_metadata& operator=(const bulk_load_metadata&); - bulk_load_metadata& operator=(bulk_load_metadata&&); - bulk_load_metadata() : file_total_size(0) { - } +class bulk_load_metadata +{ +public: + bulk_load_metadata(const bulk_load_metadata &); + bulk_load_metadata(bulk_load_metadata &&); + bulk_load_metadata &operator=(const bulk_load_metadata &); + bulk_load_metadata &operator=(bulk_load_metadata &&); + bulk_load_metadata() : file_total_size(0) {} - virtual ~bulk_load_metadata() throw(); - std::vector files; - int64_t file_total_size; + virtual ~bulk_load_metadata() throw(); + std::vector files; + int64_t file_total_size; - _bulk_load_metadata__isset __isset; + _bulk_load_metadata__isset __isset; - void __set_files(const std::vector & val); + void __set_files(const std::vector &val); - void __set_file_total_size(const int64_t val); + void __set_file_total_size(const int64_t val); - bool operator == (const bulk_load_metadata & rhs) const - { - if (!(files == rhs.files)) - return false; - if (!(file_total_size == rhs.file_total_size)) - return false; - return true; - } - bool operator != (const bulk_load_metadata &rhs) const { - return !(*this == rhs); - } + bool operator==(const bulk_load_metadata &rhs) const + { + if (!(files == rhs.files)) + return false; + if (!(file_total_size == rhs.file_total_size)) + return false; + return true; + } + bool operator!=(const bulk_load_metadata &rhs) const { return !(*this == rhs); } - bool operator < (const bulk_load_metadata & ) const; + bool operator<(const bulk_load_metadata &) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - virtual void printTo(std::ostream& out) const; + virtual void printTo(std::ostream &out) const; }; void swap(bulk_load_metadata &a, bulk_load_metadata &b); -inline std::ostream& operator<<(std::ostream& out, const bulk_load_metadata& obj) +inline std::ostream &operator<<(std::ostream &out, const bulk_load_metadata &obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } - -}} // namespace +} +} // namespace #endif diff --git a/src/core/core/dsn.layer2_types.cpp b/src/core/core/dsn.layer2_types.cpp index 5a4582a4db..b078062bb5 100644 --- a/src/core/core/dsn.layer2_types.cpp +++ b/src/core/core/dsn.layer2_types.cpp @@ -13,1259 +13,1298 @@ namespace dsn { -int _kapp_statusValues[] = { - app_status::AS_INVALID, - app_status::AS_AVAILABLE, - app_status::AS_CREATING, - app_status::AS_CREATE_FAILED, - app_status::AS_DROPPING, - app_status::AS_DROP_FAILED, - app_status::AS_DROPPED, - app_status::AS_RECALLING -}; -const char* _kapp_statusNames[] = { - "AS_INVALID", - "AS_AVAILABLE", - "AS_CREATING", - "AS_CREATE_FAILED", - "AS_DROPPING", - "AS_DROP_FAILED", - "AS_DROPPED", - "AS_RECALLING" -}; -const std::map _app_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(8, _kapp_statusValues, _kapp_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - - -partition_configuration::~partition_configuration() throw() { -} +int _kapp_statusValues[] = {app_status::AS_INVALID, + app_status::AS_AVAILABLE, + app_status::AS_CREATING, + app_status::AS_CREATE_FAILED, + app_status::AS_DROPPING, + app_status::AS_DROP_FAILED, + app_status::AS_DROPPED, + app_status::AS_RECALLING}; +const char *_kapp_statusNames[] = {"AS_INVALID", + "AS_AVAILABLE", + "AS_CREATING", + "AS_CREATE_FAILED", + "AS_DROPPING", + "AS_DROP_FAILED", + "AS_DROPPED", + "AS_RECALLING"}; +const std::map _app_status_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(8, _kapp_statusValues, _kapp_statusNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); +partition_configuration::~partition_configuration() throw() {} -void partition_configuration::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} +void partition_configuration::__set_pid(const ::dsn::gpid &val) { this->pid = val; } -void partition_configuration::__set_ballot(const int64_t val) { - this->ballot = val; -} +void partition_configuration::__set_ballot(const int64_t val) { this->ballot = val; } -void partition_configuration::__set_max_replica_count(const int32_t val) { - this->max_replica_count = val; +void partition_configuration::__set_max_replica_count(const int32_t val) +{ + this->max_replica_count = val; } -void partition_configuration::__set_primary(const ::dsn::rpc_address& val) { - this->primary = val; -} +void partition_configuration::__set_primary(const ::dsn::rpc_address &val) { this->primary = val; } -void partition_configuration::__set_secondaries(const std::vector< ::dsn::rpc_address> & val) { - this->secondaries = val; +void partition_configuration::__set_secondaries(const std::vector<::dsn::rpc_address> &val) +{ + this->secondaries = val; } -void partition_configuration::__set_last_drops(const std::vector< ::dsn::rpc_address> & val) { - this->last_drops = val; +void partition_configuration::__set_last_drops(const std::vector<::dsn::rpc_address> &val) +{ + this->last_drops = val; } -void partition_configuration::__set_last_committed_decree(const int64_t val) { - this->last_committed_decree = val; +void partition_configuration::__set_last_committed_decree(const int64_t val) +{ + this->last_committed_decree = val; } -void partition_configuration::__set_partition_flags(const int32_t val) { - this->partition_flags = val; +void partition_configuration::__set_partition_flags(const int32_t val) +{ + this->partition_flags = val; } -uint32_t partition_configuration::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t partition_configuration::read(::apache::thrift::protocol::TProtocol *iprot) +{ - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->max_replica_count); - this->__isset.max_replica_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->primary.read(iprot); - this->__isset.primary = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->secondaries.clear(); - uint32_t _size0; - ::apache::thrift::protocol::TType _etype3; - xfer += iprot->readListBegin(_etype3, _size0); - this->secondaries.resize(_size0); - uint32_t _i4; - for (_i4 = 0; _i4 < _size0; ++_i4) - { - xfer += this->secondaries[_i4].read(iprot); + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readListEnd(); - } - this->__isset.secondaries = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->last_drops.clear(); - uint32_t _size5; - ::apache::thrift::protocol::TType _etype8; - xfer += iprot->readListBegin(_etype8, _size5); - this->last_drops.resize(_size5); - uint32_t _i9; - for (_i9 = 0; _i9 < _size5; ++_i9) - { - xfer += this->last_drops[_i9].read(iprot); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readListEnd(); - } - this->__isset.last_drops = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_flags); - this->__isset.partition_flags = true; - } else { - xfer += iprot->skip(ftype); + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->max_replica_count); + this->__isset.max_replica_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->primary.read(iprot); + this->__isset.primary = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->secondaries.clear(); + uint32_t _size0; + ::apache::thrift::protocol::TType _etype3; + xfer += iprot->readListBegin(_etype3, _size0); + this->secondaries.resize(_size0); + uint32_t _i4; + for (_i4 = 0; _i4 < _size0; ++_i4) { + xfer += this->secondaries[_i4].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.secondaries = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->last_drops.clear(); + uint32_t _size5; + ::apache::thrift::protocol::TType _etype8; + xfer += iprot->readListBegin(_etype8, _size5); + this->last_drops.resize(_size5); + uint32_t _i9; + for (_i9 = 0; _i9 < _size5; ++_i9) { + xfer += this->last_drops[_i9].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.last_drops = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_flags); + this->__isset.partition_flags = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t partition_configuration::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("partition_configuration"); +uint32_t partition_configuration::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("partition_configuration"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_replica_count", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->max_replica_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_replica_count", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->max_replica_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("primary", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->primary.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("primary", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->primary.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("secondaries", ::apache::thrift::protocol::T_LIST, 5); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->secondaries.size())); - std::vector< ::dsn::rpc_address> ::const_iterator _iter10; - for (_iter10 = this->secondaries.begin(); _iter10 != this->secondaries.end(); ++_iter10) + xfer += oprot->writeFieldBegin("secondaries", ::apache::thrift::protocol::T_LIST, 5); { - xfer += (*_iter10).write(oprot); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->secondaries.size())); + std::vector<::dsn::rpc_address>::const_iterator _iter10; + for (_iter10 = this->secondaries.begin(); _iter10 != this->secondaries.end(); ++_iter10) { + xfer += (*_iter10).write(oprot); + } + xfer += oprot->writeListEnd(); } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_drops", ::apache::thrift::protocol::T_LIST, 6); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->last_drops.size())); - std::vector< ::dsn::rpc_address> ::const_iterator _iter11; - for (_iter11 = this->last_drops.begin(); _iter11 != this->last_drops.end(); ++_iter11) + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("last_drops", ::apache::thrift::protocol::T_LIST, 6); { - xfer += (*_iter11).write(oprot); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->last_drops.size())); + std::vector<::dsn::rpc_address>::const_iterator _iter11; + for (_iter11 = this->last_drops.begin(); _iter11 != this->last_drops.end(); ++_iter11) { + xfer += (*_iter11).write(oprot); + } + xfer += oprot->writeListEnd(); } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 7); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("partition_flags", ::apache::thrift::protocol::T_I32, 8); - xfer += oprot->writeI32(this->partition_flags); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(partition_configuration &a, partition_configuration &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.ballot, b.ballot); - swap(a.max_replica_count, b.max_replica_count); - swap(a.primary, b.primary); - swap(a.secondaries, b.secondaries); - swap(a.last_drops, b.last_drops); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.partition_flags, b.partition_flags); - swap(a.__isset, b.__isset); -} - -partition_configuration::partition_configuration(const partition_configuration& other12) { - pid = other12.pid; - ballot = other12.ballot; - max_replica_count = other12.max_replica_count; - primary = other12.primary; - secondaries = other12.secondaries; - last_drops = other12.last_drops; - last_committed_decree = other12.last_committed_decree; - partition_flags = other12.partition_flags; - __isset = other12.__isset; -} -partition_configuration::partition_configuration( partition_configuration&& other13) { - pid = std::move(other13.pid); - ballot = std::move(other13.ballot); - max_replica_count = std::move(other13.max_replica_count); - primary = std::move(other13.primary); - secondaries = std::move(other13.secondaries); - last_drops = std::move(other13.last_drops); - last_committed_decree = std::move(other13.last_committed_decree); - partition_flags = std::move(other13.partition_flags); - __isset = std::move(other13.__isset); -} -partition_configuration& partition_configuration::operator=(const partition_configuration& other14) { - pid = other14.pid; - ballot = other14.ballot; - max_replica_count = other14.max_replica_count; - primary = other14.primary; - secondaries = other14.secondaries; - last_drops = other14.last_drops; - last_committed_decree = other14.last_committed_decree; - partition_flags = other14.partition_flags; - __isset = other14.__isset; - return *this; -} -partition_configuration& partition_configuration::operator=(partition_configuration&& other15) { - pid = std::move(other15.pid); - ballot = std::move(other15.ballot); - max_replica_count = std::move(other15.max_replica_count); - primary = std::move(other15.primary); - secondaries = std::move(other15.secondaries); - last_drops = std::move(other15.last_drops); - last_committed_decree = std::move(other15.last_committed_decree); - partition_flags = std::move(other15.partition_flags); - __isset = std::move(other15.__isset); - return *this; -} -void partition_configuration::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "partition_configuration("; - out << "pid=" << to_string(pid); - out << ", " << "ballot=" << to_string(ballot); - out << ", " << "max_replica_count=" << to_string(max_replica_count); - out << ", " << "primary=" << to_string(primary); - out << ", " << "secondaries=" << to_string(secondaries); - out << ", " << "last_drops=" << to_string(last_drops); - out << ", " << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " << "partition_flags=" << to_string(partition_flags); - out << ")"; -} - - -configuration_query_by_index_request::~configuration_query_by_index_request() throw() { -} - - -void configuration_query_by_index_request::__set_app_name(const std::string& val) { - this->app_name = val; -} - -void configuration_query_by_index_request::__set_partition_indices(const std::vector & val) { - this->partition_indices = val; -} - -uint32_t configuration_query_by_index_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition_flags", ::apache::thrift::protocol::T_I32, 8); + xfer += oprot->writeI32(this->partition_flags); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(partition_configuration &a, partition_configuration &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.ballot, b.ballot); + swap(a.max_replica_count, b.max_replica_count); + swap(a.primary, b.primary); + swap(a.secondaries, b.secondaries); + swap(a.last_drops, b.last_drops); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.partition_flags, b.partition_flags); + swap(a.__isset, b.__isset); +} + +partition_configuration::partition_configuration(const partition_configuration &other12) +{ + pid = other12.pid; + ballot = other12.ballot; + max_replica_count = other12.max_replica_count; + primary = other12.primary; + secondaries = other12.secondaries; + last_drops = other12.last_drops; + last_committed_decree = other12.last_committed_decree; + partition_flags = other12.partition_flags; + __isset = other12.__isset; +} +partition_configuration::partition_configuration(partition_configuration &&other13) +{ + pid = std::move(other13.pid); + ballot = std::move(other13.ballot); + max_replica_count = std::move(other13.max_replica_count); + primary = std::move(other13.primary); + secondaries = std::move(other13.secondaries); + last_drops = std::move(other13.last_drops); + last_committed_decree = std::move(other13.last_committed_decree); + partition_flags = std::move(other13.partition_flags); + __isset = std::move(other13.__isset); +} +partition_configuration &partition_configuration::operator=(const partition_configuration &other14) +{ + pid = other14.pid; + ballot = other14.ballot; + max_replica_count = other14.max_replica_count; + primary = other14.primary; + secondaries = other14.secondaries; + last_drops = other14.last_drops; + last_committed_decree = other14.last_committed_decree; + partition_flags = other14.partition_flags; + __isset = other14.__isset; + return *this; +} +partition_configuration &partition_configuration::operator=(partition_configuration &&other15) +{ + pid = std::move(other15.pid); + ballot = std::move(other15.ballot); + max_replica_count = std::move(other15.max_replica_count); + primary = std::move(other15.primary); + secondaries = std::move(other15.secondaries); + last_drops = std::move(other15.last_drops); + last_committed_decree = std::move(other15.last_committed_decree); + partition_flags = std::move(other15.partition_flags); + __isset = std::move(other15.__isset); + return *this; +} +void partition_configuration::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "partition_configuration("; + out << "pid=" << to_string(pid); + out << ", " + << "ballot=" << to_string(ballot); + out << ", " + << "max_replica_count=" << to_string(max_replica_count); + out << ", " + << "primary=" << to_string(primary); + out << ", " + << "secondaries=" << to_string(secondaries); + out << ", " + << "last_drops=" << to_string(last_drops); + out << ", " + << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " + << "partition_flags=" << to_string(partition_flags); + out << ")"; +} + +configuration_query_by_index_request::~configuration_query_by_index_request() throw() {} + +void configuration_query_by_index_request::__set_app_name(const std::string &val) +{ + this->app_name = val; +} + +void configuration_query_by_index_request::__set_partition_indices(const std::vector &val) +{ + this->partition_indices = val; +} + +uint32_t configuration_query_by_index_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partition_indices.clear(); - uint32_t _size16; - ::apache::thrift::protocol::TType _etype19; - xfer += iprot->readListBegin(_etype19, _size16); - this->partition_indices.resize(_size16); - uint32_t _i20; - for (_i20 = 0; _i20 < _size16; ++_i20) - { - xfer += iprot->readI32(this->partition_indices[_i20]); + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partition_indices.clear(); + uint32_t _size16; + ::apache::thrift::protocol::TType _etype19; + xfer += iprot->readListBegin(_etype19, _size16); + this->partition_indices.resize(_size16); + uint32_t _i20; + for (_i20 = 0; _i20 < _size16; ++_i20) { + xfer += iprot->readI32(this->partition_indices[_i20]); + } + xfer += iprot->readListEnd(); + } + this->__isset.partition_indices = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readListEnd(); - } - this->__isset.partition_indices = true; - } else { - xfer += iprot->skip(ftype); + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_query_by_index_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_by_index_request"); +uint32_t +configuration_query_by_index_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_by_index_request"); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partition_indices", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->partition_indices.size())); - std::vector ::const_iterator _iter21; - for (_iter21 = this->partition_indices.begin(); _iter21 != this->partition_indices.end(); ++_iter21) + xfer += oprot->writeFieldBegin("partition_indices", ::apache::thrift::protocol::T_LIST, 2); { - xfer += oprot->writeI32((*_iter21)); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, + static_cast(this->partition_indices.size())); + std::vector::const_iterator _iter21; + for (_iter21 = this->partition_indices.begin(); _iter21 != this->partition_indices.end(); + ++_iter21) { + xfer += oprot->writeI32((*_iter21)); + } + xfer += oprot->writeListEnd(); } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_query_by_index_request &a, configuration_query_by_index_request &b) { - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.partition_indices, b.partition_indices); - swap(a.__isset, b.__isset); +void swap(configuration_query_by_index_request &a, configuration_query_by_index_request &b) +{ + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.partition_indices, b.partition_indices); + swap(a.__isset, b.__isset); } -configuration_query_by_index_request::configuration_query_by_index_request(const configuration_query_by_index_request& other22) { - app_name = other22.app_name; - partition_indices = other22.partition_indices; - __isset = other22.__isset; -} -configuration_query_by_index_request::configuration_query_by_index_request( configuration_query_by_index_request&& other23) { - app_name = std::move(other23.app_name); - partition_indices = std::move(other23.partition_indices); - __isset = std::move(other23.__isset); +configuration_query_by_index_request::configuration_query_by_index_request( + const configuration_query_by_index_request &other22) +{ + app_name = other22.app_name; + partition_indices = other22.partition_indices; + __isset = other22.__isset; } -configuration_query_by_index_request& configuration_query_by_index_request::operator=(const configuration_query_by_index_request& other24) { - app_name = other24.app_name; - partition_indices = other24.partition_indices; - __isset = other24.__isset; - return *this; +configuration_query_by_index_request::configuration_query_by_index_request( + configuration_query_by_index_request &&other23) +{ + app_name = std::move(other23.app_name); + partition_indices = std::move(other23.partition_indices); + __isset = std::move(other23.__isset); } -configuration_query_by_index_request& configuration_query_by_index_request::operator=(configuration_query_by_index_request&& other25) { - app_name = std::move(other25.app_name); - partition_indices = std::move(other25.partition_indices); - __isset = std::move(other25.__isset); - return *this; +configuration_query_by_index_request &configuration_query_by_index_request:: +operator=(const configuration_query_by_index_request &other24) +{ + app_name = other24.app_name; + partition_indices = other24.partition_indices; + __isset = other24.__isset; + return *this; } -void configuration_query_by_index_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_query_by_index_request("; - out << "app_name=" << to_string(app_name); - out << ", " << "partition_indices=" << to_string(partition_indices); - out << ")"; +configuration_query_by_index_request &configuration_query_by_index_request:: +operator=(configuration_query_by_index_request &&other25) +{ + app_name = std::move(other25.app_name); + partition_indices = std::move(other25.partition_indices); + __isset = std::move(other25.__isset); + return *this; } - - -configuration_query_by_index_response::~configuration_query_by_index_response() throw() { +void configuration_query_by_index_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_query_by_index_request("; + out << "app_name=" << to_string(app_name); + out << ", " + << "partition_indices=" << to_string(partition_indices); + out << ")"; } +configuration_query_by_index_response::~configuration_query_by_index_response() throw() {} -void configuration_query_by_index_response::__set_err(const ::dsn::error_code& val) { - this->err = val; +void configuration_query_by_index_response::__set_err(const ::dsn::error_code &val) +{ + this->err = val; } -void configuration_query_by_index_response::__set_app_id(const int32_t val) { - this->app_id = val; -} +void configuration_query_by_index_response::__set_app_id(const int32_t val) { this->app_id = val; } -void configuration_query_by_index_response::__set_partition_count(const int32_t val) { - this->partition_count = val; +void configuration_query_by_index_response::__set_partition_count(const int32_t val) +{ + this->partition_count = val; } -void configuration_query_by_index_response::__set_is_stateful(const bool val) { - this->is_stateful = val; +void configuration_query_by_index_response::__set_is_stateful(const bool val) +{ + this->is_stateful = val; } -void configuration_query_by_index_response::__set_partitions(const std::vector & val) { - this->partitions = val; +void configuration_query_by_index_response::__set_partitions( + const std::vector &val) +{ + this->partitions = val; } -uint32_t configuration_query_by_index_response::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t configuration_query_by_index_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_count); - this->__isset.partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_stateful); - this->__isset.is_stateful = true; - } else { - xfer += iprot->skip(ftype); + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitions.clear(); - uint32_t _size26; - ::apache::thrift::protocol::TType _etype29; - xfer += iprot->readListBegin(_etype29, _size26); - this->partitions.resize(_size26); - uint32_t _i30; - for (_i30 = 0; _i30 < _size26; ++_i30) - { - xfer += this->partitions[_i30].read(iprot); + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readListEnd(); - } - this->__isset.partitions = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_count); + this->__isset.partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_stateful); + this->__isset.is_stateful = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitions.clear(); + uint32_t _size26; + ::apache::thrift::protocol::TType _etype29; + xfer += iprot->readListBegin(_etype29, _size26); + this->partitions.resize(_size26); + uint32_t _i30; + for (_i30 = 0; _i30 < _size26; ++_i30) { + xfer += this->partitions[_i30].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.partitions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_query_by_index_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_by_index_response"); +uint32_t +configuration_query_by_index_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_by_index_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->partition_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->partition_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->is_stateful); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->is_stateful); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 5); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); - std::vector ::const_iterator _iter31; - for (_iter31 = this->partitions.begin(); _iter31 != this->partitions.end(); ++_iter31) + xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 5); { - xfer += (*_iter31).write(oprot); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->partitions.size())); + std::vector::const_iterator _iter31; + for (_iter31 = this->partitions.begin(); _iter31 != this->partitions.end(); ++_iter31) { + xfer += (*_iter31).write(oprot); + } + xfer += oprot->writeListEnd(); } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += oprot->writeFieldEnd(); -void swap(configuration_query_by_index_response &a, configuration_query_by_index_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.app_id, b.app_id); - swap(a.partition_count, b.partition_count); - swap(a.is_stateful, b.is_stateful); - swap(a.partitions, b.partitions); - swap(a.__isset, b.__isset); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_query_by_index_response &a, configuration_query_by_index_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.app_id, b.app_id); + swap(a.partition_count, b.partition_count); + swap(a.is_stateful, b.is_stateful); + swap(a.partitions, b.partitions); + swap(a.__isset, b.__isset); } -configuration_query_by_index_response::configuration_query_by_index_response(const configuration_query_by_index_response& other32) { - err = other32.err; - app_id = other32.app_id; - partition_count = other32.partition_count; - is_stateful = other32.is_stateful; - partitions = other32.partitions; - __isset = other32.__isset; -} -configuration_query_by_index_response::configuration_query_by_index_response( configuration_query_by_index_response&& other33) { - err = std::move(other33.err); - app_id = std::move(other33.app_id); - partition_count = std::move(other33.partition_count); - is_stateful = std::move(other33.is_stateful); - partitions = std::move(other33.partitions); - __isset = std::move(other33.__isset); +configuration_query_by_index_response::configuration_query_by_index_response( + const configuration_query_by_index_response &other32) +{ + err = other32.err; + app_id = other32.app_id; + partition_count = other32.partition_count; + is_stateful = other32.is_stateful; + partitions = other32.partitions; + __isset = other32.__isset; } -configuration_query_by_index_response& configuration_query_by_index_response::operator=(const configuration_query_by_index_response& other34) { - err = other34.err; - app_id = other34.app_id; - partition_count = other34.partition_count; - is_stateful = other34.is_stateful; - partitions = other34.partitions; - __isset = other34.__isset; - return *this; +configuration_query_by_index_response::configuration_query_by_index_response( + configuration_query_by_index_response &&other33) +{ + err = std::move(other33.err); + app_id = std::move(other33.app_id); + partition_count = std::move(other33.partition_count); + is_stateful = std::move(other33.is_stateful); + partitions = std::move(other33.partitions); + __isset = std::move(other33.__isset); } -configuration_query_by_index_response& configuration_query_by_index_response::operator=(configuration_query_by_index_response&& other35) { - err = std::move(other35.err); - app_id = std::move(other35.app_id); - partition_count = std::move(other35.partition_count); - is_stateful = std::move(other35.is_stateful); - partitions = std::move(other35.partitions); - __isset = std::move(other35.__isset); - return *this; +configuration_query_by_index_response &configuration_query_by_index_response:: +operator=(const configuration_query_by_index_response &other34) +{ + err = other34.err; + app_id = other34.app_id; + partition_count = other34.partition_count; + is_stateful = other34.is_stateful; + partitions = other34.partitions; + __isset = other34.__isset; + return *this; } -void configuration_query_by_index_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_query_by_index_response("; - out << "err=" << to_string(err); - out << ", " << "app_id=" << to_string(app_id); - out << ", " << "partition_count=" << to_string(partition_count); - out << ", " << "is_stateful=" << to_string(is_stateful); - out << ", " << "partitions=" << to_string(partitions); - out << ")"; +configuration_query_by_index_response &configuration_query_by_index_response:: +operator=(configuration_query_by_index_response &&other35) +{ + err = std::move(other35.err); + app_id = std::move(other35.app_id); + partition_count = std::move(other35.partition_count); + is_stateful = std::move(other35.is_stateful); + partitions = std::move(other35.partitions); + __isset = std::move(other35.__isset); + return *this; } - - -app_info::~app_info() throw() { +void configuration_query_by_index_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_query_by_index_response("; + out << "err=" << to_string(err); + out << ", " + << "app_id=" << to_string(app_id); + out << ", " + << "partition_count=" << to_string(partition_count); + out << ", " + << "is_stateful=" << to_string(is_stateful); + out << ", " + << "partitions=" << to_string(partitions); + out << ")"; } +app_info::~app_info() throw() {} -void app_info::__set_status(const app_status::type val) { - this->status = val; -} - -void app_info::__set_app_type(const std::string& val) { - this->app_type = val; -} +void app_info::__set_status(const app_status::type val) { this->status = val; } -void app_info::__set_app_name(const std::string& val) { - this->app_name = val; -} +void app_info::__set_app_type(const std::string &val) { this->app_type = val; } -void app_info::__set_app_id(const int32_t val) { - this->app_id = val; -} +void app_info::__set_app_name(const std::string &val) { this->app_name = val; } -void app_info::__set_partition_count(const int32_t val) { - this->partition_count = val; -} +void app_info::__set_app_id(const int32_t val) { this->app_id = val; } -void app_info::__set_envs(const std::map & val) { - this->envs = val; -} +void app_info::__set_partition_count(const int32_t val) { this->partition_count = val; } -void app_info::__set_is_stateful(const bool val) { - this->is_stateful = val; -} +void app_info::__set_envs(const std::map &val) { this->envs = val; } -void app_info::__set_max_replica_count(const int32_t val) { - this->max_replica_count = val; -} +void app_info::__set_is_stateful(const bool val) { this->is_stateful = val; } -void app_info::__set_expire_second(const int64_t val) { - this->expire_second = val; -} +void app_info::__set_max_replica_count(const int32_t val) { this->max_replica_count = val; } -void app_info::__set_create_second(const int64_t val) { - this->create_second = val; -} +void app_info::__set_expire_second(const int64_t val) { this->expire_second = val; } -void app_info::__set_drop_second(const int64_t val) { - this->drop_second = val; -} +void app_info::__set_create_second(const int64_t val) { this->create_second = val; } -void app_info::__set_duplicating(const bool val) { - this->duplicating = val; -__isset.duplicating = true; -} +void app_info::__set_drop_second(const int64_t val) { this->drop_second = val; } -void app_info::__set_init_partition_count(const int32_t val) { - this->init_partition_count = val; +void app_info::__set_duplicating(const bool val) +{ + this->duplicating = val; + __isset.duplicating = true; } -void app_info::__set_is_bulk_loading(const bool val) { - this->is_bulk_loading = val; -__isset.is_bulk_loading = true; +void app_info::__set_init_partition_count(const int32_t val) { this->init_partition_count = val; } + +void app_info::__set_is_bulk_loading(const bool val) +{ + this->is_bulk_loading = val; + __isset.is_bulk_loading = true; } -uint32_t app_info::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t app_info::read(::apache::thrift::protocol::TProtocol *iprot) +{ - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast36; - xfer += iprot->readI32(ecast36); - this->status = (app_status::type)ecast36; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_type); - this->__isset.app_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_count); - this->__isset.partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->envs.clear(); - uint32_t _size37; - ::apache::thrift::protocol::TType _ktype38; - ::apache::thrift::protocol::TType _vtype39; - xfer += iprot->readMapBegin(_ktype38, _vtype39, _size37); - uint32_t _i41; - for (_i41 = 0; _i41 < _size37; ++_i41) - { - std::string _key42; - xfer += iprot->readString(_key42); - std::string& _val43 = this->envs[_key42]; - xfer += iprot->readString(_val43); + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast36; + xfer += iprot->readI32(ecast36); + this->status = (app_status::type)ecast36; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readMapEnd(); - } - this->__isset.envs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_stateful); - this->__isset.is_stateful = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->max_replica_count); - this->__isset.max_replica_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->expire_second); - this->__isset.expire_second = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->create_second); - this->__isset.create_second = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 11: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->drop_second); - this->__isset.drop_second = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 12: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->duplicating); - this->__isset.duplicating = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 13: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->init_partition_count); - this->__isset.init_partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 14: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_bulk_loading); - this->__isset.is_bulk_loading = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_type); + this->__isset.app_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_count); + this->__isset.partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->envs.clear(); + uint32_t _size37; + ::apache::thrift::protocol::TType _ktype38; + ::apache::thrift::protocol::TType _vtype39; + xfer += iprot->readMapBegin(_ktype38, _vtype39, _size37); + uint32_t _i41; + for (_i41 = 0; _i41 < _size37; ++_i41) { + std::string _key42; + xfer += iprot->readString(_key42); + std::string &_val43 = this->envs[_key42]; + xfer += iprot->readString(_val43); + } + xfer += iprot->readMapEnd(); + } + this->__isset.envs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_stateful); + this->__isset.is_stateful = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->max_replica_count); + this->__isset.max_replica_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->expire_second); + this->__isset.expire_second = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->create_second); + this->__isset.create_second = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->drop_second); + this->__isset.drop_second = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->duplicating); + this->__isset.duplicating = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 13: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->init_partition_count); + this->__isset.init_partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 14: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_bulk_loading); + this->__isset.is_bulk_loading = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t app_info::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("app_info"); +uint32_t app_info::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("app_info"); - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->app_type); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->app_type); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32(this->partition_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->partition_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("envs", ::apache::thrift::protocol::T_MAP, 6); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->envs.size())); - std::map ::const_iterator _iter44; - for (_iter44 = this->envs.begin(); _iter44 != this->envs.end(); ++_iter44) + xfer += oprot->writeFieldBegin("envs", ::apache::thrift::protocol::T_MAP, 6); { - xfer += oprot->writeString(_iter44->first); - xfer += oprot->writeString(_iter44->second); + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, + ::apache::thrift::protocol::T_STRING, + static_cast(this->envs.size())); + std::map::const_iterator _iter44; + for (_iter44 = this->envs.begin(); _iter44 != this->envs.end(); ++_iter44) { + xfer += oprot->writeString(_iter44->first); + xfer += oprot->writeString(_iter44->second); + } + xfer += oprot->writeMapEnd(); } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 7); - xfer += oprot->writeBool(this->is_stateful); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("max_replica_count", ::apache::thrift::protocol::T_I32, 8); - xfer += oprot->writeI32(this->max_replica_count); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("expire_second", ::apache::thrift::protocol::T_I64, 9); - xfer += oprot->writeI64(this->expire_second); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("create_second", ::apache::thrift::protocol::T_I64, 10); - xfer += oprot->writeI64(this->create_second); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("drop_second", ::apache::thrift::protocol::T_I64, 11); - xfer += oprot->writeI64(this->drop_second); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.duplicating) { - xfer += oprot->writeFieldBegin("duplicating", ::apache::thrift::protocol::T_BOOL, 12); - xfer += oprot->writeBool(this->duplicating); xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("init_partition_count", ::apache::thrift::protocol::T_I32, 13); - xfer += oprot->writeI32(this->init_partition_count); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.is_bulk_loading) { - xfer += oprot->writeFieldBegin("is_bulk_loading", ::apache::thrift::protocol::T_BOOL, 14); - xfer += oprot->writeBool(this->is_bulk_loading); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(app_info &a, app_info &b) { - using ::std::swap; - swap(a.status, b.status); - swap(a.app_type, b.app_type); - swap(a.app_name, b.app_name); - swap(a.app_id, b.app_id); - swap(a.partition_count, b.partition_count); - swap(a.envs, b.envs); - swap(a.is_stateful, b.is_stateful); - swap(a.max_replica_count, b.max_replica_count); - swap(a.expire_second, b.expire_second); - swap(a.create_second, b.create_second); - swap(a.drop_second, b.drop_second); - swap(a.duplicating, b.duplicating); - swap(a.init_partition_count, b.init_partition_count); - swap(a.is_bulk_loading, b.is_bulk_loading); - swap(a.__isset, b.__isset); -} - -app_info::app_info(const app_info& other45) { - status = other45.status; - app_type = other45.app_type; - app_name = other45.app_name; - app_id = other45.app_id; - partition_count = other45.partition_count; - envs = other45.envs; - is_stateful = other45.is_stateful; - max_replica_count = other45.max_replica_count; - expire_second = other45.expire_second; - create_second = other45.create_second; - drop_second = other45.drop_second; - duplicating = other45.duplicating; - init_partition_count = other45.init_partition_count; - is_bulk_loading = other45.is_bulk_loading; - __isset = other45.__isset; -} -app_info::app_info( app_info&& other46) { - status = std::move(other46.status); - app_type = std::move(other46.app_type); - app_name = std::move(other46.app_name); - app_id = std::move(other46.app_id); - partition_count = std::move(other46.partition_count); - envs = std::move(other46.envs); - is_stateful = std::move(other46.is_stateful); - max_replica_count = std::move(other46.max_replica_count); - expire_second = std::move(other46.expire_second); - create_second = std::move(other46.create_second); - drop_second = std::move(other46.drop_second); - duplicating = std::move(other46.duplicating); - init_partition_count = std::move(other46.init_partition_count); - is_bulk_loading = std::move(other46.is_bulk_loading); - __isset = std::move(other46.__isset); -} -app_info& app_info::operator=(const app_info& other47) { - status = other47.status; - app_type = other47.app_type; - app_name = other47.app_name; - app_id = other47.app_id; - partition_count = other47.partition_count; - envs = other47.envs; - is_stateful = other47.is_stateful; - max_replica_count = other47.max_replica_count; - expire_second = other47.expire_second; - create_second = other47.create_second; - drop_second = other47.drop_second; - duplicating = other47.duplicating; - init_partition_count = other47.init_partition_count; - is_bulk_loading = other47.is_bulk_loading; - __isset = other47.__isset; - return *this; -} -app_info& app_info::operator=(app_info&& other48) { - status = std::move(other48.status); - app_type = std::move(other48.app_type); - app_name = std::move(other48.app_name); - app_id = std::move(other48.app_id); - partition_count = std::move(other48.partition_count); - envs = std::move(other48.envs); - is_stateful = std::move(other48.is_stateful); - max_replica_count = std::move(other48.max_replica_count); - expire_second = std::move(other48.expire_second); - create_second = std::move(other48.create_second); - drop_second = std::move(other48.drop_second); - duplicating = std::move(other48.duplicating); - init_partition_count = std::move(other48.init_partition_count); - is_bulk_loading = std::move(other48.is_bulk_loading); - __isset = std::move(other48.__isset); - return *this; -} -void app_info::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "app_info("; - out << "status=" << to_string(status); - out << ", " << "app_type=" << to_string(app_type); - out << ", " << "app_name=" << to_string(app_name); - out << ", " << "app_id=" << to_string(app_id); - out << ", " << "partition_count=" << to_string(partition_count); - out << ", " << "envs=" << to_string(envs); - out << ", " << "is_stateful=" << to_string(is_stateful); - out << ", " << "max_replica_count=" << to_string(max_replica_count); - out << ", " << "expire_second=" << to_string(expire_second); - out << ", " << "create_second=" << to_string(create_second); - out << ", " << "drop_second=" << to_string(drop_second); - out << ", " << "duplicating="; (__isset.duplicating ? (out << to_string(duplicating)) : (out << "")); - out << ", " << "init_partition_count=" << to_string(init_partition_count); - out << ", " << "is_bulk_loading="; (__isset.is_bulk_loading ? (out << to_string(is_bulk_loading)) : (out << "")); - out << ")"; -} - - -thrift_request_meta_v1::~thrift_request_meta_v1() throw() { -} - - -void thrift_request_meta_v1::__set_app_id(const int32_t val) { - this->app_id = val; -__isset.app_id = true; -} - -void thrift_request_meta_v1::__set_partition_index(const int32_t val) { - this->partition_index = val; -__isset.partition_index = true; -} - -void thrift_request_meta_v1::__set_client_timeout(const int32_t val) { - this->client_timeout = val; -__isset.client_timeout = true; -} - -void thrift_request_meta_v1::__set_client_partition_hash(const int64_t val) { - this->client_partition_hash = val; -__isset.client_partition_hash = true; -} -void thrift_request_meta_v1::__set_is_backup_request(const bool val) { - this->is_backup_request = val; -__isset.is_backup_request = true; -} + xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->is_stateful); + xfer += oprot->writeFieldEnd(); -uint32_t thrift_request_meta_v1::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += oprot->writeFieldBegin("max_replica_count", ::apache::thrift::protocol::T_I32, 8); + xfer += oprot->writeI32(this->max_replica_count); + xfer += oprot->writeFieldEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("expire_second", ::apache::thrift::protocol::T_I64, 9); + xfer += oprot->writeI64(this->expire_second); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("create_second", ::apache::thrift::protocol::T_I64, 10); + xfer += oprot->writeI64(this->create_second); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("drop_second", ::apache::thrift::protocol::T_I64, 11); + xfer += oprot->writeI64(this->drop_second); + xfer += oprot->writeFieldEnd(); + if (this->__isset.duplicating) { + xfer += oprot->writeFieldBegin("duplicating", ::apache::thrift::protocol::T_BOOL, 12); + xfer += oprot->writeBool(this->duplicating); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("init_partition_count", ::apache::thrift::protocol::T_I32, 13); + xfer += oprot->writeI32(this->init_partition_count); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + if (this->__isset.is_bulk_loading) { + xfer += oprot->writeFieldBegin("is_bulk_loading", ::apache::thrift::protocol::T_BOOL, 14); + xfer += oprot->writeBool(this->is_bulk_loading); + xfer += oprot->writeFieldEnd(); } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_index); - this->__isset.partition_index = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->client_timeout); - this->__isset.client_timeout = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->client_partition_hash); - this->__isset.client_partition_hash = true; - } else { - xfer += iprot->skip(ftype); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(app_info &a, app_info &b) +{ + using ::std::swap; + swap(a.status, b.status); + swap(a.app_type, b.app_type); + swap(a.app_name, b.app_name); + swap(a.app_id, b.app_id); + swap(a.partition_count, b.partition_count); + swap(a.envs, b.envs); + swap(a.is_stateful, b.is_stateful); + swap(a.max_replica_count, b.max_replica_count); + swap(a.expire_second, b.expire_second); + swap(a.create_second, b.create_second); + swap(a.drop_second, b.drop_second); + swap(a.duplicating, b.duplicating); + swap(a.init_partition_count, b.init_partition_count); + swap(a.is_bulk_loading, b.is_bulk_loading); + swap(a.__isset, b.__isset); +} + +app_info::app_info(const app_info &other45) +{ + status = other45.status; + app_type = other45.app_type; + app_name = other45.app_name; + app_id = other45.app_id; + partition_count = other45.partition_count; + envs = other45.envs; + is_stateful = other45.is_stateful; + max_replica_count = other45.max_replica_count; + expire_second = other45.expire_second; + create_second = other45.create_second; + drop_second = other45.drop_second; + duplicating = other45.duplicating; + init_partition_count = other45.init_partition_count; + is_bulk_loading = other45.is_bulk_loading; + __isset = other45.__isset; +} +app_info::app_info(app_info &&other46) +{ + status = std::move(other46.status); + app_type = std::move(other46.app_type); + app_name = std::move(other46.app_name); + app_id = std::move(other46.app_id); + partition_count = std::move(other46.partition_count); + envs = std::move(other46.envs); + is_stateful = std::move(other46.is_stateful); + max_replica_count = std::move(other46.max_replica_count); + expire_second = std::move(other46.expire_second); + create_second = std::move(other46.create_second); + drop_second = std::move(other46.drop_second); + duplicating = std::move(other46.duplicating); + init_partition_count = std::move(other46.init_partition_count); + is_bulk_loading = std::move(other46.is_bulk_loading); + __isset = std::move(other46.__isset); +} +app_info &app_info::operator=(const app_info &other47) +{ + status = other47.status; + app_type = other47.app_type; + app_name = other47.app_name; + app_id = other47.app_id; + partition_count = other47.partition_count; + envs = other47.envs; + is_stateful = other47.is_stateful; + max_replica_count = other47.max_replica_count; + expire_second = other47.expire_second; + create_second = other47.create_second; + drop_second = other47.drop_second; + duplicating = other47.duplicating; + init_partition_count = other47.init_partition_count; + is_bulk_loading = other47.is_bulk_loading; + __isset = other47.__isset; + return *this; +} +app_info &app_info::operator=(app_info &&other48) +{ + status = std::move(other48.status); + app_type = std::move(other48.app_type); + app_name = std::move(other48.app_name); + app_id = std::move(other48.app_id); + partition_count = std::move(other48.partition_count); + envs = std::move(other48.envs); + is_stateful = std::move(other48.is_stateful); + max_replica_count = std::move(other48.max_replica_count); + expire_second = std::move(other48.expire_second); + create_second = std::move(other48.create_second); + drop_second = std::move(other48.drop_second); + duplicating = std::move(other48.duplicating); + init_partition_count = std::move(other48.init_partition_count); + is_bulk_loading = std::move(other48.is_bulk_loading); + __isset = std::move(other48.__isset); + return *this; +} +void app_info::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "app_info("; + out << "status=" << to_string(status); + out << ", " + << "app_type=" << to_string(app_type); + out << ", " + << "app_name=" << to_string(app_name); + out << ", " + << "app_id=" << to_string(app_id); + out << ", " + << "partition_count=" << to_string(partition_count); + out << ", " + << "envs=" << to_string(envs); + out << ", " + << "is_stateful=" << to_string(is_stateful); + out << ", " + << "max_replica_count=" << to_string(max_replica_count); + out << ", " + << "expire_second=" << to_string(expire_second); + out << ", " + << "create_second=" << to_string(create_second); + out << ", " + << "drop_second=" << to_string(drop_second); + out << ", " + << "duplicating="; + (__isset.duplicating ? (out << to_string(duplicating)) : (out << "")); + out << ", " + << "init_partition_count=" << to_string(init_partition_count); + out << ", " + << "is_bulk_loading="; + (__isset.is_bulk_loading ? (out << to_string(is_bulk_loading)) : (out << "")); + out << ")"; +} + +thrift_request_meta_v1::~thrift_request_meta_v1() throw() {} + +void thrift_request_meta_v1::__set_app_id(const int32_t val) +{ + this->app_id = val; + __isset.app_id = true; +} + +void thrift_request_meta_v1::__set_partition_index(const int32_t val) +{ + this->partition_index = val; + __isset.partition_index = true; +} + +void thrift_request_meta_v1::__set_client_timeout(const int32_t val) +{ + this->client_timeout = val; + __isset.client_timeout = true; +} + +void thrift_request_meta_v1::__set_client_partition_hash(const int64_t val) +{ + this->client_partition_hash = val; + __isset.client_partition_hash = true; +} + +void thrift_request_meta_v1::__set_is_backup_request(const bool val) +{ + this->is_backup_request = val; + __isset.is_backup_request = true; +} + +uint32_t thrift_request_meta_v1::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_backup_request); - this->__isset.is_backup_request = true; - } else { - xfer += iprot->skip(ftype); + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_index); + this->__isset.partition_index = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->client_timeout); + this->__isset.client_timeout = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->client_partition_hash); + this->__isset.client_partition_hash = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_backup_request); + this->__isset.is_backup_request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - return xfer; -} - -uint32_t thrift_request_meta_v1::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("thrift_request_meta_v1"); + xfer += iprot->readStructEnd(); - if (this->__isset.app_id) { - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.partition_index) { - xfer += oprot->writeFieldBegin("partition_index", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->partition_index); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.client_timeout) { - xfer += oprot->writeFieldBegin("client_timeout", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->client_timeout); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.client_partition_hash) { - xfer += oprot->writeFieldBegin("client_partition_hash", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->client_partition_hash); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.is_backup_request) { - xfer += oprot->writeFieldBegin("is_backup_request", ::apache::thrift::protocol::T_BOOL, 5); - xfer += oprot->writeBool(this->is_backup_request); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + return xfer; } -void swap(thrift_request_meta_v1 &a, thrift_request_meta_v1 &b) { - using ::std::swap; - swap(a.app_id, b.app_id); - swap(a.partition_index, b.partition_index); - swap(a.client_timeout, b.client_timeout); - swap(a.client_partition_hash, b.client_partition_hash); - swap(a.is_backup_request, b.is_backup_request); - swap(a.__isset, b.__isset); -} +uint32_t thrift_request_meta_v1::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("thrift_request_meta_v1"); -thrift_request_meta_v1::thrift_request_meta_v1(const thrift_request_meta_v1& other49) { - app_id = other49.app_id; - partition_index = other49.partition_index; - client_timeout = other49.client_timeout; - client_partition_hash = other49.client_partition_hash; - is_backup_request = other49.is_backup_request; - __isset = other49.__isset; -} -thrift_request_meta_v1::thrift_request_meta_v1( thrift_request_meta_v1&& other50) { - app_id = std::move(other50.app_id); - partition_index = std::move(other50.partition_index); - client_timeout = std::move(other50.client_timeout); - client_partition_hash = std::move(other50.client_partition_hash); - is_backup_request = std::move(other50.is_backup_request); - __isset = std::move(other50.__isset); -} -thrift_request_meta_v1& thrift_request_meta_v1::operator=(const thrift_request_meta_v1& other51) { - app_id = other51.app_id; - partition_index = other51.partition_index; - client_timeout = other51.client_timeout; - client_partition_hash = other51.client_partition_hash; - is_backup_request = other51.is_backup_request; - __isset = other51.__isset; - return *this; -} -thrift_request_meta_v1& thrift_request_meta_v1::operator=(thrift_request_meta_v1&& other52) { - app_id = std::move(other52.app_id); - partition_index = std::move(other52.partition_index); - client_timeout = std::move(other52.client_timeout); - client_partition_hash = std::move(other52.client_partition_hash); - is_backup_request = std::move(other52.is_backup_request); - __isset = std::move(other52.__isset); - return *this; -} -void thrift_request_meta_v1::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "thrift_request_meta_v1("; - out << "app_id="; (__isset.app_id ? (out << to_string(app_id)) : (out << "")); - out << ", " << "partition_index="; (__isset.partition_index ? (out << to_string(partition_index)) : (out << "")); - out << ", " << "client_timeout="; (__isset.client_timeout ? (out << to_string(client_timeout)) : (out << "")); - out << ", " << "client_partition_hash="; (__isset.client_partition_hash ? (out << to_string(client_partition_hash)) : (out << "")); - out << ", " << "is_backup_request="; (__isset.is_backup_request ? (out << to_string(is_backup_request)) : (out << "")); - out << ")"; + if (this->__isset.app_id) { + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.partition_index) { + xfer += oprot->writeFieldBegin("partition_index", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->partition_index); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.client_timeout) { + xfer += oprot->writeFieldBegin("client_timeout", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->client_timeout); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.client_partition_hash) { + xfer += + oprot->writeFieldBegin("client_partition_hash", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->client_partition_hash); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.is_backup_request) { + xfer += oprot->writeFieldBegin("is_backup_request", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->is_backup_request); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(thrift_request_meta_v1 &a, thrift_request_meta_v1 &b) +{ + using ::std::swap; + swap(a.app_id, b.app_id); + swap(a.partition_index, b.partition_index); + swap(a.client_timeout, b.client_timeout); + swap(a.client_partition_hash, b.client_partition_hash); + swap(a.is_backup_request, b.is_backup_request); + swap(a.__isset, b.__isset); +} + +thrift_request_meta_v1::thrift_request_meta_v1(const thrift_request_meta_v1 &other49) +{ + app_id = other49.app_id; + partition_index = other49.partition_index; + client_timeout = other49.client_timeout; + client_partition_hash = other49.client_partition_hash; + is_backup_request = other49.is_backup_request; + __isset = other49.__isset; +} +thrift_request_meta_v1::thrift_request_meta_v1(thrift_request_meta_v1 &&other50) +{ + app_id = std::move(other50.app_id); + partition_index = std::move(other50.partition_index); + client_timeout = std::move(other50.client_timeout); + client_partition_hash = std::move(other50.client_partition_hash); + is_backup_request = std::move(other50.is_backup_request); + __isset = std::move(other50.__isset); +} +thrift_request_meta_v1 &thrift_request_meta_v1::operator=(const thrift_request_meta_v1 &other51) +{ + app_id = other51.app_id; + partition_index = other51.partition_index; + client_timeout = other51.client_timeout; + client_partition_hash = other51.client_partition_hash; + is_backup_request = other51.is_backup_request; + __isset = other51.__isset; + return *this; +} +thrift_request_meta_v1 &thrift_request_meta_v1::operator=(thrift_request_meta_v1 &&other52) +{ + app_id = std::move(other52.app_id); + partition_index = std::move(other52.partition_index); + client_timeout = std::move(other52.client_timeout); + client_partition_hash = std::move(other52.client_partition_hash); + is_backup_request = std::move(other52.is_backup_request); + __isset = std::move(other52.__isset); + return *this; +} +void thrift_request_meta_v1::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "thrift_request_meta_v1("; + out << "app_id="; + (__isset.app_id ? (out << to_string(app_id)) : (out << "")); + out << ", " + << "partition_index="; + (__isset.partition_index ? (out << to_string(partition_index)) : (out << "")); + out << ", " + << "client_timeout="; + (__isset.client_timeout ? (out << to_string(client_timeout)) : (out << "")); + out << ", " + << "client_partition_hash="; + (__isset.client_partition_hash ? (out << to_string(client_partition_hash)) : (out << "")); + out << ", " + << "is_backup_request="; + (__isset.is_backup_request ? (out << to_string(is_backup_request)) : (out << "")); + out << ")"; } } // namespace diff --git a/src/dist/replication/common/replication_types.cpp b/src/dist/replication/common/replication_types.cpp index 2d88dc247d..4dfd75ffa4 100644 --- a/src/dist/replication/common/replication_types.cpp +++ b/src/dist/replication/common/replication_types.cpp @@ -11,14105 +11,14541 @@ #include -namespace dsn { namespace replication { - -int _kpartition_statusValues[] = { - partition_status::PS_INVALID, - partition_status::PS_INACTIVE, - partition_status::PS_ERROR, - partition_status::PS_PRIMARY, - partition_status::PS_SECONDARY, - partition_status::PS_POTENTIAL_SECONDARY, - partition_status::PS_PARTITION_SPLIT -}; -const char* _kpartition_statusNames[] = { - "PS_INVALID", - "PS_INACTIVE", - "PS_ERROR", - "PS_PRIMARY", - "PS_SECONDARY", - "PS_POTENTIAL_SECONDARY", - "PS_PARTITION_SPLIT" -}; -const std::map _partition_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(7, _kpartition_statusValues, _kpartition_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kread_semanticValues[] = { - read_semantic::ReadInvalid, - read_semantic::ReadLastUpdate, - read_semantic::ReadOutdated, - read_semantic::ReadSnapshot -}; -const char* _kread_semanticNames[] = { - "ReadInvalid", - "ReadLastUpdate", - "ReadOutdated", - "ReadSnapshot" -}; -const std::map _read_semantic_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kread_semanticValues, _kread_semanticNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); +namespace dsn { +namespace replication { + +int _kpartition_statusValues[] = {partition_status::PS_INVALID, + partition_status::PS_INACTIVE, + partition_status::PS_ERROR, + partition_status::PS_PRIMARY, + partition_status::PS_SECONDARY, + partition_status::PS_POTENTIAL_SECONDARY, + partition_status::PS_PARTITION_SPLIT}; +const char *_kpartition_statusNames[] = {"PS_INVALID", + "PS_INACTIVE", + "PS_ERROR", + "PS_PRIMARY", + "PS_SECONDARY", + "PS_POTENTIAL_SECONDARY", + "PS_PARTITION_SPLIT"}; +const std::map _partition_status_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(7, _kpartition_statusValues, _kpartition_statusNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kread_semanticValues[] = {read_semantic::ReadInvalid, + read_semantic::ReadLastUpdate, + read_semantic::ReadOutdated, + read_semantic::ReadSnapshot}; +const char *_kread_semanticNames[] = { + "ReadInvalid", "ReadLastUpdate", "ReadOutdated", "ReadSnapshot"}; +const std::map _read_semantic_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(4, _kread_semanticValues, _kread_semanticNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); int _klearn_typeValues[] = { - learn_type::LT_INVALID, - learn_type::LT_CACHE, - learn_type::LT_APP, - learn_type::LT_LOG -}; -const char* _klearn_typeNames[] = { - "LT_INVALID", - "LT_CACHE", - "LT_APP", - "LT_LOG" -}; -const std::map _learn_type_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _klearn_typeValues, _klearn_typeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _klearner_statusValues[] = { - learner_status::LearningInvalid, - learner_status::LearningWithoutPrepare, - learner_status::LearningWithPrepareTransient, - learner_status::LearningWithPrepare, - learner_status::LearningSucceeded, - learner_status::LearningFailed -}; -const char* _klearner_statusNames[] = { - "LearningInvalid", - "LearningWithoutPrepare", - "LearningWithPrepareTransient", - "LearningWithPrepare", - "LearningSucceeded", - "LearningFailed" -}; -const std::map _learner_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _klearner_statusValues, _klearner_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kconfig_typeValues[] = { - config_type::CT_INVALID, - config_type::CT_ASSIGN_PRIMARY, - config_type::CT_UPGRADE_TO_PRIMARY, - config_type::CT_ADD_SECONDARY, - config_type::CT_UPGRADE_TO_SECONDARY, - config_type::CT_DOWNGRADE_TO_SECONDARY, - config_type::CT_DOWNGRADE_TO_INACTIVE, - config_type::CT_REMOVE, - config_type::CT_ADD_SECONDARY_FOR_LB, - config_type::CT_PRIMARY_FORCE_UPDATE_BALLOT, - config_type::CT_DROP_PARTITION -}; -const char* _kconfig_typeNames[] = { - "CT_INVALID", - "CT_ASSIGN_PRIMARY", - "CT_UPGRADE_TO_PRIMARY", - "CT_ADD_SECONDARY", - "CT_UPGRADE_TO_SECONDARY", - "CT_DOWNGRADE_TO_SECONDARY", - "CT_DOWNGRADE_TO_INACTIVE", - "CT_REMOVE", - "CT_ADD_SECONDARY_FOR_LB", - "CT_PRIMARY_FORCE_UPDATE_BALLOT", - "CT_DROP_PARTITION" -}; -const std::map _config_type_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(11, _kconfig_typeValues, _kconfig_typeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + learn_type::LT_INVALID, learn_type::LT_CACHE, learn_type::LT_APP, learn_type::LT_LOG}; +const char *_klearn_typeNames[] = {"LT_INVALID", "LT_CACHE", "LT_APP", "LT_LOG"}; +const std::map _learn_type_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(4, _klearn_typeValues, _klearn_typeNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _klearner_statusValues[] = {learner_status::LearningInvalid, + learner_status::LearningWithoutPrepare, + learner_status::LearningWithPrepareTransient, + learner_status::LearningWithPrepare, + learner_status::LearningSucceeded, + learner_status::LearningFailed}; +const char *_klearner_statusNames[] = {"LearningInvalid", + "LearningWithoutPrepare", + "LearningWithPrepareTransient", + "LearningWithPrepare", + "LearningSucceeded", + "LearningFailed"}; +const std::map _learner_status_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(6, _klearner_statusValues, _klearner_statusNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kconfig_typeValues[] = {config_type::CT_INVALID, + config_type::CT_ASSIGN_PRIMARY, + config_type::CT_UPGRADE_TO_PRIMARY, + config_type::CT_ADD_SECONDARY, + config_type::CT_UPGRADE_TO_SECONDARY, + config_type::CT_DOWNGRADE_TO_SECONDARY, + config_type::CT_DOWNGRADE_TO_INACTIVE, + config_type::CT_REMOVE, + config_type::CT_ADD_SECONDARY_FOR_LB, + config_type::CT_PRIMARY_FORCE_UPDATE_BALLOT, + config_type::CT_DROP_PARTITION}; +const char *_kconfig_typeNames[] = {"CT_INVALID", + "CT_ASSIGN_PRIMARY", + "CT_UPGRADE_TO_PRIMARY", + "CT_ADD_SECONDARY", + "CT_UPGRADE_TO_SECONDARY", + "CT_DOWNGRADE_TO_SECONDARY", + "CT_DOWNGRADE_TO_INACTIVE", + "CT_REMOVE", + "CT_ADD_SECONDARY_FOR_LB", + "CT_PRIMARY_FORCE_UPDATE_BALLOT", + "CT_DROP_PARTITION"}; +const std::map _config_type_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(11, _kconfig_typeValues, _kconfig_typeNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); int _knode_statusValues[] = { - node_status::NS_INVALID, - node_status::NS_ALIVE, - node_status::NS_UNALIVE -}; -const char* _knode_statusNames[] = { - "NS_INVALID", - "NS_ALIVE", - "NS_UNALIVE" -}; -const std::map _node_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _knode_statusValues, _knode_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kmeta_function_levelValues[] = { - meta_function_level::fl_stopped, - meta_function_level::fl_blind, - meta_function_level::fl_freezed, - meta_function_level::fl_steady, - meta_function_level::fl_lively, - meta_function_level::fl_invalid -}; -const char* _kmeta_function_levelNames[] = { - "fl_stopped", - "fl_blind", - "fl_freezed", - "fl_steady", - "fl_lively", - "fl_invalid" -}; -const std::map _meta_function_level_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kmeta_function_levelValues, _kmeta_function_levelNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kbalancer_request_typeValues[] = { - balancer_request_type::move_primary, - balancer_request_type::copy_primary, - balancer_request_type::copy_secondary -}; -const char* _kbalancer_request_typeNames[] = { - "move_primary", - "copy_primary", - "copy_secondary" -}; -const std::map _balancer_request_type_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kbalancer_request_typeValues, _kbalancer_request_typeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kapp_env_operationValues[] = { - app_env_operation::APP_ENV_OP_INVALID, - app_env_operation::APP_ENV_OP_SET, - app_env_operation::APP_ENV_OP_DEL, - app_env_operation::APP_ENV_OP_CLEAR -}; -const char* _kapp_env_operationNames[] = { - "APP_ENV_OP_INVALID", - "APP_ENV_OP_SET", - "APP_ENV_OP_DEL", - "APP_ENV_OP_CLEAR" -}; -const std::map _app_env_operation_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kapp_env_operationValues, _kapp_env_operationNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kduplication_statusValues[] = { - duplication_status::DS_INIT, - duplication_status::DS_START, - duplication_status::DS_PAUSE, - duplication_status::DS_REMOVED -}; -const char* _kduplication_statusNames[] = { - "DS_INIT", - "DS_START", - "DS_PAUSE", - "DS_REMOVED" -}; -const std::map _duplication_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kduplication_statusValues, _kduplication_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kduplication_fail_modeValues[] = { - duplication_fail_mode::FAIL_SLOW, - duplication_fail_mode::FAIL_SKIP, - duplication_fail_mode::FAIL_FAST -}; -const char* _kduplication_fail_modeNames[] = { - "FAIL_SLOW", - "FAIL_SKIP", - "FAIL_FAST" -}; -const std::map _duplication_fail_mode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kduplication_fail_modeValues, _kduplication_fail_modeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kbulk_load_statusValues[] = { - bulk_load_status::BLS_INVALID, - bulk_load_status::BLS_DOWNLOADING, - bulk_load_status::BLS_DOWNLOADED, - bulk_load_status::BLS_INGESTING, - bulk_load_status::BLS_SUCCEED, - bulk_load_status::BLS_FAILED, - bulk_load_status::BLS_PAUSING, - bulk_load_status::BLS_PAUSED, - bulk_load_status::BLS_CANCELED -}; -const char* _kbulk_load_statusNames[] = { - "BLS_INVALID", - "BLS_DOWNLOADING", - "BLS_DOWNLOADED", - "BLS_INGESTING", - "BLS_SUCCEED", - "BLS_FAILED", - "BLS_PAUSING", - "BLS_PAUSED", - "BLS_CANCELED" -}; -const std::map _bulk_load_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(9, _kbulk_load_statusValues, _kbulk_load_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - - -mutation_header::~mutation_header() throw() { -} - - -void mutation_header::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} - -void mutation_header::__set_ballot(const int64_t val) { - this->ballot = val; -} - -void mutation_header::__set_decree(const int64_t val) { - this->decree = val; -} - -void mutation_header::__set_log_offset(const int64_t val) { - this->log_offset = val; -} - -void mutation_header::__set_last_committed_decree(const int64_t val) { - this->last_committed_decree = val; -} - -void mutation_header::__set_timestamp(const int64_t val) { - this->timestamp = val; -} - -uint32_t mutation_header::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + node_status::NS_INVALID, node_status::NS_ALIVE, node_status::NS_UNALIVE}; +const char *_knode_statusNames[] = {"NS_INVALID", "NS_ALIVE", "NS_UNALIVE"}; +const std::map _node_status_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(3, _knode_statusValues, _knode_statusNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kmeta_function_levelValues[] = {meta_function_level::fl_stopped, + meta_function_level::fl_blind, + meta_function_level::fl_freezed, + meta_function_level::fl_steady, + meta_function_level::fl_lively, + meta_function_level::fl_invalid}; +const char *_kmeta_function_levelNames[] = { + "fl_stopped", "fl_blind", "fl_freezed", "fl_steady", "fl_lively", "fl_invalid"}; +const std::map _meta_function_level_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(6, _kmeta_function_levelValues, _kmeta_function_levelNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kbalancer_request_typeValues[] = {balancer_request_type::move_primary, + balancer_request_type::copy_primary, + balancer_request_type::copy_secondary}; +const char *_kbalancer_request_typeNames[] = {"move_primary", "copy_primary", "copy_secondary"}; +const std::map _balancer_request_type_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(3, _kbalancer_request_typeValues, _kbalancer_request_typeNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kapp_env_operationValues[] = {app_env_operation::APP_ENV_OP_INVALID, + app_env_operation::APP_ENV_OP_SET, + app_env_operation::APP_ENV_OP_DEL, + app_env_operation::APP_ENV_OP_CLEAR}; +const char *_kapp_env_operationNames[] = { + "APP_ENV_OP_INVALID", "APP_ENV_OP_SET", "APP_ENV_OP_DEL", "APP_ENV_OP_CLEAR"}; +const std::map _app_env_operation_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(4, _kapp_env_operationValues, _kapp_env_operationNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kduplication_statusValues[] = {duplication_status::DS_INIT, + duplication_status::DS_START, + duplication_status::DS_PAUSE, + duplication_status::DS_REMOVED}; +const char *_kduplication_statusNames[] = {"DS_INIT", "DS_START", "DS_PAUSE", "DS_REMOVED"}; +const std::map _duplication_status_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(4, _kduplication_statusValues, _kduplication_statusNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kduplication_fail_modeValues[] = {duplication_fail_mode::FAIL_SLOW, + duplication_fail_mode::FAIL_SKIP, + duplication_fail_mode::FAIL_FAST}; +const char *_kduplication_fail_modeNames[] = {"FAIL_SLOW", "FAIL_SKIP", "FAIL_FAST"}; +const std::map _duplication_fail_mode_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(3, _kduplication_fail_modeValues, _kduplication_fail_modeNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kbulk_load_statusValues[] = {bulk_load_status::BLS_INVALID, + bulk_load_status::BLS_DOWNLOADING, + bulk_load_status::BLS_DOWNLOADED, + bulk_load_status::BLS_INGESTING, + bulk_load_status::BLS_SUCCEED, + bulk_load_status::BLS_FAILED, + bulk_load_status::BLS_PAUSING, + bulk_load_status::BLS_PAUSED, + bulk_load_status::BLS_CANCELED}; +const char *_kbulk_load_statusNames[] = {"BLS_INVALID", + "BLS_DOWNLOADING", + "BLS_DOWNLOADED", + "BLS_INGESTING", + "BLS_SUCCEED", + "BLS_FAILED", + "BLS_PAUSING", + "BLS_PAUSED", + "BLS_CANCELED"}; +const std::map _bulk_load_status_VALUES_TO_NAMES( + ::apache::thrift::TEnumIterator(9, _kbulk_load_statusValues, _kbulk_load_statusNames), + ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +mutation_header::~mutation_header() throw() {} + +void mutation_header::__set_pid(const ::dsn::gpid &val) { this->pid = val; } + +void mutation_header::__set_ballot(const int64_t val) { this->ballot = val; } + +void mutation_header::__set_decree(const int64_t val) { this->decree = val; } + +void mutation_header::__set_log_offset(const int64_t val) { this->log_offset = val; } + +void mutation_header::__set_last_committed_decree(const int64_t val) +{ + this->last_committed_decree = val; +} + +void mutation_header::__set_timestamp(const int64_t val) { this->timestamp = val; } + +uint32_t mutation_header::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->decree); + this->__isset.decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->log_offset); + this->__isset.log_offset = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->decree); - this->__isset.decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->log_offset); - this->__isset.log_offset = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->timestamp); - this->__isset.timestamp = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t mutation_header::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("mutation_header"); - - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("decree", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->decree); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("log_offset", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->log_offset); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructEnd(); - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 6); - xfer += oprot->writeI64(this->timestamp); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + return xfer; } -void swap(mutation_header &a, mutation_header &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.ballot, b.ballot); - swap(a.decree, b.decree); - swap(a.log_offset, b.log_offset); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.timestamp, b.timestamp); - swap(a.__isset, b.__isset); -} +uint32_t mutation_header::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("mutation_header"); -mutation_header::mutation_header(const mutation_header& other0) { - pid = other0.pid; - ballot = other0.ballot; - decree = other0.decree; - log_offset = other0.log_offset; - last_committed_decree = other0.last_committed_decree; - timestamp = other0.timestamp; - __isset = other0.__isset; -} -mutation_header::mutation_header( mutation_header&& other1) { - pid = std::move(other1.pid); - ballot = std::move(other1.ballot); - decree = std::move(other1.decree); - log_offset = std::move(other1.log_offset); - last_committed_decree = std::move(other1.last_committed_decree); - timestamp = std::move(other1.timestamp); - __isset = std::move(other1.__isset); -} -mutation_header& mutation_header::operator=(const mutation_header& other2) { - pid = other2.pid; - ballot = other2.ballot; - decree = other2.decree; - log_offset = other2.log_offset; - last_committed_decree = other2.last_committed_decree; - timestamp = other2.timestamp; - __isset = other2.__isset; - return *this; -} -mutation_header& mutation_header::operator=(mutation_header&& other3) { - pid = std::move(other3.pid); - ballot = std::move(other3.ballot); - decree = std::move(other3.decree); - log_offset = std::move(other3.log_offset); - last_committed_decree = std::move(other3.last_committed_decree); - timestamp = std::move(other3.timestamp); - __isset = std::move(other3.__isset); - return *this; -} -void mutation_header::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "mutation_header("; - out << "pid=" << to_string(pid); - out << ", " << "ballot=" << to_string(ballot); - out << ", " << "decree=" << to_string(decree); - out << ", " << "log_offset=" << to_string(log_offset); - out << ", " << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " << "timestamp=" << to_string(timestamp); - out << ")"; -} + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); -mutation_update::~mutation_update() throw() { -} + xfer += oprot->writeFieldBegin("decree", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->decree); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("log_offset", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->log_offset); + xfer += oprot->writeFieldEnd(); -void mutation_update::__set_code(const ::dsn::task_code& val) { - this->code = val; -} + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); -void mutation_update::__set_serialization_type(const int32_t val) { - this->serialization_type = val; -} + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); -void mutation_update::__set_data(const ::dsn::blob& val) { - this->data = val; -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(mutation_header &a, mutation_header &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.ballot, b.ballot); + swap(a.decree, b.decree); + swap(a.log_offset, b.log_offset); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.timestamp, b.timestamp); + swap(a.__isset, b.__isset); +} + +mutation_header::mutation_header(const mutation_header &other0) +{ + pid = other0.pid; + ballot = other0.ballot; + decree = other0.decree; + log_offset = other0.log_offset; + last_committed_decree = other0.last_committed_decree; + timestamp = other0.timestamp; + __isset = other0.__isset; +} +mutation_header::mutation_header(mutation_header &&other1) +{ + pid = std::move(other1.pid); + ballot = std::move(other1.ballot); + decree = std::move(other1.decree); + log_offset = std::move(other1.log_offset); + last_committed_decree = std::move(other1.last_committed_decree); + timestamp = std::move(other1.timestamp); + __isset = std::move(other1.__isset); +} +mutation_header &mutation_header::operator=(const mutation_header &other2) +{ + pid = other2.pid; + ballot = other2.ballot; + decree = other2.decree; + log_offset = other2.log_offset; + last_committed_decree = other2.last_committed_decree; + timestamp = other2.timestamp; + __isset = other2.__isset; + return *this; +} +mutation_header &mutation_header::operator=(mutation_header &&other3) +{ + pid = std::move(other3.pid); + ballot = std::move(other3.ballot); + decree = std::move(other3.decree); + log_offset = std::move(other3.log_offset); + last_committed_decree = std::move(other3.last_committed_decree); + timestamp = std::move(other3.timestamp); + __isset = std::move(other3.__isset); + return *this; +} +void mutation_header::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "mutation_header("; + out << "pid=" << to_string(pid); + out << ", " + << "ballot=" << to_string(ballot); + out << ", " + << "decree=" << to_string(decree); + out << ", " + << "log_offset=" << to_string(log_offset); + out << ", " + << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " + << "timestamp=" << to_string(timestamp); + out << ")"; +} + +mutation_update::~mutation_update() throw() {} + +void mutation_update::__set_code(const ::dsn::task_code &val) { this->code = val; } + +void mutation_update::__set_serialization_type(const int32_t val) +{ + this->serialization_type = val; +} + +void mutation_update::__set_data(const ::dsn::blob &val) { this->data = val; } + +void mutation_update::__set_start_time_ns(const int64_t val) +{ + this->start_time_ns = val; + __isset.start_time_ns = true; +} + +uint32_t mutation_update::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->code.read(iprot); + this->__isset.code = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->serialization_type); + this->__isset.serialization_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->data.read(iprot); + this->__isset.data = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->start_time_ns); + this->__isset.start_time_ns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -void mutation_update::__set_start_time_ns(const int64_t val) { - this->start_time_ns = val; -__isset.start_time_ns = true; -} + xfer += iprot->readStructEnd(); -uint32_t mutation_update::read(::apache::thrift::protocol::TProtocol* iprot) { + return xfer; +} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t mutation_update::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("mutation_update"); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->code.write(oprot); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("serialization_type", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->serialization_type); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->data.write(oprot); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->code.read(iprot); - this->__isset.code = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->serialization_type); - this->__isset.serialization_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->data.read(iprot); - this->__isset.data = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->start_time_ns); - this->__isset.start_time_ns = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + if (this->__isset.start_time_ns) { + xfer += oprot->writeFieldBegin("start_time_ns", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->start_time_ns); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(mutation_update &a, mutation_update &b) +{ + using ::std::swap; + swap(a.code, b.code); + swap(a.serialization_type, b.serialization_type); + swap(a.data, b.data); + swap(a.start_time_ns, b.start_time_ns); + swap(a.__isset, b.__isset); +} + +mutation_update::mutation_update(const mutation_update &other4) +{ + code = other4.code; + serialization_type = other4.serialization_type; + data = other4.data; + start_time_ns = other4.start_time_ns; + __isset = other4.__isset; +} +mutation_update::mutation_update(mutation_update &&other5) +{ + code = std::move(other5.code); + serialization_type = std::move(other5.serialization_type); + data = std::move(other5.data); + start_time_ns = std::move(other5.start_time_ns); + __isset = std::move(other5.__isset); +} +mutation_update &mutation_update::operator=(const mutation_update &other6) +{ + code = other6.code; + serialization_type = other6.serialization_type; + data = other6.data; + start_time_ns = other6.start_time_ns; + __isset = other6.__isset; + return *this; +} +mutation_update &mutation_update::operator=(mutation_update &&other7) +{ + code = std::move(other7.code); + serialization_type = std::move(other7.serialization_type); + data = std::move(other7.data); + start_time_ns = std::move(other7.start_time_ns); + __isset = std::move(other7.__isset); + return *this; +} +void mutation_update::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "mutation_update("; + out << "code=" << to_string(code); + out << ", " + << "serialization_type=" << to_string(serialization_type); + out << ", " + << "data=" << to_string(data); + out << ", " + << "start_time_ns="; + (__isset.start_time_ns ? (out << to_string(start_time_ns)) : (out << "")); + out << ")"; +} + +mutation_data::~mutation_data() throw() {} + +void mutation_data::__set_header(const mutation_header &val) { this->header = val; } + +void mutation_data::__set_updates(const std::vector &val) { this->updates = val; } + +uint32_t mutation_data::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->header.read(iprot); + this->__isset.header = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->updates.clear(); + uint32_t _size8; + ::apache::thrift::protocol::TType _etype11; + xfer += iprot->readListBegin(_etype11, _size8); + this->updates.resize(_size8); + uint32_t _i12; + for (_i12 = 0; _i12 < _size8; ++_i12) { + xfer += this->updates[_i12].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.updates = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t mutation_update::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("mutation_update"); - - xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->code.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t mutation_data::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("mutation_data"); - xfer += oprot->writeFieldBegin("serialization_type", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->serialization_type); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->data.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("header", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->header.write(oprot); + xfer += oprot->writeFieldEnd(); - if (this->__isset.start_time_ns) { - xfer += oprot->writeFieldBegin("start_time_ns", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->start_time_ns); + xfer += oprot->writeFieldBegin("updates", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->updates.size())); + std::vector::const_iterator _iter13; + for (_iter13 = this->updates.begin(); _iter13 != this->updates.end(); ++_iter13) { + xfer += (*_iter13).write(oprot); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(mutation_update &a, mutation_update &b) { - using ::std::swap; - swap(a.code, b.code); - swap(a.serialization_type, b.serialization_type); - swap(a.data, b.data); - swap(a.start_time_ns, b.start_time_ns); - swap(a.__isset, b.__isset); +void swap(mutation_data &a, mutation_data &b) +{ + using ::std::swap; + swap(a.header, b.header); + swap(a.updates, b.updates); + swap(a.__isset, b.__isset); } -mutation_update::mutation_update(const mutation_update& other4) { - code = other4.code; - serialization_type = other4.serialization_type; - data = other4.data; - start_time_ns = other4.start_time_ns; - __isset = other4.__isset; +mutation_data::mutation_data(const mutation_data &other14) +{ + header = other14.header; + updates = other14.updates; + __isset = other14.__isset; } -mutation_update::mutation_update( mutation_update&& other5) { - code = std::move(other5.code); - serialization_type = std::move(other5.serialization_type); - data = std::move(other5.data); - start_time_ns = std::move(other5.start_time_ns); - __isset = std::move(other5.__isset); +mutation_data::mutation_data(mutation_data &&other15) +{ + header = std::move(other15.header); + updates = std::move(other15.updates); + __isset = std::move(other15.__isset); } -mutation_update& mutation_update::operator=(const mutation_update& other6) { - code = other6.code; - serialization_type = other6.serialization_type; - data = other6.data; - start_time_ns = other6.start_time_ns; - __isset = other6.__isset; - return *this; +mutation_data &mutation_data::operator=(const mutation_data &other16) +{ + header = other16.header; + updates = other16.updates; + __isset = other16.__isset; + return *this; } -mutation_update& mutation_update::operator=(mutation_update&& other7) { - code = std::move(other7.code); - serialization_type = std::move(other7.serialization_type); - data = std::move(other7.data); - start_time_ns = std::move(other7.start_time_ns); - __isset = std::move(other7.__isset); - return *this; +mutation_data &mutation_data::operator=(mutation_data &&other17) +{ + header = std::move(other17.header); + updates = std::move(other17.updates); + __isset = std::move(other17.__isset); + return *this; } -void mutation_update::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "mutation_update("; - out << "code=" << to_string(code); - out << ", " << "serialization_type=" << to_string(serialization_type); - out << ", " << "data=" << to_string(data); - out << ", " << "start_time_ns="; (__isset.start_time_ns ? (out << to_string(start_time_ns)) : (out << "")); - out << ")"; +void mutation_data::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "mutation_data("; + out << "header=" << to_string(header); + out << ", " + << "updates=" << to_string(updates); + out << ")"; } +replica_configuration::~replica_configuration() throw() {} -mutation_data::~mutation_data() throw() { -} +void replica_configuration::__set_pid(const ::dsn::gpid &val) { this->pid = val; } +void replica_configuration::__set_ballot(const int64_t val) { this->ballot = val; } -void mutation_data::__set_header(const mutation_header& val) { - this->header = val; -} +void replica_configuration::__set_primary(const ::dsn::rpc_address &val) { this->primary = val; } -void mutation_data::__set_updates(const std::vector & val) { - this->updates = val; -} +void replica_configuration::__set_status(const partition_status::type val) { this->status = val; } -uint32_t mutation_data::read(::apache::thrift::protocol::TProtocol* iprot) { +void replica_configuration::__set_learner_signature(const int64_t val) +{ + this->learner_signature = val; +} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t replica_configuration::read(::apache::thrift::protocol::TProtocol *iprot) +{ - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->header.read(iprot); - this->__isset.header = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->updates.clear(); - uint32_t _size8; - ::apache::thrift::protocol::TType _etype11; - xfer += iprot->readListBegin(_etype11, _size8); - this->updates.resize(_size8); - uint32_t _i12; - for (_i12 = 0; _i12 < _size8; ++_i12) - { - xfer += this->updates[_i12].read(iprot); + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->primary.read(iprot); + this->__isset.primary = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast18; + xfer += iprot->readI32(ecast18); + this->status = (partition_status::type)ecast18; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readListEnd(); - } - this->__isset.updates = true; - } else { - xfer += iprot->skip(ftype); + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->learner_signature); + this->__isset.learner_signature = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t mutation_data::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("mutation_data"); +uint32_t replica_configuration::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("replica_configuration"); - xfer += oprot->writeFieldBegin("header", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->header.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("updates", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->updates.size())); - std::vector ::const_iterator _iter13; - for (_iter13 = this->updates.begin(); _iter13 != this->updates.end(); ++_iter13) - { - xfer += (*_iter13).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("primary", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->primary.write(oprot); + xfer += oprot->writeFieldEnd(); -void swap(mutation_data &a, mutation_data &b) { - using ::std::swap; - swap(a.header, b.header); - swap(a.updates, b.updates); - swap(a.__isset, b.__isset); -} + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); -mutation_data::mutation_data(const mutation_data& other14) { - header = other14.header; - updates = other14.updates; - __isset = other14.__isset; -} -mutation_data::mutation_data( mutation_data&& other15) { - header = std::move(other15.header); - updates = std::move(other15.updates); - __isset = std::move(other15.__isset); -} -mutation_data& mutation_data::operator=(const mutation_data& other16) { - header = other16.header; - updates = other16.updates; - __isset = other16.__isset; - return *this; -} -mutation_data& mutation_data::operator=(mutation_data&& other17) { - header = std::move(other17.header); - updates = std::move(other17.updates); - __isset = std::move(other17.__isset); - return *this; -} -void mutation_data::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "mutation_data("; - out << "header=" << to_string(header); - out << ", " << "updates=" << to_string(updates); - out << ")"; -} + xfer += oprot->writeFieldBegin("learner_signature", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->learner_signature); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(replica_configuration &a, replica_configuration &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.ballot, b.ballot); + swap(a.primary, b.primary); + swap(a.status, b.status); + swap(a.learner_signature, b.learner_signature); + swap(a.__isset, b.__isset); +} + +replica_configuration::replica_configuration(const replica_configuration &other19) +{ + pid = other19.pid; + ballot = other19.ballot; + primary = other19.primary; + status = other19.status; + learner_signature = other19.learner_signature; + __isset = other19.__isset; +} +replica_configuration::replica_configuration(replica_configuration &&other20) +{ + pid = std::move(other20.pid); + ballot = std::move(other20.ballot); + primary = std::move(other20.primary); + status = std::move(other20.status); + learner_signature = std::move(other20.learner_signature); + __isset = std::move(other20.__isset); +} +replica_configuration &replica_configuration::operator=(const replica_configuration &other21) +{ + pid = other21.pid; + ballot = other21.ballot; + primary = other21.primary; + status = other21.status; + learner_signature = other21.learner_signature; + __isset = other21.__isset; + return *this; +} +replica_configuration &replica_configuration::operator=(replica_configuration &&other22) +{ + pid = std::move(other22.pid); + ballot = std::move(other22.ballot); + primary = std::move(other22.primary); + status = std::move(other22.status); + learner_signature = std::move(other22.learner_signature); + __isset = std::move(other22.__isset); + return *this; +} +void replica_configuration::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "replica_configuration("; + out << "pid=" << to_string(pid); + out << ", " + << "ballot=" << to_string(ballot); + out << ", " + << "primary=" << to_string(primary); + out << ", " + << "status=" << to_string(status); + out << ", " + << "learner_signature=" << to_string(learner_signature); + out << ")"; +} + +prepare_msg::~prepare_msg() throw() {} + +void prepare_msg::__set_config(const replica_configuration &val) { this->config = val; } + +void prepare_msg::__set_mu(const mutation_data &val) { this->mu = val; } + +uint32_t prepare_msg::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->mu.read(iprot); + this->__isset.mu = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + xfer += iprot->readStructEnd(); -replica_configuration::~replica_configuration() throw() { + return xfer; } +uint32_t prepare_msg::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("prepare_msg"); -void replica_configuration::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); -void replica_configuration::__set_ballot(const int64_t val) { - this->ballot = val; -} + xfer += oprot->writeFieldBegin("mu", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->mu.write(oprot); + xfer += oprot->writeFieldEnd(); -void replica_configuration::__set_primary(const ::dsn::rpc_address& val) { - this->primary = val; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void replica_configuration::__set_status(const partition_status::type val) { - this->status = val; +void swap(prepare_msg &a, prepare_msg &b) +{ + using ::std::swap; + swap(a.config, b.config); + swap(a.mu, b.mu); + swap(a.__isset, b.__isset); } -void replica_configuration::__set_learner_signature(const int64_t val) { - this->learner_signature = val; +prepare_msg::prepare_msg(const prepare_msg &other23) +{ + config = other23.config; + mu = other23.mu; + __isset = other23.__isset; +} +prepare_msg::prepare_msg(prepare_msg &&other24) +{ + config = std::move(other24.config); + mu = std::move(other24.mu); + __isset = std::move(other24.__isset); +} +prepare_msg &prepare_msg::operator=(const prepare_msg &other25) +{ + config = other25.config; + mu = other25.mu; + __isset = other25.__isset; + return *this; +} +prepare_msg &prepare_msg::operator=(prepare_msg &&other26) +{ + config = std::move(other26.config); + mu = std::move(other26.mu); + __isset = std::move(other26.__isset); + return *this; +} +void prepare_msg::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "prepare_msg("; + out << "config=" << to_string(config); + out << ", " + << "mu=" << to_string(mu); + out << ")"; } -uint32_t replica_configuration::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - +read_request_header::~read_request_header() throw() {} - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->primary.read(iprot); - this->__isset.primary = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast18; - xfer += iprot->readI32(ecast18); - this->status = (partition_status::type)ecast18; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->learner_signature); - this->__isset.learner_signature = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } +void read_request_header::__set_pid(const ::dsn::gpid &val) { this->pid = val; } - xfer += iprot->readStructEnd(); +void read_request_header::__set_code(const ::dsn::task_code &val) { this->code = val; } - return xfer; -} +void read_request_header::__set_semantic(const read_semantic::type val) { this->semantic = val; } -uint32_t replica_configuration::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("replica_configuration"); +void read_request_header::__set_version_decree(const int64_t val) { this->version_decree = val; } - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t read_request_header::read(::apache::thrift::protocol::TProtocol *iprot) +{ - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += oprot->writeFieldBegin("primary", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->primary.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("learner_signature", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->learner_signature); - xfer += oprot->writeFieldEnd(); + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->code.read(iprot); + this->__isset.code = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast27; + xfer += iprot->readI32(ecast27); + this->semantic = (read_semantic::type)ecast27; + this->__isset.semantic = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->version_decree); + this->__isset.version_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += iprot->readStructEnd(); -void swap(replica_configuration &a, replica_configuration &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.ballot, b.ballot); - swap(a.primary, b.primary); - swap(a.status, b.status); - swap(a.learner_signature, b.learner_signature); - swap(a.__isset, b.__isset); + return xfer; } -replica_configuration::replica_configuration(const replica_configuration& other19) { - pid = other19.pid; - ballot = other19.ballot; - primary = other19.primary; - status = other19.status; - learner_signature = other19.learner_signature; - __isset = other19.__isset; -} -replica_configuration::replica_configuration( replica_configuration&& other20) { - pid = std::move(other20.pid); - ballot = std::move(other20.ballot); - primary = std::move(other20.primary); - status = std::move(other20.status); - learner_signature = std::move(other20.learner_signature); - __isset = std::move(other20.__isset); -} -replica_configuration& replica_configuration::operator=(const replica_configuration& other21) { - pid = other21.pid; - ballot = other21.ballot; - primary = other21.primary; - status = other21.status; - learner_signature = other21.learner_signature; - __isset = other21.__isset; - return *this; -} -replica_configuration& replica_configuration::operator=(replica_configuration&& other22) { - pid = std::move(other22.pid); - ballot = std::move(other22.ballot); - primary = std::move(other22.primary); - status = std::move(other22.status); - learner_signature = std::move(other22.learner_signature); - __isset = std::move(other22.__isset); - return *this; -} -void replica_configuration::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "replica_configuration("; - out << "pid=" << to_string(pid); - out << ", " << "ballot=" << to_string(ballot); - out << ", " << "primary=" << to_string(primary); - out << ", " << "status=" << to_string(status); - out << ", " << "learner_signature=" << to_string(learner_signature); - out << ")"; -} +uint32_t read_request_header::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("read_request_header"); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); -prepare_msg::~prepare_msg() throw() { -} + xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->code.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("semantic", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->semantic); + xfer += oprot->writeFieldEnd(); -void prepare_msg::__set_config(const replica_configuration& val) { - this->config = val; -} + xfer += oprot->writeFieldBegin("version_decree", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->version_decree); + xfer += oprot->writeFieldEnd(); -void prepare_msg::__set_mu(const mutation_data& val) { - this->mu = val; -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(read_request_header &a, read_request_header &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.code, b.code); + swap(a.semantic, b.semantic); + swap(a.version_decree, b.version_decree); + swap(a.__isset, b.__isset); +} + +read_request_header::read_request_header(const read_request_header &other28) +{ + pid = other28.pid; + code = other28.code; + semantic = other28.semantic; + version_decree = other28.version_decree; + __isset = other28.__isset; +} +read_request_header::read_request_header(read_request_header &&other29) +{ + pid = std::move(other29.pid); + code = std::move(other29.code); + semantic = std::move(other29.semantic); + version_decree = std::move(other29.version_decree); + __isset = std::move(other29.__isset); +} +read_request_header &read_request_header::operator=(const read_request_header &other30) +{ + pid = other30.pid; + code = other30.code; + semantic = other30.semantic; + version_decree = other30.version_decree; + __isset = other30.__isset; + return *this; +} +read_request_header &read_request_header::operator=(read_request_header &&other31) +{ + pid = std::move(other31.pid); + code = std::move(other31.code); + semantic = std::move(other31.semantic); + version_decree = std::move(other31.version_decree); + __isset = std::move(other31.__isset); + return *this; +} +void read_request_header::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "read_request_header("; + out << "pid=" << to_string(pid); + out << ", " + << "code=" << to_string(code); + out << ", " + << "semantic=" << to_string(semantic); + out << ", " + << "version_decree=" << to_string(version_decree); + out << ")"; +} + +write_request_header::~write_request_header() throw() {} + +void write_request_header::__set_pid(const ::dsn::gpid &val) { this->pid = val; } + +void write_request_header::__set_code(const ::dsn::task_code &val) { this->code = val; } + +uint32_t write_request_header::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->code.read(iprot); + this->__isset.code = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -uint32_t prepare_msg::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += iprot->readStructEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + return xfer; +} - xfer += iprot->readStructBegin(fname); +uint32_t write_request_header::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("write_request_header"); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->code.write(oprot); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->config.read(iprot); - this->__isset.config = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->mu.read(iprot); - this->__isset.mu = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(write_request_header &a, write_request_header &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.code, b.code); + swap(a.__isset, b.__isset); +} + +write_request_header::write_request_header(const write_request_header &other32) +{ + pid = other32.pid; + code = other32.code; + __isset = other32.__isset; +} +write_request_header::write_request_header(write_request_header &&other33) +{ + pid = std::move(other33.pid); + code = std::move(other33.code); + __isset = std::move(other33.__isset); +} +write_request_header &write_request_header::operator=(const write_request_header &other34) +{ + pid = other34.pid; + code = other34.code; + __isset = other34.__isset; + return *this; +} +write_request_header &write_request_header::operator=(write_request_header &&other35) +{ + pid = std::move(other35.pid); + code = std::move(other35.code); + __isset = std::move(other35.__isset); + return *this; +} +void write_request_header::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "write_request_header("; + out << "pid=" << to_string(pid); + out << ", " + << "code=" << to_string(code); + out << ")"; +} + +rw_response_header::~rw_response_header() throw() {} + +void rw_response_header::__set_err(const ::dsn::error_code &val) { this->err = val; } + +uint32_t rw_response_header::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t prepare_msg::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("prepare_msg"); - - xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->config.write(oprot); - xfer += oprot->writeFieldEnd(); +uint32_t rw_response_header::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("rw_response_header"); - xfer += oprot->writeFieldBegin("mu", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->mu.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(prepare_msg &a, prepare_msg &b) { - using ::std::swap; - swap(a.config, b.config); - swap(a.mu, b.mu); - swap(a.__isset, b.__isset); +void swap(rw_response_header &a, rw_response_header &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.__isset, b.__isset); } -prepare_msg::prepare_msg(const prepare_msg& other23) { - config = other23.config; - mu = other23.mu; - __isset = other23.__isset; +rw_response_header::rw_response_header(const rw_response_header &other36) +{ + err = other36.err; + __isset = other36.__isset; } -prepare_msg::prepare_msg( prepare_msg&& other24) { - config = std::move(other24.config); - mu = std::move(other24.mu); - __isset = std::move(other24.__isset); +rw_response_header::rw_response_header(rw_response_header &&other37) +{ + err = std::move(other37.err); + __isset = std::move(other37.__isset); } -prepare_msg& prepare_msg::operator=(const prepare_msg& other25) { - config = other25.config; - mu = other25.mu; - __isset = other25.__isset; - return *this; +rw_response_header &rw_response_header::operator=(const rw_response_header &other38) +{ + err = other38.err; + __isset = other38.__isset; + return *this; } -prepare_msg& prepare_msg::operator=(prepare_msg&& other26) { - config = std::move(other26.config); - mu = std::move(other26.mu); - __isset = std::move(other26.__isset); - return *this; +rw_response_header &rw_response_header::operator=(rw_response_header &&other39) +{ + err = std::move(other39.err); + __isset = std::move(other39.__isset); + return *this; } -void prepare_msg::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "prepare_msg("; - out << "config=" << to_string(config); - out << ", " << "mu=" << to_string(mu); - out << ")"; +void rw_response_header::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "rw_response_header("; + out << "err=" << to_string(err); + out << ")"; } +prepare_ack::~prepare_ack() throw() {} -read_request_header::~read_request_header() throw() { -} +void prepare_ack::__set_pid(const ::dsn::gpid &val) { this->pid = val; } +void prepare_ack::__set_err(const ::dsn::error_code &val) { this->err = val; } -void read_request_header::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} +void prepare_ack::__set_ballot(const int64_t val) { this->ballot = val; } -void read_request_header::__set_code(const ::dsn::task_code& val) { - this->code = val; -} +void prepare_ack::__set_decree(const int64_t val) { this->decree = val; } -void read_request_header::__set_semantic(const read_semantic::type val) { - this->semantic = val; +void prepare_ack::__set_last_committed_decree_in_app(const int64_t val) +{ + this->last_committed_decree_in_app = val; } -void read_request_header::__set_version_decree(const int64_t val) { - this->version_decree = val; +void prepare_ack::__set_last_committed_decree_in_prepare_list(const int64_t val) +{ + this->last_committed_decree_in_prepare_list = val; } -uint32_t read_request_header::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t prepare_ack::read(::apache::thrift::protocol::TProtocol *iprot) +{ - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->code.read(iprot); - this->__isset.code = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast27; - xfer += iprot->readI32(ecast27); - this->semantic = (read_semantic::type)ecast27; - this->__isset.semantic = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->version_decree); - this->__isset.version_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->decree); + this->__isset.decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree_in_app); + this->__isset.last_committed_decree_in_app = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree_in_prepare_list); + this->__isset.last_committed_decree_in_prepare_list = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t read_request_header::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("read_request_header"); +uint32_t prepare_ack::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("prepare_ack"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->code.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("semantic", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->semantic); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("version_decree", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->version_decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("decree", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->decree); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin( + "last_committed_decree_in_app", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->last_committed_decree_in_app); + xfer += oprot->writeFieldEnd(); -void swap(read_request_header &a, read_request_header &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.code, b.code); - swap(a.semantic, b.semantic); - swap(a.version_decree, b.version_decree); - swap(a.__isset, b.__isset); -} + xfer += oprot->writeFieldBegin( + "last_committed_decree_in_prepare_list", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->last_committed_decree_in_prepare_list); + xfer += oprot->writeFieldEnd(); -read_request_header::read_request_header(const read_request_header& other28) { - pid = other28.pid; - code = other28.code; - semantic = other28.semantic; - version_decree = other28.version_decree; - __isset = other28.__isset; -} -read_request_header::read_request_header( read_request_header&& other29) { - pid = std::move(other29.pid); - code = std::move(other29.code); - semantic = std::move(other29.semantic); - version_decree = std::move(other29.version_decree); - __isset = std::move(other29.__isset); -} -read_request_header& read_request_header::operator=(const read_request_header& other30) { - pid = other30.pid; - code = other30.code; - semantic = other30.semantic; - version_decree = other30.version_decree; - __isset = other30.__isset; - return *this; -} -read_request_header& read_request_header::operator=(read_request_header&& other31) { - pid = std::move(other31.pid); - code = std::move(other31.code); - semantic = std::move(other31.semantic); - version_decree = std::move(other31.version_decree); - __isset = std::move(other31.__isset); - return *this; -} -void read_request_header::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "read_request_header("; - out << "pid=" << to_string(pid); - out << ", " << "code=" << to_string(code); - out << ", " << "semantic=" << to_string(semantic); - out << ", " << "version_decree=" << to_string(version_decree); - out << ")"; -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(prepare_ack &a, prepare_ack &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.err, b.err); + swap(a.ballot, b.ballot); + swap(a.decree, b.decree); + swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app); + swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list); + swap(a.__isset, b.__isset); +} + +prepare_ack::prepare_ack(const prepare_ack &other40) +{ + pid = other40.pid; + err = other40.err; + ballot = other40.ballot; + decree = other40.decree; + last_committed_decree_in_app = other40.last_committed_decree_in_app; + last_committed_decree_in_prepare_list = other40.last_committed_decree_in_prepare_list; + __isset = other40.__isset; +} +prepare_ack::prepare_ack(prepare_ack &&other41) +{ + pid = std::move(other41.pid); + err = std::move(other41.err); + ballot = std::move(other41.ballot); + decree = std::move(other41.decree); + last_committed_decree_in_app = std::move(other41.last_committed_decree_in_app); + last_committed_decree_in_prepare_list = + std::move(other41.last_committed_decree_in_prepare_list); + __isset = std::move(other41.__isset); +} +prepare_ack &prepare_ack::operator=(const prepare_ack &other42) +{ + pid = other42.pid; + err = other42.err; + ballot = other42.ballot; + decree = other42.decree; + last_committed_decree_in_app = other42.last_committed_decree_in_app; + last_committed_decree_in_prepare_list = other42.last_committed_decree_in_prepare_list; + __isset = other42.__isset; + return *this; +} +prepare_ack &prepare_ack::operator=(prepare_ack &&other43) +{ + pid = std::move(other43.pid); + err = std::move(other43.err); + ballot = std::move(other43.ballot); + decree = std::move(other43.decree); + last_committed_decree_in_app = std::move(other43.last_committed_decree_in_app); + last_committed_decree_in_prepare_list = + std::move(other43.last_committed_decree_in_prepare_list); + __isset = std::move(other43.__isset); + return *this; +} +void prepare_ack::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "prepare_ack("; + out << "pid=" << to_string(pid); + out << ", " + << "err=" << to_string(err); + out << ", " + << "ballot=" << to_string(ballot); + out << ", " + << "decree=" << to_string(decree); + out << ", " + << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app); + out << ", " + << "last_committed_decree_in_prepare_list=" + << to_string(last_committed_decree_in_prepare_list); + out << ")"; +} + +learn_state::~learn_state() throw() {} + +void learn_state::__set_from_decree_excluded(const int64_t val) +{ + this->from_decree_excluded = val; +} + +void learn_state::__set_to_decree_included(const int64_t val) { this->to_decree_included = val; } + +void learn_state::__set_meta(const ::dsn::blob &val) { this->meta = val; } + +void learn_state::__set_files(const std::vector &val) { this->files = val; } + +void learn_state::__set_learn_start_decree(const int64_t val) +{ + this->learn_start_decree = val; + __isset.learn_start_decree = true; +} + +uint32_t learn_state::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->from_decree_excluded); + this->__isset.from_decree_excluded = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->to_decree_included); + this->__isset.to_decree_included = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->meta.read(iprot); + this->__isset.meta = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->files.clear(); + uint32_t _size44; + ::apache::thrift::protocol::TType _etype47; + xfer += iprot->readListBegin(_etype47, _size44); + this->files.resize(_size44); + uint32_t _i48; + for (_i48 = 0; _i48 < _size44; ++_i48) { + xfer += iprot->readString(this->files[_i48]); + } + xfer += iprot->readListEnd(); + } + this->__isset.files = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->learn_start_decree); + this->__isset.learn_start_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + xfer += iprot->readStructEnd(); -write_request_header::~write_request_header() throw() { + return xfer; } +uint32_t learn_state::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("learn_state"); -void write_request_header::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} + xfer += oprot->writeFieldBegin("from_decree_excluded", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->from_decree_excluded); + xfer += oprot->writeFieldEnd(); -void write_request_header::__set_code(const ::dsn::task_code& val) { - this->code = val; -} + xfer += oprot->writeFieldBegin("to_decree_included", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->to_decree_included); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("meta", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->meta.write(oprot); + xfer += oprot->writeFieldEnd(); -uint32_t write_request_header::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, + static_cast(this->files.size())); + std::vector::const_iterator _iter49; + for (_iter49 = this->files.begin(); _iter49 != this->files.end(); ++_iter49) { + xfer += oprot->writeString((*_iter49)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + if (this->__isset.learn_start_decree) { + xfer += oprot->writeFieldBegin("learn_start_decree", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->learn_start_decree); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(learn_state &a, learn_state &b) +{ + using ::std::swap; + swap(a.from_decree_excluded, b.from_decree_excluded); + swap(a.to_decree_included, b.to_decree_included); + swap(a.meta, b.meta); + swap(a.files, b.files); + swap(a.learn_start_decree, b.learn_start_decree); + swap(a.__isset, b.__isset); +} + +learn_state::learn_state(const learn_state &other50) +{ + from_decree_excluded = other50.from_decree_excluded; + to_decree_included = other50.to_decree_included; + meta = other50.meta; + files = other50.files; + learn_start_decree = other50.learn_start_decree; + __isset = other50.__isset; +} +learn_state::learn_state(learn_state &&other51) +{ + from_decree_excluded = std::move(other51.from_decree_excluded); + to_decree_included = std::move(other51.to_decree_included); + meta = std::move(other51.meta); + files = std::move(other51.files); + learn_start_decree = std::move(other51.learn_start_decree); + __isset = std::move(other51.__isset); +} +learn_state &learn_state::operator=(const learn_state &other52) +{ + from_decree_excluded = other52.from_decree_excluded; + to_decree_included = other52.to_decree_included; + meta = other52.meta; + files = other52.files; + learn_start_decree = other52.learn_start_decree; + __isset = other52.__isset; + return *this; +} +learn_state &learn_state::operator=(learn_state &&other53) +{ + from_decree_excluded = std::move(other53.from_decree_excluded); + to_decree_included = std::move(other53.to_decree_included); + meta = std::move(other53.meta); + files = std::move(other53.files); + learn_start_decree = std::move(other53.learn_start_decree); + __isset = std::move(other53.__isset); + return *this; +} +void learn_state::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "learn_state("; + out << "from_decree_excluded=" << to_string(from_decree_excluded); + out << ", " + << "to_decree_included=" << to_string(to_decree_included); + out << ", " + << "meta=" << to_string(meta); + out << ", " + << "files=" << to_string(files); + out << ", " + << "learn_start_decree="; + (__isset.learn_start_decree ? (out << to_string(learn_start_decree)) : (out << "")); + out << ")"; +} + +learn_request::~learn_request() throw() {} + +void learn_request::__set_pid(const ::dsn::gpid &val) { this->pid = val; } + +void learn_request::__set_learner(const ::dsn::rpc_address &val) { this->learner = val; } + +void learn_request::__set_signature(const int64_t val) { this->signature = val; } + +void learn_request::__set_last_committed_decree_in_app(const int64_t val) +{ + this->last_committed_decree_in_app = val; +} + +void learn_request::__set_last_committed_decree_in_prepare_list(const int64_t val) +{ + this->last_committed_decree_in_prepare_list = val; +} + +void learn_request::__set_app_specific_learn_request(const ::dsn::blob &val) +{ + this->app_specific_learn_request = val; +} + +void learn_request::__set_max_gced_decree(const int64_t val) +{ + this->max_gced_decree = val; + __isset.max_gced_decree = true; +} + +uint32_t learn_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->learner.read(iprot); + this->__isset.learner = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->signature); + this->__isset.signature = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree_in_app); + this->__isset.last_committed_decree_in_app = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree_in_prepare_list); + this->__isset.last_committed_decree_in_prepare_list = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->app_specific_learn_request.read(iprot); + this->__isset.app_specific_learn_request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->max_gced_decree); + this->__isset.max_gced_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructEnd(); - using ::apache::thrift::protocol::TProtocolException; + return xfer; +} +uint32_t learn_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("learn_request"); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->code.read(iprot); - this->__isset.code = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldBegin("learner", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->learner.write(oprot); + xfer += oprot->writeFieldEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("signature", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->signature); + xfer += oprot->writeFieldEnd(); -uint32_t write_request_header::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("write_request_header"); + xfer += oprot->writeFieldBegin( + "last_committed_decree_in_app", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->last_committed_decree_in_app); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin( + "last_committed_decree_in_prepare_list", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->last_committed_decree_in_prepare_list); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->code.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin( + "app_specific_learn_request", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->app_specific_learn_request.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + if (this->__isset.max_gced_decree) { + xfer += oprot->writeFieldBegin("max_gced_decree", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64(this->max_gced_decree); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(learn_request &a, learn_request &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.learner, b.learner); + swap(a.signature, b.signature); + swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app); + swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list); + swap(a.app_specific_learn_request, b.app_specific_learn_request); + swap(a.max_gced_decree, b.max_gced_decree); + swap(a.__isset, b.__isset); +} + +learn_request::learn_request(const learn_request &other54) +{ + pid = other54.pid; + learner = other54.learner; + signature = other54.signature; + last_committed_decree_in_app = other54.last_committed_decree_in_app; + last_committed_decree_in_prepare_list = other54.last_committed_decree_in_prepare_list; + app_specific_learn_request = other54.app_specific_learn_request; + max_gced_decree = other54.max_gced_decree; + __isset = other54.__isset; +} +learn_request::learn_request(learn_request &&other55) +{ + pid = std::move(other55.pid); + learner = std::move(other55.learner); + signature = std::move(other55.signature); + last_committed_decree_in_app = std::move(other55.last_committed_decree_in_app); + last_committed_decree_in_prepare_list = + std::move(other55.last_committed_decree_in_prepare_list); + app_specific_learn_request = std::move(other55.app_specific_learn_request); + max_gced_decree = std::move(other55.max_gced_decree); + __isset = std::move(other55.__isset); +} +learn_request &learn_request::operator=(const learn_request &other56) +{ + pid = other56.pid; + learner = other56.learner; + signature = other56.signature; + last_committed_decree_in_app = other56.last_committed_decree_in_app; + last_committed_decree_in_prepare_list = other56.last_committed_decree_in_prepare_list; + app_specific_learn_request = other56.app_specific_learn_request; + max_gced_decree = other56.max_gced_decree; + __isset = other56.__isset; + return *this; +} +learn_request &learn_request::operator=(learn_request &&other57) +{ + pid = std::move(other57.pid); + learner = std::move(other57.learner); + signature = std::move(other57.signature); + last_committed_decree_in_app = std::move(other57.last_committed_decree_in_app); + last_committed_decree_in_prepare_list = + std::move(other57.last_committed_decree_in_prepare_list); + app_specific_learn_request = std::move(other57.app_specific_learn_request); + max_gced_decree = std::move(other57.max_gced_decree); + __isset = std::move(other57.__isset); + return *this; +} +void learn_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "learn_request("; + out << "pid=" << to_string(pid); + out << ", " + << "learner=" << to_string(learner); + out << ", " + << "signature=" << to_string(signature); + out << ", " + << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app); + out << ", " + << "last_committed_decree_in_prepare_list=" + << to_string(last_committed_decree_in_prepare_list); + out << ", " + << "app_specific_learn_request=" << to_string(app_specific_learn_request); + out << ", " + << "max_gced_decree="; + (__isset.max_gced_decree ? (out << to_string(max_gced_decree)) : (out << "")); + out << ")"; +} + +learn_response::~learn_response() throw() {} + +void learn_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void learn_response::__set_config(const replica_configuration &val) { this->config = val; } + +void learn_response::__set_last_committed_decree(const int64_t val) +{ + this->last_committed_decree = val; +} + +void learn_response::__set_prepare_start_decree(const int64_t val) +{ + this->prepare_start_decree = val; +} + +void learn_response::__set_type(const learn_type::type val) { this->type = val; } + +void learn_response::__set_state(const learn_state &val) { this->state = val; } + +void learn_response::__set_address(const ::dsn::rpc_address &val) { this->address = val; } + +void learn_response::__set_base_local_dir(const std::string &val) { this->base_local_dir = val; } + +uint32_t learn_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->prepare_start_decree); + this->__isset.prepare_start_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast58; + xfer += iprot->readI32(ecast58); + this->type = (learn_type::type)ecast58; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->state.read(iprot); + this->__isset.state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->address.read(iprot); + this->__isset.address = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->base_local_dir); + this->__isset.base_local_dir = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -void swap(write_request_header &a, write_request_header &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.code, b.code); - swap(a.__isset, b.__isset); -} + xfer += iprot->readStructEnd(); -write_request_header::write_request_header(const write_request_header& other32) { - pid = other32.pid; - code = other32.code; - __isset = other32.__isset; -} -write_request_header::write_request_header( write_request_header&& other33) { - pid = std::move(other33.pid); - code = std::move(other33.code); - __isset = std::move(other33.__isset); -} -write_request_header& write_request_header::operator=(const write_request_header& other34) { - pid = other34.pid; - code = other34.code; - __isset = other34.__isset; - return *this; -} -write_request_header& write_request_header::operator=(write_request_header&& other35) { - pid = std::move(other35.pid); - code = std::move(other35.code); - __isset = std::move(other35.__isset); - return *this; -} -void write_request_header::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "write_request_header("; - out << "pid=" << to_string(pid); - out << ", " << "code=" << to_string(code); - out << ")"; + return xfer; } +uint32_t learn_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("learn_response"); -rw_response_header::~rw_response_header() throw() { -} + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); -void rw_response_header::__set_err(const ::dsn::error_code& val) { - this->err = val; -} + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); -uint32_t rw_response_header::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += oprot->writeFieldBegin("prepare_start_decree", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->prepare_start_decree); + xfer += oprot->writeFieldEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->state.write(oprot); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("address", ::apache::thrift::protocol::T_STRUCT, 7); + xfer += this->address.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("base_local_dir", ::apache::thrift::protocol::T_STRING, 8); + xfer += oprot->writeString(this->base_local_dir); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(learn_response &a, learn_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.config, b.config); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.prepare_start_decree, b.prepare_start_decree); + swap(a.type, b.type); + swap(a.state, b.state); + swap(a.address, b.address); + swap(a.base_local_dir, b.base_local_dir); + swap(a.__isset, b.__isset); +} + +learn_response::learn_response(const learn_response &other59) +{ + err = other59.err; + config = other59.config; + last_committed_decree = other59.last_committed_decree; + prepare_start_decree = other59.prepare_start_decree; + type = other59.type; + state = other59.state; + address = other59.address; + base_local_dir = other59.base_local_dir; + __isset = other59.__isset; +} +learn_response::learn_response(learn_response &&other60) +{ + err = std::move(other60.err); + config = std::move(other60.config); + last_committed_decree = std::move(other60.last_committed_decree); + prepare_start_decree = std::move(other60.prepare_start_decree); + type = std::move(other60.type); + state = std::move(other60.state); + address = std::move(other60.address); + base_local_dir = std::move(other60.base_local_dir); + __isset = std::move(other60.__isset); +} +learn_response &learn_response::operator=(const learn_response &other61) +{ + err = other61.err; + config = other61.config; + last_committed_decree = other61.last_committed_decree; + prepare_start_decree = other61.prepare_start_decree; + type = other61.type; + state = other61.state; + address = other61.address; + base_local_dir = other61.base_local_dir; + __isset = other61.__isset; + return *this; +} +learn_response &learn_response::operator=(learn_response &&other62) +{ + err = std::move(other62.err); + config = std::move(other62.config); + last_committed_decree = std::move(other62.last_committed_decree); + prepare_start_decree = std::move(other62.prepare_start_decree); + type = std::move(other62.type); + state = std::move(other62.state); + address = std::move(other62.address); + base_local_dir = std::move(other62.base_local_dir); + __isset = std::move(other62.__isset); + return *this; +} +void learn_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "learn_response("; + out << "err=" << to_string(err); + out << ", " + << "config=" << to_string(config); + out << ", " + << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " + << "prepare_start_decree=" << to_string(prepare_start_decree); + out << ", " + << "type=" << to_string(type); + out << ", " + << "state=" << to_string(state); + out << ", " + << "address=" << to_string(address); + out << ", " + << "base_local_dir=" << to_string(base_local_dir); + out << ")"; +} + +learn_notify_response::~learn_notify_response() throw() {} + +void learn_notify_response::__set_pid(const ::dsn::gpid &val) { this->pid = val; } + +void learn_notify_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void learn_notify_response::__set_signature(const int64_t val) { this->signature = val; } + +uint32_t learn_notify_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->signature); + this->__isset.signature = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t rw_response_header::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("rw_response_header"); +uint32_t learn_notify_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("learn_notify_response"); + + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("signature", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->signature); + xfer += oprot->writeFieldEnd(); -void swap(rw_response_header &a, rw_response_header &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.__isset, b.__isset); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -rw_response_header::rw_response_header(const rw_response_header& other36) { - err = other36.err; - __isset = other36.__isset; +void swap(learn_notify_response &a, learn_notify_response &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.err, b.err); + swap(a.signature, b.signature); + swap(a.__isset, b.__isset); } -rw_response_header::rw_response_header( rw_response_header&& other37) { - err = std::move(other37.err); - __isset = std::move(other37.__isset); + +learn_notify_response::learn_notify_response(const learn_notify_response &other63) +{ + pid = other63.pid; + err = other63.err; + signature = other63.signature; + __isset = other63.__isset; } -rw_response_header& rw_response_header::operator=(const rw_response_header& other38) { - err = other38.err; - __isset = other38.__isset; - return *this; +learn_notify_response::learn_notify_response(learn_notify_response &&other64) +{ + pid = std::move(other64.pid); + err = std::move(other64.err); + signature = std::move(other64.signature); + __isset = std::move(other64.__isset); } -rw_response_header& rw_response_header::operator=(rw_response_header&& other39) { - err = std::move(other39.err); - __isset = std::move(other39.__isset); - return *this; +learn_notify_response &learn_notify_response::operator=(const learn_notify_response &other65) +{ + pid = other65.pid; + err = other65.err; + signature = other65.signature; + __isset = other65.__isset; + return *this; } -void rw_response_header::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "rw_response_header("; - out << "err=" << to_string(err); - out << ")"; +learn_notify_response &learn_notify_response::operator=(learn_notify_response &&other66) +{ + pid = std::move(other66.pid); + err = std::move(other66.err); + signature = std::move(other66.signature); + __isset = std::move(other66.__isset); + return *this; } - - -prepare_ack::~prepare_ack() throw() { +void learn_notify_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "learn_notify_response("; + out << "pid=" << to_string(pid); + out << ", " + << "err=" << to_string(err); + out << ", " + << "signature=" << to_string(signature); + out << ")"; } +group_check_request::~group_check_request() throw() {} -void prepare_ack::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} +void group_check_request::__set_app(const ::dsn::app_info &val) { this->app = val; } -void prepare_ack::__set_err(const ::dsn::error_code& val) { - this->err = val; -} +void group_check_request::__set_node(const ::dsn::rpc_address &val) { this->node = val; } -void prepare_ack::__set_ballot(const int64_t val) { - this->ballot = val; -} +void group_check_request::__set_config(const replica_configuration &val) { this->config = val; } -void prepare_ack::__set_decree(const int64_t val) { - this->decree = val; +void group_check_request::__set_last_committed_decree(const int64_t val) +{ + this->last_committed_decree = val; } -void prepare_ack::__set_last_committed_decree_in_app(const int64_t val) { - this->last_committed_decree_in_app = val; +void group_check_request::__set_confirmed_decree(const int64_t val) +{ + this->confirmed_decree = val; + __isset.confirmed_decree = true; } -void prepare_ack::__set_last_committed_decree_in_prepare_list(const int64_t val) { - this->last_committed_decree_in_prepare_list = val; +void group_check_request::__set_child_gpid(const ::dsn::gpid &val) +{ + this->child_gpid = val; + __isset.child_gpid = true; } -uint32_t prepare_ack::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t group_check_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->decree); - this->__isset.decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree_in_app); - this->__isset.last_committed_decree_in_app = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree_in_prepare_list); - this->__isset.last_committed_decree_in_prepare_list = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t prepare_ack::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("prepare_ack"); - - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("decree", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->decree); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_committed_decree_in_app", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->last_committed_decree_in_app); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_committed_decree_in_prepare_list", ::apache::thrift::protocol::T_I64, 6); - xfer += oprot->writeI64(this->last_committed_decree_in_prepare_list); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(prepare_ack &a, prepare_ack &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.err, b.err); - swap(a.ballot, b.ballot); - swap(a.decree, b.decree); - swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app); - swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list); - swap(a.__isset, b.__isset); -} - -prepare_ack::prepare_ack(const prepare_ack& other40) { - pid = other40.pid; - err = other40.err; - ballot = other40.ballot; - decree = other40.decree; - last_committed_decree_in_app = other40.last_committed_decree_in_app; - last_committed_decree_in_prepare_list = other40.last_committed_decree_in_prepare_list; - __isset = other40.__isset; -} -prepare_ack::prepare_ack( prepare_ack&& other41) { - pid = std::move(other41.pid); - err = std::move(other41.err); - ballot = std::move(other41.ballot); - decree = std::move(other41.decree); - last_committed_decree_in_app = std::move(other41.last_committed_decree_in_app); - last_committed_decree_in_prepare_list = std::move(other41.last_committed_decree_in_prepare_list); - __isset = std::move(other41.__isset); -} -prepare_ack& prepare_ack::operator=(const prepare_ack& other42) { - pid = other42.pid; - err = other42.err; - ballot = other42.ballot; - decree = other42.decree; - last_committed_decree_in_app = other42.last_committed_decree_in_app; - last_committed_decree_in_prepare_list = other42.last_committed_decree_in_prepare_list; - __isset = other42.__isset; - return *this; -} -prepare_ack& prepare_ack::operator=(prepare_ack&& other43) { - pid = std::move(other43.pid); - err = std::move(other43.err); - ballot = std::move(other43.ballot); - decree = std::move(other43.decree); - last_committed_decree_in_app = std::move(other43.last_committed_decree_in_app); - last_committed_decree_in_prepare_list = std::move(other43.last_committed_decree_in_prepare_list); - __isset = std::move(other43.__isset); - return *this; -} -void prepare_ack::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "prepare_ack("; - out << "pid=" << to_string(pid); - out << ", " << "err=" << to_string(err); - out << ", " << "ballot=" << to_string(ballot); - out << ", " << "decree=" << to_string(decree); - out << ", " << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app); - out << ", " << "last_committed_decree_in_prepare_list=" << to_string(last_committed_decree_in_prepare_list); - out << ")"; -} - - -learn_state::~learn_state() throw() { -} - - -void learn_state::__set_from_decree_excluded(const int64_t val) { - this->from_decree_excluded = val; -} - -void learn_state::__set_to_decree_included(const int64_t val) { - this->to_decree_included = val; -} - -void learn_state::__set_meta(const ::dsn::blob& val) { - this->meta = val; -} - -void learn_state::__set_files(const std::vector & val) { - this->files = val; -} - -void learn_state::__set_learn_start_decree(const int64_t val) { - this->learn_start_decree = val; -__isset.learn_start_decree = true; -} - -uint32_t learn_state::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->from_decree_excluded); - this->__isset.from_decree_excluded = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->to_decree_included); - this->__isset.to_decree_included = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->meta.read(iprot); - this->__isset.meta = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->files.clear(); - uint32_t _size44; - ::apache::thrift::protocol::TType _etype47; - xfer += iprot->readListBegin(_etype47, _size44); - this->files.resize(_size44); - uint32_t _i48; - for (_i48 = 0; _i48 < _size44; ++_i48) - { - xfer += iprot->readString(this->files[_i48]); - } - xfer += iprot->readListEnd(); - } - this->__isset.files = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->learn_start_decree); - this->__isset.learn_start_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t learn_state::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("learn_state"); - - xfer += oprot->writeFieldBegin("from_decree_excluded", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->from_decree_excluded); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("to_decree_included", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->to_decree_included); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("meta", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->meta.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->files.size())); - std::vector ::const_iterator _iter49; - for (_iter49 = this->files.begin(); _iter49 != this->files.end(); ++_iter49) - { - xfer += oprot->writeString((*_iter49)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.learn_start_decree) { - xfer += oprot->writeFieldBegin("learn_start_decree", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->learn_start_decree); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(learn_state &a, learn_state &b) { - using ::std::swap; - swap(a.from_decree_excluded, b.from_decree_excluded); - swap(a.to_decree_included, b.to_decree_included); - swap(a.meta, b.meta); - swap(a.files, b.files); - swap(a.learn_start_decree, b.learn_start_decree); - swap(a.__isset, b.__isset); -} - -learn_state::learn_state(const learn_state& other50) { - from_decree_excluded = other50.from_decree_excluded; - to_decree_included = other50.to_decree_included; - meta = other50.meta; - files = other50.files; - learn_start_decree = other50.learn_start_decree; - __isset = other50.__isset; -} -learn_state::learn_state( learn_state&& other51) { - from_decree_excluded = std::move(other51.from_decree_excluded); - to_decree_included = std::move(other51.to_decree_included); - meta = std::move(other51.meta); - files = std::move(other51.files); - learn_start_decree = std::move(other51.learn_start_decree); - __isset = std::move(other51.__isset); -} -learn_state& learn_state::operator=(const learn_state& other52) { - from_decree_excluded = other52.from_decree_excluded; - to_decree_included = other52.to_decree_included; - meta = other52.meta; - files = other52.files; - learn_start_decree = other52.learn_start_decree; - __isset = other52.__isset; - return *this; -} -learn_state& learn_state::operator=(learn_state&& other53) { - from_decree_excluded = std::move(other53.from_decree_excluded); - to_decree_included = std::move(other53.to_decree_included); - meta = std::move(other53.meta); - files = std::move(other53.files); - learn_start_decree = std::move(other53.learn_start_decree); - __isset = std::move(other53.__isset); - return *this; -} -void learn_state::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "learn_state("; - out << "from_decree_excluded=" << to_string(from_decree_excluded); - out << ", " << "to_decree_included=" << to_string(to_decree_included); - out << ", " << "meta=" << to_string(meta); - out << ", " << "files=" << to_string(files); - out << ", " << "learn_start_decree="; (__isset.learn_start_decree ? (out << to_string(learn_start_decree)) : (out << "")); - out << ")"; -} - - -learn_request::~learn_request() throw() { -} - - -void learn_request::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} - -void learn_request::__set_learner(const ::dsn::rpc_address& val) { - this->learner = val; -} - -void learn_request::__set_signature(const int64_t val) { - this->signature = val; -} - -void learn_request::__set_last_committed_decree_in_app(const int64_t val) { - this->last_committed_decree_in_app = val; -} - -void learn_request::__set_last_committed_decree_in_prepare_list(const int64_t val) { - this->last_committed_decree_in_prepare_list = val; -} - -void learn_request::__set_app_specific_learn_request(const ::dsn::blob& val) { - this->app_specific_learn_request = val; -} - -void learn_request::__set_max_gced_decree(const int64_t val) { - this->max_gced_decree = val; -__isset.max_gced_decree = true; -} - -uint32_t learn_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->learner.read(iprot); - this->__isset.learner = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->signature); - this->__isset.signature = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree_in_app); - this->__isset.last_committed_decree_in_app = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree_in_prepare_list); - this->__isset.last_committed_decree_in_prepare_list = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->app_specific_learn_request.read(iprot); - this->__isset.app_specific_learn_request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->max_gced_decree); - this->__isset.max_gced_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t learn_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("learn_request"); - - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("learner", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->learner.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("signature", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->signature); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_committed_decree_in_app", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->last_committed_decree_in_app); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_committed_decree_in_prepare_list", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->last_committed_decree_in_prepare_list); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("app_specific_learn_request", ::apache::thrift::protocol::T_STRUCT, 6); - xfer += this->app_specific_learn_request.write(oprot); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.max_gced_decree) { - xfer += oprot->writeFieldBegin("max_gced_decree", ::apache::thrift::protocol::T_I64, 7); - xfer += oprot->writeI64(this->max_gced_decree); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(learn_request &a, learn_request &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.learner, b.learner); - swap(a.signature, b.signature); - swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app); - swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list); - swap(a.app_specific_learn_request, b.app_specific_learn_request); - swap(a.max_gced_decree, b.max_gced_decree); - swap(a.__isset, b.__isset); -} - -learn_request::learn_request(const learn_request& other54) { - pid = other54.pid; - learner = other54.learner; - signature = other54.signature; - last_committed_decree_in_app = other54.last_committed_decree_in_app; - last_committed_decree_in_prepare_list = other54.last_committed_decree_in_prepare_list; - app_specific_learn_request = other54.app_specific_learn_request; - max_gced_decree = other54.max_gced_decree; - __isset = other54.__isset; -} -learn_request::learn_request( learn_request&& other55) { - pid = std::move(other55.pid); - learner = std::move(other55.learner); - signature = std::move(other55.signature); - last_committed_decree_in_app = std::move(other55.last_committed_decree_in_app); - last_committed_decree_in_prepare_list = std::move(other55.last_committed_decree_in_prepare_list); - app_specific_learn_request = std::move(other55.app_specific_learn_request); - max_gced_decree = std::move(other55.max_gced_decree); - __isset = std::move(other55.__isset); -} -learn_request& learn_request::operator=(const learn_request& other56) { - pid = other56.pid; - learner = other56.learner; - signature = other56.signature; - last_committed_decree_in_app = other56.last_committed_decree_in_app; - last_committed_decree_in_prepare_list = other56.last_committed_decree_in_prepare_list; - app_specific_learn_request = other56.app_specific_learn_request; - max_gced_decree = other56.max_gced_decree; - __isset = other56.__isset; - return *this; -} -learn_request& learn_request::operator=(learn_request&& other57) { - pid = std::move(other57.pid); - learner = std::move(other57.learner); - signature = std::move(other57.signature); - last_committed_decree_in_app = std::move(other57.last_committed_decree_in_app); - last_committed_decree_in_prepare_list = std::move(other57.last_committed_decree_in_prepare_list); - app_specific_learn_request = std::move(other57.app_specific_learn_request); - max_gced_decree = std::move(other57.max_gced_decree); - __isset = std::move(other57.__isset); - return *this; -} -void learn_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "learn_request("; - out << "pid=" << to_string(pid); - out << ", " << "learner=" << to_string(learner); - out << ", " << "signature=" << to_string(signature); - out << ", " << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app); - out << ", " << "last_committed_decree_in_prepare_list=" << to_string(last_committed_decree_in_prepare_list); - out << ", " << "app_specific_learn_request=" << to_string(app_specific_learn_request); - out << ", " << "max_gced_decree="; (__isset.max_gced_decree ? (out << to_string(max_gced_decree)) : (out << "")); - out << ")"; -} - - -learn_response::~learn_response() throw() { -} - - -void learn_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void learn_response::__set_config(const replica_configuration& val) { - this->config = val; -} - -void learn_response::__set_last_committed_decree(const int64_t val) { - this->last_committed_decree = val; -} - -void learn_response::__set_prepare_start_decree(const int64_t val) { - this->prepare_start_decree = val; -} - -void learn_response::__set_type(const learn_type::type val) { - this->type = val; -} - -void learn_response::__set_state(const learn_state& val) { - this->state = val; -} - -void learn_response::__set_address(const ::dsn::rpc_address& val) { - this->address = val; -} - -void learn_response::__set_base_local_dir(const std::string& val) { - this->base_local_dir = val; -} - -uint32_t learn_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->config.read(iprot); - this->__isset.config = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->prepare_start_decree); - this->__isset.prepare_start_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast58; - xfer += iprot->readI32(ecast58); - this->type = (learn_type::type)ecast58; - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->state.read(iprot); - this->__isset.state = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->address.read(iprot); - this->__isset.address = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->base_local_dir); - this->__isset.base_local_dir = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t learn_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("learn_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->config.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("prepare_start_decree", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->prepare_start_decree); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32((int32_t)this->type); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRUCT, 6); - xfer += this->state.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("address", ::apache::thrift::protocol::T_STRUCT, 7); - xfer += this->address.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("base_local_dir", ::apache::thrift::protocol::T_STRING, 8); - xfer += oprot->writeString(this->base_local_dir); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(learn_response &a, learn_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.config, b.config); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.prepare_start_decree, b.prepare_start_decree); - swap(a.type, b.type); - swap(a.state, b.state); - swap(a.address, b.address); - swap(a.base_local_dir, b.base_local_dir); - swap(a.__isset, b.__isset); -} - -learn_response::learn_response(const learn_response& other59) { - err = other59.err; - config = other59.config; - last_committed_decree = other59.last_committed_decree; - prepare_start_decree = other59.prepare_start_decree; - type = other59.type; - state = other59.state; - address = other59.address; - base_local_dir = other59.base_local_dir; - __isset = other59.__isset; -} -learn_response::learn_response( learn_response&& other60) { - err = std::move(other60.err); - config = std::move(other60.config); - last_committed_decree = std::move(other60.last_committed_decree); - prepare_start_decree = std::move(other60.prepare_start_decree); - type = std::move(other60.type); - state = std::move(other60.state); - address = std::move(other60.address); - base_local_dir = std::move(other60.base_local_dir); - __isset = std::move(other60.__isset); -} -learn_response& learn_response::operator=(const learn_response& other61) { - err = other61.err; - config = other61.config; - last_committed_decree = other61.last_committed_decree; - prepare_start_decree = other61.prepare_start_decree; - type = other61.type; - state = other61.state; - address = other61.address; - base_local_dir = other61.base_local_dir; - __isset = other61.__isset; - return *this; -} -learn_response& learn_response::operator=(learn_response&& other62) { - err = std::move(other62.err); - config = std::move(other62.config); - last_committed_decree = std::move(other62.last_committed_decree); - prepare_start_decree = std::move(other62.prepare_start_decree); - type = std::move(other62.type); - state = std::move(other62.state); - address = std::move(other62.address); - base_local_dir = std::move(other62.base_local_dir); - __isset = std::move(other62.__isset); - return *this; -} -void learn_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "learn_response("; - out << "err=" << to_string(err); - out << ", " << "config=" << to_string(config); - out << ", " << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " << "prepare_start_decree=" << to_string(prepare_start_decree); - out << ", " << "type=" << to_string(type); - out << ", " << "state=" << to_string(state); - out << ", " << "address=" << to_string(address); - out << ", " << "base_local_dir=" << to_string(base_local_dir); - out << ")"; -} - - -learn_notify_response::~learn_notify_response() throw() { -} - - -void learn_notify_response::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} - -void learn_notify_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void learn_notify_response::__set_signature(const int64_t val) { - this->signature = val; -} - -uint32_t learn_notify_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->signature); - this->__isset.signature = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t learn_notify_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("learn_notify_response"); - - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("signature", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->signature); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(learn_notify_response &a, learn_notify_response &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.err, b.err); - swap(a.signature, b.signature); - swap(a.__isset, b.__isset); -} - -learn_notify_response::learn_notify_response(const learn_notify_response& other63) { - pid = other63.pid; - err = other63.err; - signature = other63.signature; - __isset = other63.__isset; -} -learn_notify_response::learn_notify_response( learn_notify_response&& other64) { - pid = std::move(other64.pid); - err = std::move(other64.err); - signature = std::move(other64.signature); - __isset = std::move(other64.__isset); -} -learn_notify_response& learn_notify_response::operator=(const learn_notify_response& other65) { - pid = other65.pid; - err = other65.err; - signature = other65.signature; - __isset = other65.__isset; - return *this; -} -learn_notify_response& learn_notify_response::operator=(learn_notify_response&& other66) { - pid = std::move(other66.pid); - err = std::move(other66.err); - signature = std::move(other66.signature); - __isset = std::move(other66.__isset); - return *this; -} -void learn_notify_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "learn_notify_response("; - out << "pid=" << to_string(pid); - out << ", " << "err=" << to_string(err); - out << ", " << "signature=" << to_string(signature); - out << ")"; -} - - -group_check_request::~group_check_request() throw() { -} - - -void group_check_request::__set_app(const ::dsn::app_info& val) { - this->app = val; -} - -void group_check_request::__set_node(const ::dsn::rpc_address& val) { - this->node = val; -} - -void group_check_request::__set_config(const replica_configuration& val) { - this->config = val; -} - -void group_check_request::__set_last_committed_decree(const int64_t val) { - this->last_committed_decree = val; -} - -void group_check_request::__set_confirmed_decree(const int64_t val) { - this->confirmed_decree = val; -__isset.confirmed_decree = true; -} - -void group_check_request::__set_child_gpid(const ::dsn::gpid& val) { - this->child_gpid = val; -__isset.child_gpid = true; -} - -uint32_t group_check_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->app.read(iprot); - this->__isset.app = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->config.read(iprot); - this->__isset.config = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->confirmed_decree); - this->__isset.confirmed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->child_gpid.read(iprot); - this->__isset.child_gpid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t group_check_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("group_check_request"); - - xfer += oprot->writeFieldBegin("app", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->app.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->config.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.confirmed_decree) { - xfer += oprot->writeFieldBegin("confirmed_decree", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->confirmed_decree); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.child_gpid) { - xfer += oprot->writeFieldBegin("child_gpid", ::apache::thrift::protocol::T_STRUCT, 6); - xfer += this->child_gpid.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(group_check_request &a, group_check_request &b) { - using ::std::swap; - swap(a.app, b.app); - swap(a.node, b.node); - swap(a.config, b.config); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.confirmed_decree, b.confirmed_decree); - swap(a.child_gpid, b.child_gpid); - swap(a.__isset, b.__isset); -} - -group_check_request::group_check_request(const group_check_request& other67) { - app = other67.app; - node = other67.node; - config = other67.config; - last_committed_decree = other67.last_committed_decree; - confirmed_decree = other67.confirmed_decree; - child_gpid = other67.child_gpid; - __isset = other67.__isset; -} -group_check_request::group_check_request( group_check_request&& other68) { - app = std::move(other68.app); - node = std::move(other68.node); - config = std::move(other68.config); - last_committed_decree = std::move(other68.last_committed_decree); - confirmed_decree = std::move(other68.confirmed_decree); - child_gpid = std::move(other68.child_gpid); - __isset = std::move(other68.__isset); -} -group_check_request& group_check_request::operator=(const group_check_request& other69) { - app = other69.app; - node = other69.node; - config = other69.config; - last_committed_decree = other69.last_committed_decree; - confirmed_decree = other69.confirmed_decree; - child_gpid = other69.child_gpid; - __isset = other69.__isset; - return *this; -} -group_check_request& group_check_request::operator=(group_check_request&& other70) { - app = std::move(other70.app); - node = std::move(other70.node); - config = std::move(other70.config); - last_committed_decree = std::move(other70.last_committed_decree); - confirmed_decree = std::move(other70.confirmed_decree); - child_gpid = std::move(other70.child_gpid); - __isset = std::move(other70.__isset); - return *this; -} -void group_check_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "group_check_request("; - out << "app=" << to_string(app); - out << ", " << "node=" << to_string(node); - out << ", " << "config=" << to_string(config); - out << ", " << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " << "confirmed_decree="; (__isset.confirmed_decree ? (out << to_string(confirmed_decree)) : (out << "")); - out << ", " << "child_gpid="; (__isset.child_gpid ? (out << to_string(child_gpid)) : (out << "")); - out << ")"; -} - - -group_check_response::~group_check_response() throw() { -} - - -void group_check_response::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} - -void group_check_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void group_check_response::__set_last_committed_decree_in_app(const int64_t val) { - this->last_committed_decree_in_app = val; -} - -void group_check_response::__set_last_committed_decree_in_prepare_list(const int64_t val) { - this->last_committed_decree_in_prepare_list = val; -} - -void group_check_response::__set_learner_status_(const learner_status::type val) { - this->learner_status_ = val; -} - -void group_check_response::__set_learner_signature(const int64_t val) { - this->learner_signature = val; -} - -void group_check_response::__set_node(const ::dsn::rpc_address& val) { - this->node = val; -} - -uint32_t group_check_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree_in_app); - this->__isset.last_committed_decree_in_app = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree_in_prepare_list); - this->__isset.last_committed_decree_in_prepare_list = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast71; - xfer += iprot->readI32(ecast71); - this->learner_status_ = (learner_status::type)ecast71; - this->__isset.learner_status_ = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->learner_signature); - this->__isset.learner_signature = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t group_check_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("group_check_response"); - - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_committed_decree_in_app", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->last_committed_decree_in_app); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_committed_decree_in_prepare_list", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->last_committed_decree_in_prepare_list); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("learner_status_", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32((int32_t)this->learner_status_); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("learner_signature", ::apache::thrift::protocol::T_I64, 6); - xfer += oprot->writeI64(this->learner_signature); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 7); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(group_check_response &a, group_check_response &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.err, b.err); - swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app); - swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list); - swap(a.learner_status_, b.learner_status_); - swap(a.learner_signature, b.learner_signature); - swap(a.node, b.node); - swap(a.__isset, b.__isset); -} - -group_check_response::group_check_response(const group_check_response& other72) { - pid = other72.pid; - err = other72.err; - last_committed_decree_in_app = other72.last_committed_decree_in_app; - last_committed_decree_in_prepare_list = other72.last_committed_decree_in_prepare_list; - learner_status_ = other72.learner_status_; - learner_signature = other72.learner_signature; - node = other72.node; - __isset = other72.__isset; -} -group_check_response::group_check_response( group_check_response&& other73) { - pid = std::move(other73.pid); - err = std::move(other73.err); - last_committed_decree_in_app = std::move(other73.last_committed_decree_in_app); - last_committed_decree_in_prepare_list = std::move(other73.last_committed_decree_in_prepare_list); - learner_status_ = std::move(other73.learner_status_); - learner_signature = std::move(other73.learner_signature); - node = std::move(other73.node); - __isset = std::move(other73.__isset); -} -group_check_response& group_check_response::operator=(const group_check_response& other74) { - pid = other74.pid; - err = other74.err; - last_committed_decree_in_app = other74.last_committed_decree_in_app; - last_committed_decree_in_prepare_list = other74.last_committed_decree_in_prepare_list; - learner_status_ = other74.learner_status_; - learner_signature = other74.learner_signature; - node = other74.node; - __isset = other74.__isset; - return *this; -} -group_check_response& group_check_response::operator=(group_check_response&& other75) { - pid = std::move(other75.pid); - err = std::move(other75.err); - last_committed_decree_in_app = std::move(other75.last_committed_decree_in_app); - last_committed_decree_in_prepare_list = std::move(other75.last_committed_decree_in_prepare_list); - learner_status_ = std::move(other75.learner_status_); - learner_signature = std::move(other75.learner_signature); - node = std::move(other75.node); - __isset = std::move(other75.__isset); - return *this; -} -void group_check_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "group_check_response("; - out << "pid=" << to_string(pid); - out << ", " << "err=" << to_string(err); - out << ", " << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app); - out << ", " << "last_committed_decree_in_prepare_list=" << to_string(last_committed_decree_in_prepare_list); - out << ", " << "learner_status_=" << to_string(learner_status_); - out << ", " << "learner_signature=" << to_string(learner_signature); - out << ", " << "node=" << to_string(node); - out << ")"; -} - - -node_info::~node_info() throw() { -} - - -void node_info::__set_status(const node_status::type val) { - this->status = val; -} - -void node_info::__set_address(const ::dsn::rpc_address& val) { - this->address = val; -} - -uint32_t node_info::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast76; - xfer += iprot->readI32(ecast76); - this->status = (node_status::type)ecast76; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->address.read(iprot); - this->__isset.address = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t node_info::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("node_info"); - - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("address", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->address.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(node_info &a, node_info &b) { - using ::std::swap; - swap(a.status, b.status); - swap(a.address, b.address); - swap(a.__isset, b.__isset); -} - -node_info::node_info(const node_info& other77) { - status = other77.status; - address = other77.address; - __isset = other77.__isset; -} -node_info::node_info( node_info&& other78) { - status = std::move(other78.status); - address = std::move(other78.address); - __isset = std::move(other78.__isset); -} -node_info& node_info::operator=(const node_info& other79) { - status = other79.status; - address = other79.address; - __isset = other79.__isset; - return *this; -} -node_info& node_info::operator=(node_info&& other80) { - status = std::move(other80.status); - address = std::move(other80.address); - __isset = std::move(other80.__isset); - return *this; -} -void node_info::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "node_info("; - out << "status=" << to_string(status); - out << ", " << "address=" << to_string(address); - out << ")"; -} - - -configuration_update_request::~configuration_update_request() throw() { -} - - -void configuration_update_request::__set_info(const ::dsn::app_info& val) { - this->info = val; -} - -void configuration_update_request::__set_config(const ::dsn::partition_configuration& val) { - this->config = val; -} - -void configuration_update_request::__set_type(const config_type::type val) { - this->type = val; -} - -void configuration_update_request::__set_node(const ::dsn::rpc_address& val) { - this->node = val; -} - -void configuration_update_request::__set_host_node(const ::dsn::rpc_address& val) { - this->host_node = val; -} - -uint32_t configuration_update_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->info.read(iprot); - this->__isset.info = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->config.read(iprot); - this->__isset.config = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast81; - xfer += iprot->readI32(ecast81); - this->type = (config_type::type)ecast81; - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->host_node.read(iprot); - this->__isset.host_node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_update_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_update_request"); - - xfer += oprot->writeFieldBegin("info", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->info.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->config.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->type); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("host_node", ::apache::thrift::protocol::T_STRUCT, 5); - xfer += this->host_node.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_update_request &a, configuration_update_request &b) { - using ::std::swap; - swap(a.info, b.info); - swap(a.config, b.config); - swap(a.type, b.type); - swap(a.node, b.node); - swap(a.host_node, b.host_node); - swap(a.__isset, b.__isset); -} - -configuration_update_request::configuration_update_request(const configuration_update_request& other82) { - info = other82.info; - config = other82.config; - type = other82.type; - node = other82.node; - host_node = other82.host_node; - __isset = other82.__isset; -} -configuration_update_request::configuration_update_request( configuration_update_request&& other83) { - info = std::move(other83.info); - config = std::move(other83.config); - type = std::move(other83.type); - node = std::move(other83.node); - host_node = std::move(other83.host_node); - __isset = std::move(other83.__isset); -} -configuration_update_request& configuration_update_request::operator=(const configuration_update_request& other84) { - info = other84.info; - config = other84.config; - type = other84.type; - node = other84.node; - host_node = other84.host_node; - __isset = other84.__isset; - return *this; -} -configuration_update_request& configuration_update_request::operator=(configuration_update_request&& other85) { - info = std::move(other85.info); - config = std::move(other85.config); - type = std::move(other85.type); - node = std::move(other85.node); - host_node = std::move(other85.host_node); - __isset = std::move(other85.__isset); - return *this; -} -void configuration_update_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_update_request("; - out << "info=" << to_string(info); - out << ", " << "config=" << to_string(config); - out << ", " << "type=" << to_string(type); - out << ", " << "node=" << to_string(node); - out << ", " << "host_node=" << to_string(host_node); - out << ")"; -} - - -configuration_update_response::~configuration_update_response() throw() { -} - - -void configuration_update_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void configuration_update_response::__set_config(const ::dsn::partition_configuration& val) { - this->config = val; -} - -uint32_t configuration_update_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->config.read(iprot); - this->__isset.config = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_update_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_update_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->config.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_update_response &a, configuration_update_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.config, b.config); - swap(a.__isset, b.__isset); -} - -configuration_update_response::configuration_update_response(const configuration_update_response& other86) { - err = other86.err; - config = other86.config; - __isset = other86.__isset; -} -configuration_update_response::configuration_update_response( configuration_update_response&& other87) { - err = std::move(other87.err); - config = std::move(other87.config); - __isset = std::move(other87.__isset); -} -configuration_update_response& configuration_update_response::operator=(const configuration_update_response& other88) { - err = other88.err; - config = other88.config; - __isset = other88.__isset; - return *this; -} -configuration_update_response& configuration_update_response::operator=(configuration_update_response&& other89) { - err = std::move(other89.err); - config = std::move(other89.config); - __isset = std::move(other89.__isset); - return *this; -} -void configuration_update_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_update_response("; - out << "err=" << to_string(err); - out << ", " << "config=" << to_string(config); - out << ")"; -} - - -replica_server_info::~replica_server_info() throw() { -} - - -void replica_server_info::__set_geo_tags(const std::map & val) { - this->geo_tags = val; -} - -void replica_server_info::__set_total_capacity_mb(const int64_t val) { - this->total_capacity_mb = val; -} - -uint32_t replica_server_info::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->geo_tags.clear(); - uint32_t _size90; - ::apache::thrift::protocol::TType _ktype91; - ::apache::thrift::protocol::TType _vtype92; - xfer += iprot->readMapBegin(_ktype91, _vtype92, _size90); - uint32_t _i94; - for (_i94 = 0; _i94 < _size90; ++_i94) - { - std::string _key95; - xfer += iprot->readString(_key95); - std::string& _val96 = this->geo_tags[_key95]; - xfer += iprot->readString(_val96); - } - xfer += iprot->readMapEnd(); - } - this->__isset.geo_tags = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->total_capacity_mb); - this->__isset.total_capacity_mb = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t replica_server_info::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("replica_server_info"); - - xfer += oprot->writeFieldBegin("geo_tags", ::apache::thrift::protocol::T_MAP, 1); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->geo_tags.size())); - std::map ::const_iterator _iter97; - for (_iter97 = this->geo_tags.begin(); _iter97 != this->geo_tags.end(); ++_iter97) - { - xfer += oprot->writeString(_iter97->first); - xfer += oprot->writeString(_iter97->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("total_capacity_mb", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->total_capacity_mb); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(replica_server_info &a, replica_server_info &b) { - using ::std::swap; - swap(a.geo_tags, b.geo_tags); - swap(a.total_capacity_mb, b.total_capacity_mb); - swap(a.__isset, b.__isset); -} - -replica_server_info::replica_server_info(const replica_server_info& other98) { - geo_tags = other98.geo_tags; - total_capacity_mb = other98.total_capacity_mb; - __isset = other98.__isset; -} -replica_server_info::replica_server_info( replica_server_info&& other99) { - geo_tags = std::move(other99.geo_tags); - total_capacity_mb = std::move(other99.total_capacity_mb); - __isset = std::move(other99.__isset); -} -replica_server_info& replica_server_info::operator=(const replica_server_info& other100) { - geo_tags = other100.geo_tags; - total_capacity_mb = other100.total_capacity_mb; - __isset = other100.__isset; - return *this; -} -replica_server_info& replica_server_info::operator=(replica_server_info&& other101) { - geo_tags = std::move(other101.geo_tags); - total_capacity_mb = std::move(other101.total_capacity_mb); - __isset = std::move(other101.__isset); - return *this; -} -void replica_server_info::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "replica_server_info("; - out << "geo_tags=" << to_string(geo_tags); - out << ", " << "total_capacity_mb=" << to_string(total_capacity_mb); - out << ")"; -} - - -configuration_query_by_node_request::~configuration_query_by_node_request() throw() { -} - - -void configuration_query_by_node_request::__set_node(const ::dsn::rpc_address& val) { - this->node = val; -} - -void configuration_query_by_node_request::__set_stored_replicas(const std::vector & val) { - this->stored_replicas = val; -__isset.stored_replicas = true; -} - -void configuration_query_by_node_request::__set_info(const replica_server_info& val) { - this->info = val; -__isset.info = true; -} - -uint32_t configuration_query_by_node_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->stored_replicas.clear(); - uint32_t _size102; - ::apache::thrift::protocol::TType _etype105; - xfer += iprot->readListBegin(_etype105, _size102); - this->stored_replicas.resize(_size102); - uint32_t _i106; - for (_i106 = 0; _i106 < _size102; ++_i106) - { - xfer += this->stored_replicas[_i106].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.stored_replicas = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->info.read(iprot); - this->__isset.info = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_query_by_node_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_by_node_request"); - - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.stored_replicas) { - xfer += oprot->writeFieldBegin("stored_replicas", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->stored_replicas.size())); - std::vector ::const_iterator _iter107; - for (_iter107 = this->stored_replicas.begin(); _iter107 != this->stored_replicas.end(); ++_iter107) - { - xfer += (*_iter107).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.info) { - xfer += oprot->writeFieldBegin("info", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->info.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_query_by_node_request &a, configuration_query_by_node_request &b) { - using ::std::swap; - swap(a.node, b.node); - swap(a.stored_replicas, b.stored_replicas); - swap(a.info, b.info); - swap(a.__isset, b.__isset); -} - -configuration_query_by_node_request::configuration_query_by_node_request(const configuration_query_by_node_request& other108) { - node = other108.node; - stored_replicas = other108.stored_replicas; - info = other108.info; - __isset = other108.__isset; -} -configuration_query_by_node_request::configuration_query_by_node_request( configuration_query_by_node_request&& other109) { - node = std::move(other109.node); - stored_replicas = std::move(other109.stored_replicas); - info = std::move(other109.info); - __isset = std::move(other109.__isset); -} -configuration_query_by_node_request& configuration_query_by_node_request::operator=(const configuration_query_by_node_request& other110) { - node = other110.node; - stored_replicas = other110.stored_replicas; - info = other110.info; - __isset = other110.__isset; - return *this; -} -configuration_query_by_node_request& configuration_query_by_node_request::operator=(configuration_query_by_node_request&& other111) { - node = std::move(other111.node); - stored_replicas = std::move(other111.stored_replicas); - info = std::move(other111.info); - __isset = std::move(other111.__isset); - return *this; -} -void configuration_query_by_node_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_query_by_node_request("; - out << "node=" << to_string(node); - out << ", " << "stored_replicas="; (__isset.stored_replicas ? (out << to_string(stored_replicas)) : (out << "")); - out << ", " << "info="; (__isset.info ? (out << to_string(info)) : (out << "")); - out << ")"; -} - - -configuration_query_by_node_response::~configuration_query_by_node_response() throw() { -} - - -void configuration_query_by_node_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void configuration_query_by_node_response::__set_partitions(const std::vector & val) { - this->partitions = val; -} - -void configuration_query_by_node_response::__set_gc_replicas(const std::vector & val) { - this->gc_replicas = val; -__isset.gc_replicas = true; -} - -uint32_t configuration_query_by_node_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitions.clear(); - uint32_t _size112; - ::apache::thrift::protocol::TType _etype115; - xfer += iprot->readListBegin(_etype115, _size112); - this->partitions.resize(_size112); - uint32_t _i116; - for (_i116 = 0; _i116 < _size112; ++_i116) - { - xfer += this->partitions[_i116].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.partitions = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->gc_replicas.clear(); - uint32_t _size117; - ::apache::thrift::protocol::TType _etype120; - xfer += iprot->readListBegin(_etype120, _size117); - this->gc_replicas.resize(_size117); - uint32_t _i121; - for (_i121 = 0; _i121 < _size117; ++_i121) - { - xfer += this->gc_replicas[_i121].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.gc_replicas = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_query_by_node_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_by_node_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); - std::vector ::const_iterator _iter122; - for (_iter122 = this->partitions.begin(); _iter122 != this->partitions.end(); ++_iter122) - { - xfer += (*_iter122).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.gc_replicas) { - xfer += oprot->writeFieldBegin("gc_replicas", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->gc_replicas.size())); - std::vector ::const_iterator _iter123; - for (_iter123 = this->gc_replicas.begin(); _iter123 != this->gc_replicas.end(); ++_iter123) - { - xfer += (*_iter123).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_query_by_node_response &a, configuration_query_by_node_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.partitions, b.partitions); - swap(a.gc_replicas, b.gc_replicas); - swap(a.__isset, b.__isset); -} - -configuration_query_by_node_response::configuration_query_by_node_response(const configuration_query_by_node_response& other124) { - err = other124.err; - partitions = other124.partitions; - gc_replicas = other124.gc_replicas; - __isset = other124.__isset; -} -configuration_query_by_node_response::configuration_query_by_node_response( configuration_query_by_node_response&& other125) { - err = std::move(other125.err); - partitions = std::move(other125.partitions); - gc_replicas = std::move(other125.gc_replicas); - __isset = std::move(other125.__isset); -} -configuration_query_by_node_response& configuration_query_by_node_response::operator=(const configuration_query_by_node_response& other126) { - err = other126.err; - partitions = other126.partitions; - gc_replicas = other126.gc_replicas; - __isset = other126.__isset; - return *this; -} -configuration_query_by_node_response& configuration_query_by_node_response::operator=(configuration_query_by_node_response&& other127) { - err = std::move(other127.err); - partitions = std::move(other127.partitions); - gc_replicas = std::move(other127.gc_replicas); - __isset = std::move(other127.__isset); - return *this; -} -void configuration_query_by_node_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_query_by_node_response("; - out << "err=" << to_string(err); - out << ", " << "partitions=" << to_string(partitions); - out << ", " << "gc_replicas="; (__isset.gc_replicas ? (out << to_string(gc_replicas)) : (out << "")); - out << ")"; -} - - -create_app_options::~create_app_options() throw() { -} - - -void create_app_options::__set_partition_count(const int32_t val) { - this->partition_count = val; -} - -void create_app_options::__set_replica_count(const int32_t val) { - this->replica_count = val; -} - -void create_app_options::__set_success_if_exist(const bool val) { - this->success_if_exist = val; -} - -void create_app_options::__set_app_type(const std::string& val) { - this->app_type = val; -} - -void create_app_options::__set_is_stateful(const bool val) { - this->is_stateful = val; -} - -void create_app_options::__set_envs(const std::map & val) { - this->envs = val; -} - -uint32_t create_app_options::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_count); - this->__isset.partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->replica_count); - this->__isset.replica_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success_if_exist); - this->__isset.success_if_exist = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_type); - this->__isset.app_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_stateful); - this->__isset.is_stateful = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->envs.clear(); - uint32_t _size128; - ::apache::thrift::protocol::TType _ktype129; - ::apache::thrift::protocol::TType _vtype130; - xfer += iprot->readMapBegin(_ktype129, _vtype130, _size128); - uint32_t _i132; - for (_i132 = 0; _i132 < _size128; ++_i132) - { - std::string _key133; - xfer += iprot->readString(_key133); - std::string& _val134 = this->envs[_key133]; - xfer += iprot->readString(_val134); - } - xfer += iprot->readMapEnd(); - } - this->__isset.envs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t create_app_options::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("create_app_options"); - - xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->partition_count); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("replica_count", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->replica_count); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("success_if_exist", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->success_if_exist); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->app_type); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 5); - xfer += oprot->writeBool(this->is_stateful); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("envs", ::apache::thrift::protocol::T_MAP, 6); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->envs.size())); - std::map ::const_iterator _iter135; - for (_iter135 = this->envs.begin(); _iter135 != this->envs.end(); ++_iter135) - { - xfer += oprot->writeString(_iter135->first); - xfer += oprot->writeString(_iter135->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(create_app_options &a, create_app_options &b) { - using ::std::swap; - swap(a.partition_count, b.partition_count); - swap(a.replica_count, b.replica_count); - swap(a.success_if_exist, b.success_if_exist); - swap(a.app_type, b.app_type); - swap(a.is_stateful, b.is_stateful); - swap(a.envs, b.envs); - swap(a.__isset, b.__isset); -} - -create_app_options::create_app_options(const create_app_options& other136) { - partition_count = other136.partition_count; - replica_count = other136.replica_count; - success_if_exist = other136.success_if_exist; - app_type = other136.app_type; - is_stateful = other136.is_stateful; - envs = other136.envs; - __isset = other136.__isset; -} -create_app_options::create_app_options( create_app_options&& other137) { - partition_count = std::move(other137.partition_count); - replica_count = std::move(other137.replica_count); - success_if_exist = std::move(other137.success_if_exist); - app_type = std::move(other137.app_type); - is_stateful = std::move(other137.is_stateful); - envs = std::move(other137.envs); - __isset = std::move(other137.__isset); -} -create_app_options& create_app_options::operator=(const create_app_options& other138) { - partition_count = other138.partition_count; - replica_count = other138.replica_count; - success_if_exist = other138.success_if_exist; - app_type = other138.app_type; - is_stateful = other138.is_stateful; - envs = other138.envs; - __isset = other138.__isset; - return *this; -} -create_app_options& create_app_options::operator=(create_app_options&& other139) { - partition_count = std::move(other139.partition_count); - replica_count = std::move(other139.replica_count); - success_if_exist = std::move(other139.success_if_exist); - app_type = std::move(other139.app_type); - is_stateful = std::move(other139.is_stateful); - envs = std::move(other139.envs); - __isset = std::move(other139.__isset); - return *this; -} -void create_app_options::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "create_app_options("; - out << "partition_count=" << to_string(partition_count); - out << ", " << "replica_count=" << to_string(replica_count); - out << ", " << "success_if_exist=" << to_string(success_if_exist); - out << ", " << "app_type=" << to_string(app_type); - out << ", " << "is_stateful=" << to_string(is_stateful); - out << ", " << "envs=" << to_string(envs); - out << ")"; -} - - -configuration_create_app_request::~configuration_create_app_request() throw() { -} - - -void configuration_create_app_request::__set_app_name(const std::string& val) { - this->app_name = val; -} - -void configuration_create_app_request::__set_options(const create_app_options& val) { - this->options = val; -} - -uint32_t configuration_create_app_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->options.read(iprot); - this->__isset.options = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_create_app_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_create_app_request"); - - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("options", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->options.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_create_app_request &a, configuration_create_app_request &b) { - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.options, b.options); - swap(a.__isset, b.__isset); -} - -configuration_create_app_request::configuration_create_app_request(const configuration_create_app_request& other140) { - app_name = other140.app_name; - options = other140.options; - __isset = other140.__isset; -} -configuration_create_app_request::configuration_create_app_request( configuration_create_app_request&& other141) { - app_name = std::move(other141.app_name); - options = std::move(other141.options); - __isset = std::move(other141.__isset); -} -configuration_create_app_request& configuration_create_app_request::operator=(const configuration_create_app_request& other142) { - app_name = other142.app_name; - options = other142.options; - __isset = other142.__isset; - return *this; -} -configuration_create_app_request& configuration_create_app_request::operator=(configuration_create_app_request&& other143) { - app_name = std::move(other143.app_name); - options = std::move(other143.options); - __isset = std::move(other143.__isset); - return *this; -} -void configuration_create_app_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_create_app_request("; - out << "app_name=" << to_string(app_name); - out << ", " << "options=" << to_string(options); - out << ")"; -} - - -drop_app_options::~drop_app_options() throw() { -} - - -void drop_app_options::__set_success_if_not_exist(const bool val) { - this->success_if_not_exist = val; -} - -void drop_app_options::__set_reserve_seconds(const int64_t val) { - this->reserve_seconds = val; -__isset.reserve_seconds = true; -} - -uint32_t drop_app_options::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success_if_not_exist); - this->__isset.success_if_not_exist = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->reserve_seconds); - this->__isset.reserve_seconds = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t drop_app_options::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("drop_app_options"); - - xfer += oprot->writeFieldBegin("success_if_not_exist", ::apache::thrift::protocol::T_BOOL, 1); - xfer += oprot->writeBool(this->success_if_not_exist); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.reserve_seconds) { - xfer += oprot->writeFieldBegin("reserve_seconds", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->reserve_seconds); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(drop_app_options &a, drop_app_options &b) { - using ::std::swap; - swap(a.success_if_not_exist, b.success_if_not_exist); - swap(a.reserve_seconds, b.reserve_seconds); - swap(a.__isset, b.__isset); -} - -drop_app_options::drop_app_options(const drop_app_options& other144) { - success_if_not_exist = other144.success_if_not_exist; - reserve_seconds = other144.reserve_seconds; - __isset = other144.__isset; -} -drop_app_options::drop_app_options( drop_app_options&& other145) { - success_if_not_exist = std::move(other145.success_if_not_exist); - reserve_seconds = std::move(other145.reserve_seconds); - __isset = std::move(other145.__isset); -} -drop_app_options& drop_app_options::operator=(const drop_app_options& other146) { - success_if_not_exist = other146.success_if_not_exist; - reserve_seconds = other146.reserve_seconds; - __isset = other146.__isset; - return *this; -} -drop_app_options& drop_app_options::operator=(drop_app_options&& other147) { - success_if_not_exist = std::move(other147.success_if_not_exist); - reserve_seconds = std::move(other147.reserve_seconds); - __isset = std::move(other147.__isset); - return *this; -} -void drop_app_options::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "drop_app_options("; - out << "success_if_not_exist=" << to_string(success_if_not_exist); - out << ", " << "reserve_seconds="; (__isset.reserve_seconds ? (out << to_string(reserve_seconds)) : (out << "")); - out << ")"; -} - - -configuration_drop_app_request::~configuration_drop_app_request() throw() { -} - - -void configuration_drop_app_request::__set_app_name(const std::string& val) { - this->app_name = val; -} - -void configuration_drop_app_request::__set_options(const drop_app_options& val) { - this->options = val; -} - -uint32_t configuration_drop_app_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->options.read(iprot); - this->__isset.options = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_drop_app_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_drop_app_request"); - - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("options", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->options.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_drop_app_request &a, configuration_drop_app_request &b) { - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.options, b.options); - swap(a.__isset, b.__isset); -} - -configuration_drop_app_request::configuration_drop_app_request(const configuration_drop_app_request& other148) { - app_name = other148.app_name; - options = other148.options; - __isset = other148.__isset; -} -configuration_drop_app_request::configuration_drop_app_request( configuration_drop_app_request&& other149) { - app_name = std::move(other149.app_name); - options = std::move(other149.options); - __isset = std::move(other149.__isset); -} -configuration_drop_app_request& configuration_drop_app_request::operator=(const configuration_drop_app_request& other150) { - app_name = other150.app_name; - options = other150.options; - __isset = other150.__isset; - return *this; -} -configuration_drop_app_request& configuration_drop_app_request::operator=(configuration_drop_app_request&& other151) { - app_name = std::move(other151.app_name); - options = std::move(other151.options); - __isset = std::move(other151.__isset); - return *this; -} -void configuration_drop_app_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_drop_app_request("; - out << "app_name=" << to_string(app_name); - out << ", " << "options=" << to_string(options); - out << ")"; -} - - -configuration_list_apps_request::~configuration_list_apps_request() throw() { -} - - -void configuration_list_apps_request::__set_status(const ::dsn::app_status::type val) { - this->status = val; -} - -uint32_t configuration_list_apps_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast152; - xfer += iprot->readI32(ecast152); - this->status = ( ::dsn::app_status::type)ecast152; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_list_apps_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_list_apps_request"); - - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_list_apps_request &a, configuration_list_apps_request &b) { - using ::std::swap; - swap(a.status, b.status); - swap(a.__isset, b.__isset); -} - -configuration_list_apps_request::configuration_list_apps_request(const configuration_list_apps_request& other153) { - status = other153.status; - __isset = other153.__isset; -} -configuration_list_apps_request::configuration_list_apps_request( configuration_list_apps_request&& other154) { - status = std::move(other154.status); - __isset = std::move(other154.__isset); -} -configuration_list_apps_request& configuration_list_apps_request::operator=(const configuration_list_apps_request& other155) { - status = other155.status; - __isset = other155.__isset; - return *this; -} -configuration_list_apps_request& configuration_list_apps_request::operator=(configuration_list_apps_request&& other156) { - status = std::move(other156.status); - __isset = std::move(other156.__isset); - return *this; -} -void configuration_list_apps_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_list_apps_request("; - out << "status=" << to_string(status); - out << ")"; -} - - -configuration_list_nodes_request::~configuration_list_nodes_request() throw() { -} - - -void configuration_list_nodes_request::__set_status(const node_status::type val) { - this->status = val; -} - -uint32_t configuration_list_nodes_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast157; - xfer += iprot->readI32(ecast157); - this->status = (node_status::type)ecast157; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_list_nodes_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_list_nodes_request"); - - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_list_nodes_request &a, configuration_list_nodes_request &b) { - using ::std::swap; - swap(a.status, b.status); - swap(a.__isset, b.__isset); -} - -configuration_list_nodes_request::configuration_list_nodes_request(const configuration_list_nodes_request& other158) { - status = other158.status; - __isset = other158.__isset; -} -configuration_list_nodes_request::configuration_list_nodes_request( configuration_list_nodes_request&& other159) { - status = std::move(other159.status); - __isset = std::move(other159.__isset); -} -configuration_list_nodes_request& configuration_list_nodes_request::operator=(const configuration_list_nodes_request& other160) { - status = other160.status; - __isset = other160.__isset; - return *this; -} -configuration_list_nodes_request& configuration_list_nodes_request::operator=(configuration_list_nodes_request&& other161) { - status = std::move(other161.status); - __isset = std::move(other161.__isset); - return *this; -} -void configuration_list_nodes_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_list_nodes_request("; - out << "status=" << to_string(status); - out << ")"; -} - - -configuration_cluster_info_request::~configuration_cluster_info_request() throw() { -} - - -uint32_t configuration_cluster_info_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_cluster_info_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_cluster_info_request"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_cluster_info_request &a, configuration_cluster_info_request &b) { - using ::std::swap; - (void) a; - (void) b; -} - -configuration_cluster_info_request::configuration_cluster_info_request(const configuration_cluster_info_request& other162) { - (void) other162; -} -configuration_cluster_info_request::configuration_cluster_info_request( configuration_cluster_info_request&& other163) { - (void) other163; -} -configuration_cluster_info_request& configuration_cluster_info_request::operator=(const configuration_cluster_info_request& other164) { - (void) other164; - return *this; -} -configuration_cluster_info_request& configuration_cluster_info_request::operator=(configuration_cluster_info_request&& other165) { - (void) other165; - return *this; -} -void configuration_cluster_info_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_cluster_info_request("; - out << ")"; -} - - -configuration_recall_app_request::~configuration_recall_app_request() throw() { -} - - -void configuration_recall_app_request::__set_app_id(const int32_t val) { - this->app_id = val; -} - -void configuration_recall_app_request::__set_new_app_name(const std::string& val) { - this->new_app_name = val; -} - -uint32_t configuration_recall_app_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->new_app_name); - this->__isset.new_app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_recall_app_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_recall_app_request"); - - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("new_app_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->new_app_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_recall_app_request &a, configuration_recall_app_request &b) { - using ::std::swap; - swap(a.app_id, b.app_id); - swap(a.new_app_name, b.new_app_name); - swap(a.__isset, b.__isset); -} - -configuration_recall_app_request::configuration_recall_app_request(const configuration_recall_app_request& other166) { - app_id = other166.app_id; - new_app_name = other166.new_app_name; - __isset = other166.__isset; -} -configuration_recall_app_request::configuration_recall_app_request( configuration_recall_app_request&& other167) { - app_id = std::move(other167.app_id); - new_app_name = std::move(other167.new_app_name); - __isset = std::move(other167.__isset); -} -configuration_recall_app_request& configuration_recall_app_request::operator=(const configuration_recall_app_request& other168) { - app_id = other168.app_id; - new_app_name = other168.new_app_name; - __isset = other168.__isset; - return *this; -} -configuration_recall_app_request& configuration_recall_app_request::operator=(configuration_recall_app_request&& other169) { - app_id = std::move(other169.app_id); - new_app_name = std::move(other169.new_app_name); - __isset = std::move(other169.__isset); - return *this; -} -void configuration_recall_app_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_recall_app_request("; - out << "app_id=" << to_string(app_id); - out << ", " << "new_app_name=" << to_string(new_app_name); - out << ")"; -} - - -configuration_create_app_response::~configuration_create_app_response() throw() { -} - - -void configuration_create_app_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void configuration_create_app_response::__set_appid(const int32_t val) { - this->appid = val; -} - -uint32_t configuration_create_app_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->appid); - this->__isset.appid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_create_app_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_create_app_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->appid); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_create_app_response &a, configuration_create_app_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.appid, b.appid); - swap(a.__isset, b.__isset); -} - -configuration_create_app_response::configuration_create_app_response(const configuration_create_app_response& other170) { - err = other170.err; - appid = other170.appid; - __isset = other170.__isset; -} -configuration_create_app_response::configuration_create_app_response( configuration_create_app_response&& other171) { - err = std::move(other171.err); - appid = std::move(other171.appid); - __isset = std::move(other171.__isset); -} -configuration_create_app_response& configuration_create_app_response::operator=(const configuration_create_app_response& other172) { - err = other172.err; - appid = other172.appid; - __isset = other172.__isset; - return *this; -} -configuration_create_app_response& configuration_create_app_response::operator=(configuration_create_app_response&& other173) { - err = std::move(other173.err); - appid = std::move(other173.appid); - __isset = std::move(other173.__isset); - return *this; -} -void configuration_create_app_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_create_app_response("; - out << "err=" << to_string(err); - out << ", " << "appid=" << to_string(appid); - out << ")"; -} - - -configuration_meta_control_request::~configuration_meta_control_request() throw() { -} - - -void configuration_meta_control_request::__set_level(const meta_function_level::type val) { - this->level = val; -} - -uint32_t configuration_meta_control_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast174; - xfer += iprot->readI32(ecast174); - this->level = (meta_function_level::type)ecast174; - this->__isset.level = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_meta_control_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_meta_control_request"); - - xfer += oprot->writeFieldBegin("level", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->level); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_meta_control_request &a, configuration_meta_control_request &b) { - using ::std::swap; - swap(a.level, b.level); - swap(a.__isset, b.__isset); -} - -configuration_meta_control_request::configuration_meta_control_request(const configuration_meta_control_request& other175) { - level = other175.level; - __isset = other175.__isset; -} -configuration_meta_control_request::configuration_meta_control_request( configuration_meta_control_request&& other176) { - level = std::move(other176.level); - __isset = std::move(other176.__isset); -} -configuration_meta_control_request& configuration_meta_control_request::operator=(const configuration_meta_control_request& other177) { - level = other177.level; - __isset = other177.__isset; - return *this; -} -configuration_meta_control_request& configuration_meta_control_request::operator=(configuration_meta_control_request&& other178) { - level = std::move(other178.level); - __isset = std::move(other178.__isset); - return *this; -} -void configuration_meta_control_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_meta_control_request("; - out << "level=" << to_string(level); - out << ")"; -} - - -configuration_meta_control_response::~configuration_meta_control_response() throw() { -} - - -void configuration_meta_control_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void configuration_meta_control_response::__set_old_level(const meta_function_level::type val) { - this->old_level = val; -} - -uint32_t configuration_meta_control_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast179; - xfer += iprot->readI32(ecast179); - this->old_level = (meta_function_level::type)ecast179; - this->__isset.old_level = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_meta_control_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_meta_control_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("old_level", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->old_level); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_meta_control_response &a, configuration_meta_control_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.old_level, b.old_level); - swap(a.__isset, b.__isset); -} - -configuration_meta_control_response::configuration_meta_control_response(const configuration_meta_control_response& other180) { - err = other180.err; - old_level = other180.old_level; - __isset = other180.__isset; -} -configuration_meta_control_response::configuration_meta_control_response( configuration_meta_control_response&& other181) { - err = std::move(other181.err); - old_level = std::move(other181.old_level); - __isset = std::move(other181.__isset); -} -configuration_meta_control_response& configuration_meta_control_response::operator=(const configuration_meta_control_response& other182) { - err = other182.err; - old_level = other182.old_level; - __isset = other182.__isset; - return *this; -} -configuration_meta_control_response& configuration_meta_control_response::operator=(configuration_meta_control_response&& other183) { - err = std::move(other183.err); - old_level = std::move(other183.old_level); - __isset = std::move(other183.__isset); - return *this; -} -void configuration_meta_control_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_meta_control_response("; - out << "err=" << to_string(err); - out << ", " << "old_level=" << to_string(old_level); - out << ")"; -} - - -configuration_proposal_action::~configuration_proposal_action() throw() { -} - - -void configuration_proposal_action::__set_target(const ::dsn::rpc_address& val) { - this->target = val; -} - -void configuration_proposal_action::__set_node(const ::dsn::rpc_address& val) { - this->node = val; -} - -void configuration_proposal_action::__set_type(const config_type::type val) { - this->type = val; -} - -uint32_t configuration_proposal_action::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->target.read(iprot); - this->__isset.target = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast184; - xfer += iprot->readI32(ecast184); - this->type = (config_type::type)ecast184; - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_proposal_action::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_proposal_action"); - - xfer += oprot->writeFieldBegin("target", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->target.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->type); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_proposal_action &a, configuration_proposal_action &b) { - using ::std::swap; - swap(a.target, b.target); - swap(a.node, b.node); - swap(a.type, b.type); - swap(a.__isset, b.__isset); -} - -configuration_proposal_action::configuration_proposal_action(const configuration_proposal_action& other185) { - target = other185.target; - node = other185.node; - type = other185.type; - __isset = other185.__isset; -} -configuration_proposal_action::configuration_proposal_action( configuration_proposal_action&& other186) { - target = std::move(other186.target); - node = std::move(other186.node); - type = std::move(other186.type); - __isset = std::move(other186.__isset); -} -configuration_proposal_action& configuration_proposal_action::operator=(const configuration_proposal_action& other187) { - target = other187.target; - node = other187.node; - type = other187.type; - __isset = other187.__isset; - return *this; -} -configuration_proposal_action& configuration_proposal_action::operator=(configuration_proposal_action&& other188) { - target = std::move(other188.target); - node = std::move(other188.node); - type = std::move(other188.type); - __isset = std::move(other188.__isset); - return *this; -} -void configuration_proposal_action::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_proposal_action("; - out << "target=" << to_string(target); - out << ", " << "node=" << to_string(node); - out << ", " << "type=" << to_string(type); - out << ")"; -} - - -configuration_balancer_request::~configuration_balancer_request() throw() { -} - - -void configuration_balancer_request::__set_gpid(const ::dsn::gpid& val) { - this->gpid = val; -} - -void configuration_balancer_request::__set_action_list(const std::vector & val) { - this->action_list = val; -} - -void configuration_balancer_request::__set_force(const bool val) { - this->force = val; -__isset.force = true; -} - -void configuration_balancer_request::__set_balance_type(const balancer_request_type::type val) { - this->balance_type = val; -__isset.balance_type = true; -} - -uint32_t configuration_balancer_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->gpid.read(iprot); - this->__isset.gpid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->action_list.clear(); - uint32_t _size189; - ::apache::thrift::protocol::TType _etype192; - xfer += iprot->readListBegin(_etype192, _size189); - this->action_list.resize(_size189); - uint32_t _i193; - for (_i193 = 0; _i193 < _size189; ++_i193) - { - xfer += this->action_list[_i193].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.action_list = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->force); - this->__isset.force = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast194; - xfer += iprot->readI32(ecast194); - this->balance_type = (balancer_request_type::type)ecast194; - this->__isset.balance_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_balancer_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_balancer_request"); - - xfer += oprot->writeFieldBegin("gpid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->gpid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("action_list", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->action_list.size())); - std::vector ::const_iterator _iter195; - for (_iter195 = this->action_list.begin(); _iter195 != this->action_list.end(); ++_iter195) - { - xfer += (*_iter195).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.force) { - xfer += oprot->writeFieldBegin("force", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->force); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.balance_type) { - xfer += oprot->writeFieldBegin("balance_type", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32((int32_t)this->balance_type); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_balancer_request &a, configuration_balancer_request &b) { - using ::std::swap; - swap(a.gpid, b.gpid); - swap(a.action_list, b.action_list); - swap(a.force, b.force); - swap(a.balance_type, b.balance_type); - swap(a.__isset, b.__isset); -} - -configuration_balancer_request::configuration_balancer_request(const configuration_balancer_request& other196) { - gpid = other196.gpid; - action_list = other196.action_list; - force = other196.force; - balance_type = other196.balance_type; - __isset = other196.__isset; -} -configuration_balancer_request::configuration_balancer_request( configuration_balancer_request&& other197) { - gpid = std::move(other197.gpid); - action_list = std::move(other197.action_list); - force = std::move(other197.force); - balance_type = std::move(other197.balance_type); - __isset = std::move(other197.__isset); -} -configuration_balancer_request& configuration_balancer_request::operator=(const configuration_balancer_request& other198) { - gpid = other198.gpid; - action_list = other198.action_list; - force = other198.force; - balance_type = other198.balance_type; - __isset = other198.__isset; - return *this; -} -configuration_balancer_request& configuration_balancer_request::operator=(configuration_balancer_request&& other199) { - gpid = std::move(other199.gpid); - action_list = std::move(other199.action_list); - force = std::move(other199.force); - balance_type = std::move(other199.balance_type); - __isset = std::move(other199.__isset); - return *this; -} -void configuration_balancer_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_balancer_request("; - out << "gpid=" << to_string(gpid); - out << ", " << "action_list=" << to_string(action_list); - out << ", " << "force="; (__isset.force ? (out << to_string(force)) : (out << "")); - out << ", " << "balance_type="; (__isset.balance_type ? (out << to_string(balance_type)) : (out << "")); - out << ")"; -} - - -configuration_balancer_response::~configuration_balancer_response() throw() { -} - - -void configuration_balancer_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -uint32_t configuration_balancer_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_balancer_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_balancer_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_balancer_response &a, configuration_balancer_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.__isset, b.__isset); -} - -configuration_balancer_response::configuration_balancer_response(const configuration_balancer_response& other200) { - err = other200.err; - __isset = other200.__isset; -} -configuration_balancer_response::configuration_balancer_response( configuration_balancer_response&& other201) { - err = std::move(other201.err); - __isset = std::move(other201.__isset); -} -configuration_balancer_response& configuration_balancer_response::operator=(const configuration_balancer_response& other202) { - err = other202.err; - __isset = other202.__isset; - return *this; -} -configuration_balancer_response& configuration_balancer_response::operator=(configuration_balancer_response&& other203) { - err = std::move(other203.err); - __isset = std::move(other203.__isset); - return *this; -} -void configuration_balancer_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_balancer_response("; - out << "err=" << to_string(err); - out << ")"; -} - - -configuration_drop_app_response::~configuration_drop_app_response() throw() { -} - - -void configuration_drop_app_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -uint32_t configuration_drop_app_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_drop_app_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_drop_app_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_drop_app_response &a, configuration_drop_app_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.__isset, b.__isset); -} - -configuration_drop_app_response::configuration_drop_app_response(const configuration_drop_app_response& other204) { - err = other204.err; - __isset = other204.__isset; -} -configuration_drop_app_response::configuration_drop_app_response( configuration_drop_app_response&& other205) { - err = std::move(other205.err); - __isset = std::move(other205.__isset); -} -configuration_drop_app_response& configuration_drop_app_response::operator=(const configuration_drop_app_response& other206) { - err = other206.err; - __isset = other206.__isset; - return *this; -} -configuration_drop_app_response& configuration_drop_app_response::operator=(configuration_drop_app_response&& other207) { - err = std::move(other207.err); - __isset = std::move(other207.__isset); - return *this; -} -void configuration_drop_app_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_drop_app_response("; - out << "err=" << to_string(err); - out << ")"; -} - - -configuration_list_apps_response::~configuration_list_apps_response() throw() { -} - - -void configuration_list_apps_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void configuration_list_apps_response::__set_infos(const std::vector< ::dsn::app_info> & val) { - this->infos = val; -} - -uint32_t configuration_list_apps_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->infos.clear(); - uint32_t _size208; - ::apache::thrift::protocol::TType _etype211; - xfer += iprot->readListBegin(_etype211, _size208); - this->infos.resize(_size208); - uint32_t _i212; - for (_i212 = 0; _i212 < _size208; ++_i212) - { - xfer += this->infos[_i212].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.infos = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_list_apps_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_list_apps_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("infos", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->infos.size())); - std::vector< ::dsn::app_info> ::const_iterator _iter213; - for (_iter213 = this->infos.begin(); _iter213 != this->infos.end(); ++_iter213) - { - xfer += (*_iter213).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_list_apps_response &a, configuration_list_apps_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.infos, b.infos); - swap(a.__isset, b.__isset); -} - -configuration_list_apps_response::configuration_list_apps_response(const configuration_list_apps_response& other214) { - err = other214.err; - infos = other214.infos; - __isset = other214.__isset; -} -configuration_list_apps_response::configuration_list_apps_response( configuration_list_apps_response&& other215) { - err = std::move(other215.err); - infos = std::move(other215.infos); - __isset = std::move(other215.__isset); -} -configuration_list_apps_response& configuration_list_apps_response::operator=(const configuration_list_apps_response& other216) { - err = other216.err; - infos = other216.infos; - __isset = other216.__isset; - return *this; -} -configuration_list_apps_response& configuration_list_apps_response::operator=(configuration_list_apps_response&& other217) { - err = std::move(other217.err); - infos = std::move(other217.infos); - __isset = std::move(other217.__isset); - return *this; -} -void configuration_list_apps_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_list_apps_response("; - out << "err=" << to_string(err); - out << ", " << "infos=" << to_string(infos); - out << ")"; -} - - -configuration_list_nodes_response::~configuration_list_nodes_response() throw() { -} - - -void configuration_list_nodes_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void configuration_list_nodes_response::__set_infos(const std::vector & val) { - this->infos = val; -} - -uint32_t configuration_list_nodes_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->infos.clear(); - uint32_t _size218; - ::apache::thrift::protocol::TType _etype221; - xfer += iprot->readListBegin(_etype221, _size218); - this->infos.resize(_size218); - uint32_t _i222; - for (_i222 = 0; _i222 < _size218; ++_i222) - { - xfer += this->infos[_i222].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.infos = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_list_nodes_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_list_nodes_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("infos", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->infos.size())); - std::vector ::const_iterator _iter223; - for (_iter223 = this->infos.begin(); _iter223 != this->infos.end(); ++_iter223) - { - xfer += (*_iter223).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_list_nodes_response &a, configuration_list_nodes_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.infos, b.infos); - swap(a.__isset, b.__isset); -} - -configuration_list_nodes_response::configuration_list_nodes_response(const configuration_list_nodes_response& other224) { - err = other224.err; - infos = other224.infos; - __isset = other224.__isset; -} -configuration_list_nodes_response::configuration_list_nodes_response( configuration_list_nodes_response&& other225) { - err = std::move(other225.err); - infos = std::move(other225.infos); - __isset = std::move(other225.__isset); -} -configuration_list_nodes_response& configuration_list_nodes_response::operator=(const configuration_list_nodes_response& other226) { - err = other226.err; - infos = other226.infos; - __isset = other226.__isset; - return *this; -} -configuration_list_nodes_response& configuration_list_nodes_response::operator=(configuration_list_nodes_response&& other227) { - err = std::move(other227.err); - infos = std::move(other227.infos); - __isset = std::move(other227.__isset); - return *this; -} -void configuration_list_nodes_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_list_nodes_response("; - out << "err=" << to_string(err); - out << ", " << "infos=" << to_string(infos); - out << ")"; -} - - -configuration_cluster_info_response::~configuration_cluster_info_response() throw() { -} - - -void configuration_cluster_info_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void configuration_cluster_info_response::__set_keys(const std::vector & val) { - this->keys = val; -} - -void configuration_cluster_info_response::__set_values(const std::vector & val) { - this->values = val; -} - -uint32_t configuration_cluster_info_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->keys.clear(); - uint32_t _size228; - ::apache::thrift::protocol::TType _etype231; - xfer += iprot->readListBegin(_etype231, _size228); - this->keys.resize(_size228); - uint32_t _i232; - for (_i232 = 0; _i232 < _size228; ++_i232) - { - xfer += iprot->readString(this->keys[_i232]); - } - xfer += iprot->readListEnd(); - } - this->__isset.keys = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->values.clear(); - uint32_t _size233; - ::apache::thrift::protocol::TType _etype236; - xfer += iprot->readListBegin(_etype236, _size233); - this->values.resize(_size233); - uint32_t _i237; - for (_i237 = 0; _i237 < _size233; ++_i237) - { - xfer += iprot->readString(this->values[_i237]); - } - xfer += iprot->readListEnd(); - } - this->__isset.values = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_cluster_info_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_cluster_info_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("keys", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->keys.size())); - std::vector ::const_iterator _iter238; - for (_iter238 = this->keys.begin(); _iter238 != this->keys.end(); ++_iter238) - { - xfer += oprot->writeString((*_iter238)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->values.size())); - std::vector ::const_iterator _iter239; - for (_iter239 = this->values.begin(); _iter239 != this->values.end(); ++_iter239) - { - xfer += oprot->writeString((*_iter239)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_cluster_info_response &a, configuration_cluster_info_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.keys, b.keys); - swap(a.values, b.values); - swap(a.__isset, b.__isset); -} - -configuration_cluster_info_response::configuration_cluster_info_response(const configuration_cluster_info_response& other240) { - err = other240.err; - keys = other240.keys; - values = other240.values; - __isset = other240.__isset; -} -configuration_cluster_info_response::configuration_cluster_info_response( configuration_cluster_info_response&& other241) { - err = std::move(other241.err); - keys = std::move(other241.keys); - values = std::move(other241.values); - __isset = std::move(other241.__isset); -} -configuration_cluster_info_response& configuration_cluster_info_response::operator=(const configuration_cluster_info_response& other242) { - err = other242.err; - keys = other242.keys; - values = other242.values; - __isset = other242.__isset; - return *this; -} -configuration_cluster_info_response& configuration_cluster_info_response::operator=(configuration_cluster_info_response&& other243) { - err = std::move(other243.err); - keys = std::move(other243.keys); - values = std::move(other243.values); - __isset = std::move(other243.__isset); - return *this; -} -void configuration_cluster_info_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_cluster_info_response("; - out << "err=" << to_string(err); - out << ", " << "keys=" << to_string(keys); - out << ", " << "values=" << to_string(values); - out << ")"; -} - - -configuration_recall_app_response::~configuration_recall_app_response() throw() { -} - - -void configuration_recall_app_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void configuration_recall_app_response::__set_info(const ::dsn::app_info& val) { - this->info = val; -} - -uint32_t configuration_recall_app_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->info.read(iprot); - this->__isset.info = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_recall_app_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_recall_app_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("info", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->info.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_recall_app_response &a, configuration_recall_app_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.info, b.info); - swap(a.__isset, b.__isset); -} - -configuration_recall_app_response::configuration_recall_app_response(const configuration_recall_app_response& other244) { - err = other244.err; - info = other244.info; - __isset = other244.__isset; -} -configuration_recall_app_response::configuration_recall_app_response( configuration_recall_app_response&& other245) { - err = std::move(other245.err); - info = std::move(other245.info); - __isset = std::move(other245.__isset); -} -configuration_recall_app_response& configuration_recall_app_response::operator=(const configuration_recall_app_response& other246) { - err = other246.err; - info = other246.info; - __isset = other246.__isset; - return *this; -} -configuration_recall_app_response& configuration_recall_app_response::operator=(configuration_recall_app_response&& other247) { - err = std::move(other247.err); - info = std::move(other247.info); - __isset = std::move(other247.__isset); - return *this; -} -void configuration_recall_app_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_recall_app_response("; - out << "err=" << to_string(err); - out << ", " << "info=" << to_string(info); - out << ")"; -} - - -query_replica_decree_request::~query_replica_decree_request() throw() { -} - - -void query_replica_decree_request::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} - -void query_replica_decree_request::__set_node(const ::dsn::rpc_address& val) { - this->node = val; -} - -uint32_t query_replica_decree_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t query_replica_decree_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_replica_decree_request"); - - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(query_replica_decree_request &a, query_replica_decree_request &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.node, b.node); - swap(a.__isset, b.__isset); -} - -query_replica_decree_request::query_replica_decree_request(const query_replica_decree_request& other248) { - pid = other248.pid; - node = other248.node; - __isset = other248.__isset; -} -query_replica_decree_request::query_replica_decree_request( query_replica_decree_request&& other249) { - pid = std::move(other249.pid); - node = std::move(other249.node); - __isset = std::move(other249.__isset); -} -query_replica_decree_request& query_replica_decree_request::operator=(const query_replica_decree_request& other250) { - pid = other250.pid; - node = other250.node; - __isset = other250.__isset; - return *this; -} -query_replica_decree_request& query_replica_decree_request::operator=(query_replica_decree_request&& other251) { - pid = std::move(other251.pid); - node = std::move(other251.node); - __isset = std::move(other251.__isset); - return *this; -} -void query_replica_decree_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "query_replica_decree_request("; - out << "pid=" << to_string(pid); - out << ", " << "node=" << to_string(node); - out << ")"; -} - - -query_replica_decree_response::~query_replica_decree_response() throw() { -} - - -void query_replica_decree_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void query_replica_decree_response::__set_last_decree(const int64_t val) { - this->last_decree = val; -} - -uint32_t query_replica_decree_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_decree); - this->__isset.last_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t query_replica_decree_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_replica_decree_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_decree", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->last_decree); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(query_replica_decree_response &a, query_replica_decree_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.last_decree, b.last_decree); - swap(a.__isset, b.__isset); -} - -query_replica_decree_response::query_replica_decree_response(const query_replica_decree_response& other252) { - err = other252.err; - last_decree = other252.last_decree; - __isset = other252.__isset; -} -query_replica_decree_response::query_replica_decree_response( query_replica_decree_response&& other253) { - err = std::move(other253.err); - last_decree = std::move(other253.last_decree); - __isset = std::move(other253.__isset); -} -query_replica_decree_response& query_replica_decree_response::operator=(const query_replica_decree_response& other254) { - err = other254.err; - last_decree = other254.last_decree; - __isset = other254.__isset; - return *this; -} -query_replica_decree_response& query_replica_decree_response::operator=(query_replica_decree_response&& other255) { - err = std::move(other255.err); - last_decree = std::move(other255.last_decree); - __isset = std::move(other255.__isset); - return *this; -} -void query_replica_decree_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "query_replica_decree_response("; - out << "err=" << to_string(err); - out << ", " << "last_decree=" << to_string(last_decree); - out << ")"; -} - - -replica_info::~replica_info() throw() { -} - - -void replica_info::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} - -void replica_info::__set_ballot(const int64_t val) { - this->ballot = val; -} - -void replica_info::__set_status(const partition_status::type val) { - this->status = val; -} - -void replica_info::__set_last_committed_decree(const int64_t val) { - this->last_committed_decree = val; -} - -void replica_info::__set_last_prepared_decree(const int64_t val) { - this->last_prepared_decree = val; -} - -void replica_info::__set_last_durable_decree(const int64_t val) { - this->last_durable_decree = val; -} - -void replica_info::__set_app_type(const std::string& val) { - this->app_type = val; -} - -void replica_info::__set_disk_tag(const std::string& val) { - this->disk_tag = val; -} - -uint32_t replica_info::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast256; - xfer += iprot->readI32(ecast256); - this->status = (partition_status::type)ecast256; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_prepared_decree); - this->__isset.last_prepared_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_durable_decree); - this->__isset.last_durable_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_type); - this->__isset.app_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->disk_tag); - this->__isset.disk_tag = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t replica_info::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("replica_info"); - - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_prepared_decree", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->last_prepared_decree); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_durable_decree", ::apache::thrift::protocol::T_I64, 6); - xfer += oprot->writeI64(this->last_durable_decree); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 7); - xfer += oprot->writeString(this->app_type); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("disk_tag", ::apache::thrift::protocol::T_STRING, 8); - xfer += oprot->writeString(this->disk_tag); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(replica_info &a, replica_info &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.ballot, b.ballot); - swap(a.status, b.status); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.last_prepared_decree, b.last_prepared_decree); - swap(a.last_durable_decree, b.last_durable_decree); - swap(a.app_type, b.app_type); - swap(a.disk_tag, b.disk_tag); - swap(a.__isset, b.__isset); -} - -replica_info::replica_info(const replica_info& other257) { - pid = other257.pid; - ballot = other257.ballot; - status = other257.status; - last_committed_decree = other257.last_committed_decree; - last_prepared_decree = other257.last_prepared_decree; - last_durable_decree = other257.last_durable_decree; - app_type = other257.app_type; - disk_tag = other257.disk_tag; - __isset = other257.__isset; -} -replica_info::replica_info( replica_info&& other258) { - pid = std::move(other258.pid); - ballot = std::move(other258.ballot); - status = std::move(other258.status); - last_committed_decree = std::move(other258.last_committed_decree); - last_prepared_decree = std::move(other258.last_prepared_decree); - last_durable_decree = std::move(other258.last_durable_decree); - app_type = std::move(other258.app_type); - disk_tag = std::move(other258.disk_tag); - __isset = std::move(other258.__isset); -} -replica_info& replica_info::operator=(const replica_info& other259) { - pid = other259.pid; - ballot = other259.ballot; - status = other259.status; - last_committed_decree = other259.last_committed_decree; - last_prepared_decree = other259.last_prepared_decree; - last_durable_decree = other259.last_durable_decree; - app_type = other259.app_type; - disk_tag = other259.disk_tag; - __isset = other259.__isset; - return *this; -} -replica_info& replica_info::operator=(replica_info&& other260) { - pid = std::move(other260.pid); - ballot = std::move(other260.ballot); - status = std::move(other260.status); - last_committed_decree = std::move(other260.last_committed_decree); - last_prepared_decree = std::move(other260.last_prepared_decree); - last_durable_decree = std::move(other260.last_durable_decree); - app_type = std::move(other260.app_type); - disk_tag = std::move(other260.disk_tag); - __isset = std::move(other260.__isset); - return *this; -} -void replica_info::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "replica_info("; - out << "pid=" << to_string(pid); - out << ", " << "ballot=" << to_string(ballot); - out << ", " << "status=" << to_string(status); - out << ", " << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " << "last_prepared_decree=" << to_string(last_prepared_decree); - out << ", " << "last_durable_decree=" << to_string(last_durable_decree); - out << ", " << "app_type=" << to_string(app_type); - out << ", " << "disk_tag=" << to_string(disk_tag); - out << ")"; -} - - -query_replica_info_request::~query_replica_info_request() throw() { -} - - -void query_replica_info_request::__set_node(const ::dsn::rpc_address& val) { - this->node = val; -} - -uint32_t query_replica_info_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t query_replica_info_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_replica_info_request"); - - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(query_replica_info_request &a, query_replica_info_request &b) { - using ::std::swap; - swap(a.node, b.node); - swap(a.__isset, b.__isset); -} - -query_replica_info_request::query_replica_info_request(const query_replica_info_request& other261) { - node = other261.node; - __isset = other261.__isset; -} -query_replica_info_request::query_replica_info_request( query_replica_info_request&& other262) { - node = std::move(other262.node); - __isset = std::move(other262.__isset); -} -query_replica_info_request& query_replica_info_request::operator=(const query_replica_info_request& other263) { - node = other263.node; - __isset = other263.__isset; - return *this; -} -query_replica_info_request& query_replica_info_request::operator=(query_replica_info_request&& other264) { - node = std::move(other264.node); - __isset = std::move(other264.__isset); - return *this; -} -void query_replica_info_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "query_replica_info_request("; - out << "node=" << to_string(node); - out << ")"; -} - - -query_replica_info_response::~query_replica_info_response() throw() { -} - - -void query_replica_info_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void query_replica_info_response::__set_replicas(const std::vector & val) { - this->replicas = val; -} - -uint32_t query_replica_info_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->replicas.clear(); - uint32_t _size265; - ::apache::thrift::protocol::TType _etype268; - xfer += iprot->readListBegin(_etype268, _size265); - this->replicas.resize(_size265); - uint32_t _i269; - for (_i269 = 0; _i269 < _size265; ++_i269) - { - xfer += this->replicas[_i269].read(iprot); + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->app.read(iprot); + this->__isset.app = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readListEnd(); - } - this->__isset.replicas = true; - } else { - xfer += iprot->skip(ftype); + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->confirmed_decree); + this->__isset.confirmed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->child_gpid.read(iprot); + this->__isset.child_gpid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t query_replica_info_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_replica_info_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("replicas", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->replicas.size())); - std::vector ::const_iterator _iter270; - for (_iter270 = this->replicas.begin(); _iter270 != this->replicas.end(); ++_iter270) - { - xfer += (*_iter270).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(query_replica_info_response &a, query_replica_info_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.replicas, b.replicas); - swap(a.__isset, b.__isset); -} - -query_replica_info_response::query_replica_info_response(const query_replica_info_response& other271) { - err = other271.err; - replicas = other271.replicas; - __isset = other271.__isset; -} -query_replica_info_response::query_replica_info_response( query_replica_info_response&& other272) { - err = std::move(other272.err); - replicas = std::move(other272.replicas); - __isset = std::move(other272.__isset); -} -query_replica_info_response& query_replica_info_response::operator=(const query_replica_info_response& other273) { - err = other273.err; - replicas = other273.replicas; - __isset = other273.__isset; - return *this; -} -query_replica_info_response& query_replica_info_response::operator=(query_replica_info_response&& other274) { - err = std::move(other274.err); - replicas = std::move(other274.replicas); - __isset = std::move(other274.__isset); - return *this; -} -void query_replica_info_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "query_replica_info_response("; - out << "err=" << to_string(err); - out << ", " << "replicas=" << to_string(replicas); - out << ")"; -} - - -disk_info::~disk_info() throw() { -} - - -void disk_info::__set_tag(const std::string& val) { - this->tag = val; -} - -void disk_info::__set_full_dir(const std::string& val) { - this->full_dir = val; -} - -void disk_info::__set_disk_capacity_mb(const int64_t val) { - this->disk_capacity_mb = val; -} - -void disk_info::__set_disk_available_mb(const int64_t val) { - this->disk_available_mb = val; -} - -void disk_info::__set_holding_primary_replica_counts(const std::map & val) { - this->holding_primary_replica_counts = val; -} - -void disk_info::__set_holding_secondary_replica_counts(const std::map & val) { - this->holding_secondary_replica_counts = val; -} - -uint32_t disk_info::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tag); - this->__isset.tag = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->full_dir); - this->__isset.full_dir = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->disk_capacity_mb); - this->__isset.disk_capacity_mb = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->disk_available_mb); - this->__isset.disk_available_mb = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->holding_primary_replica_counts.clear(); - uint32_t _size275; - ::apache::thrift::protocol::TType _ktype276; - ::apache::thrift::protocol::TType _vtype277; - xfer += iprot->readMapBegin(_ktype276, _vtype277, _size275); - uint32_t _i279; - for (_i279 = 0; _i279 < _size275; ++_i279) - { - int32_t _key280; - xfer += iprot->readI32(_key280); - int32_t& _val281 = this->holding_primary_replica_counts[_key280]; - xfer += iprot->readI32(_val281); - } - xfer += iprot->readMapEnd(); - } - this->__isset.holding_primary_replica_counts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->holding_secondary_replica_counts.clear(); - uint32_t _size282; - ::apache::thrift::protocol::TType _ktype283; - ::apache::thrift::protocol::TType _vtype284; - xfer += iprot->readMapBegin(_ktype283, _vtype284, _size282); - uint32_t _i286; - for (_i286 = 0; _i286 < _size282; ++_i286) - { - int32_t _key287; - xfer += iprot->readI32(_key287); - int32_t& _val288 = this->holding_secondary_replica_counts[_key287]; - xfer += iprot->readI32(_val288); - } - xfer += iprot->readMapEnd(); - } - this->__isset.holding_secondary_replica_counts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t disk_info::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("disk_info"); - - xfer += oprot->writeFieldBegin("tag", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->tag); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("full_dir", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->full_dir); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("disk_capacity_mb", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->disk_capacity_mb); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("disk_available_mb", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->disk_available_mb); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("holding_primary_replica_counts", ::apache::thrift::protocol::T_MAP, 5); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_I32, static_cast(this->holding_primary_replica_counts.size())); - std::map ::const_iterator _iter289; - for (_iter289 = this->holding_primary_replica_counts.begin(); _iter289 != this->holding_primary_replica_counts.end(); ++_iter289) - { - xfer += oprot->writeI32(_iter289->first); - xfer += oprot->writeI32(_iter289->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("holding_secondary_replica_counts", ::apache::thrift::protocol::T_MAP, 6); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_I32, static_cast(this->holding_secondary_replica_counts.size())); - std::map ::const_iterator _iter290; - for (_iter290 = this->holding_secondary_replica_counts.begin(); _iter290 != this->holding_secondary_replica_counts.end(); ++_iter290) - { - xfer += oprot->writeI32(_iter290->first); - xfer += oprot->writeI32(_iter290->second); + xfer += iprot->readFieldEnd(); } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(disk_info &a, disk_info &b) { - using ::std::swap; - swap(a.tag, b.tag); - swap(a.full_dir, b.full_dir); - swap(a.disk_capacity_mb, b.disk_capacity_mb); - swap(a.disk_available_mb, b.disk_available_mb); - swap(a.holding_primary_replica_counts, b.holding_primary_replica_counts); - swap(a.holding_secondary_replica_counts, b.holding_secondary_replica_counts); - swap(a.__isset, b.__isset); -} - -disk_info::disk_info(const disk_info& other291) { - tag = other291.tag; - full_dir = other291.full_dir; - disk_capacity_mb = other291.disk_capacity_mb; - disk_available_mb = other291.disk_available_mb; - holding_primary_replica_counts = other291.holding_primary_replica_counts; - holding_secondary_replica_counts = other291.holding_secondary_replica_counts; - __isset = other291.__isset; -} -disk_info::disk_info( disk_info&& other292) { - tag = std::move(other292.tag); - full_dir = std::move(other292.full_dir); - disk_capacity_mb = std::move(other292.disk_capacity_mb); - disk_available_mb = std::move(other292.disk_available_mb); - holding_primary_replica_counts = std::move(other292.holding_primary_replica_counts); - holding_secondary_replica_counts = std::move(other292.holding_secondary_replica_counts); - __isset = std::move(other292.__isset); -} -disk_info& disk_info::operator=(const disk_info& other293) { - tag = other293.tag; - full_dir = other293.full_dir; - disk_capacity_mb = other293.disk_capacity_mb; - disk_available_mb = other293.disk_available_mb; - holding_primary_replica_counts = other293.holding_primary_replica_counts; - holding_secondary_replica_counts = other293.holding_secondary_replica_counts; - __isset = other293.__isset; - return *this; -} -disk_info& disk_info::operator=(disk_info&& other294) { - tag = std::move(other294.tag); - full_dir = std::move(other294.full_dir); - disk_capacity_mb = std::move(other294.disk_capacity_mb); - disk_available_mb = std::move(other294.disk_available_mb); - holding_primary_replica_counts = std::move(other294.holding_primary_replica_counts); - holding_secondary_replica_counts = std::move(other294.holding_secondary_replica_counts); - __isset = std::move(other294.__isset); - return *this; -} -void disk_info::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "disk_info("; - out << "tag=" << to_string(tag); - out << ", " << "full_dir=" << to_string(full_dir); - out << ", " << "disk_capacity_mb=" << to_string(disk_capacity_mb); - out << ", " << "disk_available_mb=" << to_string(disk_available_mb); - out << ", " << "holding_primary_replica_counts=" << to_string(holding_primary_replica_counts); - out << ", " << "holding_secondary_replica_counts=" << to_string(holding_secondary_replica_counts); - out << ")"; -} - - -query_disk_info_request::~query_disk_info_request() throw() { -} - -void query_disk_info_request::__set_node(const ::dsn::rpc_address& val) { - this->node = val; -} + xfer += iprot->readStructEnd(); -void query_disk_info_request::__set_app_name(const std::string& val) { - this->app_name = val; + return xfer; } -uint32_t query_disk_info_request::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t group_check_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("group_check_request"); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("app", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->app.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + if (this->__isset.confirmed_decree) { + xfer += oprot->writeFieldBegin("confirmed_decree", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->confirmed_decree); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.child_gpid) { + xfer += oprot->writeFieldBegin("child_gpid", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->child_gpid.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(group_check_request &a, group_check_request &b) +{ + using ::std::swap; + swap(a.app, b.app); + swap(a.node, b.node); + swap(a.config, b.config); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.confirmed_decree, b.confirmed_decree); + swap(a.child_gpid, b.child_gpid); + swap(a.__isset, b.__isset); +} + +group_check_request::group_check_request(const group_check_request &other67) +{ + app = other67.app; + node = other67.node; + config = other67.config; + last_committed_decree = other67.last_committed_decree; + confirmed_decree = other67.confirmed_decree; + child_gpid = other67.child_gpid; + __isset = other67.__isset; +} +group_check_request::group_check_request(group_check_request &&other68) +{ + app = std::move(other68.app); + node = std::move(other68.node); + config = std::move(other68.config); + last_committed_decree = std::move(other68.last_committed_decree); + confirmed_decree = std::move(other68.confirmed_decree); + child_gpid = std::move(other68.child_gpid); + __isset = std::move(other68.__isset); +} +group_check_request &group_check_request::operator=(const group_check_request &other69) +{ + app = other69.app; + node = other69.node; + config = other69.config; + last_committed_decree = other69.last_committed_decree; + confirmed_decree = other69.confirmed_decree; + child_gpid = other69.child_gpid; + __isset = other69.__isset; + return *this; +} +group_check_request &group_check_request::operator=(group_check_request &&other70) +{ + app = std::move(other70.app); + node = std::move(other70.node); + config = std::move(other70.config); + last_committed_decree = std::move(other70.last_committed_decree); + confirmed_decree = std::move(other70.confirmed_decree); + child_gpid = std::move(other70.child_gpid); + __isset = std::move(other70.__isset); + return *this; +} +void group_check_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "group_check_request("; + out << "app=" << to_string(app); + out << ", " + << "node=" << to_string(node); + out << ", " + << "config=" << to_string(config); + out << ", " + << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " + << "confirmed_decree="; + (__isset.confirmed_decree ? (out << to_string(confirmed_decree)) : (out << "")); + out << ", " + << "child_gpid="; + (__isset.child_gpid ? (out << to_string(child_gpid)) : (out << "")); + out << ")"; +} + +group_check_response::~group_check_response() throw() {} + +void group_check_response::__set_pid(const ::dsn::gpid &val) { this->pid = val; } + +void group_check_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void group_check_response::__set_last_committed_decree_in_app(const int64_t val) +{ + this->last_committed_decree_in_app = val; +} + +void group_check_response::__set_last_committed_decree_in_prepare_list(const int64_t val) +{ + this->last_committed_decree_in_prepare_list = val; +} + +void group_check_response::__set_learner_status_(const learner_status::type val) +{ + this->learner_status_ = val; +} + +void group_check_response::__set_learner_signature(const int64_t val) +{ + this->learner_signature = val; +} + +void group_check_response::__set_node(const ::dsn::rpc_address &val) { this->node = val; } + +uint32_t group_check_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree_in_app); + this->__isset.last_committed_decree_in_app = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree_in_prepare_list); + this->__isset.last_committed_decree_in_prepare_list = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast71; + xfer += iprot->readI32(ecast71); + this->learner_status_ = (learner_status::type)ecast71; + this->__isset.learner_status_ = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->learner_signature); + this->__isset.learner_signature = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t query_disk_info_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_disk_info_request"); - - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(query_disk_info_request &a, query_disk_info_request &b) { - using ::std::swap; - swap(a.node, b.node); - swap(a.app_name, b.app_name); - swap(a.__isset, b.__isset); -} - -query_disk_info_request::query_disk_info_request(const query_disk_info_request& other295) { - node = other295.node; - app_name = other295.app_name; - __isset = other295.__isset; -} -query_disk_info_request::query_disk_info_request( query_disk_info_request&& other296) { - node = std::move(other296.node); - app_name = std::move(other296.app_name); - __isset = std::move(other296.__isset); -} -query_disk_info_request& query_disk_info_request::operator=(const query_disk_info_request& other297) { - node = other297.node; - app_name = other297.app_name; - __isset = other297.__isset; - return *this; -} -query_disk_info_request& query_disk_info_request::operator=(query_disk_info_request&& other298) { - node = std::move(other298.node); - app_name = std::move(other298.app_name); - __isset = std::move(other298.__isset); - return *this; -} -void query_disk_info_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "query_disk_info_request("; - out << "node=" << to_string(node); - out << ", " << "app_name=" << to_string(app_name); - out << ")"; -} + xfer += iprot->readStructEnd(); -query_disk_info_response::~query_disk_info_response() throw() { + return xfer; } +uint32_t group_check_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("group_check_response"); -void query_disk_info_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void query_disk_info_response::__set_total_capacity_mb(const int64_t val) { - this->total_capacity_mb = val; -} - -void query_disk_info_response::__set_total_available_mb(const int64_t val) { - this->total_available_mb = val; -} + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); -void query_disk_info_response::__set_disk_infos(const std::vector & val) { - this->disk_infos = val; -} + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); -uint32_t query_disk_info_response::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += oprot->writeFieldBegin( + "last_committed_decree_in_app", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->last_committed_decree_in_app); + xfer += oprot->writeFieldEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin( + "last_committed_decree_in_prepare_list", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->last_committed_decree_in_prepare_list); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("learner_status_", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)this->learner_status_); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("learner_signature", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->learner_signature); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 7); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->total_capacity_mb); - this->__isset.total_capacity_mb = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->total_available_mb); - this->__isset.total_available_mb = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->disk_infos.clear(); - uint32_t _size299; - ::apache::thrift::protocol::TType _etype302; - xfer += iprot->readListBegin(_etype302, _size299); - this->disk_infos.resize(_size299); - uint32_t _i303; - for (_i303 = 0; _i303 < _size299; ++_i303) - { - xfer += this->disk_infos[_i303].read(iprot); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(group_check_response &a, group_check_response &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.err, b.err); + swap(a.last_committed_decree_in_app, b.last_committed_decree_in_app); + swap(a.last_committed_decree_in_prepare_list, b.last_committed_decree_in_prepare_list); + swap(a.learner_status_, b.learner_status_); + swap(a.learner_signature, b.learner_signature); + swap(a.node, b.node); + swap(a.__isset, b.__isset); +} + +group_check_response::group_check_response(const group_check_response &other72) +{ + pid = other72.pid; + err = other72.err; + last_committed_decree_in_app = other72.last_committed_decree_in_app; + last_committed_decree_in_prepare_list = other72.last_committed_decree_in_prepare_list; + learner_status_ = other72.learner_status_; + learner_signature = other72.learner_signature; + node = other72.node; + __isset = other72.__isset; +} +group_check_response::group_check_response(group_check_response &&other73) +{ + pid = std::move(other73.pid); + err = std::move(other73.err); + last_committed_decree_in_app = std::move(other73.last_committed_decree_in_app); + last_committed_decree_in_prepare_list = + std::move(other73.last_committed_decree_in_prepare_list); + learner_status_ = std::move(other73.learner_status_); + learner_signature = std::move(other73.learner_signature); + node = std::move(other73.node); + __isset = std::move(other73.__isset); +} +group_check_response &group_check_response::operator=(const group_check_response &other74) +{ + pid = other74.pid; + err = other74.err; + last_committed_decree_in_app = other74.last_committed_decree_in_app; + last_committed_decree_in_prepare_list = other74.last_committed_decree_in_prepare_list; + learner_status_ = other74.learner_status_; + learner_signature = other74.learner_signature; + node = other74.node; + __isset = other74.__isset; + return *this; +} +group_check_response &group_check_response::operator=(group_check_response &&other75) +{ + pid = std::move(other75.pid); + err = std::move(other75.err); + last_committed_decree_in_app = std::move(other75.last_committed_decree_in_app); + last_committed_decree_in_prepare_list = + std::move(other75.last_committed_decree_in_prepare_list); + learner_status_ = std::move(other75.learner_status_); + learner_signature = std::move(other75.learner_signature); + node = std::move(other75.node); + __isset = std::move(other75.__isset); + return *this; +} +void group_check_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "group_check_response("; + out << "pid=" << to_string(pid); + out << ", " + << "err=" << to_string(err); + out << ", " + << "last_committed_decree_in_app=" << to_string(last_committed_decree_in_app); + out << ", " + << "last_committed_decree_in_prepare_list=" + << to_string(last_committed_decree_in_prepare_list); + out << ", " + << "learner_status_=" << to_string(learner_status_); + out << ", " + << "learner_signature=" << to_string(learner_signature); + out << ", " + << "node=" << to_string(node); + out << ")"; +} + +node_info::~node_info() throw() {} + +void node_info::__set_status(const node_status::type val) { this->status = val; } + +void node_info::__set_address(const ::dsn::rpc_address &val) { this->address = val; } + +uint32_t node_info::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast76; + xfer += iprot->readI32(ecast76); + this->status = (node_status::type)ecast76; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readListEnd(); - } - this->__isset.disk_infos = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->address.read(iprot); + this->__isset.address = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t query_disk_info_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_disk_info_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("total_capacity_mb", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->total_capacity_mb); - xfer += oprot->writeFieldEnd(); +uint32_t node_info::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("node_info"); - xfer += oprot->writeFieldBegin("total_available_mb", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->total_available_mb); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("disk_infos", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->disk_infos.size())); - std::vector ::const_iterator _iter304; - for (_iter304 = this->disk_infos.begin(); _iter304 != this->disk_infos.end(); ++_iter304) - { - xfer += (*_iter304).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("address", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->address.write(oprot); + xfer += oprot->writeFieldEnd(); -void swap(query_disk_info_response &a, query_disk_info_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.total_capacity_mb, b.total_capacity_mb); - swap(a.total_available_mb, b.total_available_mb); - swap(a.disk_infos, b.disk_infos); - swap(a.__isset, b.__isset); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -query_disk_info_response::query_disk_info_response(const query_disk_info_response& other305) { - err = other305.err; - total_capacity_mb = other305.total_capacity_mb; - total_available_mb = other305.total_available_mb; - disk_infos = other305.disk_infos; - __isset = other305.__isset; -} -query_disk_info_response::query_disk_info_response( query_disk_info_response&& other306) { - err = std::move(other306.err); - total_capacity_mb = std::move(other306.total_capacity_mb); - total_available_mb = std::move(other306.total_available_mb); - disk_infos = std::move(other306.disk_infos); - __isset = std::move(other306.__isset); +void swap(node_info &a, node_info &b) +{ + using ::std::swap; + swap(a.status, b.status); + swap(a.address, b.address); + swap(a.__isset, b.__isset); } -query_disk_info_response& query_disk_info_response::operator=(const query_disk_info_response& other307) { - err = other307.err; - total_capacity_mb = other307.total_capacity_mb; - total_available_mb = other307.total_available_mb; - disk_infos = other307.disk_infos; - __isset = other307.__isset; - return *this; -} -query_disk_info_response& query_disk_info_response::operator=(query_disk_info_response&& other308) { - err = std::move(other308.err); - total_capacity_mb = std::move(other308.total_capacity_mb); - total_available_mb = std::move(other308.total_available_mb); - disk_infos = std::move(other308.disk_infos); - __isset = std::move(other308.__isset); - return *this; -} -void query_disk_info_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "query_disk_info_response("; - out << "err=" << to_string(err); - out << ", " << "total_capacity_mb=" << to_string(total_capacity_mb); - out << ", " << "total_available_mb=" << to_string(total_available_mb); - out << ", " << "disk_infos=" << to_string(disk_infos); - out << ")"; -} - -query_app_info_request::~query_app_info_request() throw() { +node_info::node_info(const node_info &other77) +{ + status = other77.status; + address = other77.address; + __isset = other77.__isset; } - - -void query_app_info_request::__set_meta_server(const ::dsn::rpc_address& val) { - this->meta_server = val; +node_info::node_info(node_info &&other78) +{ + status = std::move(other78.status); + address = std::move(other78.address); + __isset = std::move(other78.__isset); } - -uint32_t query_app_info_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->meta_server.read(iprot); - this->__isset.meta_server = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; +node_info &node_info::operator=(const node_info &other79) +{ + status = other79.status; + address = other79.address; + __isset = other79.__isset; + return *this; } - -uint32_t query_app_info_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_app_info_request"); - - xfer += oprot->writeFieldBegin("meta_server", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->meta_server.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; +node_info &node_info::operator=(node_info &&other80) +{ + status = std::move(other80.status); + address = std::move(other80.address); + __isset = std::move(other80.__isset); + return *this; } - -void swap(query_app_info_request &a, query_app_info_request &b) { - using ::std::swap; - swap(a.meta_server, b.meta_server); - swap(a.__isset, b.__isset); +void node_info::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "node_info("; + out << "status=" << to_string(status); + out << ", " + << "address=" << to_string(address); + out << ")"; } -query_app_info_request::query_app_info_request(const query_app_info_request& other309) { - meta_server = other309.meta_server; - __isset = other309.__isset; -} -query_app_info_request::query_app_info_request( query_app_info_request&& other310) { - meta_server = std::move(other310.meta_server); - __isset = std::move(other310.__isset); -} -query_app_info_request& query_app_info_request::operator=(const query_app_info_request& other311) { - meta_server = other311.meta_server; - __isset = other311.__isset; - return *this; -} -query_app_info_request& query_app_info_request::operator=(query_app_info_request&& other312) { - meta_server = std::move(other312.meta_server); - __isset = std::move(other312.__isset); - return *this; -} -void query_app_info_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "query_app_info_request("; - out << "meta_server=" << to_string(meta_server); - out << ")"; -} +configuration_update_request::~configuration_update_request() throw() {} +void configuration_update_request::__set_info(const ::dsn::app_info &val) { this->info = val; } -query_app_info_response::~query_app_info_response() throw() { +void configuration_update_request::__set_config(const ::dsn::partition_configuration &val) +{ + this->config = val; } +void configuration_update_request::__set_type(const config_type::type val) { this->type = val; } -void query_app_info_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} +void configuration_update_request::__set_node(const ::dsn::rpc_address &val) { this->node = val; } -void query_app_info_response::__set_apps(const std::vector< ::dsn::app_info> & val) { - this->apps = val; +void configuration_update_request::__set_host_node(const ::dsn::rpc_address &val) +{ + this->host_node = val; } -uint32_t query_app_info_response::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t configuration_update_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->apps.clear(); - uint32_t _size313; - ::apache::thrift::protocol::TType _etype316; - xfer += iprot->readListBegin(_etype316, _size313); - this->apps.resize(_size313); - uint32_t _i317; - for (_i317 = 0; _i317 < _size313; ++_i317) - { - xfer += this->apps[_i317].read(iprot); + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->info.read(iprot); + this->__isset.info = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast81; + xfer += iprot->readI32(ecast81); + this->type = (config_type::type)ecast81; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readListEnd(); - } - this->__isset.apps = true; - } else { - xfer += iprot->skip(ftype); + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->host_node.read(iprot); + this->__isset.host_node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t query_app_info_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("query_app_info_response"); - - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("apps", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->apps.size())); - std::vector< ::dsn::app_info> ::const_iterator _iter318; - for (_iter318 = this->apps.begin(); _iter318 != this->apps.end(); ++_iter318) - { - xfer += (*_iter318).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(query_app_info_response &a, query_app_info_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.apps, b.apps); - swap(a.__isset, b.__isset); -} - -query_app_info_response::query_app_info_response(const query_app_info_response& other319) { - err = other319.err; - apps = other319.apps; - __isset = other319.__isset; -} -query_app_info_response::query_app_info_response( query_app_info_response&& other320) { - err = std::move(other320.err); - apps = std::move(other320.apps); - __isset = std::move(other320.__isset); -} -query_app_info_response& query_app_info_response::operator=(const query_app_info_response& other321) { - err = other321.err; - apps = other321.apps; - __isset = other321.__isset; - return *this; -} -query_app_info_response& query_app_info_response::operator=(query_app_info_response&& other322) { - err = std::move(other322.err); - apps = std::move(other322.apps); - __isset = std::move(other322.__isset); - return *this; -} -void query_app_info_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "query_app_info_response("; - out << "err=" << to_string(err); - out << ", " << "apps=" << to_string(apps); - out << ")"; -} - - -configuration_recovery_request::~configuration_recovery_request() throw() { -} - - -void configuration_recovery_request::__set_recovery_set(const std::vector< ::dsn::rpc_address> & val) { - this->recovery_set = val; -} - -void configuration_recovery_request::__set_skip_bad_nodes(const bool val) { - this->skip_bad_nodes = val; -} - -void configuration_recovery_request::__set_skip_lost_partitions(const bool val) { - this->skip_lost_partitions = val; -} - -uint32_t configuration_recovery_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->recovery_set.clear(); - uint32_t _size323; - ::apache::thrift::protocol::TType _etype326; - xfer += iprot->readListBegin(_etype326, _size323); - this->recovery_set.resize(_size323); - uint32_t _i327; - for (_i327 = 0; _i327 < _size323; ++_i327) - { - xfer += this->recovery_set[_i327].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.recovery_set = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->skip_bad_nodes); - this->__isset.skip_bad_nodes = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->skip_lost_partitions); - this->__isset.skip_lost_partitions = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_recovery_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_recovery_request"); - - xfer += oprot->writeFieldBegin("recovery_set", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->recovery_set.size())); - std::vector< ::dsn::rpc_address> ::const_iterator _iter328; - for (_iter328 = this->recovery_set.begin(); _iter328 != this->recovery_set.end(); ++_iter328) - { - xfer += (*_iter328).write(oprot); + xfer += iprot->readFieldEnd(); } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("skip_bad_nodes", ::apache::thrift::protocol::T_BOOL, 2); - xfer += oprot->writeBool(this->skip_bad_nodes); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructEnd(); - xfer += oprot->writeFieldBegin("skip_lost_partitions", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->skip_lost_partitions); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_recovery_request &a, configuration_recovery_request &b) { - using ::std::swap; - swap(a.recovery_set, b.recovery_set); - swap(a.skip_bad_nodes, b.skip_bad_nodes); - swap(a.skip_lost_partitions, b.skip_lost_partitions); - swap(a.__isset, b.__isset); -} - -configuration_recovery_request::configuration_recovery_request(const configuration_recovery_request& other329) { - recovery_set = other329.recovery_set; - skip_bad_nodes = other329.skip_bad_nodes; - skip_lost_partitions = other329.skip_lost_partitions; - __isset = other329.__isset; -} -configuration_recovery_request::configuration_recovery_request( configuration_recovery_request&& other330) { - recovery_set = std::move(other330.recovery_set); - skip_bad_nodes = std::move(other330.skip_bad_nodes); - skip_lost_partitions = std::move(other330.skip_lost_partitions); - __isset = std::move(other330.__isset); -} -configuration_recovery_request& configuration_recovery_request::operator=(const configuration_recovery_request& other331) { - recovery_set = other331.recovery_set; - skip_bad_nodes = other331.skip_bad_nodes; - skip_lost_partitions = other331.skip_lost_partitions; - __isset = other331.__isset; - return *this; -} -configuration_recovery_request& configuration_recovery_request::operator=(configuration_recovery_request&& other332) { - recovery_set = std::move(other332.recovery_set); - skip_bad_nodes = std::move(other332.skip_bad_nodes); - skip_lost_partitions = std::move(other332.skip_lost_partitions); - __isset = std::move(other332.__isset); - return *this; -} -void configuration_recovery_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_recovery_request("; - out << "recovery_set=" << to_string(recovery_set); - out << ", " << "skip_bad_nodes=" << to_string(skip_bad_nodes); - out << ", " << "skip_lost_partitions=" << to_string(skip_lost_partitions); - out << ")"; -} - - -configuration_recovery_response::~configuration_recovery_response() throw() { + return xfer; } +uint32_t configuration_update_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_update_request"); -void configuration_recovery_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void configuration_recovery_response::__set_hint_message(const std::string& val) { - this->hint_message = val; -} - -uint32_t configuration_recovery_response::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += oprot->writeFieldBegin("info", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->info.write(oprot); + xfer += oprot->writeFieldEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("host_node", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->host_node.write(oprot); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint_message); - this->__isset.hint_message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_update_request &a, configuration_update_request &b) +{ + using ::std::swap; + swap(a.info, b.info); + swap(a.config, b.config); + swap(a.type, b.type); + swap(a.node, b.node); + swap(a.host_node, b.host_node); + swap(a.__isset, b.__isset); +} + +configuration_update_request::configuration_update_request( + const configuration_update_request &other82) +{ + info = other82.info; + config = other82.config; + type = other82.type; + node = other82.node; + host_node = other82.host_node; + __isset = other82.__isset; +} +configuration_update_request::configuration_update_request(configuration_update_request &&other83) +{ + info = std::move(other83.info); + config = std::move(other83.config); + type = std::move(other83.type); + node = std::move(other83.node); + host_node = std::move(other83.host_node); + __isset = std::move(other83.__isset); +} +configuration_update_request &configuration_update_request:: +operator=(const configuration_update_request &other84) +{ + info = other84.info; + config = other84.config; + type = other84.type; + node = other84.node; + host_node = other84.host_node; + __isset = other84.__isset; + return *this; +} +configuration_update_request &configuration_update_request:: +operator=(configuration_update_request &&other85) +{ + info = std::move(other85.info); + config = std::move(other85.config); + type = std::move(other85.type); + node = std::move(other85.node); + host_node = std::move(other85.host_node); + __isset = std::move(other85.__isset); + return *this; +} +void configuration_update_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_update_request("; + out << "info=" << to_string(info); + out << ", " + << "config=" << to_string(config); + out << ", " + << "type=" << to_string(type); + out << ", " + << "node=" << to_string(node); + out << ", " + << "host_node=" << to_string(host_node); + out << ")"; +} + +configuration_update_response::~configuration_update_response() throw() {} + +void configuration_update_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void configuration_update_response::__set_config(const ::dsn::partition_configuration &val) +{ + this->config = val; +} + +uint32_t configuration_update_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_recovery_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_recovery_response"); +uint32_t configuration_update_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_update_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->hint_message); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_recovery_response &a, configuration_recovery_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.hint_message, b.hint_message); - swap(a.__isset, b.__isset); +void swap(configuration_update_response &a, configuration_update_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.config, b.config); + swap(a.__isset, b.__isset); } -configuration_recovery_response::configuration_recovery_response(const configuration_recovery_response& other333) { - err = other333.err; - hint_message = other333.hint_message; - __isset = other333.__isset; +configuration_update_response::configuration_update_response( + const configuration_update_response &other86) +{ + err = other86.err; + config = other86.config; + __isset = other86.__isset; } -configuration_recovery_response::configuration_recovery_response( configuration_recovery_response&& other334) { - err = std::move(other334.err); - hint_message = std::move(other334.hint_message); - __isset = std::move(other334.__isset); +configuration_update_response::configuration_update_response( + configuration_update_response &&other87) +{ + err = std::move(other87.err); + config = std::move(other87.config); + __isset = std::move(other87.__isset); } -configuration_recovery_response& configuration_recovery_response::operator=(const configuration_recovery_response& other335) { - err = other335.err; - hint_message = other335.hint_message; - __isset = other335.__isset; - return *this; +configuration_update_response &configuration_update_response:: +operator=(const configuration_update_response &other88) +{ + err = other88.err; + config = other88.config; + __isset = other88.__isset; + return *this; } -configuration_recovery_response& configuration_recovery_response::operator=(configuration_recovery_response&& other336) { - err = std::move(other336.err); - hint_message = std::move(other336.hint_message); - __isset = std::move(other336.__isset); - return *this; +configuration_update_response &configuration_update_response:: +operator=(configuration_update_response &&other89) +{ + err = std::move(other89.err); + config = std::move(other89.config); + __isset = std::move(other89.__isset); + return *this; } -void configuration_recovery_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_recovery_response("; - out << "err=" << to_string(err); - out << ", " << "hint_message=" << to_string(hint_message); - out << ")"; -} - - -policy_info::~policy_info() throw() { +void configuration_update_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_update_response("; + out << "err=" << to_string(err); + out << ", " + << "config=" << to_string(config); + out << ")"; } +replica_server_info::~replica_server_info() throw() {} -void policy_info::__set_policy_name(const std::string& val) { - this->policy_name = val; +void replica_server_info::__set_geo_tags(const std::map &val) +{ + this->geo_tags = val; } -void policy_info::__set_backup_provider_type(const std::string& val) { - this->backup_provider_type = val; +void replica_server_info::__set_total_capacity_mb(const int64_t val) +{ + this->total_capacity_mb = val; } -uint32_t policy_info::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t replica_server_info::read(::apache::thrift::protocol::TProtocol *iprot) +{ - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->backup_provider_type); - this->__isset.backup_provider_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->geo_tags.clear(); + uint32_t _size90; + ::apache::thrift::protocol::TType _ktype91; + ::apache::thrift::protocol::TType _vtype92; + xfer += iprot->readMapBegin(_ktype91, _vtype92, _size90); + uint32_t _i94; + for (_i94 = 0; _i94 < _size90; ++_i94) { + std::string _key95; + xfer += iprot->readString(_key95); + std::string &_val96 = this->geo_tags[_key95]; + xfer += iprot->readString(_val96); + } + xfer += iprot->readMapEnd(); + } + this->__isset.geo_tags = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->total_capacity_mb); + this->__isset.total_capacity_mb = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t policy_info::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("policy_info"); +uint32_t replica_server_info::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("replica_server_info"); - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("geo_tags", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, + ::apache::thrift::protocol::T_STRING, + static_cast(this->geo_tags.size())); + std::map::const_iterator _iter97; + for (_iter97 = this->geo_tags.begin(); _iter97 != this->geo_tags.end(); ++_iter97) { + xfer += oprot->writeString(_iter97->first); + xfer += oprot->writeString(_iter97->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("backup_provider_type", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->backup_provider_type); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("total_capacity_mb", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->total_capacity_mb); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(policy_info &a, policy_info &b) { - using ::std::swap; - swap(a.policy_name, b.policy_name); - swap(a.backup_provider_type, b.backup_provider_type); - swap(a.__isset, b.__isset); +void swap(replica_server_info &a, replica_server_info &b) +{ + using ::std::swap; + swap(a.geo_tags, b.geo_tags); + swap(a.total_capacity_mb, b.total_capacity_mb); + swap(a.__isset, b.__isset); } -policy_info::policy_info(const policy_info& other337) { - policy_name = other337.policy_name; - backup_provider_type = other337.backup_provider_type; - __isset = other337.__isset; +replica_server_info::replica_server_info(const replica_server_info &other98) +{ + geo_tags = other98.geo_tags; + total_capacity_mb = other98.total_capacity_mb; + __isset = other98.__isset; } -policy_info::policy_info( policy_info&& other338) { - policy_name = std::move(other338.policy_name); - backup_provider_type = std::move(other338.backup_provider_type); - __isset = std::move(other338.__isset); +replica_server_info::replica_server_info(replica_server_info &&other99) +{ + geo_tags = std::move(other99.geo_tags); + total_capacity_mb = std::move(other99.total_capacity_mb); + __isset = std::move(other99.__isset); } -policy_info& policy_info::operator=(const policy_info& other339) { - policy_name = other339.policy_name; - backup_provider_type = other339.backup_provider_type; - __isset = other339.__isset; - return *this; +replica_server_info &replica_server_info::operator=(const replica_server_info &other100) +{ + geo_tags = other100.geo_tags; + total_capacity_mb = other100.total_capacity_mb; + __isset = other100.__isset; + return *this; } -policy_info& policy_info::operator=(policy_info&& other340) { - policy_name = std::move(other340.policy_name); - backup_provider_type = std::move(other340.backup_provider_type); - __isset = std::move(other340.__isset); - return *this; +replica_server_info &replica_server_info::operator=(replica_server_info &&other101) +{ + geo_tags = std::move(other101.geo_tags); + total_capacity_mb = std::move(other101.total_capacity_mb); + __isset = std::move(other101.__isset); + return *this; } -void policy_info::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "policy_info("; - out << "policy_name=" << to_string(policy_name); - out << ", " << "backup_provider_type=" << to_string(backup_provider_type); - out << ")"; +void replica_server_info::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "replica_server_info("; + out << "geo_tags=" << to_string(geo_tags); + out << ", " + << "total_capacity_mb=" << to_string(total_capacity_mb); + out << ")"; } +configuration_query_by_node_request::~configuration_query_by_node_request() throw() {} -configuration_restore_request::~configuration_restore_request() throw() { +void configuration_query_by_node_request::__set_node(const ::dsn::rpc_address &val) +{ + this->node = val; } - -void configuration_restore_request::__set_cluster_name(const std::string& val) { - this->cluster_name = val; +void configuration_query_by_node_request::__set_stored_replicas( + const std::vector &val) +{ + this->stored_replicas = val; + __isset.stored_replicas = true; } -void configuration_restore_request::__set_policy_name(const std::string& val) { - this->policy_name = val; +void configuration_query_by_node_request::__set_info(const replica_server_info &val) +{ + this->info = val; + __isset.info = true; } -void configuration_restore_request::__set_time_stamp(const int64_t val) { - this->time_stamp = val; -} +uint32_t configuration_query_by_node_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ -void configuration_restore_request::__set_app_name(const std::string& val) { - this->app_name = val; -} + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -void configuration_restore_request::__set_app_id(const int32_t val) { - this->app_id = val; -} + xfer += iprot->readStructBegin(fname); -void configuration_restore_request::__set_new_app_name(const std::string& val) { - this->new_app_name = val; -} + using ::apache::thrift::protocol::TProtocolException; -void configuration_restore_request::__set_backup_provider_name(const std::string& val) { - this->backup_provider_name = val; -} + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->stored_replicas.clear(); + uint32_t _size102; + ::apache::thrift::protocol::TType _etype105; + xfer += iprot->readListBegin(_etype105, _size102); + this->stored_replicas.resize(_size102); + uint32_t _i106; + for (_i106 = 0; _i106 < _size102; ++_i106) { + xfer += this->stored_replicas[_i106].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.stored_replicas = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->info.read(iprot); + this->__isset.info = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); -void configuration_restore_request::__set_skip_bad_partition(const bool val) { - this->skip_bad_partition = val; + return xfer; } -uint32_t configuration_restore_request::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t +configuration_query_by_node_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_by_node_request"); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + if (this->__isset.stored_replicas) { + xfer += oprot->writeFieldBegin("stored_replicas", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->stored_replicas.size())); + std::vector::const_iterator _iter107; + for (_iter107 = this->stored_replicas.begin(); _iter107 != this->stored_replicas.end(); + ++_iter107) { + xfer += (*_iter107).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.info) { + xfer += oprot->writeFieldBegin("info", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->info.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_query_by_node_request &a, configuration_query_by_node_request &b) +{ + using ::std::swap; + swap(a.node, b.node); + swap(a.stored_replicas, b.stored_replicas); + swap(a.info, b.info); + swap(a.__isset, b.__isset); +} + +configuration_query_by_node_request::configuration_query_by_node_request( + const configuration_query_by_node_request &other108) +{ + node = other108.node; + stored_replicas = other108.stored_replicas; + info = other108.info; + __isset = other108.__isset; +} +configuration_query_by_node_request::configuration_query_by_node_request( + configuration_query_by_node_request &&other109) +{ + node = std::move(other109.node); + stored_replicas = std::move(other109.stored_replicas); + info = std::move(other109.info); + __isset = std::move(other109.__isset); +} +configuration_query_by_node_request &configuration_query_by_node_request:: +operator=(const configuration_query_by_node_request &other110) +{ + node = other110.node; + stored_replicas = other110.stored_replicas; + info = other110.info; + __isset = other110.__isset; + return *this; +} +configuration_query_by_node_request &configuration_query_by_node_request:: +operator=(configuration_query_by_node_request &&other111) +{ + node = std::move(other111.node); + stored_replicas = std::move(other111.stored_replicas); + info = std::move(other111.info); + __isset = std::move(other111.__isset); + return *this; +} +void configuration_query_by_node_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_query_by_node_request("; + out << "node=" << to_string(node); + out << ", " + << "stored_replicas="; + (__isset.stored_replicas ? (out << to_string(stored_replicas)) : (out << "")); + out << ", " + << "info="; + (__isset.info ? (out << to_string(info)) : (out << "")); + out << ")"; +} + +configuration_query_by_node_response::~configuration_query_by_node_response() throw() {} + +void configuration_query_by_node_response::__set_err(const ::dsn::error_code &val) +{ + this->err = val; +} + +void configuration_query_by_node_response::__set_partitions( + const std::vector &val) +{ + this->partitions = val; +} + +void configuration_query_by_node_response::__set_gc_replicas(const std::vector &val) +{ + this->gc_replicas = val; + __isset.gc_replicas = true; +} + +uint32_t configuration_query_by_node_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitions.clear(); + uint32_t _size112; + ::apache::thrift::protocol::TType _etype115; + xfer += iprot->readListBegin(_etype115, _size112); + this->partitions.resize(_size112); + uint32_t _i116; + for (_i116 = 0; _i116 < _size112; ++_i116) { + xfer += this->partitions[_i116].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.partitions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->gc_replicas.clear(); + uint32_t _size117; + ::apache::thrift::protocol::TType _etype120; + xfer += iprot->readListBegin(_etype120, _size117); + this->gc_replicas.resize(_size117); + uint32_t _i121; + for (_i121 = 0; _i121 < _size117; ++_i121) { + xfer += this->gc_replicas[_i121].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.gc_replicas = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructEnd(); + return xfer; +} - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->cluster_name); - this->__isset.cluster_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->time_stamp); - this->__isset.time_stamp = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->new_app_name); - this->__isset.new_app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->backup_provider_name); - this->__isset.backup_provider_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->skip_bad_partition); - this->__isset.skip_bad_partition = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t configuration_restore_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_restore_request"); - - xfer += oprot->writeFieldBegin("cluster_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->cluster_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("time_stamp", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->time_stamp); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("new_app_name", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->new_app_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("backup_provider_name", ::apache::thrift::protocol::T_STRING, 7); - xfer += oprot->writeString(this->backup_provider_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("skip_bad_partition", ::apache::thrift::protocol::T_BOOL, 8); - xfer += oprot->writeBool(this->skip_bad_partition); - xfer += oprot->writeFieldEnd(); +uint32_t +configuration_query_by_node_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_by_node_response"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_restore_request &a, configuration_restore_request &b) { - using ::std::swap; - swap(a.cluster_name, b.cluster_name); - swap(a.policy_name, b.policy_name); - swap(a.time_stamp, b.time_stamp); - swap(a.app_name, b.app_name); - swap(a.app_id, b.app_id); - swap(a.new_app_name, b.new_app_name); - swap(a.backup_provider_name, b.backup_provider_name); - swap(a.skip_bad_partition, b.skip_bad_partition); - swap(a.__isset, b.__isset); -} + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); -configuration_restore_request::configuration_restore_request(const configuration_restore_request& other341) { - cluster_name = other341.cluster_name; - policy_name = other341.policy_name; - time_stamp = other341.time_stamp; - app_name = other341.app_name; - app_id = other341.app_id; - new_app_name = other341.new_app_name; - backup_provider_name = other341.backup_provider_name; - skip_bad_partition = other341.skip_bad_partition; - __isset = other341.__isset; -} -configuration_restore_request::configuration_restore_request( configuration_restore_request&& other342) { - cluster_name = std::move(other342.cluster_name); - policy_name = std::move(other342.policy_name); - time_stamp = std::move(other342.time_stamp); - app_name = std::move(other342.app_name); - app_id = std::move(other342.app_id); - new_app_name = std::move(other342.new_app_name); - backup_provider_name = std::move(other342.backup_provider_name); - skip_bad_partition = std::move(other342.skip_bad_partition); - __isset = std::move(other342.__isset); -} -configuration_restore_request& configuration_restore_request::operator=(const configuration_restore_request& other343) { - cluster_name = other343.cluster_name; - policy_name = other343.policy_name; - time_stamp = other343.time_stamp; - app_name = other343.app_name; - app_id = other343.app_id; - new_app_name = other343.new_app_name; - backup_provider_name = other343.backup_provider_name; - skip_bad_partition = other343.skip_bad_partition; - __isset = other343.__isset; - return *this; -} -configuration_restore_request& configuration_restore_request::operator=(configuration_restore_request&& other344) { - cluster_name = std::move(other344.cluster_name); - policy_name = std::move(other344.policy_name); - time_stamp = std::move(other344.time_stamp); - app_name = std::move(other344.app_name); - app_id = std::move(other344.app_id); - new_app_name = std::move(other344.new_app_name); - backup_provider_name = std::move(other344.backup_provider_name); - skip_bad_partition = std::move(other344.skip_bad_partition); - __isset = std::move(other344.__isset); - return *this; -} -void configuration_restore_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_restore_request("; - out << "cluster_name=" << to_string(cluster_name); - out << ", " << "policy_name=" << to_string(policy_name); - out << ", " << "time_stamp=" << to_string(time_stamp); - out << ", " << "app_name=" << to_string(app_name); - out << ", " << "app_id=" << to_string(app_id); - out << ", " << "new_app_name=" << to_string(new_app_name); - out << ", " << "backup_provider_name=" << to_string(backup_provider_name); - out << ", " << "skip_bad_partition=" << to_string(skip_bad_partition); - out << ")"; -} - - -backup_request::~backup_request() throw() { -} - - -void backup_request::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} - -void backup_request::__set_policy(const policy_info& val) { - this->policy = val; -} - -void backup_request::__set_app_name(const std::string& val) { - this->app_name = val; -} - -void backup_request::__set_backup_id(const int64_t val) { - this->backup_id = val; -} - -uint32_t backup_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) + xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 2); { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->policy.read(iprot); - this->__isset.policy = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->backup_id); - this->__isset.backup_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->partitions.size())); + std::vector::const_iterator _iter122; + for (_iter122 = this->partitions.begin(); _iter122 != this->partitions.end(); ++_iter122) { + xfer += (*_iter122).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.gc_replicas) { + xfer += oprot->writeFieldBegin("gc_replicas", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->gc_replicas.size())); + std::vector::const_iterator _iter123; + for (_iter123 = this->gc_replicas.begin(); _iter123 != this->gc_replicas.end(); + ++_iter123) { + xfer += (*_iter123).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_query_by_node_response &a, configuration_query_by_node_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.partitions, b.partitions); + swap(a.gc_replicas, b.gc_replicas); + swap(a.__isset, b.__isset); +} + +configuration_query_by_node_response::configuration_query_by_node_response( + const configuration_query_by_node_response &other124) +{ + err = other124.err; + partitions = other124.partitions; + gc_replicas = other124.gc_replicas; + __isset = other124.__isset; +} +configuration_query_by_node_response::configuration_query_by_node_response( + configuration_query_by_node_response &&other125) +{ + err = std::move(other125.err); + partitions = std::move(other125.partitions); + gc_replicas = std::move(other125.gc_replicas); + __isset = std::move(other125.__isset); +} +configuration_query_by_node_response &configuration_query_by_node_response:: +operator=(const configuration_query_by_node_response &other126) +{ + err = other126.err; + partitions = other126.partitions; + gc_replicas = other126.gc_replicas; + __isset = other126.__isset; + return *this; +} +configuration_query_by_node_response &configuration_query_by_node_response:: +operator=(configuration_query_by_node_response &&other127) +{ + err = std::move(other127.err); + partitions = std::move(other127.partitions); + gc_replicas = std::move(other127.gc_replicas); + __isset = std::move(other127.__isset); + return *this; +} +void configuration_query_by_node_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_query_by_node_response("; + out << "err=" << to_string(err); + out << ", " + << "partitions=" << to_string(partitions); + out << ", " + << "gc_replicas="; + (__isset.gc_replicas ? (out << to_string(gc_replicas)) : (out << "")); + out << ")"; +} + +create_app_options::~create_app_options() throw() {} + +void create_app_options::__set_partition_count(const int32_t val) { this->partition_count = val; } + +void create_app_options::__set_replica_count(const int32_t val) { this->replica_count = val; } + +void create_app_options::__set_success_if_exist(const bool val) { this->success_if_exist = val; } + +void create_app_options::__set_app_type(const std::string &val) { this->app_type = val; } + +void create_app_options::__set_is_stateful(const bool val) { this->is_stateful = val; } + +void create_app_options::__set_envs(const std::map &val) +{ + this->envs = val; +} + +uint32_t create_app_options::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_count); + this->__isset.partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->replica_count); + this->__isset.replica_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success_if_exist); + this->__isset.success_if_exist = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_type); + this->__isset.app_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_stateful); + this->__isset.is_stateful = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->envs.clear(); + uint32_t _size128; + ::apache::thrift::protocol::TType _ktype129; + ::apache::thrift::protocol::TType _vtype130; + xfer += iprot->readMapBegin(_ktype129, _vtype130, _size128); + uint32_t _i132; + for (_i132 = 0; _i132 < _size128; ++_i132) { + std::string _key133; + xfer += iprot->readString(_key133); + std::string &_val134 = this->envs[_key133]; + xfer += iprot->readString(_val134); + } + xfer += iprot->readMapEnd(); + } + this->__isset.envs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t backup_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("backup_request"); +uint32_t create_app_options::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("create_app_options"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->partition_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("policy", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->policy.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("replica_count", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->replica_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("success_if_exist", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->success_if_exist); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("backup_id", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->backup_id); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->app_type); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->is_stateful); + xfer += oprot->writeFieldEnd(); -void swap(backup_request &a, backup_request &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.policy, b.policy); - swap(a.app_name, b.app_name); - swap(a.backup_id, b.backup_id); - swap(a.__isset, b.__isset); -} + xfer += oprot->writeFieldBegin("envs", ::apache::thrift::protocol::T_MAP, 6); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, + ::apache::thrift::protocol::T_STRING, + static_cast(this->envs.size())); + std::map::const_iterator _iter135; + for (_iter135 = this->envs.begin(); _iter135 != this->envs.end(); ++_iter135) { + xfer += oprot->writeString(_iter135->first); + xfer += oprot->writeString(_iter135->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); -backup_request::backup_request(const backup_request& other345) { - pid = other345.pid; - policy = other345.policy; - app_name = other345.app_name; - backup_id = other345.backup_id; - __isset = other345.__isset; -} -backup_request::backup_request( backup_request&& other346) { - pid = std::move(other346.pid); - policy = std::move(other346.policy); - app_name = std::move(other346.app_name); - backup_id = std::move(other346.backup_id); - __isset = std::move(other346.__isset); -} -backup_request& backup_request::operator=(const backup_request& other347) { - pid = other347.pid; - policy = other347.policy; - app_name = other347.app_name; - backup_id = other347.backup_id; - __isset = other347.__isset; - return *this; -} -backup_request& backup_request::operator=(backup_request&& other348) { - pid = std::move(other348.pid); - policy = std::move(other348.policy); - app_name = std::move(other348.app_name); - backup_id = std::move(other348.backup_id); - __isset = std::move(other348.__isset); - return *this; -} -void backup_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "backup_request("; - out << "pid=" << to_string(pid); - out << ", " << "policy=" << to_string(policy); - out << ", " << "app_name=" << to_string(app_name); - out << ", " << "backup_id=" << to_string(backup_id); - out << ")"; -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(create_app_options &a, create_app_options &b) +{ + using ::std::swap; + swap(a.partition_count, b.partition_count); + swap(a.replica_count, b.replica_count); + swap(a.success_if_exist, b.success_if_exist); + swap(a.app_type, b.app_type); + swap(a.is_stateful, b.is_stateful); + swap(a.envs, b.envs); + swap(a.__isset, b.__isset); +} + +create_app_options::create_app_options(const create_app_options &other136) +{ + partition_count = other136.partition_count; + replica_count = other136.replica_count; + success_if_exist = other136.success_if_exist; + app_type = other136.app_type; + is_stateful = other136.is_stateful; + envs = other136.envs; + __isset = other136.__isset; +} +create_app_options::create_app_options(create_app_options &&other137) +{ + partition_count = std::move(other137.partition_count); + replica_count = std::move(other137.replica_count); + success_if_exist = std::move(other137.success_if_exist); + app_type = std::move(other137.app_type); + is_stateful = std::move(other137.is_stateful); + envs = std::move(other137.envs); + __isset = std::move(other137.__isset); +} +create_app_options &create_app_options::operator=(const create_app_options &other138) +{ + partition_count = other138.partition_count; + replica_count = other138.replica_count; + success_if_exist = other138.success_if_exist; + app_type = other138.app_type; + is_stateful = other138.is_stateful; + envs = other138.envs; + __isset = other138.__isset; + return *this; +} +create_app_options &create_app_options::operator=(create_app_options &&other139) +{ + partition_count = std::move(other139.partition_count); + replica_count = std::move(other139.replica_count); + success_if_exist = std::move(other139.success_if_exist); + app_type = std::move(other139.app_type); + is_stateful = std::move(other139.is_stateful); + envs = std::move(other139.envs); + __isset = std::move(other139.__isset); + return *this; +} +void create_app_options::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "create_app_options("; + out << "partition_count=" << to_string(partition_count); + out << ", " + << "replica_count=" << to_string(replica_count); + out << ", " + << "success_if_exist=" << to_string(success_if_exist); + out << ", " + << "app_type=" << to_string(app_type); + out << ", " + << "is_stateful=" << to_string(is_stateful); + out << ", " + << "envs=" << to_string(envs); + out << ")"; +} + +configuration_create_app_request::~configuration_create_app_request() throw() {} + +void configuration_create_app_request::__set_app_name(const std::string &val) +{ + this->app_name = val; +} + +void configuration_create_app_request::__set_options(const create_app_options &val) +{ + this->options = val; +} + +uint32_t configuration_create_app_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->options.read(iprot); + this->__isset.options = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + xfer += iprot->readStructEnd(); -backup_response::~backup_response() throw() { + return xfer; } +uint32_t configuration_create_app_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_create_app_request"); -void backup_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); -void backup_response::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} + xfer += oprot->writeFieldBegin("options", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->options.write(oprot); + xfer += oprot->writeFieldEnd(); -void backup_response::__set_progress(const int32_t val) { - this->progress = val; -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_create_app_request &a, configuration_create_app_request &b) +{ + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.options, b.options); + swap(a.__isset, b.__isset); +} + +configuration_create_app_request::configuration_create_app_request( + const configuration_create_app_request &other140) +{ + app_name = other140.app_name; + options = other140.options; + __isset = other140.__isset; +} +configuration_create_app_request::configuration_create_app_request( + configuration_create_app_request &&other141) +{ + app_name = std::move(other141.app_name); + options = std::move(other141.options); + __isset = std::move(other141.__isset); +} +configuration_create_app_request &configuration_create_app_request:: +operator=(const configuration_create_app_request &other142) +{ + app_name = other142.app_name; + options = other142.options; + __isset = other142.__isset; + return *this; +} +configuration_create_app_request &configuration_create_app_request:: +operator=(configuration_create_app_request &&other143) +{ + app_name = std::move(other143.app_name); + options = std::move(other143.options); + __isset = std::move(other143.__isset); + return *this; +} +void configuration_create_app_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_create_app_request("; + out << "app_name=" << to_string(app_name); + out << ", " + << "options=" << to_string(options); + out << ")"; +} + +drop_app_options::~drop_app_options() throw() {} + +void drop_app_options::__set_success_if_not_exist(const bool val) +{ + this->success_if_not_exist = val; +} + +void drop_app_options::__set_reserve_seconds(const int64_t val) +{ + this->reserve_seconds = val; + __isset.reserve_seconds = true; +} + +uint32_t drop_app_options::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success_if_not_exist); + this->__isset.success_if_not_exist = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->reserve_seconds); + this->__isset.reserve_seconds = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -void backup_response::__set_policy_name(const std::string& val) { - this->policy_name = val; -} + xfer += iprot->readStructEnd(); -void backup_response::__set_backup_id(const int64_t val) { - this->backup_id = val; + return xfer; } -void backup_response::__set_checkpoint_total_size(const int64_t val) { - this->checkpoint_total_size = val; -} +uint32_t drop_app_options::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("drop_app_options"); + + xfer += oprot->writeFieldBegin("success_if_not_exist", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->success_if_not_exist); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.reserve_seconds) { + xfer += oprot->writeFieldBegin("reserve_seconds", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->reserve_seconds); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(drop_app_options &a, drop_app_options &b) +{ + using ::std::swap; + swap(a.success_if_not_exist, b.success_if_not_exist); + swap(a.reserve_seconds, b.reserve_seconds); + swap(a.__isset, b.__isset); +} + +drop_app_options::drop_app_options(const drop_app_options &other144) +{ + success_if_not_exist = other144.success_if_not_exist; + reserve_seconds = other144.reserve_seconds; + __isset = other144.__isset; +} +drop_app_options::drop_app_options(drop_app_options &&other145) +{ + success_if_not_exist = std::move(other145.success_if_not_exist); + reserve_seconds = std::move(other145.reserve_seconds); + __isset = std::move(other145.__isset); +} +drop_app_options &drop_app_options::operator=(const drop_app_options &other146) +{ + success_if_not_exist = other146.success_if_not_exist; + reserve_seconds = other146.reserve_seconds; + __isset = other146.__isset; + return *this; +} +drop_app_options &drop_app_options::operator=(drop_app_options &&other147) +{ + success_if_not_exist = std::move(other147.success_if_not_exist); + reserve_seconds = std::move(other147.reserve_seconds); + __isset = std::move(other147.__isset); + return *this; +} +void drop_app_options::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "drop_app_options("; + out << "success_if_not_exist=" << to_string(success_if_not_exist); + out << ", " + << "reserve_seconds="; + (__isset.reserve_seconds ? (out << to_string(reserve_seconds)) : (out << "")); + out << ")"; +} + +configuration_drop_app_request::~configuration_drop_app_request() throw() {} + +void configuration_drop_app_request::__set_app_name(const std::string &val) +{ + this->app_name = val; +} + +void configuration_drop_app_request::__set_options(const drop_app_options &val) +{ + this->options = val; +} + +uint32_t configuration_drop_app_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->options.read(iprot); + this->__isset.options = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -uint32_t backup_response::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += iprot->readStructEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + return xfer; +} - xfer += iprot->readStructBegin(fname); +uint32_t configuration_drop_app_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_drop_app_request"); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("options", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->options.write(oprot); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_drop_app_request &a, configuration_drop_app_request &b) +{ + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.options, b.options); + swap(a.__isset, b.__isset); +} + +configuration_drop_app_request::configuration_drop_app_request( + const configuration_drop_app_request &other148) +{ + app_name = other148.app_name; + options = other148.options; + __isset = other148.__isset; +} +configuration_drop_app_request::configuration_drop_app_request( + configuration_drop_app_request &&other149) +{ + app_name = std::move(other149.app_name); + options = std::move(other149.options); + __isset = std::move(other149.__isset); +} +configuration_drop_app_request &configuration_drop_app_request:: +operator=(const configuration_drop_app_request &other150) +{ + app_name = other150.app_name; + options = other150.options; + __isset = other150.__isset; + return *this; +} +configuration_drop_app_request &configuration_drop_app_request:: +operator=(configuration_drop_app_request &&other151) +{ + app_name = std::move(other151.app_name); + options = std::move(other151.options); + __isset = std::move(other151.__isset); + return *this; +} +void configuration_drop_app_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_drop_app_request("; + out << "app_name=" << to_string(app_name); + out << ", " + << "options=" << to_string(options); + out << ")"; +} + +configuration_list_apps_request::~configuration_list_apps_request() throw() {} + +void configuration_list_apps_request::__set_status(const ::dsn::app_status::type val) +{ + this->status = val; +} + +uint32_t configuration_list_apps_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast152; + xfer += iprot->readI32(ecast152); + this->status = (::dsn::app_status::type)ecast152; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->progress); - this->__isset.progress = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->backup_id); - this->__isset.backup_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->checkpoint_total_size); - this->__isset.checkpoint_total_size = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t backup_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("backup_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructEnd(); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->progress); - xfer += oprot->writeFieldEnd(); +uint32_t configuration_list_apps_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_list_apps_request"); - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("backup_id", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->backup_id); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_list_apps_request &a, configuration_list_apps_request &b) +{ + using ::std::swap; + swap(a.status, b.status); + swap(a.__isset, b.__isset); +} + +configuration_list_apps_request::configuration_list_apps_request( + const configuration_list_apps_request &other153) +{ + status = other153.status; + __isset = other153.__isset; +} +configuration_list_apps_request::configuration_list_apps_request( + configuration_list_apps_request &&other154) +{ + status = std::move(other154.status); + __isset = std::move(other154.__isset); +} +configuration_list_apps_request &configuration_list_apps_request:: +operator=(const configuration_list_apps_request &other155) +{ + status = other155.status; + __isset = other155.__isset; + return *this; +} +configuration_list_apps_request &configuration_list_apps_request:: +operator=(configuration_list_apps_request &&other156) +{ + status = std::move(other156.status); + __isset = std::move(other156.__isset); + return *this; +} +void configuration_list_apps_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_list_apps_request("; + out << "status=" << to_string(status); + out << ")"; +} + +configuration_list_nodes_request::~configuration_list_nodes_request() throw() {} + +void configuration_list_nodes_request::__set_status(const node_status::type val) +{ + this->status = val; +} + +uint32_t configuration_list_nodes_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast157; + xfer += iprot->readI32(ecast157); + this->status = (node_status::type)ecast157; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - xfer += oprot->writeFieldBegin("checkpoint_total_size", ::apache::thrift::protocol::T_I64, 6); - xfer += oprot->writeI64(this->checkpoint_total_size); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + return xfer; } -void swap(backup_response &a, backup_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.pid, b.pid); - swap(a.progress, b.progress); - swap(a.policy_name, b.policy_name); - swap(a.backup_id, b.backup_id); - swap(a.checkpoint_total_size, b.checkpoint_total_size); - swap(a.__isset, b.__isset); -} +uint32_t configuration_list_nodes_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_list_nodes_request"); -backup_response::backup_response(const backup_response& other349) { - err = other349.err; - pid = other349.pid; - progress = other349.progress; - policy_name = other349.policy_name; - backup_id = other349.backup_id; - checkpoint_total_size = other349.checkpoint_total_size; - __isset = other349.__isset; -} -backup_response::backup_response( backup_response&& other350) { - err = std::move(other350.err); - pid = std::move(other350.pid); - progress = std::move(other350.progress); - policy_name = std::move(other350.policy_name); - backup_id = std::move(other350.backup_id); - checkpoint_total_size = std::move(other350.checkpoint_total_size); - __isset = std::move(other350.__isset); + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -backup_response& backup_response::operator=(const backup_response& other351) { - err = other351.err; - pid = other351.pid; - progress = other351.progress; - policy_name = other351.policy_name; - backup_id = other351.backup_id; - checkpoint_total_size = other351.checkpoint_total_size; - __isset = other351.__isset; - return *this; + +void swap(configuration_list_nodes_request &a, configuration_list_nodes_request &b) +{ + using ::std::swap; + swap(a.status, b.status); + swap(a.__isset, b.__isset); } -backup_response& backup_response::operator=(backup_response&& other352) { - err = std::move(other352.err); - pid = std::move(other352.pid); - progress = std::move(other352.progress); - policy_name = std::move(other352.policy_name); - backup_id = std::move(other352.backup_id); - checkpoint_total_size = std::move(other352.checkpoint_total_size); - __isset = std::move(other352.__isset); - return *this; + +configuration_list_nodes_request::configuration_list_nodes_request( + const configuration_list_nodes_request &other158) +{ + status = other158.status; + __isset = other158.__isset; } -void backup_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "backup_response("; - out << "err=" << to_string(err); - out << ", " << "pid=" << to_string(pid); - out << ", " << "progress=" << to_string(progress); - out << ", " << "policy_name=" << to_string(policy_name); - out << ", " << "backup_id=" << to_string(backup_id); - out << ", " << "checkpoint_total_size=" << to_string(checkpoint_total_size); - out << ")"; +configuration_list_nodes_request::configuration_list_nodes_request( + configuration_list_nodes_request &&other159) +{ + status = std::move(other159.status); + __isset = std::move(other159.__isset); } - - -backup_clear_request::~backup_clear_request() throw() { +configuration_list_nodes_request &configuration_list_nodes_request:: +operator=(const configuration_list_nodes_request &other160) +{ + status = other160.status; + __isset = other160.__isset; + return *this; } - - -void backup_clear_request::__set_pid(const ::dsn::gpid& val) { - this->pid = val; +configuration_list_nodes_request &configuration_list_nodes_request:: +operator=(configuration_list_nodes_request &&other161) +{ + status = std::move(other161.status); + __isset = std::move(other161.__isset); + return *this; } - -void backup_clear_request::__set_policy_name(const std::string& val) { - this->policy_name = val; +void configuration_list_nodes_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_list_nodes_request("; + out << "status=" << to_string(status); + out << ")"; } -uint32_t backup_clear_request::read(::apache::thrift::protocol::TProtocol* iprot) { +configuration_cluster_info_request::~configuration_cluster_info_request() throw() {} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t configuration_cluster_info_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t backup_clear_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("backup_clear_request"); +uint32_t +configuration_cluster_info_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_cluster_info_request"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(backup_clear_request &a, backup_clear_request &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.policy_name, b.policy_name); - swap(a.__isset, b.__isset); +void swap(configuration_cluster_info_request &a, configuration_cluster_info_request &b) +{ + using ::std::swap; + (void)a; + (void)b; } -backup_clear_request::backup_clear_request(const backup_clear_request& other353) { - pid = other353.pid; - policy_name = other353.policy_name; - __isset = other353.__isset; +configuration_cluster_info_request::configuration_cluster_info_request( + const configuration_cluster_info_request &other162) +{ + (void)other162; } -backup_clear_request::backup_clear_request( backup_clear_request&& other354) { - pid = std::move(other354.pid); - policy_name = std::move(other354.policy_name); - __isset = std::move(other354.__isset); +configuration_cluster_info_request::configuration_cluster_info_request( + configuration_cluster_info_request &&other163) +{ + (void)other163; } -backup_clear_request& backup_clear_request::operator=(const backup_clear_request& other355) { - pid = other355.pid; - policy_name = other355.policy_name; - __isset = other355.__isset; - return *this; +configuration_cluster_info_request &configuration_cluster_info_request:: +operator=(const configuration_cluster_info_request &other164) +{ + (void)other164; + return *this; } -backup_clear_request& backup_clear_request::operator=(backup_clear_request&& other356) { - pid = std::move(other356.pid); - policy_name = std::move(other356.policy_name); - __isset = std::move(other356.__isset); - return *this; +configuration_cluster_info_request &configuration_cluster_info_request:: +operator=(configuration_cluster_info_request &&other165) +{ + (void)other165; + return *this; } -void backup_clear_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "backup_clear_request("; - out << "pid=" << to_string(pid); - out << ", " << "policy_name=" << to_string(policy_name); - out << ")"; -} - - -configuration_modify_backup_policy_request::~configuration_modify_backup_policy_request() throw() { +void configuration_cluster_info_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_cluster_info_request("; + out << ")"; } +configuration_recall_app_request::~configuration_recall_app_request() throw() {} -void configuration_modify_backup_policy_request::__set_policy_name(const std::string& val) { - this->policy_name = val; -} +void configuration_recall_app_request::__set_app_id(const int32_t val) { this->app_id = val; } -void configuration_modify_backup_policy_request::__set_add_appids(const std::vector & val) { - this->add_appids = val; -__isset.add_appids = true; +void configuration_recall_app_request::__set_new_app_name(const std::string &val) +{ + this->new_app_name = val; } -void configuration_modify_backup_policy_request::__set_removal_appids(const std::vector & val) { - this->removal_appids = val; -__isset.removal_appids = true; -} +uint32_t configuration_recall_app_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ -void configuration_modify_backup_policy_request::__set_new_backup_interval_sec(const int64_t val) { - this->new_backup_interval_sec = val; -__isset.new_backup_interval_sec = true; -} + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -void configuration_modify_backup_policy_request::__set_backup_history_count_to_keep(const int32_t val) { - this->backup_history_count_to_keep = val; -__isset.backup_history_count_to_keep = true; -} + xfer += iprot->readStructBegin(fname); -void configuration_modify_backup_policy_request::__set_is_disable(const bool val) { - this->is_disable = val; -__isset.is_disable = true; -} + using ::apache::thrift::protocol::TProtocolException; -void configuration_modify_backup_policy_request::__set_start_time(const std::string& val) { - this->start_time = val; -__isset.start_time = true; -} + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->new_app_name); + this->__isset.new_app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -uint32_t configuration_modify_backup_policy_request::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += iprot->readStructEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + return xfer; +} - xfer += iprot->readStructBegin(fname); +uint32_t configuration_recall_app_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_recall_app_request"); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_app_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->new_app_name); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->add_appids.clear(); - uint32_t _size357; - ::apache::thrift::protocol::TType _etype360; - xfer += iprot->readListBegin(_etype360, _size357); - this->add_appids.resize(_size357); - uint32_t _i361; - for (_i361 = 0; _i361 < _size357; ++_i361) - { - xfer += iprot->readI32(this->add_appids[_i361]); - } - xfer += iprot->readListEnd(); - } - this->__isset.add_appids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->removal_appids.clear(); - uint32_t _size362; - ::apache::thrift::protocol::TType _etype365; - xfer += iprot->readListBegin(_etype365, _size362); - this->removal_appids.resize(_size362); - uint32_t _i366; - for (_i366 = 0; _i366 < _size362; ++_i366) - { - xfer += iprot->readI32(this->removal_appids[_i366]); - } - xfer += iprot->readListEnd(); - } - this->__isset.removal_appids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->new_backup_interval_sec); - this->__isset.new_backup_interval_sec = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->backup_history_count_to_keep); - this->__isset.backup_history_count_to_keep = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_disable); - this->__isset.is_disable = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->start_time); - this->__isset.start_time = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_recall_app_request &a, configuration_recall_app_request &b) +{ + using ::std::swap; + swap(a.app_id, b.app_id); + swap(a.new_app_name, b.new_app_name); + swap(a.__isset, b.__isset); +} + +configuration_recall_app_request::configuration_recall_app_request( + const configuration_recall_app_request &other166) +{ + app_id = other166.app_id; + new_app_name = other166.new_app_name; + __isset = other166.__isset; +} +configuration_recall_app_request::configuration_recall_app_request( + configuration_recall_app_request &&other167) +{ + app_id = std::move(other167.app_id); + new_app_name = std::move(other167.new_app_name); + __isset = std::move(other167.__isset); +} +configuration_recall_app_request &configuration_recall_app_request:: +operator=(const configuration_recall_app_request &other168) +{ + app_id = other168.app_id; + new_app_name = other168.new_app_name; + __isset = other168.__isset; + return *this; +} +configuration_recall_app_request &configuration_recall_app_request:: +operator=(configuration_recall_app_request &&other169) +{ + app_id = std::move(other169.app_id); + new_app_name = std::move(other169.new_app_name); + __isset = std::move(other169.__isset); + return *this; +} +void configuration_recall_app_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_recall_app_request("; + out << "app_id=" << to_string(app_id); + out << ", " + << "new_app_name=" << to_string(new_app_name); + out << ")"; +} + +configuration_create_app_response::~configuration_create_app_response() throw() {} + +void configuration_create_app_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void configuration_create_app_response::__set_appid(const int32_t val) { this->appid = val; } + +uint32_t configuration_create_app_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->appid); + this->__isset.appid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_modify_backup_policy_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_modify_backup_policy_request"); - - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); +uint32_t +configuration_create_app_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_create_app_response"); - if (this->__isset.add_appids) { - xfer += oprot->writeFieldBegin("add_appids", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->add_appids.size())); - std::vector ::const_iterator _iter367; - for (_iter367 = this->add_appids.begin(); _iter367 != this->add_appids.end(); ++_iter367) - { - xfer += oprot->writeI32((*_iter367)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.removal_appids) { - xfer += oprot->writeFieldBegin("removal_appids", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->removal_appids.size())); - std::vector ::const_iterator _iter368; - for (_iter368 = this->removal_appids.begin(); _iter368 != this->removal_appids.end(); ++_iter368) - { - xfer += oprot->writeI32((*_iter368)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.new_backup_interval_sec) { - xfer += oprot->writeFieldBegin("new_backup_interval_sec", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->new_backup_interval_sec); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.backup_history_count_to_keep) { - xfer += oprot->writeFieldBegin("backup_history_count_to_keep", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32(this->backup_history_count_to_keep); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.is_disable) { - xfer += oprot->writeFieldBegin("is_disable", ::apache::thrift::protocol::T_BOOL, 6); - xfer += oprot->writeBool(this->is_disable); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); xfer += oprot->writeFieldEnd(); - } - if (this->__isset.start_time) { - xfer += oprot->writeFieldBegin("start_time", ::apache::thrift::protocol::T_STRING, 7); - xfer += oprot->writeString(this->start_time); + + xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->appid); xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_modify_backup_policy_request &a, configuration_modify_backup_policy_request &b) { - using ::std::swap; - swap(a.policy_name, b.policy_name); - swap(a.add_appids, b.add_appids); - swap(a.removal_appids, b.removal_appids); - swap(a.new_backup_interval_sec, b.new_backup_interval_sec); - swap(a.backup_history_count_to_keep, b.backup_history_count_to_keep); - swap(a.is_disable, b.is_disable); - swap(a.start_time, b.start_time); - swap(a.__isset, b.__isset); -} - -configuration_modify_backup_policy_request::configuration_modify_backup_policy_request(const configuration_modify_backup_policy_request& other369) { - policy_name = other369.policy_name; - add_appids = other369.add_appids; - removal_appids = other369.removal_appids; - new_backup_interval_sec = other369.new_backup_interval_sec; - backup_history_count_to_keep = other369.backup_history_count_to_keep; - is_disable = other369.is_disable; - start_time = other369.start_time; - __isset = other369.__isset; -} -configuration_modify_backup_policy_request::configuration_modify_backup_policy_request( configuration_modify_backup_policy_request&& other370) { - policy_name = std::move(other370.policy_name); - add_appids = std::move(other370.add_appids); - removal_appids = std::move(other370.removal_appids); - new_backup_interval_sec = std::move(other370.new_backup_interval_sec); - backup_history_count_to_keep = std::move(other370.backup_history_count_to_keep); - is_disable = std::move(other370.is_disable); - start_time = std::move(other370.start_time); - __isset = std::move(other370.__isset); -} -configuration_modify_backup_policy_request& configuration_modify_backup_policy_request::operator=(const configuration_modify_backup_policy_request& other371) { - policy_name = other371.policy_name; - add_appids = other371.add_appids; - removal_appids = other371.removal_appids; - new_backup_interval_sec = other371.new_backup_interval_sec; - backup_history_count_to_keep = other371.backup_history_count_to_keep; - is_disable = other371.is_disable; - start_time = other371.start_time; - __isset = other371.__isset; - return *this; -} -configuration_modify_backup_policy_request& configuration_modify_backup_policy_request::operator=(configuration_modify_backup_policy_request&& other372) { - policy_name = std::move(other372.policy_name); - add_appids = std::move(other372.add_appids); - removal_appids = std::move(other372.removal_appids); - new_backup_interval_sec = std::move(other372.new_backup_interval_sec); - backup_history_count_to_keep = std::move(other372.backup_history_count_to_keep); - is_disable = std::move(other372.is_disable); - start_time = std::move(other372.start_time); - __isset = std::move(other372.__isset); - return *this; -} -void configuration_modify_backup_policy_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_modify_backup_policy_request("; - out << "policy_name=" << to_string(policy_name); - out << ", " << "add_appids="; (__isset.add_appids ? (out << to_string(add_appids)) : (out << "")); - out << ", " << "removal_appids="; (__isset.removal_appids ? (out << to_string(removal_appids)) : (out << "")); - out << ", " << "new_backup_interval_sec="; (__isset.new_backup_interval_sec ? (out << to_string(new_backup_interval_sec)) : (out << "")); - out << ", " << "backup_history_count_to_keep="; (__isset.backup_history_count_to_keep ? (out << to_string(backup_history_count_to_keep)) : (out << "")); - out << ", " << "is_disable="; (__isset.is_disable ? (out << to_string(is_disable)) : (out << "")); - out << ", " << "start_time="; (__isset.start_time ? (out << to_string(start_time)) : (out << "")); - out << ")"; -} - - -configuration_modify_backup_policy_response::~configuration_modify_backup_policy_response() throw() { -} - - -void configuration_modify_backup_policy_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void configuration_modify_backup_policy_response::__set_hint_message(const std::string& val) { - this->hint_message = val; -} - -uint32_t configuration_modify_backup_policy_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint_message); - this->__isset.hint_message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_create_app_response &a, configuration_create_app_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.appid, b.appid); + swap(a.__isset, b.__isset); +} + +configuration_create_app_response::configuration_create_app_response( + const configuration_create_app_response &other170) +{ + err = other170.err; + appid = other170.appid; + __isset = other170.__isset; +} +configuration_create_app_response::configuration_create_app_response( + configuration_create_app_response &&other171) +{ + err = std::move(other171.err); + appid = std::move(other171.appid); + __isset = std::move(other171.__isset); +} +configuration_create_app_response &configuration_create_app_response:: +operator=(const configuration_create_app_response &other172) +{ + err = other172.err; + appid = other172.appid; + __isset = other172.__isset; + return *this; +} +configuration_create_app_response &configuration_create_app_response:: +operator=(configuration_create_app_response &&other173) +{ + err = std::move(other173.err); + appid = std::move(other173.appid); + __isset = std::move(other173.__isset); + return *this; +} +void configuration_create_app_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_create_app_response("; + out << "err=" << to_string(err); + out << ", " + << "appid=" << to_string(appid); + out << ")"; +} + +configuration_meta_control_request::~configuration_meta_control_request() throw() {} + +void configuration_meta_control_request::__set_level(const meta_function_level::type val) +{ + this->level = val; +} + +uint32_t configuration_meta_control_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast174; + xfer += iprot->readI32(ecast174); + this->level = (meta_function_level::type)ecast174; + this->__isset.level = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_modify_backup_policy_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_modify_backup_policy_response"); +uint32_t +configuration_meta_control_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_meta_control_request"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->hint_message); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("level", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->level); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_modify_backup_policy_response &a, configuration_modify_backup_policy_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.hint_message, b.hint_message); - swap(a.__isset, b.__isset); +void swap(configuration_meta_control_request &a, configuration_meta_control_request &b) +{ + using ::std::swap; + swap(a.level, b.level); + swap(a.__isset, b.__isset); } -configuration_modify_backup_policy_response::configuration_modify_backup_policy_response(const configuration_modify_backup_policy_response& other373) { - err = other373.err; - hint_message = other373.hint_message; - __isset = other373.__isset; +configuration_meta_control_request::configuration_meta_control_request( + const configuration_meta_control_request &other175) +{ + level = other175.level; + __isset = other175.__isset; } -configuration_modify_backup_policy_response::configuration_modify_backup_policy_response( configuration_modify_backup_policy_response&& other374) { - err = std::move(other374.err); - hint_message = std::move(other374.hint_message); - __isset = std::move(other374.__isset); +configuration_meta_control_request::configuration_meta_control_request( + configuration_meta_control_request &&other176) +{ + level = std::move(other176.level); + __isset = std::move(other176.__isset); } -configuration_modify_backup_policy_response& configuration_modify_backup_policy_response::operator=(const configuration_modify_backup_policy_response& other375) { - err = other375.err; - hint_message = other375.hint_message; - __isset = other375.__isset; - return *this; +configuration_meta_control_request &configuration_meta_control_request:: +operator=(const configuration_meta_control_request &other177) +{ + level = other177.level; + __isset = other177.__isset; + return *this; } -configuration_modify_backup_policy_response& configuration_modify_backup_policy_response::operator=(configuration_modify_backup_policy_response&& other376) { - err = std::move(other376.err); - hint_message = std::move(other376.hint_message); - __isset = std::move(other376.__isset); - return *this; +configuration_meta_control_request &configuration_meta_control_request:: +operator=(configuration_meta_control_request &&other178) +{ + level = std::move(other178.level); + __isset = std::move(other178.__isset); + return *this; } -void configuration_modify_backup_policy_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_modify_backup_policy_response("; - out << "err=" << to_string(err); - out << ", " << "hint_message=" << to_string(hint_message); - out << ")"; +void configuration_meta_control_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_meta_control_request("; + out << "level=" << to_string(level); + out << ")"; } +configuration_meta_control_response::~configuration_meta_control_response() throw() {} -configuration_add_backup_policy_request::~configuration_add_backup_policy_request() throw() { +void configuration_meta_control_response::__set_err(const ::dsn::error_code &val) +{ + this->err = val; } - -void configuration_add_backup_policy_request::__set_backup_provider_type(const std::string& val) { - this->backup_provider_type = val; +void configuration_meta_control_response::__set_old_level(const meta_function_level::type val) +{ + this->old_level = val; } -void configuration_add_backup_policy_request::__set_policy_name(const std::string& val) { - this->policy_name = val; -} +uint32_t configuration_meta_control_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ -void configuration_add_backup_policy_request::__set_app_ids(const std::vector & val) { - this->app_ids = val; -} + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -void configuration_add_backup_policy_request::__set_backup_interval_seconds(const int64_t val) { - this->backup_interval_seconds = val; -} + xfer += iprot->readStructBegin(fname); -void configuration_add_backup_policy_request::__set_backup_history_count_to_keep(const int32_t val) { - this->backup_history_count_to_keep = val; -} + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast179; + xfer += iprot->readI32(ecast179); + this->old_level = (meta_function_level::type)ecast179; + this->__isset.old_level = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); -void configuration_add_backup_policy_request::__set_start_time(const std::string& val) { - this->start_time = val; + return xfer; } -uint32_t configuration_add_backup_policy_request::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t +configuration_meta_control_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_meta_control_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("old_level", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->old_level); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_meta_control_response &a, configuration_meta_control_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.old_level, b.old_level); + swap(a.__isset, b.__isset); +} + +configuration_meta_control_response::configuration_meta_control_response( + const configuration_meta_control_response &other180) +{ + err = other180.err; + old_level = other180.old_level; + __isset = other180.__isset; +} +configuration_meta_control_response::configuration_meta_control_response( + configuration_meta_control_response &&other181) +{ + err = std::move(other181.err); + old_level = std::move(other181.old_level); + __isset = std::move(other181.__isset); +} +configuration_meta_control_response &configuration_meta_control_response:: +operator=(const configuration_meta_control_response &other182) +{ + err = other182.err; + old_level = other182.old_level; + __isset = other182.__isset; + return *this; +} +configuration_meta_control_response &configuration_meta_control_response:: +operator=(configuration_meta_control_response &&other183) +{ + err = std::move(other183.err); + old_level = std::move(other183.old_level); + __isset = std::move(other183.__isset); + return *this; +} +void configuration_meta_control_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_meta_control_response("; + out << "err=" << to_string(err); + out << ", " + << "old_level=" << to_string(old_level); + out << ")"; +} + +configuration_proposal_action::~configuration_proposal_action() throw() {} + +void configuration_proposal_action::__set_target(const ::dsn::rpc_address &val) +{ + this->target = val; +} + +void configuration_proposal_action::__set_node(const ::dsn::rpc_address &val) { this->node = val; } + +void configuration_proposal_action::__set_type(const config_type::type val) { this->type = val; } + +uint32_t configuration_proposal_action::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->target.read(iprot); + this->__isset.target = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast184; + xfer += iprot->readI32(ecast184); + this->type = (config_type::type)ecast184; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t configuration_proposal_action::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_proposal_action"); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("target", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->target.write(oprot); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_proposal_action &a, configuration_proposal_action &b) +{ + using ::std::swap; + swap(a.target, b.target); + swap(a.node, b.node); + swap(a.type, b.type); + swap(a.__isset, b.__isset); +} + +configuration_proposal_action::configuration_proposal_action( + const configuration_proposal_action &other185) +{ + target = other185.target; + node = other185.node; + type = other185.type; + __isset = other185.__isset; +} +configuration_proposal_action::configuration_proposal_action( + configuration_proposal_action &&other186) +{ + target = std::move(other186.target); + node = std::move(other186.node); + type = std::move(other186.type); + __isset = std::move(other186.__isset); +} +configuration_proposal_action &configuration_proposal_action:: +operator=(const configuration_proposal_action &other187) +{ + target = other187.target; + node = other187.node; + type = other187.type; + __isset = other187.__isset; + return *this; +} +configuration_proposal_action &configuration_proposal_action:: +operator=(configuration_proposal_action &&other188) +{ + target = std::move(other188.target); + node = std::move(other188.node); + type = std::move(other188.type); + __isset = std::move(other188.__isset); + return *this; +} +void configuration_proposal_action::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_proposal_action("; + out << "target=" << to_string(target); + out << ", " + << "node=" << to_string(node); + out << ", " + << "type=" << to_string(type); + out << ")"; +} + +configuration_balancer_request::~configuration_balancer_request() throw() {} + +void configuration_balancer_request::__set_gpid(const ::dsn::gpid &val) { this->gpid = val; } + +void configuration_balancer_request::__set_action_list( + const std::vector &val) +{ + this->action_list = val; +} + +void configuration_balancer_request::__set_force(const bool val) +{ + this->force = val; + __isset.force = true; +} + +void configuration_balancer_request::__set_balance_type(const balancer_request_type::type val) +{ + this->balance_type = val; + __isset.balance_type = true; +} + +uint32_t configuration_balancer_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->gpid.read(iprot); + this->__isset.gpid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->action_list.clear(); + uint32_t _size189; + ::apache::thrift::protocol::TType _etype192; + xfer += iprot->readListBegin(_etype192, _size189); + this->action_list.resize(_size189); + uint32_t _i193; + for (_i193 = 0; _i193 < _size189; ++_i193) { + xfer += this->action_list[_i193].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.action_list = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->force); + this->__isset.force = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast194; + xfer += iprot->readI32(ecast194); + this->balance_type = (balancer_request_type::type)ecast194; + this->__isset.balance_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - switch (fid) + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t configuration_balancer_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_balancer_request"); + + xfer += oprot->writeFieldBegin("gpid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->gpid.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("action_list", ::apache::thrift::protocol::T_LIST, 2); { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->backup_provider_type); - this->__isset.backup_provider_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->app_ids.clear(); - uint32_t _size377; - ::apache::thrift::protocol::TType _etype380; - xfer += iprot->readListBegin(_etype380, _size377); - this->app_ids.resize(_size377); - uint32_t _i381; - for (_i381 = 0; _i381 < _size377; ++_i381) - { - xfer += iprot->readI32(this->app_ids[_i381]); - } - xfer += iprot->readListEnd(); - } - this->__isset.app_ids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->backup_interval_seconds); - this->__isset.backup_interval_seconds = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->backup_history_count_to_keep); - this->__isset.backup_history_count_to_keep = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->start_time); - this->__isset.start_time = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->action_list.size())); + std::vector::const_iterator _iter195; + for (_iter195 = this->action_list.begin(); _iter195 != this->action_list.end(); + ++_iter195) { + xfer += (*_iter195).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.force) { + xfer += oprot->writeFieldBegin("force", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->force); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.balance_type) { + xfer += oprot->writeFieldBegin("balance_type", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((int32_t)this->balance_type); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_balancer_request &a, configuration_balancer_request &b) +{ + using ::std::swap; + swap(a.gpid, b.gpid); + swap(a.action_list, b.action_list); + swap(a.force, b.force); + swap(a.balance_type, b.balance_type); + swap(a.__isset, b.__isset); +} + +configuration_balancer_request::configuration_balancer_request( + const configuration_balancer_request &other196) +{ + gpid = other196.gpid; + action_list = other196.action_list; + force = other196.force; + balance_type = other196.balance_type; + __isset = other196.__isset; +} +configuration_balancer_request::configuration_balancer_request( + configuration_balancer_request &&other197) +{ + gpid = std::move(other197.gpid); + action_list = std::move(other197.action_list); + force = std::move(other197.force); + balance_type = std::move(other197.balance_type); + __isset = std::move(other197.__isset); +} +configuration_balancer_request &configuration_balancer_request:: +operator=(const configuration_balancer_request &other198) +{ + gpid = other198.gpid; + action_list = other198.action_list; + force = other198.force; + balance_type = other198.balance_type; + __isset = other198.__isset; + return *this; +} +configuration_balancer_request &configuration_balancer_request:: +operator=(configuration_balancer_request &&other199) +{ + gpid = std::move(other199.gpid); + action_list = std::move(other199.action_list); + force = std::move(other199.force); + balance_type = std::move(other199.balance_type); + __isset = std::move(other199.__isset); + return *this; +} +void configuration_balancer_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_balancer_request("; + out << "gpid=" << to_string(gpid); + out << ", " + << "action_list=" << to_string(action_list); + out << ", " + << "force="; + (__isset.force ? (out << to_string(force)) : (out << "")); + out << ", " + << "balance_type="; + (__isset.balance_type ? (out << to_string(balance_type)) : (out << "")); + out << ")"; +} + +configuration_balancer_response::~configuration_balancer_response() throw() {} + +void configuration_balancer_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +uint32_t configuration_balancer_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_add_backup_policy_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_add_backup_policy_request"); +uint32_t configuration_balancer_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_balancer_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("backup_provider_type", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->backup_provider_type); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_balancer_response &a, configuration_balancer_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.__isset, b.__isset); +} + +configuration_balancer_response::configuration_balancer_response( + const configuration_balancer_response &other200) +{ + err = other200.err; + __isset = other200.__isset; +} +configuration_balancer_response::configuration_balancer_response( + configuration_balancer_response &&other201) +{ + err = std::move(other201.err); + __isset = std::move(other201.__isset); +} +configuration_balancer_response &configuration_balancer_response:: +operator=(const configuration_balancer_response &other202) +{ + err = other202.err; + __isset = other202.__isset; + return *this; +} +configuration_balancer_response &configuration_balancer_response:: +operator=(configuration_balancer_response &&other203) +{ + err = std::move(other203.err); + __isset = std::move(other203.__isset); + return *this; +} +void configuration_balancer_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_balancer_response("; + out << "err=" << to_string(err); + out << ")"; +} + +configuration_drop_app_response::~configuration_drop_app_response() throw() {} + +void configuration_drop_app_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +uint32_t configuration_drop_app_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructEnd(); - xfer += oprot->writeFieldBegin("app_ids", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->app_ids.size())); - std::vector ::const_iterator _iter382; - for (_iter382 = this->app_ids.begin(); _iter382 != this->app_ids.end(); ++_iter382) - { - xfer += oprot->writeI32((*_iter382)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("backup_interval_seconds", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->backup_interval_seconds); - xfer += oprot->writeFieldEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("backup_history_count_to_keep", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32(this->backup_history_count_to_keep); - xfer += oprot->writeFieldEnd(); +uint32_t configuration_drop_app_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_drop_app_response"); - xfer += oprot->writeFieldBegin("start_time", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->start_time); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_add_backup_policy_request &a, configuration_add_backup_policy_request &b) { - using ::std::swap; - swap(a.backup_provider_type, b.backup_provider_type); - swap(a.policy_name, b.policy_name); - swap(a.app_ids, b.app_ids); - swap(a.backup_interval_seconds, b.backup_interval_seconds); - swap(a.backup_history_count_to_keep, b.backup_history_count_to_keep); - swap(a.start_time, b.start_time); - swap(a.__isset, b.__isset); +void swap(configuration_drop_app_response &a, configuration_drop_app_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.__isset, b.__isset); } -configuration_add_backup_policy_request::configuration_add_backup_policy_request(const configuration_add_backup_policy_request& other383) { - backup_provider_type = other383.backup_provider_type; - policy_name = other383.policy_name; - app_ids = other383.app_ids; - backup_interval_seconds = other383.backup_interval_seconds; - backup_history_count_to_keep = other383.backup_history_count_to_keep; - start_time = other383.start_time; - __isset = other383.__isset; +configuration_drop_app_response::configuration_drop_app_response( + const configuration_drop_app_response &other204) +{ + err = other204.err; + __isset = other204.__isset; } -configuration_add_backup_policy_request::configuration_add_backup_policy_request( configuration_add_backup_policy_request&& other384) { - backup_provider_type = std::move(other384.backup_provider_type); - policy_name = std::move(other384.policy_name); - app_ids = std::move(other384.app_ids); - backup_interval_seconds = std::move(other384.backup_interval_seconds); - backup_history_count_to_keep = std::move(other384.backup_history_count_to_keep); - start_time = std::move(other384.start_time); - __isset = std::move(other384.__isset); +configuration_drop_app_response::configuration_drop_app_response( + configuration_drop_app_response &&other205) +{ + err = std::move(other205.err); + __isset = std::move(other205.__isset); } -configuration_add_backup_policy_request& configuration_add_backup_policy_request::operator=(const configuration_add_backup_policy_request& other385) { - backup_provider_type = other385.backup_provider_type; - policy_name = other385.policy_name; - app_ids = other385.app_ids; - backup_interval_seconds = other385.backup_interval_seconds; - backup_history_count_to_keep = other385.backup_history_count_to_keep; - start_time = other385.start_time; - __isset = other385.__isset; - return *this; +configuration_drop_app_response &configuration_drop_app_response:: +operator=(const configuration_drop_app_response &other206) +{ + err = other206.err; + __isset = other206.__isset; + return *this; } -configuration_add_backup_policy_request& configuration_add_backup_policy_request::operator=(configuration_add_backup_policy_request&& other386) { - backup_provider_type = std::move(other386.backup_provider_type); - policy_name = std::move(other386.policy_name); - app_ids = std::move(other386.app_ids); - backup_interval_seconds = std::move(other386.backup_interval_seconds); - backup_history_count_to_keep = std::move(other386.backup_history_count_to_keep); - start_time = std::move(other386.start_time); - __isset = std::move(other386.__isset); - return *this; +configuration_drop_app_response &configuration_drop_app_response:: +operator=(configuration_drop_app_response &&other207) +{ + err = std::move(other207.err); + __isset = std::move(other207.__isset); + return *this; } -void configuration_add_backup_policy_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_add_backup_policy_request("; - out << "backup_provider_type=" << to_string(backup_provider_type); - out << ", " << "policy_name=" << to_string(policy_name); - out << ", " << "app_ids=" << to_string(app_ids); - out << ", " << "backup_interval_seconds=" << to_string(backup_interval_seconds); - out << ", " << "backup_history_count_to_keep=" << to_string(backup_history_count_to_keep); - out << ", " << "start_time=" << to_string(start_time); - out << ")"; +void configuration_drop_app_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_drop_app_response("; + out << "err=" << to_string(err); + out << ")"; } +configuration_list_apps_response::~configuration_list_apps_response() throw() {} + +void configuration_list_apps_response::__set_err(const ::dsn::error_code &val) { this->err = val; } -configuration_add_backup_policy_response::~configuration_add_backup_policy_response() throw() { +void configuration_list_apps_response::__set_infos(const std::vector<::dsn::app_info> &val) +{ + this->infos = val; } +uint32_t configuration_list_apps_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ -void configuration_add_backup_policy_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -void configuration_add_backup_policy_response::__set_hint_message(const std::string& val) { - this->hint_message = val; -} + xfer += iprot->readStructBegin(fname); -uint32_t configuration_add_backup_policy_response::read(::apache::thrift::protocol::TProtocol* iprot) { + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->infos.clear(); + uint32_t _size208; + ::apache::thrift::protocol::TType _etype211; + xfer += iprot->readListBegin(_etype211, _size208); + this->infos.resize(_size208); + uint32_t _i212; + for (_i212 = 0; _i212 < _size208; ++_i212) { + xfer += this->infos[_i212].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.infos = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += iprot->readStructEnd(); - xfer += iprot->readStructBegin(fname); + return xfer; +} - using ::apache::thrift::protocol::TProtocolException; +uint32_t configuration_list_apps_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_list_apps_response"); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) + xfer += oprot->writeFieldBegin("infos", ::apache::thrift::protocol::T_LIST, 2); { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint_message); - this->__isset.hint_message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->infos.size())); + std::vector<::dsn::app_info>::const_iterator _iter213; + for (_iter213 = this->infos.begin(); _iter213 != this->infos.end(); ++_iter213) { + xfer += (*_iter213).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_list_apps_response &a, configuration_list_apps_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.infos, b.infos); + swap(a.__isset, b.__isset); +} + +configuration_list_apps_response::configuration_list_apps_response( + const configuration_list_apps_response &other214) +{ + err = other214.err; + infos = other214.infos; + __isset = other214.__isset; +} +configuration_list_apps_response::configuration_list_apps_response( + configuration_list_apps_response &&other215) +{ + err = std::move(other215.err); + infos = std::move(other215.infos); + __isset = std::move(other215.__isset); +} +configuration_list_apps_response &configuration_list_apps_response:: +operator=(const configuration_list_apps_response &other216) +{ + err = other216.err; + infos = other216.infos; + __isset = other216.__isset; + return *this; +} +configuration_list_apps_response &configuration_list_apps_response:: +operator=(configuration_list_apps_response &&other217) +{ + err = std::move(other217.err); + infos = std::move(other217.infos); + __isset = std::move(other217.__isset); + return *this; +} +void configuration_list_apps_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_list_apps_response("; + out << "err=" << to_string(err); + out << ", " + << "infos=" << to_string(infos); + out << ")"; +} + +configuration_list_nodes_response::~configuration_list_nodes_response() throw() {} + +void configuration_list_nodes_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void configuration_list_nodes_response::__set_infos(const std::vector &val) +{ + this->infos = val; +} + +uint32_t configuration_list_nodes_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->infos.clear(); + uint32_t _size218; + ::apache::thrift::protocol::TType _etype221; + xfer += iprot->readListBegin(_etype221, _size218); + this->infos.resize(_size218); + uint32_t _i222; + for (_i222 = 0; _i222 < _size218; ++_i222) { + xfer += this->infos[_i222].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.infos = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_add_backup_policy_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_add_backup_policy_response"); +uint32_t +configuration_list_nodes_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_list_nodes_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->hint_message); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("infos", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->infos.size())); + std::vector::const_iterator _iter223; + for (_iter223 = this->infos.begin(); _iter223 != this->infos.end(); ++_iter223) { + xfer += (*_iter223).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_list_nodes_response &a, configuration_list_nodes_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.infos, b.infos); + swap(a.__isset, b.__isset); +} + +configuration_list_nodes_response::configuration_list_nodes_response( + const configuration_list_nodes_response &other224) +{ + err = other224.err; + infos = other224.infos; + __isset = other224.__isset; +} +configuration_list_nodes_response::configuration_list_nodes_response( + configuration_list_nodes_response &&other225) +{ + err = std::move(other225.err); + infos = std::move(other225.infos); + __isset = std::move(other225.__isset); +} +configuration_list_nodes_response &configuration_list_nodes_response:: +operator=(const configuration_list_nodes_response &other226) +{ + err = other226.err; + infos = other226.infos; + __isset = other226.__isset; + return *this; +} +configuration_list_nodes_response &configuration_list_nodes_response:: +operator=(configuration_list_nodes_response &&other227) +{ + err = std::move(other227.err); + infos = std::move(other227.infos); + __isset = std::move(other227.__isset); + return *this; +} +void configuration_list_nodes_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_list_nodes_response("; + out << "err=" << to_string(err); + out << ", " + << "infos=" << to_string(infos); + out << ")"; +} + +configuration_cluster_info_response::~configuration_cluster_info_response() throw() {} + +void configuration_cluster_info_response::__set_err(const ::dsn::error_code &val) +{ + this->err = val; +} + +void configuration_cluster_info_response::__set_keys(const std::vector &val) +{ + this->keys = val; +} + +void configuration_cluster_info_response::__set_values(const std::vector &val) +{ + this->values = val; +} + +uint32_t configuration_cluster_info_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->keys.clear(); + uint32_t _size228; + ::apache::thrift::protocol::TType _etype231; + xfer += iprot->readListBegin(_etype231, _size228); + this->keys.resize(_size228); + uint32_t _i232; + for (_i232 = 0; _i232 < _size228; ++_i232) { + xfer += iprot->readString(this->keys[_i232]); + } + xfer += iprot->readListEnd(); + } + this->__isset.keys = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->values.clear(); + uint32_t _size233; + ::apache::thrift::protocol::TType _etype236; + xfer += iprot->readListBegin(_etype236, _size233); + this->values.resize(_size233); + uint32_t _i237; + for (_i237 = 0; _i237 < _size233; ++_i237) { + xfer += iprot->readString(this->values[_i237]); + } + xfer += iprot->readListEnd(); + } + this->__isset.values = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -void swap(configuration_add_backup_policy_response &a, configuration_add_backup_policy_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.hint_message, b.hint_message); - swap(a.__isset, b.__isset); -} + xfer += iprot->readStructEnd(); -configuration_add_backup_policy_response::configuration_add_backup_policy_response(const configuration_add_backup_policy_response& other387) { - err = other387.err; - hint_message = other387.hint_message; - __isset = other387.__isset; -} -configuration_add_backup_policy_response::configuration_add_backup_policy_response( configuration_add_backup_policy_response&& other388) { - err = std::move(other388.err); - hint_message = std::move(other388.hint_message); - __isset = std::move(other388.__isset); -} -configuration_add_backup_policy_response& configuration_add_backup_policy_response::operator=(const configuration_add_backup_policy_response& other389) { - err = other389.err; - hint_message = other389.hint_message; - __isset = other389.__isset; - return *this; -} -configuration_add_backup_policy_response& configuration_add_backup_policy_response::operator=(configuration_add_backup_policy_response&& other390) { - err = std::move(other390.err); - hint_message = std::move(other390.hint_message); - __isset = std::move(other390.__isset); - return *this; -} -void configuration_add_backup_policy_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_add_backup_policy_response("; - out << "err=" << to_string(err); - out << ", " << "hint_message=" << to_string(hint_message); - out << ")"; + return xfer; } +uint32_t +configuration_cluster_info_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_cluster_info_response"); -policy_entry::~policy_entry() throw() { -} + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("keys", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, + static_cast(this->keys.size())); + std::vector::const_iterator _iter238; + for (_iter238 = this->keys.begin(); _iter238 != this->keys.end(); ++_iter238) { + xfer += oprot->writeString((*_iter238)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); -void policy_entry::__set_policy_name(const std::string& val) { - this->policy_name = val; -} + xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, + static_cast(this->values.size())); + std::vector::const_iterator _iter239; + for (_iter239 = this->values.begin(); _iter239 != this->values.end(); ++_iter239) { + xfer += oprot->writeString((*_iter239)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); -void policy_entry::__set_backup_provider_type(const std::string& val) { - this->backup_provider_type = val; -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_cluster_info_response &a, configuration_cluster_info_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.keys, b.keys); + swap(a.values, b.values); + swap(a.__isset, b.__isset); +} + +configuration_cluster_info_response::configuration_cluster_info_response( + const configuration_cluster_info_response &other240) +{ + err = other240.err; + keys = other240.keys; + values = other240.values; + __isset = other240.__isset; +} +configuration_cluster_info_response::configuration_cluster_info_response( + configuration_cluster_info_response &&other241) +{ + err = std::move(other241.err); + keys = std::move(other241.keys); + values = std::move(other241.values); + __isset = std::move(other241.__isset); +} +configuration_cluster_info_response &configuration_cluster_info_response:: +operator=(const configuration_cluster_info_response &other242) +{ + err = other242.err; + keys = other242.keys; + values = other242.values; + __isset = other242.__isset; + return *this; +} +configuration_cluster_info_response &configuration_cluster_info_response:: +operator=(configuration_cluster_info_response &&other243) +{ + err = std::move(other243.err); + keys = std::move(other243.keys); + values = std::move(other243.values); + __isset = std::move(other243.__isset); + return *this; +} +void configuration_cluster_info_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_cluster_info_response("; + out << "err=" << to_string(err); + out << ", " + << "keys=" << to_string(keys); + out << ", " + << "values=" << to_string(values); + out << ")"; +} + +configuration_recall_app_response::~configuration_recall_app_response() throw() {} + +void configuration_recall_app_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void configuration_recall_app_response::__set_info(const ::dsn::app_info &val) { this->info = val; } + +uint32_t configuration_recall_app_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->info.read(iprot); + this->__isset.info = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -void policy_entry::__set_backup_interval_seconds(const std::string& val) { - this->backup_interval_seconds = val; -} + xfer += iprot->readStructEnd(); -void policy_entry::__set_app_ids(const std::set & val) { - this->app_ids = val; + return xfer; } -void policy_entry::__set_backup_history_count_to_keep(const int32_t val) { - this->backup_history_count_to_keep = val; -} +uint32_t +configuration_recall_app_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_recall_app_response"); -void policy_entry::__set_start_time(const std::string& val) { - this->start_time = val; -} + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); -void policy_entry::__set_is_disable(const bool val) { - this->is_disable = val; -} + xfer += oprot->writeFieldBegin("info", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->info.write(oprot); + xfer += oprot->writeFieldEnd(); -uint32_t policy_entry::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_recall_app_response &a, configuration_recall_app_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.info, b.info); + swap(a.__isset, b.__isset); +} + +configuration_recall_app_response::configuration_recall_app_response( + const configuration_recall_app_response &other244) +{ + err = other244.err; + info = other244.info; + __isset = other244.__isset; +} +configuration_recall_app_response::configuration_recall_app_response( + configuration_recall_app_response &&other245) +{ + err = std::move(other245.err); + info = std::move(other245.info); + __isset = std::move(other245.__isset); +} +configuration_recall_app_response &configuration_recall_app_response:: +operator=(const configuration_recall_app_response &other246) +{ + err = other246.err; + info = other246.info; + __isset = other246.__isset; + return *this; +} +configuration_recall_app_response &configuration_recall_app_response:: +operator=(configuration_recall_app_response &&other247) +{ + err = std::move(other247.err); + info = std::move(other247.info); + __isset = std::move(other247.__isset); + return *this; +} +void configuration_recall_app_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_recall_app_response("; + out << "err=" << to_string(err); + out << ", " + << "info=" << to_string(info); + out << ")"; +} + +query_replica_decree_request::~query_replica_decree_request() throw() {} + +void query_replica_decree_request::__set_pid(const ::dsn::gpid &val) { this->pid = val; } + +void query_replica_decree_request::__set_node(const ::dsn::rpc_address &val) { this->node = val; } + +uint32_t query_replica_decree_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += iprot->readStructEnd(); - xfer += iprot->readStructBegin(fname); + return xfer; +} - using ::apache::thrift::protocol::TProtocolException; +uint32_t query_replica_decree_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_replica_decree_request"); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->policy_name); - this->__isset.policy_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->backup_provider_type); - this->__isset.backup_provider_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->backup_interval_seconds); - this->__isset.backup_interval_seconds = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_SET) { - { - this->app_ids.clear(); - uint32_t _size391; - ::apache::thrift::protocol::TType _etype394; - xfer += iprot->readSetBegin(_etype394, _size391); - uint32_t _i395; - for (_i395 = 0; _i395 < _size391; ++_i395) - { - int32_t _elem396; - xfer += iprot->readI32(_elem396); - this->app_ids.insert(_elem396); - } - xfer += iprot->readSetEnd(); - } - this->__isset.app_ids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->backup_history_count_to_keep); - this->__isset.backup_history_count_to_keep = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->start_time); - this->__isset.start_time = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_disable); - this->__isset.is_disable = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(query_replica_decree_request &a, query_replica_decree_request &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.node, b.node); + swap(a.__isset, b.__isset); +} + +query_replica_decree_request::query_replica_decree_request( + const query_replica_decree_request &other248) +{ + pid = other248.pid; + node = other248.node; + __isset = other248.__isset; +} +query_replica_decree_request::query_replica_decree_request(query_replica_decree_request &&other249) +{ + pid = std::move(other249.pid); + node = std::move(other249.node); + __isset = std::move(other249.__isset); +} +query_replica_decree_request &query_replica_decree_request:: +operator=(const query_replica_decree_request &other250) +{ + pid = other250.pid; + node = other250.node; + __isset = other250.__isset; + return *this; +} +query_replica_decree_request &query_replica_decree_request:: +operator=(query_replica_decree_request &&other251) +{ + pid = std::move(other251.pid); + node = std::move(other251.node); + __isset = std::move(other251.__isset); + return *this; +} +void query_replica_decree_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "query_replica_decree_request("; + out << "pid=" << to_string(pid); + out << ", " + << "node=" << to_string(node); + out << ")"; +} + +query_replica_decree_response::~query_replica_decree_response() throw() {} + +void query_replica_decree_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void query_replica_decree_response::__set_last_decree(const int64_t val) +{ + this->last_decree = val; +} + +uint32_t query_replica_decree_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_decree); + this->__isset.last_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t policy_entry::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("policy_entry"); - - xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->policy_name); - xfer += oprot->writeFieldEnd(); +uint32_t query_replica_decree_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_replica_decree_response"); - xfer += oprot->writeFieldBegin("backup_provider_type", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->backup_provider_type); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("backup_interval_seconds", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->backup_interval_seconds); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_ids", ::apache::thrift::protocol::T_SET, 4); - { - xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I32, static_cast(this->app_ids.size())); - std::set ::const_iterator _iter397; - for (_iter397 = this->app_ids.begin(); _iter397 != this->app_ids.end(); ++_iter397) - { - xfer += oprot->writeI32((*_iter397)); - } - xfer += oprot->writeSetEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("backup_history_count_to_keep", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32(this->backup_history_count_to_keep); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("start_time", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->start_time); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("last_decree", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->last_decree); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("is_disable", ::apache::thrift::protocol::T_BOOL, 7); - xfer += oprot->writeBool(this->is_disable); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(policy_entry &a, policy_entry &b) { - using ::std::swap; - swap(a.policy_name, b.policy_name); - swap(a.backup_provider_type, b.backup_provider_type); - swap(a.backup_interval_seconds, b.backup_interval_seconds); - swap(a.app_ids, b.app_ids); - swap(a.backup_history_count_to_keep, b.backup_history_count_to_keep); - swap(a.start_time, b.start_time); - swap(a.is_disable, b.is_disable); - swap(a.__isset, b.__isset); +void swap(query_replica_decree_response &a, query_replica_decree_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.last_decree, b.last_decree); + swap(a.__isset, b.__isset); } -policy_entry::policy_entry(const policy_entry& other398) { - policy_name = other398.policy_name; - backup_provider_type = other398.backup_provider_type; - backup_interval_seconds = other398.backup_interval_seconds; - app_ids = other398.app_ids; - backup_history_count_to_keep = other398.backup_history_count_to_keep; - start_time = other398.start_time; - is_disable = other398.is_disable; - __isset = other398.__isset; +query_replica_decree_response::query_replica_decree_response( + const query_replica_decree_response &other252) +{ + err = other252.err; + last_decree = other252.last_decree; + __isset = other252.__isset; } -policy_entry::policy_entry( policy_entry&& other399) { - policy_name = std::move(other399.policy_name); - backup_provider_type = std::move(other399.backup_provider_type); - backup_interval_seconds = std::move(other399.backup_interval_seconds); - app_ids = std::move(other399.app_ids); - backup_history_count_to_keep = std::move(other399.backup_history_count_to_keep); - start_time = std::move(other399.start_time); - is_disable = std::move(other399.is_disable); - __isset = std::move(other399.__isset); +query_replica_decree_response::query_replica_decree_response( + query_replica_decree_response &&other253) +{ + err = std::move(other253.err); + last_decree = std::move(other253.last_decree); + __isset = std::move(other253.__isset); } -policy_entry& policy_entry::operator=(const policy_entry& other400) { - policy_name = other400.policy_name; - backup_provider_type = other400.backup_provider_type; - backup_interval_seconds = other400.backup_interval_seconds; - app_ids = other400.app_ids; - backup_history_count_to_keep = other400.backup_history_count_to_keep; - start_time = other400.start_time; - is_disable = other400.is_disable; - __isset = other400.__isset; - return *this; +query_replica_decree_response &query_replica_decree_response:: +operator=(const query_replica_decree_response &other254) +{ + err = other254.err; + last_decree = other254.last_decree; + __isset = other254.__isset; + return *this; } -policy_entry& policy_entry::operator=(policy_entry&& other401) { - policy_name = std::move(other401.policy_name); - backup_provider_type = std::move(other401.backup_provider_type); - backup_interval_seconds = std::move(other401.backup_interval_seconds); - app_ids = std::move(other401.app_ids); - backup_history_count_to_keep = std::move(other401.backup_history_count_to_keep); - start_time = std::move(other401.start_time); - is_disable = std::move(other401.is_disable); - __isset = std::move(other401.__isset); - return *this; +query_replica_decree_response &query_replica_decree_response:: +operator=(query_replica_decree_response &&other255) +{ + err = std::move(other255.err); + last_decree = std::move(other255.last_decree); + __isset = std::move(other255.__isset); + return *this; } -void policy_entry::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "policy_entry("; - out << "policy_name=" << to_string(policy_name); - out << ", " << "backup_provider_type=" << to_string(backup_provider_type); - out << ", " << "backup_interval_seconds=" << to_string(backup_interval_seconds); - out << ", " << "app_ids=" << to_string(app_ids); - out << ", " << "backup_history_count_to_keep=" << to_string(backup_history_count_to_keep); - out << ", " << "start_time=" << to_string(start_time); - out << ", " << "is_disable=" << to_string(is_disable); - out << ")"; +void query_replica_decree_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "query_replica_decree_response("; + out << "err=" << to_string(err); + out << ", " + << "last_decree=" << to_string(last_decree); + out << ")"; } +replica_info::~replica_info() throw() {} -backup_entry::~backup_entry() throw() { -} - +void replica_info::__set_pid(const ::dsn::gpid &val) { this->pid = val; } -void backup_entry::__set_backup_id(const int64_t val) { - this->backup_id = val; -} +void replica_info::__set_ballot(const int64_t val) { this->ballot = val; } -void backup_entry::__set_start_time_ms(const int64_t val) { - this->start_time_ms = val; -} +void replica_info::__set_status(const partition_status::type val) { this->status = val; } -void backup_entry::__set_end_time_ms(const int64_t val) { - this->end_time_ms = val; +void replica_info::__set_last_committed_decree(const int64_t val) +{ + this->last_committed_decree = val; } -void backup_entry::__set_app_ids(const std::set & val) { - this->app_ids = val; +void replica_info::__set_last_prepared_decree(const int64_t val) +{ + this->last_prepared_decree = val; } -uint32_t backup_entry::read(::apache::thrift::protocol::TProtocol* iprot) { +void replica_info::__set_last_durable_decree(const int64_t val) { this->last_durable_decree = val; } - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +void replica_info::__set_app_type(const std::string &val) { this->app_type = val; } - xfer += iprot->readStructBegin(fname); +void replica_info::__set_disk_tag(const std::string &val) { this->disk_tag = val; } - using ::apache::thrift::protocol::TProtocolException; +uint32_t replica_info::read(::apache::thrift::protocol::TProtocol *iprot) +{ + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->backup_id); - this->__isset.backup_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->start_time_ms); - this->__isset.start_time_ms = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->end_time_ms); - this->__isset.end_time_ms = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_SET) { - { - this->app_ids.clear(); - uint32_t _size402; - ::apache::thrift::protocol::TType _etype405; - xfer += iprot->readSetBegin(_etype405, _size402); - uint32_t _i406; - for (_i406 = 0; _i406 < _size402; ++_i406) - { - int32_t _elem407; - xfer += iprot->readI32(_elem407); - this->app_ids.insert(_elem407); - } - xfer += iprot->readSetEnd(); - } - this->__isset.app_ids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t backup_entry::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("backup_entry"); + xfer += iprot->readStructBegin(fname); - xfer += oprot->writeFieldBegin("backup_id", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->backup_id); - xfer += oprot->writeFieldEnd(); + using ::apache::thrift::protocol::TProtocolException; - xfer += oprot->writeFieldBegin("start_time_ms", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->start_time_ms); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("end_time_ms", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->end_time_ms); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("app_ids", ::apache::thrift::protocol::T_SET, 4); - { - xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I32, static_cast(this->app_ids.size())); - std::set ::const_iterator _iter408; - for (_iter408 = this->app_ids.begin(); _iter408 != this->app_ids.end(); ++_iter408) - { - xfer += oprot->writeI32((*_iter408)); + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast256; + xfer += iprot->readI32(ecast256); + this->status = (partition_status::type)ecast256; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_prepared_decree); + this->__isset.last_prepared_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_durable_decree); + this->__isset.last_durable_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_type); + this->__isset.app_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->disk_tag); + this->__isset.disk_tag = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += oprot->writeSetEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} -void swap(backup_entry &a, backup_entry &b) { - using ::std::swap; - swap(a.backup_id, b.backup_id); - swap(a.start_time_ms, b.start_time_ms); - swap(a.end_time_ms, b.end_time_ms); - swap(a.app_ids, b.app_ids); - swap(a.__isset, b.__isset); -} + xfer += iprot->readStructEnd(); -backup_entry::backup_entry(const backup_entry& other409) { - backup_id = other409.backup_id; - start_time_ms = other409.start_time_ms; - end_time_ms = other409.end_time_ms; - app_ids = other409.app_ids; - __isset = other409.__isset; -} -backup_entry::backup_entry( backup_entry&& other410) { - backup_id = std::move(other410.backup_id); - start_time_ms = std::move(other410.start_time_ms); - end_time_ms = std::move(other410.end_time_ms); - app_ids = std::move(other410.app_ids); - __isset = std::move(other410.__isset); -} -backup_entry& backup_entry::operator=(const backup_entry& other411) { - backup_id = other411.backup_id; - start_time_ms = other411.start_time_ms; - end_time_ms = other411.end_time_ms; - app_ids = other411.app_ids; - __isset = other411.__isset; - return *this; -} -backup_entry& backup_entry::operator=(backup_entry&& other412) { - backup_id = std::move(other412.backup_id); - start_time_ms = std::move(other412.start_time_ms); - end_time_ms = std::move(other412.end_time_ms); - app_ids = std::move(other412.app_ids); - __isset = std::move(other412.__isset); - return *this; -} -void backup_entry::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "backup_entry("; - out << "backup_id=" << to_string(backup_id); - out << ", " << "start_time_ms=" << to_string(start_time_ms); - out << ", " << "end_time_ms=" << to_string(end_time_ms); - out << ", " << "app_ids=" << to_string(app_ids); - out << ")"; + return xfer; } +uint32_t replica_info::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("replica_info"); -configuration_query_backup_policy_request::~configuration_query_backup_policy_request() throw() { -} - + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); -void configuration_query_backup_policy_request::__set_policy_names(const std::vector & val) { - this->policy_names = val; -} + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); -void configuration_query_backup_policy_request::__set_backup_info_count(const int32_t val) { - this->backup_info_count = val; -} + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); -uint32_t configuration_query_backup_policy_request::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("last_prepared_decree", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->last_prepared_decree); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("last_durable_decree", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->last_durable_decree); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->app_type); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("disk_tag", ::apache::thrift::protocol::T_STRING, 8); + xfer += oprot->writeString(this->disk_tag); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->policy_names.clear(); - uint32_t _size413; - ::apache::thrift::protocol::TType _etype416; - xfer += iprot->readListBegin(_etype416, _size413); - this->policy_names.resize(_size413); - uint32_t _i417; - for (_i417 = 0; _i417 < _size413; ++_i417) - { - xfer += iprot->readString(this->policy_names[_i417]); - } - xfer += iprot->readListEnd(); - } - this->__isset.policy_names = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->backup_info_count); - this->__isset.backup_info_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(replica_info &a, replica_info &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.ballot, b.ballot); + swap(a.status, b.status); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.last_prepared_decree, b.last_prepared_decree); + swap(a.last_durable_decree, b.last_durable_decree); + swap(a.app_type, b.app_type); + swap(a.disk_tag, b.disk_tag); + swap(a.__isset, b.__isset); +} + +replica_info::replica_info(const replica_info &other257) +{ + pid = other257.pid; + ballot = other257.ballot; + status = other257.status; + last_committed_decree = other257.last_committed_decree; + last_prepared_decree = other257.last_prepared_decree; + last_durable_decree = other257.last_durable_decree; + app_type = other257.app_type; + disk_tag = other257.disk_tag; + __isset = other257.__isset; +} +replica_info::replica_info(replica_info &&other258) +{ + pid = std::move(other258.pid); + ballot = std::move(other258.ballot); + status = std::move(other258.status); + last_committed_decree = std::move(other258.last_committed_decree); + last_prepared_decree = std::move(other258.last_prepared_decree); + last_durable_decree = std::move(other258.last_durable_decree); + app_type = std::move(other258.app_type); + disk_tag = std::move(other258.disk_tag); + __isset = std::move(other258.__isset); +} +replica_info &replica_info::operator=(const replica_info &other259) +{ + pid = other259.pid; + ballot = other259.ballot; + status = other259.status; + last_committed_decree = other259.last_committed_decree; + last_prepared_decree = other259.last_prepared_decree; + last_durable_decree = other259.last_durable_decree; + app_type = other259.app_type; + disk_tag = other259.disk_tag; + __isset = other259.__isset; + return *this; +} +replica_info &replica_info::operator=(replica_info &&other260) +{ + pid = std::move(other260.pid); + ballot = std::move(other260.ballot); + status = std::move(other260.status); + last_committed_decree = std::move(other260.last_committed_decree); + last_prepared_decree = std::move(other260.last_prepared_decree); + last_durable_decree = std::move(other260.last_durable_decree); + app_type = std::move(other260.app_type); + disk_tag = std::move(other260.disk_tag); + __isset = std::move(other260.__isset); + return *this; +} +void replica_info::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "replica_info("; + out << "pid=" << to_string(pid); + out << ", " + << "ballot=" << to_string(ballot); + out << ", " + << "status=" << to_string(status); + out << ", " + << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " + << "last_prepared_decree=" << to_string(last_prepared_decree); + out << ", " + << "last_durable_decree=" << to_string(last_durable_decree); + out << ", " + << "app_type=" << to_string(app_type); + out << ", " + << "disk_tag=" << to_string(disk_tag); + out << ")"; +} + +query_replica_info_request::~query_replica_info_request() throw() {} + +void query_replica_info_request::__set_node(const ::dsn::rpc_address &val) { this->node = val; } + +uint32_t query_replica_info_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_query_backup_policy_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_backup_policy_request"); +uint32_t query_replica_info_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_replica_info_request"); - xfer += oprot->writeFieldBegin("policy_names", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->policy_names.size())); - std::vector ::const_iterator _iter418; - for (_iter418 = this->policy_names.begin(); _iter418 != this->policy_names.end(); ++_iter418) - { - xfer += oprot->writeString((*_iter418)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("backup_info_count", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->backup_info_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_query_backup_policy_request &a, configuration_query_backup_policy_request &b) { - using ::std::swap; - swap(a.policy_names, b.policy_names); - swap(a.backup_info_count, b.backup_info_count); - swap(a.__isset, b.__isset); +void swap(query_replica_info_request &a, query_replica_info_request &b) +{ + using ::std::swap; + swap(a.node, b.node); + swap(a.__isset, b.__isset); } -configuration_query_backup_policy_request::configuration_query_backup_policy_request(const configuration_query_backup_policy_request& other419) { - policy_names = other419.policy_names; - backup_info_count = other419.backup_info_count; - __isset = other419.__isset; +query_replica_info_request::query_replica_info_request(const query_replica_info_request &other261) +{ + node = other261.node; + __isset = other261.__isset; } -configuration_query_backup_policy_request::configuration_query_backup_policy_request( configuration_query_backup_policy_request&& other420) { - policy_names = std::move(other420.policy_names); - backup_info_count = std::move(other420.backup_info_count); - __isset = std::move(other420.__isset); +query_replica_info_request::query_replica_info_request(query_replica_info_request &&other262) +{ + node = std::move(other262.node); + __isset = std::move(other262.__isset); } -configuration_query_backup_policy_request& configuration_query_backup_policy_request::operator=(const configuration_query_backup_policy_request& other421) { - policy_names = other421.policy_names; - backup_info_count = other421.backup_info_count; - __isset = other421.__isset; - return *this; +query_replica_info_request &query_replica_info_request:: +operator=(const query_replica_info_request &other263) +{ + node = other263.node; + __isset = other263.__isset; + return *this; } -configuration_query_backup_policy_request& configuration_query_backup_policy_request::operator=(configuration_query_backup_policy_request&& other422) { - policy_names = std::move(other422.policy_names); - backup_info_count = std::move(other422.backup_info_count); - __isset = std::move(other422.__isset); - return *this; -} -void configuration_query_backup_policy_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_query_backup_policy_request("; - out << "policy_names=" << to_string(policy_names); - out << ", " << "backup_info_count=" << to_string(backup_info_count); - out << ")"; -} - - -configuration_query_backup_policy_response::~configuration_query_backup_policy_response() throw() { +query_replica_info_request &query_replica_info_request:: +operator=(query_replica_info_request &&other264) +{ + node = std::move(other264.node); + __isset = std::move(other264.__isset); + return *this; } - - -void configuration_query_backup_policy_response::__set_err(const ::dsn::error_code& val) { - this->err = val; +void query_replica_info_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "query_replica_info_request("; + out << "node=" << to_string(node); + out << ")"; } -void configuration_query_backup_policy_response::__set_policys(const std::vector & val) { - this->policys = val; -} +query_replica_info_response::~query_replica_info_response() throw() {} -void configuration_query_backup_policy_response::__set_backup_infos(const std::vector > & val) { - this->backup_infos = val; -} +void query_replica_info_response::__set_err(const ::dsn::error_code &val) { this->err = val; } -void configuration_query_backup_policy_response::__set_hint_msg(const std::string& val) { - this->hint_msg = val; -__isset.hint_msg = true; +void query_replica_info_response::__set_replicas(const std::vector &val) +{ + this->replicas = val; } -uint32_t configuration_query_backup_policy_response::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t query_replica_info_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->policys.clear(); - uint32_t _size423; - ::apache::thrift::protocol::TType _etype426; - xfer += iprot->readListBegin(_etype426, _size423); - this->policys.resize(_size423); - uint32_t _i427; - for (_i427 = 0; _i427 < _size423; ++_i427) - { - xfer += this->policys[_i427].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.policys = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->backup_infos.clear(); - uint32_t _size428; - ::apache::thrift::protocol::TType _etype431; - xfer += iprot->readListBegin(_etype431, _size428); - this->backup_infos.resize(_size428); - uint32_t _i432; - for (_i432 = 0; _i432 < _size428; ++_i432) - { - { - this->backup_infos[_i432].clear(); - uint32_t _size433; - ::apache::thrift::protocol::TType _etype436; - xfer += iprot->readListBegin(_etype436, _size433); - this->backup_infos[_i432].resize(_size433); - uint32_t _i437; - for (_i437 = 0; _i437 < _size433; ++_i437) + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { { - xfer += this->backup_infos[_i432][_i437].read(iprot); + this->replicas.clear(); + uint32_t _size265; + ::apache::thrift::protocol::TType _etype268; + xfer += iprot->readListBegin(_etype268, _size265); + this->replicas.resize(_size265); + uint32_t _i269; + for (_i269 = 0; _i269 < _size265; ++_i269) { + xfer += this->replicas[_i269].read(iprot); + } + xfer += iprot->readListEnd(); } - xfer += iprot->readListEnd(); - } - } - xfer += iprot->readListEnd(); - } - this->__isset.backup_infos = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint_msg); - this->__isset.hint_msg = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + this->__isset.replicas = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_query_backup_policy_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_backup_policy_response"); +uint32_t query_replica_info_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_replica_info_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("policys", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->policys.size())); - std::vector ::const_iterator _iter438; - for (_iter438 = this->policys.begin(); _iter438 != this->policys.end(); ++_iter438) - { - xfer += (*_iter438).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("backup_infos", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast(this->backup_infos.size())); - std::vector > ::const_iterator _iter439; - for (_iter439 = this->backup_infos.begin(); _iter439 != this->backup_infos.end(); ++_iter439) + xfer += oprot->writeFieldBegin("replicas", ::apache::thrift::protocol::T_LIST, 2); { - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*_iter439).size())); - std::vector ::const_iterator _iter440; - for (_iter440 = (*_iter439).begin(); _iter440 != (*_iter439).end(); ++_iter440) - { - xfer += (*_iter440).write(oprot); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->replicas.size())); + std::vector::const_iterator _iter270; + for (_iter270 = this->replicas.begin(); _iter270 != this->replicas.end(); ++_iter270) { + xfer += (*_iter270).write(oprot); } xfer += oprot->writeListEnd(); - } } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.hint_msg) { - xfer += oprot->writeFieldBegin("hint_msg", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->hint_msg); xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_query_backup_policy_response &a, configuration_query_backup_policy_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.policys, b.policys); - swap(a.backup_infos, b.backup_infos); - swap(a.hint_msg, b.hint_msg); - swap(a.__isset, b.__isset); +void swap(query_replica_info_response &a, query_replica_info_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.replicas, b.replicas); + swap(a.__isset, b.__isset); } -configuration_query_backup_policy_response::configuration_query_backup_policy_response(const configuration_query_backup_policy_response& other441) { - err = other441.err; - policys = other441.policys; - backup_infos = other441.backup_infos; - hint_msg = other441.hint_msg; - __isset = other441.__isset; +query_replica_info_response::query_replica_info_response( + const query_replica_info_response &other271) +{ + err = other271.err; + replicas = other271.replicas; + __isset = other271.__isset; } -configuration_query_backup_policy_response::configuration_query_backup_policy_response( configuration_query_backup_policy_response&& other442) { - err = std::move(other442.err); - policys = std::move(other442.policys); - backup_infos = std::move(other442.backup_infos); - hint_msg = std::move(other442.hint_msg); - __isset = std::move(other442.__isset); +query_replica_info_response::query_replica_info_response(query_replica_info_response &&other272) +{ + err = std::move(other272.err); + replicas = std::move(other272.replicas); + __isset = std::move(other272.__isset); } -configuration_query_backup_policy_response& configuration_query_backup_policy_response::operator=(const configuration_query_backup_policy_response& other443) { - err = other443.err; - policys = other443.policys; - backup_infos = other443.backup_infos; - hint_msg = other443.hint_msg; - __isset = other443.__isset; - return *this; +query_replica_info_response &query_replica_info_response:: +operator=(const query_replica_info_response &other273) +{ + err = other273.err; + replicas = other273.replicas; + __isset = other273.__isset; + return *this; } -configuration_query_backup_policy_response& configuration_query_backup_policy_response::operator=(configuration_query_backup_policy_response&& other444) { - err = std::move(other444.err); - policys = std::move(other444.policys); - backup_infos = std::move(other444.backup_infos); - hint_msg = std::move(other444.hint_msg); - __isset = std::move(other444.__isset); - return *this; +query_replica_info_response &query_replica_info_response:: +operator=(query_replica_info_response &&other274) +{ + err = std::move(other274.err); + replicas = std::move(other274.replicas); + __isset = std::move(other274.__isset); + return *this; } -void configuration_query_backup_policy_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_query_backup_policy_response("; - out << "err=" << to_string(err); - out << ", " << "policys=" << to_string(policys); - out << ", " << "backup_infos=" << to_string(backup_infos); - out << ", " << "hint_msg="; (__isset.hint_msg ? (out << to_string(hint_msg)) : (out << "")); - out << ")"; +void query_replica_info_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "query_replica_info_response("; + out << "err=" << to_string(err); + out << ", " + << "replicas=" << to_string(replicas); + out << ")"; } +disk_info::~disk_info() throw() {} -configuration_report_restore_status_request::~configuration_report_restore_status_request() throw() { -} +void disk_info::__set_tag(const std::string &val) { this->tag = val; } +void disk_info::__set_full_dir(const std::string &val) { this->full_dir = val; } -void configuration_report_restore_status_request::__set_pid(const ::dsn::gpid& val) { - this->pid = val; -} +void disk_info::__set_disk_capacity_mb(const int64_t val) { this->disk_capacity_mb = val; } -void configuration_report_restore_status_request::__set_restore_status(const ::dsn::error_code& val) { - this->restore_status = val; -} +void disk_info::__set_disk_available_mb(const int64_t val) { this->disk_available_mb = val; } -void configuration_report_restore_status_request::__set_progress(const int32_t val) { - this->progress = val; +void disk_info::__set_holding_primary_replica_counts(const std::map &val) +{ + this->holding_primary_replica_counts = val; } -void configuration_report_restore_status_request::__set_reason(const std::string& val) { - this->reason = val; -__isset.reason = true; +void disk_info::__set_holding_secondary_replica_counts(const std::map &val) +{ + this->holding_secondary_replica_counts = val; } -uint32_t configuration_report_restore_status_request::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t disk_info::read(::apache::thrift::protocol::TProtocol *iprot) +{ - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->restore_status.read(iprot); - this->__isset.restore_status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->progress); - this->__isset.progress = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->reason); - this->__isset.reason = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tag); + this->__isset.tag = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->full_dir); + this->__isset.full_dir = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->disk_capacity_mb); + this->__isset.disk_capacity_mb = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->disk_available_mb); + this->__isset.disk_available_mb = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->holding_primary_replica_counts.clear(); + uint32_t _size275; + ::apache::thrift::protocol::TType _ktype276; + ::apache::thrift::protocol::TType _vtype277; + xfer += iprot->readMapBegin(_ktype276, _vtype277, _size275); + uint32_t _i279; + for (_i279 = 0; _i279 < _size275; ++_i279) { + int32_t _key280; + xfer += iprot->readI32(_key280); + int32_t &_val281 = this->holding_primary_replica_counts[_key280]; + xfer += iprot->readI32(_val281); + } + xfer += iprot->readMapEnd(); + } + this->__isset.holding_primary_replica_counts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->holding_secondary_replica_counts.clear(); + uint32_t _size282; + ::apache::thrift::protocol::TType _ktype283; + ::apache::thrift::protocol::TType _vtype284; + xfer += iprot->readMapBegin(_ktype283, _vtype284, _size282); + uint32_t _i286; + for (_i286 = 0; _i286 < _size282; ++_i286) { + int32_t _key287; + xfer += iprot->readI32(_key287); + int32_t &_val288 = this->holding_secondary_replica_counts[_key287]; + xfer += iprot->readI32(_val288); + } + xfer += iprot->readMapEnd(); + } + this->__isset.holding_secondary_replica_counts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_report_restore_status_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_report_restore_status_request"); +uint32_t disk_info::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("disk_info"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("restore_status", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->restore_status.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->progress); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.reason) { - xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->reason); + xfer += oprot->writeFieldBegin("tag", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->tag); xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_report_restore_status_request &a, configuration_report_restore_status_request &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.restore_status, b.restore_status); - swap(a.progress, b.progress); - swap(a.reason, b.reason); - swap(a.__isset, b.__isset); -} - -configuration_report_restore_status_request::configuration_report_restore_status_request(const configuration_report_restore_status_request& other445) { - pid = other445.pid; - restore_status = other445.restore_status; - progress = other445.progress; - reason = other445.reason; - __isset = other445.__isset; -} -configuration_report_restore_status_request::configuration_report_restore_status_request( configuration_report_restore_status_request&& other446) { - pid = std::move(other446.pid); - restore_status = std::move(other446.restore_status); - progress = std::move(other446.progress); - reason = std::move(other446.reason); - __isset = std::move(other446.__isset); -} -configuration_report_restore_status_request& configuration_report_restore_status_request::operator=(const configuration_report_restore_status_request& other447) { - pid = other447.pid; - restore_status = other447.restore_status; - progress = other447.progress; - reason = other447.reason; - __isset = other447.__isset; - return *this; -} -configuration_report_restore_status_request& configuration_report_restore_status_request::operator=(configuration_report_restore_status_request&& other448) { - pid = std::move(other448.pid); - restore_status = std::move(other448.restore_status); - progress = std::move(other448.progress); - reason = std::move(other448.reason); - __isset = std::move(other448.__isset); - return *this; -} -void configuration_report_restore_status_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_report_restore_status_request("; - out << "pid=" << to_string(pid); - out << ", " << "restore_status=" << to_string(restore_status); - out << ", " << "progress=" << to_string(progress); - out << ", " << "reason="; (__isset.reason ? (out << to_string(reason)) : (out << "")); - out << ")"; -} - - -configuration_report_restore_status_response::~configuration_report_restore_status_response() throw() { -} + xfer += oprot->writeFieldBegin("full_dir", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->full_dir); + xfer += oprot->writeFieldEnd(); -void configuration_report_restore_status_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -uint32_t configuration_report_restore_status_response::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("disk_capacity_mb", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->disk_capacity_mb); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("disk_available_mb", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->disk_available_mb); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + xfer += oprot->writeFieldBegin( + "holding_primary_replica_counts", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin( + ::apache::thrift::protocol::T_I32, + ::apache::thrift::protocol::T_I32, + static_cast(this->holding_primary_replica_counts.size())); + std::map::const_iterator _iter289; + for (_iter289 = this->holding_primary_replica_counts.begin(); + _iter289 != this->holding_primary_replica_counts.end(); + ++_iter289) { + xfer += oprot->writeI32(_iter289->first); + xfer += oprot->writeI32(_iter289->second); + } + xfer += oprot->writeMapEnd(); } - switch (fid) + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin( + "holding_secondary_replica_counts", ::apache::thrift::protocol::T_MAP, 6); { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeMapBegin( + ::apache::thrift::protocol::T_I32, + ::apache::thrift::protocol::T_I32, + static_cast(this->holding_secondary_replica_counts.size())); + std::map::const_iterator _iter290; + for (_iter290 = this->holding_secondary_replica_counts.begin(); + _iter290 != this->holding_secondary_replica_counts.end(); + ++_iter290) { + xfer += oprot->writeI32(_iter290->first); + xfer += oprot->writeI32(_iter290->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(disk_info &a, disk_info &b) +{ + using ::std::swap; + swap(a.tag, b.tag); + swap(a.full_dir, b.full_dir); + swap(a.disk_capacity_mb, b.disk_capacity_mb); + swap(a.disk_available_mb, b.disk_available_mb); + swap(a.holding_primary_replica_counts, b.holding_primary_replica_counts); + swap(a.holding_secondary_replica_counts, b.holding_secondary_replica_counts); + swap(a.__isset, b.__isset); +} + +disk_info::disk_info(const disk_info &other291) +{ + tag = other291.tag; + full_dir = other291.full_dir; + disk_capacity_mb = other291.disk_capacity_mb; + disk_available_mb = other291.disk_available_mb; + holding_primary_replica_counts = other291.holding_primary_replica_counts; + holding_secondary_replica_counts = other291.holding_secondary_replica_counts; + __isset = other291.__isset; +} +disk_info::disk_info(disk_info &&other292) +{ + tag = std::move(other292.tag); + full_dir = std::move(other292.full_dir); + disk_capacity_mb = std::move(other292.disk_capacity_mb); + disk_available_mb = std::move(other292.disk_available_mb); + holding_primary_replica_counts = std::move(other292.holding_primary_replica_counts); + holding_secondary_replica_counts = std::move(other292.holding_secondary_replica_counts); + __isset = std::move(other292.__isset); +} +disk_info &disk_info::operator=(const disk_info &other293) +{ + tag = other293.tag; + full_dir = other293.full_dir; + disk_capacity_mb = other293.disk_capacity_mb; + disk_available_mb = other293.disk_available_mb; + holding_primary_replica_counts = other293.holding_primary_replica_counts; + holding_secondary_replica_counts = other293.holding_secondary_replica_counts; + __isset = other293.__isset; + return *this; +} +disk_info &disk_info::operator=(disk_info &&other294) +{ + tag = std::move(other294.tag); + full_dir = std::move(other294.full_dir); + disk_capacity_mb = std::move(other294.disk_capacity_mb); + disk_available_mb = std::move(other294.disk_available_mb); + holding_primary_replica_counts = std::move(other294.holding_primary_replica_counts); + holding_secondary_replica_counts = std::move(other294.holding_secondary_replica_counts); + __isset = std::move(other294.__isset); + return *this; +} +void disk_info::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "disk_info("; + out << "tag=" << to_string(tag); + out << ", " + << "full_dir=" << to_string(full_dir); + out << ", " + << "disk_capacity_mb=" << to_string(disk_capacity_mb); + out << ", " + << "disk_available_mb=" << to_string(disk_available_mb); + out << ", " + << "holding_primary_replica_counts=" << to_string(holding_primary_replica_counts); + out << ", " + << "holding_secondary_replica_counts=" << to_string(holding_secondary_replica_counts); + out << ")"; +} + +query_disk_info_request::~query_disk_info_request() throw() {} + +void query_disk_info_request::__set_node(const ::dsn::rpc_address &val) { this->node = val; } + +void query_disk_info_request::__set_app_name(const std::string &val) { this->app_name = val; } + +uint32_t query_disk_info_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_report_restore_status_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_report_restore_status_response"); +uint32_t query_disk_info_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_disk_info_request"); + + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_report_restore_status_response &a, configuration_report_restore_status_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.__isset, b.__isset); +void swap(query_disk_info_request &a, query_disk_info_request &b) +{ + using ::std::swap; + swap(a.node, b.node); + swap(a.app_name, b.app_name); + swap(a.__isset, b.__isset); } -configuration_report_restore_status_response::configuration_report_restore_status_response(const configuration_report_restore_status_response& other449) { - err = other449.err; - __isset = other449.__isset; +query_disk_info_request::query_disk_info_request(const query_disk_info_request &other295) +{ + node = other295.node; + app_name = other295.app_name; + __isset = other295.__isset; } -configuration_report_restore_status_response::configuration_report_restore_status_response( configuration_report_restore_status_response&& other450) { - err = std::move(other450.err); - __isset = std::move(other450.__isset); +query_disk_info_request::query_disk_info_request(query_disk_info_request &&other296) +{ + node = std::move(other296.node); + app_name = std::move(other296.app_name); + __isset = std::move(other296.__isset); } -configuration_report_restore_status_response& configuration_report_restore_status_response::operator=(const configuration_report_restore_status_response& other451) { - err = other451.err; - __isset = other451.__isset; - return *this; +query_disk_info_request &query_disk_info_request::operator=(const query_disk_info_request &other297) +{ + node = other297.node; + app_name = other297.app_name; + __isset = other297.__isset; + return *this; } -configuration_report_restore_status_response& configuration_report_restore_status_response::operator=(configuration_report_restore_status_response&& other452) { - err = std::move(other452.err); - __isset = std::move(other452.__isset); - return *this; +query_disk_info_request &query_disk_info_request::operator=(query_disk_info_request &&other298) +{ + node = std::move(other298.node); + app_name = std::move(other298.app_name); + __isset = std::move(other298.__isset); + return *this; } -void configuration_report_restore_status_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_report_restore_status_response("; - out << "err=" << to_string(err); - out << ")"; +void query_disk_info_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "query_disk_info_request("; + out << "node=" << to_string(node); + out << ", " + << "app_name=" << to_string(app_name); + out << ")"; } +query_disk_info_response::~query_disk_info_response() throw() {} + +void query_disk_info_response::__set_err(const ::dsn::error_code &val) { this->err = val; } -configuration_query_restore_request::~configuration_query_restore_request() throw() { +void query_disk_info_response::__set_total_capacity_mb(const int64_t val) +{ + this->total_capacity_mb = val; } +void query_disk_info_response::__set_total_available_mb(const int64_t val) +{ + this->total_available_mb = val; +} -void configuration_query_restore_request::__set_restore_app_id(const int32_t val) { - this->restore_app_id = val; +void query_disk_info_response::__set_disk_infos(const std::vector &val) +{ + this->disk_infos = val; } -uint32_t configuration_query_restore_request::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t query_disk_info_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->total_capacity_mb); + this->__isset.total_capacity_mb = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->total_available_mb); + this->__isset.total_available_mb = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->disk_infos.clear(); + uint32_t _size299; + ::apache::thrift::protocol::TType _etype302; + xfer += iprot->readListBegin(_etype302, _size299); + this->disk_infos.resize(_size299); + uint32_t _i303; + for (_i303 = 0; _i303 < _size299; ++_i303) { + xfer += this->disk_infos[_i303].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.disk_infos = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t query_disk_info_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_disk_info_response"); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("total_capacity_mb", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->total_capacity_mb); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("total_available_mb", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->total_available_mb); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + xfer += oprot->writeFieldBegin("disk_infos", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->disk_infos.size())); + std::vector::const_iterator _iter304; + for (_iter304 = this->disk_infos.begin(); _iter304 != this->disk_infos.end(); ++_iter304) { + xfer += (*_iter304).write(oprot); + } + xfer += oprot->writeListEnd(); } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->restore_app_id); - this->__isset.restore_app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(query_disk_info_response &a, query_disk_info_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.total_capacity_mb, b.total_capacity_mb); + swap(a.total_available_mb, b.total_available_mb); + swap(a.disk_infos, b.disk_infos); + swap(a.__isset, b.__isset); +} + +query_disk_info_response::query_disk_info_response(const query_disk_info_response &other305) +{ + err = other305.err; + total_capacity_mb = other305.total_capacity_mb; + total_available_mb = other305.total_available_mb; + disk_infos = other305.disk_infos; + __isset = other305.__isset; +} +query_disk_info_response::query_disk_info_response(query_disk_info_response &&other306) +{ + err = std::move(other306.err); + total_capacity_mb = std::move(other306.total_capacity_mb); + total_available_mb = std::move(other306.total_available_mb); + disk_infos = std::move(other306.disk_infos); + __isset = std::move(other306.__isset); +} +query_disk_info_response &query_disk_info_response:: +operator=(const query_disk_info_response &other307) +{ + err = other307.err; + total_capacity_mb = other307.total_capacity_mb; + total_available_mb = other307.total_available_mb; + disk_infos = other307.disk_infos; + __isset = other307.__isset; + return *this; +} +query_disk_info_response &query_disk_info_response::operator=(query_disk_info_response &&other308) +{ + err = std::move(other308.err); + total_capacity_mb = std::move(other308.total_capacity_mb); + total_available_mb = std::move(other308.total_available_mb); + disk_infos = std::move(other308.disk_infos); + __isset = std::move(other308.__isset); + return *this; +} +void query_disk_info_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "query_disk_info_response("; + out << "err=" << to_string(err); + out << ", " + << "total_capacity_mb=" << to_string(total_capacity_mb); + out << ", " + << "total_available_mb=" << to_string(total_available_mb); + out << ", " + << "disk_infos=" << to_string(disk_infos); + out << ")"; +} + +query_app_info_request::~query_app_info_request() throw() {} + +void query_app_info_request::__set_meta_server(const ::dsn::rpc_address &val) +{ + this->meta_server = val; +} + +uint32_t query_app_info_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->meta_server.read(iprot); + this->__isset.meta_server = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_query_restore_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_restore_request"); +uint32_t query_app_info_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_app_info_request"); - xfer += oprot->writeFieldBegin("restore_app_id", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->restore_app_id); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("meta_server", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->meta_server.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_query_restore_request &a, configuration_query_restore_request &b) { - using ::std::swap; - swap(a.restore_app_id, b.restore_app_id); - swap(a.__isset, b.__isset); +void swap(query_app_info_request &a, query_app_info_request &b) +{ + using ::std::swap; + swap(a.meta_server, b.meta_server); + swap(a.__isset, b.__isset); } -configuration_query_restore_request::configuration_query_restore_request(const configuration_query_restore_request& other453) { - restore_app_id = other453.restore_app_id; - __isset = other453.__isset; +query_app_info_request::query_app_info_request(const query_app_info_request &other309) +{ + meta_server = other309.meta_server; + __isset = other309.__isset; } -configuration_query_restore_request::configuration_query_restore_request( configuration_query_restore_request&& other454) { - restore_app_id = std::move(other454.restore_app_id); - __isset = std::move(other454.__isset); +query_app_info_request::query_app_info_request(query_app_info_request &&other310) +{ + meta_server = std::move(other310.meta_server); + __isset = std::move(other310.__isset); } -configuration_query_restore_request& configuration_query_restore_request::operator=(const configuration_query_restore_request& other455) { - restore_app_id = other455.restore_app_id; - __isset = other455.__isset; - return *this; +query_app_info_request &query_app_info_request::operator=(const query_app_info_request &other311) +{ + meta_server = other311.meta_server; + __isset = other311.__isset; + return *this; } -configuration_query_restore_request& configuration_query_restore_request::operator=(configuration_query_restore_request&& other456) { - restore_app_id = std::move(other456.restore_app_id); - __isset = std::move(other456.__isset); - return *this; +query_app_info_request &query_app_info_request::operator=(query_app_info_request &&other312) +{ + meta_server = std::move(other312.meta_server); + __isset = std::move(other312.__isset); + return *this; } -void configuration_query_restore_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_query_restore_request("; - out << "restore_app_id=" << to_string(restore_app_id); - out << ")"; +void query_app_info_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "query_app_info_request("; + out << "meta_server=" << to_string(meta_server); + out << ")"; } +query_app_info_response::~query_app_info_response() throw() {} -configuration_query_restore_response::~configuration_query_restore_response() throw() { -} - - -void configuration_query_restore_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} +void query_app_info_response::__set_err(const ::dsn::error_code &val) { this->err = val; } -void configuration_query_restore_response::__set_restore_status(const std::vector< ::dsn::error_code> & val) { - this->restore_status = val; +void query_app_info_response::__set_apps(const std::vector<::dsn::app_info> &val) +{ + this->apps = val; } -void configuration_query_restore_response::__set_restore_progress(const std::vector & val) { - this->restore_progress = val; -} - -uint32_t configuration_query_restore_response::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t query_app_info_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->restore_status.clear(); - uint32_t _size457; - ::apache::thrift::protocol::TType _etype460; - xfer += iprot->readListBegin(_etype460, _size457); - this->restore_status.resize(_size457); - uint32_t _i461; - for (_i461 = 0; _i461 < _size457; ++_i461) - { - xfer += this->restore_status[_i461].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.restore_status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->restore_progress.clear(); - uint32_t _size462; - ::apache::thrift::protocol::TType _etype465; - xfer += iprot->readListBegin(_etype465, _size462); - this->restore_progress.resize(_size462); - uint32_t _i466; - for (_i466 = 0; _i466 < _size462; ++_i466) - { - xfer += iprot->readI32(this->restore_progress[_i466]); + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readListEnd(); - } - this->__isset.restore_progress = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->apps.clear(); + uint32_t _size313; + ::apache::thrift::protocol::TType _etype316; + xfer += iprot->readListBegin(_etype316, _size313); + this->apps.resize(_size313); + uint32_t _i317; + for (_i317 = 0; _i317 < _size313; ++_i317) { + xfer += this->apps[_i317].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.apps = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_query_restore_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_restore_response"); +uint32_t query_app_info_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_app_info_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("restore_status", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->restore_status.size())); - std::vector< ::dsn::error_code> ::const_iterator _iter467; - for (_iter467 = this->restore_status.begin(); _iter467 != this->restore_status.end(); ++_iter467) - { - xfer += (*_iter467).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("restore_progress", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->restore_progress.size())); - std::vector ::const_iterator _iter468; - for (_iter468 = this->restore_progress.begin(); _iter468 != this->restore_progress.end(); ++_iter468) + xfer += oprot->writeFieldBegin("apps", ::apache::thrift::protocol::T_LIST, 2); { - xfer += oprot->writeI32((*_iter468)); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->apps.size())); + std::vector<::dsn::app_info>::const_iterator _iter318; + for (_iter318 = this->apps.begin(); _iter318 != this->apps.end(); ++_iter318) { + xfer += (*_iter318).write(oprot); + } + xfer += oprot->writeListEnd(); } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_query_restore_response &a, configuration_query_restore_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.restore_status, b.restore_status); - swap(a.restore_progress, b.restore_progress); - swap(a.__isset, b.__isset); +void swap(query_app_info_response &a, query_app_info_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.apps, b.apps); + swap(a.__isset, b.__isset); } -configuration_query_restore_response::configuration_query_restore_response(const configuration_query_restore_response& other469) { - err = other469.err; - restore_status = other469.restore_status; - restore_progress = other469.restore_progress; - __isset = other469.__isset; +query_app_info_response::query_app_info_response(const query_app_info_response &other319) +{ + err = other319.err; + apps = other319.apps; + __isset = other319.__isset; } -configuration_query_restore_response::configuration_query_restore_response( configuration_query_restore_response&& other470) { - err = std::move(other470.err); - restore_status = std::move(other470.restore_status); - restore_progress = std::move(other470.restore_progress); - __isset = std::move(other470.__isset); +query_app_info_response::query_app_info_response(query_app_info_response &&other320) +{ + err = std::move(other320.err); + apps = std::move(other320.apps); + __isset = std::move(other320.__isset); } -configuration_query_restore_response& configuration_query_restore_response::operator=(const configuration_query_restore_response& other471) { - err = other471.err; - restore_status = other471.restore_status; - restore_progress = other471.restore_progress; - __isset = other471.__isset; - return *this; +query_app_info_response &query_app_info_response::operator=(const query_app_info_response &other321) +{ + err = other321.err; + apps = other321.apps; + __isset = other321.__isset; + return *this; } -configuration_query_restore_response& configuration_query_restore_response::operator=(configuration_query_restore_response&& other472) { - err = std::move(other472.err); - restore_status = std::move(other472.restore_status); - restore_progress = std::move(other472.restore_progress); - __isset = std::move(other472.__isset); - return *this; +query_app_info_response &query_app_info_response::operator=(query_app_info_response &&other322) +{ + err = std::move(other322.err); + apps = std::move(other322.apps); + __isset = std::move(other322.__isset); + return *this; } -void configuration_query_restore_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_query_restore_response("; - out << "err=" << to_string(err); - out << ", " << "restore_status=" << to_string(restore_status); - out << ", " << "restore_progress=" << to_string(restore_progress); - out << ")"; +void query_app_info_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "query_app_info_response("; + out << "err=" << to_string(err); + out << ", " + << "apps=" << to_string(apps); + out << ")"; } +configuration_recovery_request::~configuration_recovery_request() throw() {} -file_meta::~file_meta() throw() { +void configuration_recovery_request::__set_recovery_set(const std::vector<::dsn::rpc_address> &val) +{ + this->recovery_set = val; } - -void file_meta::__set_name(const std::string& val) { - this->name = val; +void configuration_recovery_request::__set_skip_bad_nodes(const bool val) +{ + this->skip_bad_nodes = val; } -void file_meta::__set_size(const int64_t val) { - this->size = val; +void configuration_recovery_request::__set_skip_lost_partitions(const bool val) +{ + this->skip_lost_partitions = val; } -void file_meta::__set_md5(const std::string& val) { - this->md5 = val; -} +uint32_t configuration_recovery_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; -uint32_t file_meta::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += iprot->readStructBegin(fname); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->recovery_set.clear(); + uint32_t _size323; + ::apache::thrift::protocol::TType _etype326; + xfer += iprot->readListBegin(_etype326, _size323); + this->recovery_set.resize(_size323); + uint32_t _i327; + for (_i327 = 0; _i327 < _size323; ++_i327) { + xfer += this->recovery_set[_i327].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.recovery_set = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->skip_bad_nodes); + this->__isset.skip_bad_nodes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->skip_lost_partitions); + this->__isset.skip_lost_partitions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructEnd(); - using ::apache::thrift::protocol::TProtocolException; + return xfer; +} +uint32_t configuration_recovery_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_recovery_request"); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) + xfer += oprot->writeFieldBegin("recovery_set", ::apache::thrift::protocol::T_LIST, 1); { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->size); - this->__isset.size = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->md5); - this->__isset.md5 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->recovery_set.size())); + std::vector<::dsn::rpc_address>::const_iterator _iter328; + for (_iter328 = this->recovery_set.begin(); _iter328 != this->recovery_set.end(); + ++_iter328) { + xfer += (*_iter328).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("skip_bad_nodes", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->skip_bad_nodes); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("skip_lost_partitions", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->skip_lost_partitions); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_recovery_request &a, configuration_recovery_request &b) +{ + using ::std::swap; + swap(a.recovery_set, b.recovery_set); + swap(a.skip_bad_nodes, b.skip_bad_nodes); + swap(a.skip_lost_partitions, b.skip_lost_partitions); + swap(a.__isset, b.__isset); +} + +configuration_recovery_request::configuration_recovery_request( + const configuration_recovery_request &other329) +{ + recovery_set = other329.recovery_set; + skip_bad_nodes = other329.skip_bad_nodes; + skip_lost_partitions = other329.skip_lost_partitions; + __isset = other329.__isset; +} +configuration_recovery_request::configuration_recovery_request( + configuration_recovery_request &&other330) +{ + recovery_set = std::move(other330.recovery_set); + skip_bad_nodes = std::move(other330.skip_bad_nodes); + skip_lost_partitions = std::move(other330.skip_lost_partitions); + __isset = std::move(other330.__isset); +} +configuration_recovery_request &configuration_recovery_request:: +operator=(const configuration_recovery_request &other331) +{ + recovery_set = other331.recovery_set; + skip_bad_nodes = other331.skip_bad_nodes; + skip_lost_partitions = other331.skip_lost_partitions; + __isset = other331.__isset; + return *this; +} +configuration_recovery_request &configuration_recovery_request:: +operator=(configuration_recovery_request &&other332) +{ + recovery_set = std::move(other332.recovery_set); + skip_bad_nodes = std::move(other332.skip_bad_nodes); + skip_lost_partitions = std::move(other332.skip_lost_partitions); + __isset = std::move(other332.__isset); + return *this; +} +void configuration_recovery_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_recovery_request("; + out << "recovery_set=" << to_string(recovery_set); + out << ", " + << "skip_bad_nodes=" << to_string(skip_bad_nodes); + out << ", " + << "skip_lost_partitions=" << to_string(skip_lost_partitions); + out << ")"; +} + +configuration_recovery_response::~configuration_recovery_response() throw() {} + +void configuration_recovery_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void configuration_recovery_response::__set_hint_message(const std::string &val) +{ + this->hint_message = val; +} + +uint32_t configuration_recovery_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint_message); + this->__isset.hint_message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t file_meta::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("file_meta"); +uint32_t configuration_recovery_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_recovery_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->hint_message); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_recovery_response &a, configuration_recovery_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.hint_message, b.hint_message); + swap(a.__isset, b.__isset); +} + +configuration_recovery_response::configuration_recovery_response( + const configuration_recovery_response &other333) +{ + err = other333.err; + hint_message = other333.hint_message; + __isset = other333.__isset; +} +configuration_recovery_response::configuration_recovery_response( + configuration_recovery_response &&other334) +{ + err = std::move(other334.err); + hint_message = std::move(other334.hint_message); + __isset = std::move(other334.__isset); +} +configuration_recovery_response &configuration_recovery_response:: +operator=(const configuration_recovery_response &other335) +{ + err = other335.err; + hint_message = other335.hint_message; + __isset = other335.__isset; + return *this; +} +configuration_recovery_response &configuration_recovery_response:: +operator=(configuration_recovery_response &&other336) +{ + err = std::move(other336.err); + hint_message = std::move(other336.hint_message); + __isset = std::move(other336.__isset); + return *this; +} +void configuration_recovery_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_recovery_response("; + out << "err=" << to_string(err); + out << ", " + << "hint_message=" << to_string(hint_message); + out << ")"; +} + +policy_info::~policy_info() throw() {} + +void policy_info::__set_policy_name(const std::string &val) { this->policy_name = val; } + +void policy_info::__set_backup_provider_type(const std::string &val) +{ + this->backup_provider_type = val; +} + +uint32_t policy_info::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->backup_provider_type); + this->__isset.backup_provider_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); - xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->name); - xfer += oprot->writeFieldEnd(); + return xfer; +} + +uint32_t policy_info::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("policy_info"); - xfer += oprot->writeFieldBegin("size", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->size); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("md5", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->md5); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("backup_provider_type", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->backup_provider_type); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(file_meta &a, file_meta &b) { - using ::std::swap; - swap(a.name, b.name); - swap(a.size, b.size); - swap(a.md5, b.md5); - swap(a.__isset, b.__isset); +void swap(policy_info &a, policy_info &b) +{ + using ::std::swap; + swap(a.policy_name, b.policy_name); + swap(a.backup_provider_type, b.backup_provider_type); + swap(a.__isset, b.__isset); } -file_meta::file_meta(const file_meta& other473) { - name = other473.name; - size = other473.size; - md5 = other473.md5; - __isset = other473.__isset; +policy_info::policy_info(const policy_info &other337) +{ + policy_name = other337.policy_name; + backup_provider_type = other337.backup_provider_type; + __isset = other337.__isset; } -file_meta::file_meta( file_meta&& other474) { - name = std::move(other474.name); - size = std::move(other474.size); - md5 = std::move(other474.md5); - __isset = std::move(other474.__isset); +policy_info::policy_info(policy_info &&other338) +{ + policy_name = std::move(other338.policy_name); + backup_provider_type = std::move(other338.backup_provider_type); + __isset = std::move(other338.__isset); } -file_meta& file_meta::operator=(const file_meta& other475) { - name = other475.name; - size = other475.size; - md5 = other475.md5; - __isset = other475.__isset; - return *this; +policy_info &policy_info::operator=(const policy_info &other339) +{ + policy_name = other339.policy_name; + backup_provider_type = other339.backup_provider_type; + __isset = other339.__isset; + return *this; } -file_meta& file_meta::operator=(file_meta&& other476) { - name = std::move(other476.name); - size = std::move(other476.size); - md5 = std::move(other476.md5); - __isset = std::move(other476.__isset); - return *this; +policy_info &policy_info::operator=(policy_info &&other340) +{ + policy_name = std::move(other340.policy_name); + backup_provider_type = std::move(other340.backup_provider_type); + __isset = std::move(other340.__isset); + return *this; } -void file_meta::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "file_meta("; - out << "name=" << to_string(name); - out << ", " << "size=" << to_string(size); - out << ", " << "md5=" << to_string(md5); - out << ")"; +void policy_info::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "policy_info("; + out << "policy_name=" << to_string(policy_name); + out << ", " + << "backup_provider_type=" << to_string(backup_provider_type); + out << ")"; } +configuration_restore_request::~configuration_restore_request() throw() {} -configuration_update_app_env_request::~configuration_update_app_env_request() throw() { +void configuration_restore_request::__set_cluster_name(const std::string &val) +{ + this->cluster_name = val; } - -void configuration_update_app_env_request::__set_app_name(const std::string& val) { - this->app_name = val; +void configuration_restore_request::__set_policy_name(const std::string &val) +{ + this->policy_name = val; } -void configuration_update_app_env_request::__set_op(const app_env_operation::type val) { - this->op = val; -} +void configuration_restore_request::__set_time_stamp(const int64_t val) { this->time_stamp = val; } -void configuration_update_app_env_request::__set_keys(const std::vector & val) { - this->keys = val; -__isset.keys = true; -} +void configuration_restore_request::__set_app_name(const std::string &val) { this->app_name = val; } + +void configuration_restore_request::__set_app_id(const int32_t val) { this->app_id = val; } -void configuration_update_app_env_request::__set_values(const std::vector & val) { - this->values = val; -__isset.values = true; +void configuration_restore_request::__set_new_app_name(const std::string &val) +{ + this->new_app_name = val; } -void configuration_update_app_env_request::__set_clear_prefix(const std::string& val) { - this->clear_prefix = val; -__isset.clear_prefix = true; +void configuration_restore_request::__set_backup_provider_name(const std::string &val) +{ + this->backup_provider_name = val; } -uint32_t configuration_update_app_env_request::read(::apache::thrift::protocol::TProtocol* iprot) { +void configuration_restore_request::__set_skip_bad_partition(const bool val) +{ + this->skip_bad_partition = val; +} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t configuration_restore_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast477; - xfer += iprot->readI32(ecast477); - this->op = (app_env_operation::type)ecast477; - this->__isset.op = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->keys.clear(); - uint32_t _size478; - ::apache::thrift::protocol::TType _etype481; - xfer += iprot->readListBegin(_etype481, _size478); - this->keys.resize(_size478); - uint32_t _i482; - for (_i482 = 0; _i482 < _size478; ++_i482) - { - xfer += iprot->readString(this->keys[_i482]); - } - xfer += iprot->readListEnd(); - } - this->__isset.keys = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->values.clear(); - uint32_t _size483; - ::apache::thrift::protocol::TType _etype486; - xfer += iprot->readListBegin(_etype486, _size483); - this->values.resize(_size483); - uint32_t _i487; - for (_i487 = 0; _i487 < _size483; ++_i487) - { - xfer += iprot->readString(this->values[_i487]); - } - xfer += iprot->readListEnd(); - } - this->__isset.values = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->clear_prefix); - this->__isset.clear_prefix = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->cluster_name); + this->__isset.cluster_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->time_stamp); + this->__isset.time_stamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->new_app_name); + this->__isset.new_app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->backup_provider_name); + this->__isset.backup_provider_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->skip_bad_partition); + this->__isset.skip_bad_partition = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_update_app_env_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_update_app_env_request"); +uint32_t configuration_restore_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_restore_request"); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("op", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->op); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.keys) { - xfer += oprot->writeFieldBegin("keys", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->keys.size())); - std::vector ::const_iterator _iter488; - for (_iter488 = this->keys.begin(); _iter488 != this->keys.end(); ++_iter488) - { - xfer += oprot->writeString((*_iter488)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.values) { - xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->values.size())); - std::vector ::const_iterator _iter489; - for (_iter489 = this->values.begin(); _iter489 != this->values.end(); ++_iter489) - { - xfer += oprot->writeString((*_iter489)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.clear_prefix) { - xfer += oprot->writeFieldBegin("clear_prefix", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->clear_prefix); + xfer += oprot->writeFieldBegin("cluster_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->cluster_name); xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_update_app_env_request &a, configuration_update_app_env_request &b) { - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.op, b.op); - swap(a.keys, b.keys); - swap(a.values, b.values); - swap(a.clear_prefix, b.clear_prefix); - swap(a.__isset, b.__isset); -} - -configuration_update_app_env_request::configuration_update_app_env_request(const configuration_update_app_env_request& other490) { - app_name = other490.app_name; - op = other490.op; - keys = other490.keys; - values = other490.values; - clear_prefix = other490.clear_prefix; - __isset = other490.__isset; -} -configuration_update_app_env_request::configuration_update_app_env_request( configuration_update_app_env_request&& other491) { - app_name = std::move(other491.app_name); - op = std::move(other491.op); - keys = std::move(other491.keys); - values = std::move(other491.values); - clear_prefix = std::move(other491.clear_prefix); - __isset = std::move(other491.__isset); -} -configuration_update_app_env_request& configuration_update_app_env_request::operator=(const configuration_update_app_env_request& other492) { - app_name = other492.app_name; - op = other492.op; - keys = other492.keys; - values = other492.values; - clear_prefix = other492.clear_prefix; - __isset = other492.__isset; - return *this; -} -configuration_update_app_env_request& configuration_update_app_env_request::operator=(configuration_update_app_env_request&& other493) { - app_name = std::move(other493.app_name); - op = std::move(other493.op); - keys = std::move(other493.keys); - values = std::move(other493.values); - clear_prefix = std::move(other493.clear_prefix); - __isset = std::move(other493.__isset); - return *this; -} -void configuration_update_app_env_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_update_app_env_request("; - out << "app_name=" << to_string(app_name); - out << ", " << "op=" << to_string(op); - out << ", " << "keys="; (__isset.keys ? (out << to_string(keys)) : (out << "")); - out << ", " << "values="; (__isset.values ? (out << to_string(values)) : (out << "")); - out << ", " << "clear_prefix="; (__isset.clear_prefix ? (out << to_string(clear_prefix)) : (out << "")); - out << ")"; -} - -configuration_update_app_env_response::~configuration_update_app_env_response() throw() { -} - - -void configuration_update_app_env_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); -void configuration_update_app_env_response::__set_hint_message(const std::string& val) { - this->hint_message = val; -} + xfer += oprot->writeFieldBegin("time_stamp", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->time_stamp); + xfer += oprot->writeFieldEnd(); -uint32_t configuration_update_app_env_response::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("new_app_name", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->new_app_name); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("backup_provider_name", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->backup_provider_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("skip_bad_partition", ::apache::thrift::protocol::T_BOOL, 8); + xfer += oprot->writeBool(this->skip_bad_partition); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint_message); - this->__isset.hint_message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_restore_request &a, configuration_restore_request &b) +{ + using ::std::swap; + swap(a.cluster_name, b.cluster_name); + swap(a.policy_name, b.policy_name); + swap(a.time_stamp, b.time_stamp); + swap(a.app_name, b.app_name); + swap(a.app_id, b.app_id); + swap(a.new_app_name, b.new_app_name); + swap(a.backup_provider_name, b.backup_provider_name); + swap(a.skip_bad_partition, b.skip_bad_partition); + swap(a.__isset, b.__isset); +} + +configuration_restore_request::configuration_restore_request( + const configuration_restore_request &other341) +{ + cluster_name = other341.cluster_name; + policy_name = other341.policy_name; + time_stamp = other341.time_stamp; + app_name = other341.app_name; + app_id = other341.app_id; + new_app_name = other341.new_app_name; + backup_provider_name = other341.backup_provider_name; + skip_bad_partition = other341.skip_bad_partition; + __isset = other341.__isset; +} +configuration_restore_request::configuration_restore_request( + configuration_restore_request &&other342) +{ + cluster_name = std::move(other342.cluster_name); + policy_name = std::move(other342.policy_name); + time_stamp = std::move(other342.time_stamp); + app_name = std::move(other342.app_name); + app_id = std::move(other342.app_id); + new_app_name = std::move(other342.new_app_name); + backup_provider_name = std::move(other342.backup_provider_name); + skip_bad_partition = std::move(other342.skip_bad_partition); + __isset = std::move(other342.__isset); +} +configuration_restore_request &configuration_restore_request:: +operator=(const configuration_restore_request &other343) +{ + cluster_name = other343.cluster_name; + policy_name = other343.policy_name; + time_stamp = other343.time_stamp; + app_name = other343.app_name; + app_id = other343.app_id; + new_app_name = other343.new_app_name; + backup_provider_name = other343.backup_provider_name; + skip_bad_partition = other343.skip_bad_partition; + __isset = other343.__isset; + return *this; +} +configuration_restore_request &configuration_restore_request:: +operator=(configuration_restore_request &&other344) +{ + cluster_name = std::move(other344.cluster_name); + policy_name = std::move(other344.policy_name); + time_stamp = std::move(other344.time_stamp); + app_name = std::move(other344.app_name); + app_id = std::move(other344.app_id); + new_app_name = std::move(other344.new_app_name); + backup_provider_name = std::move(other344.backup_provider_name); + skip_bad_partition = std::move(other344.skip_bad_partition); + __isset = std::move(other344.__isset); + return *this; +} +void configuration_restore_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_restore_request("; + out << "cluster_name=" << to_string(cluster_name); + out << ", " + << "policy_name=" << to_string(policy_name); + out << ", " + << "time_stamp=" << to_string(time_stamp); + out << ", " + << "app_name=" << to_string(app_name); + out << ", " + << "app_id=" << to_string(app_id); + out << ", " + << "new_app_name=" << to_string(new_app_name); + out << ", " + << "backup_provider_name=" << to_string(backup_provider_name); + out << ", " + << "skip_bad_partition=" << to_string(skip_bad_partition); + out << ")"; +} + +backup_request::~backup_request() throw() {} + +void backup_request::__set_pid(const ::dsn::gpid &val) { this->pid = val; } + +void backup_request::__set_policy(const policy_info &val) { this->policy = val; } + +void backup_request::__set_app_name(const std::string &val) { this->app_name = val; } + +void backup_request::__set_backup_id(const int64_t val) { this->backup_id = val; } + +uint32_t backup_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->policy.read(iprot); + this->__isset.policy = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->backup_id); + this->__isset.backup_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t configuration_update_app_env_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_update_app_env_response"); +uint32_t backup_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("backup_request"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->hint_message); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); -void swap(configuration_update_app_env_response &a, configuration_update_app_env_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.hint_message, b.hint_message); - swap(a.__isset, b.__isset); -} + xfer += oprot->writeFieldBegin("policy", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->policy.write(oprot); + xfer += oprot->writeFieldEnd(); -configuration_update_app_env_response::configuration_update_app_env_response(const configuration_update_app_env_response& other494) { - err = other494.err; - hint_message = other494.hint_message; - __isset = other494.__isset; -} -configuration_update_app_env_response::configuration_update_app_env_response( configuration_update_app_env_response&& other495) { - err = std::move(other495.err); - hint_message = std::move(other495.hint_message); - __isset = std::move(other495.__isset); -} -configuration_update_app_env_response& configuration_update_app_env_response::operator=(const configuration_update_app_env_response& other496) { - err = other496.err; - hint_message = other496.hint_message; - __isset = other496.__isset; - return *this; -} -configuration_update_app_env_response& configuration_update_app_env_response::operator=(configuration_update_app_env_response&& other497) { - err = std::move(other497.err); - hint_message = std::move(other497.hint_message); - __isset = std::move(other497.__isset); - return *this; -} -void configuration_update_app_env_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "configuration_update_app_env_response("; - out << "err=" << to_string(err); - out << ", " << "hint_message=" << to_string(hint_message); - out << ")"; -} + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("backup_id", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->backup_id); + xfer += oprot->writeFieldEnd(); -duplication_add_request::~duplication_add_request() throw() { -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(backup_request &a, backup_request &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.policy, b.policy); + swap(a.app_name, b.app_name); + swap(a.backup_id, b.backup_id); + swap(a.__isset, b.__isset); +} + +backup_request::backup_request(const backup_request &other345) +{ + pid = other345.pid; + policy = other345.policy; + app_name = other345.app_name; + backup_id = other345.backup_id; + __isset = other345.__isset; +} +backup_request::backup_request(backup_request &&other346) +{ + pid = std::move(other346.pid); + policy = std::move(other346.policy); + app_name = std::move(other346.app_name); + backup_id = std::move(other346.backup_id); + __isset = std::move(other346.__isset); +} +backup_request &backup_request::operator=(const backup_request &other347) +{ + pid = other347.pid; + policy = other347.policy; + app_name = other347.app_name; + backup_id = other347.backup_id; + __isset = other347.__isset; + return *this; +} +backup_request &backup_request::operator=(backup_request &&other348) +{ + pid = std::move(other348.pid); + policy = std::move(other348.policy); + app_name = std::move(other348.app_name); + backup_id = std::move(other348.backup_id); + __isset = std::move(other348.__isset); + return *this; +} +void backup_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "backup_request("; + out << "pid=" << to_string(pid); + out << ", " + << "policy=" << to_string(policy); + out << ", " + << "app_name=" << to_string(app_name); + out << ", " + << "backup_id=" << to_string(backup_id); + out << ")"; +} + +backup_response::~backup_response() throw() {} + +void backup_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void backup_response::__set_pid(const ::dsn::gpid &val) { this->pid = val; } + +void backup_response::__set_progress(const int32_t val) { this->progress = val; } + +void backup_response::__set_policy_name(const std::string &val) { this->policy_name = val; } + +void backup_response::__set_backup_id(const int64_t val) { this->backup_id = val; } + +void backup_response::__set_checkpoint_total_size(const int64_t val) +{ + this->checkpoint_total_size = val; +} + +uint32_t backup_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->progress); + this->__isset.progress = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->backup_id); + this->__isset.backup_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->checkpoint_total_size); + this->__isset.checkpoint_total_size = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + xfer += iprot->readStructEnd(); -void duplication_add_request::__set_app_name(const std::string& val) { - this->app_name = val; + return xfer; } -void duplication_add_request::__set_remote_cluster_name(const std::string& val) { - this->remote_cluster_name = val; -} +uint32_t backup_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("backup_response"); -void duplication_add_request::__set_freezed(const bool val) { - this->freezed = val; -} + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); -uint32_t duplication_add_request::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->progress); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("backup_id", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->backup_id); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("checkpoint_total_size", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->checkpoint_total_size); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->remote_cluster_name); - this->__isset.remote_cluster_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->freezed); - this->__isset.freezed = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(backup_response &a, backup_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.pid, b.pid); + swap(a.progress, b.progress); + swap(a.policy_name, b.policy_name); + swap(a.backup_id, b.backup_id); + swap(a.checkpoint_total_size, b.checkpoint_total_size); + swap(a.__isset, b.__isset); +} + +backup_response::backup_response(const backup_response &other349) +{ + err = other349.err; + pid = other349.pid; + progress = other349.progress; + policy_name = other349.policy_name; + backup_id = other349.backup_id; + checkpoint_total_size = other349.checkpoint_total_size; + __isset = other349.__isset; +} +backup_response::backup_response(backup_response &&other350) +{ + err = std::move(other350.err); + pid = std::move(other350.pid); + progress = std::move(other350.progress); + policy_name = std::move(other350.policy_name); + backup_id = std::move(other350.backup_id); + checkpoint_total_size = std::move(other350.checkpoint_total_size); + __isset = std::move(other350.__isset); +} +backup_response &backup_response::operator=(const backup_response &other351) +{ + err = other351.err; + pid = other351.pid; + progress = other351.progress; + policy_name = other351.policy_name; + backup_id = other351.backup_id; + checkpoint_total_size = other351.checkpoint_total_size; + __isset = other351.__isset; + return *this; +} +backup_response &backup_response::operator=(backup_response &&other352) +{ + err = std::move(other352.err); + pid = std::move(other352.pid); + progress = std::move(other352.progress); + policy_name = std::move(other352.policy_name); + backup_id = std::move(other352.backup_id); + checkpoint_total_size = std::move(other352.checkpoint_total_size); + __isset = std::move(other352.__isset); + return *this; +} +void backup_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "backup_response("; + out << "err=" << to_string(err); + out << ", " + << "pid=" << to_string(pid); + out << ", " + << "progress=" << to_string(progress); + out << ", " + << "policy_name=" << to_string(policy_name); + out << ", " + << "backup_id=" << to_string(backup_id); + out << ", " + << "checkpoint_total_size=" << to_string(checkpoint_total_size); + out << ")"; +} + +backup_clear_request::~backup_clear_request() throw() {} + +void backup_clear_request::__set_pid(const ::dsn::gpid &val) { this->pid = val; } + +void backup_clear_request::__set_policy_name(const std::string &val) { this->policy_name = val; } + +uint32_t backup_clear_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t duplication_add_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_add_request"); +uint32_t backup_clear_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("backup_clear_request"); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("remote_cluster_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->remote_cluster_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("freezed", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->freezed); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(duplication_add_request &a, duplication_add_request &b) { - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.remote_cluster_name, b.remote_cluster_name); - swap(a.freezed, b.freezed); - swap(a.__isset, b.__isset); +void swap(backup_clear_request &a, backup_clear_request &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.policy_name, b.policy_name); + swap(a.__isset, b.__isset); } -duplication_add_request::duplication_add_request(const duplication_add_request& other498) { - app_name = other498.app_name; - remote_cluster_name = other498.remote_cluster_name; - freezed = other498.freezed; - __isset = other498.__isset; +backup_clear_request::backup_clear_request(const backup_clear_request &other353) +{ + pid = other353.pid; + policy_name = other353.policy_name; + __isset = other353.__isset; } -duplication_add_request::duplication_add_request( duplication_add_request&& other499) { - app_name = std::move(other499.app_name); - remote_cluster_name = std::move(other499.remote_cluster_name); - freezed = std::move(other499.freezed); - __isset = std::move(other499.__isset); +backup_clear_request::backup_clear_request(backup_clear_request &&other354) +{ + pid = std::move(other354.pid); + policy_name = std::move(other354.policy_name); + __isset = std::move(other354.__isset); } -duplication_add_request& duplication_add_request::operator=(const duplication_add_request& other500) { - app_name = other500.app_name; - remote_cluster_name = other500.remote_cluster_name; - freezed = other500.freezed; - __isset = other500.__isset; - return *this; +backup_clear_request &backup_clear_request::operator=(const backup_clear_request &other355) +{ + pid = other355.pid; + policy_name = other355.policy_name; + __isset = other355.__isset; + return *this; } -duplication_add_request& duplication_add_request::operator=(duplication_add_request&& other501) { - app_name = std::move(other501.app_name); - remote_cluster_name = std::move(other501.remote_cluster_name); - freezed = std::move(other501.freezed); - __isset = std::move(other501.__isset); - return *this; +backup_clear_request &backup_clear_request::operator=(backup_clear_request &&other356) +{ + pid = std::move(other356.pid); + policy_name = std::move(other356.policy_name); + __isset = std::move(other356.__isset); + return *this; } -void duplication_add_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "duplication_add_request("; - out << "app_name=" << to_string(app_name); - out << ", " << "remote_cluster_name=" << to_string(remote_cluster_name); - out << ", " << "freezed=" << to_string(freezed); - out << ")"; +void backup_clear_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "backup_clear_request("; + out << "pid=" << to_string(pid); + out << ", " + << "policy_name=" << to_string(policy_name); + out << ")"; } +configuration_modify_backup_policy_request::~configuration_modify_backup_policy_request() throw() {} -duplication_add_response::~duplication_add_response() throw() { +void configuration_modify_backup_policy_request::__set_policy_name(const std::string &val) +{ + this->policy_name = val; } +void configuration_modify_backup_policy_request::__set_add_appids(const std::vector &val) +{ + this->add_appids = val; + __isset.add_appids = true; +} -void duplication_add_response::__set_err(const ::dsn::error_code& val) { - this->err = val; +void configuration_modify_backup_policy_request::__set_removal_appids( + const std::vector &val) +{ + this->removal_appids = val; + __isset.removal_appids = true; } -void duplication_add_response::__set_appid(const int32_t val) { - this->appid = val; +void configuration_modify_backup_policy_request::__set_new_backup_interval_sec(const int64_t val) +{ + this->new_backup_interval_sec = val; + __isset.new_backup_interval_sec = true; } -void duplication_add_response::__set_dupid(const int32_t val) { - this->dupid = val; +void configuration_modify_backup_policy_request::__set_backup_history_count_to_keep( + const int32_t val) +{ + this->backup_history_count_to_keep = val; + __isset.backup_history_count_to_keep = true; } -void duplication_add_response::__set_hint(const std::string& val) { - this->hint = val; -__isset.hint = true; +void configuration_modify_backup_policy_request::__set_is_disable(const bool val) +{ + this->is_disable = val; + __isset.is_disable = true; } -uint32_t duplication_add_response::read(::apache::thrift::protocol::TProtocol* iprot) { +void configuration_modify_backup_policy_request::__set_start_time(const std::string &val) +{ + this->start_time = val; + __isset.start_time = true; +} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t +configuration_modify_backup_policy_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->appid); - this->__isset.appid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->dupid); - this->__isset.dupid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hint); - this->__isset.hint = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->add_appids.clear(); + uint32_t _size357; + ::apache::thrift::protocol::TType _etype360; + xfer += iprot->readListBegin(_etype360, _size357); + this->add_appids.resize(_size357); + uint32_t _i361; + for (_i361 = 0; _i361 < _size357; ++_i361) { + xfer += iprot->readI32(this->add_appids[_i361]); + } + xfer += iprot->readListEnd(); + } + this->__isset.add_appids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->removal_appids.clear(); + uint32_t _size362; + ::apache::thrift::protocol::TType _etype365; + xfer += iprot->readListBegin(_etype365, _size362); + this->removal_appids.resize(_size362); + uint32_t _i366; + for (_i366 = 0; _i366 < _size362; ++_i366) { + xfer += iprot->readI32(this->removal_appids[_i366]); + } + xfer += iprot->readListEnd(); + } + this->__isset.removal_appids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->new_backup_interval_sec); + this->__isset.new_backup_interval_sec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->backup_history_count_to_keep); + this->__isset.backup_history_count_to_keep = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_disable); + this->__isset.is_disable = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->start_time); + this->__isset.start_time = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t duplication_add_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_add_response"); +uint32_t configuration_modify_backup_policy_request::write( + ::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_modify_backup_policy_request"); + + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.add_appids) { + xfer += oprot->writeFieldBegin("add_appids", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, + static_cast(this->add_appids.size())); + std::vector::const_iterator _iter367; + for (_iter367 = this->add_appids.begin(); _iter367 != this->add_appids.end(); + ++_iter367) { + xfer += oprot->writeI32((*_iter367)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.removal_appids) { + xfer += oprot->writeFieldBegin("removal_appids", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, + static_cast(this->removal_appids.size())); + std::vector::const_iterator _iter368; + for (_iter368 = this->removal_appids.begin(); _iter368 != this->removal_appids.end(); + ++_iter368) { + xfer += oprot->writeI32((*_iter368)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.new_backup_interval_sec) { + xfer += + oprot->writeFieldBegin("new_backup_interval_sec", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->new_backup_interval_sec); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.backup_history_count_to_keep) { + xfer += oprot->writeFieldBegin( + "backup_history_count_to_keep", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->backup_history_count_to_keep); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.is_disable) { + xfer += oprot->writeFieldBegin("is_disable", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->is_disable); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.start_time) { + xfer += oprot->writeFieldBegin("start_time", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->start_time); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_modify_backup_policy_request &a, + configuration_modify_backup_policy_request &b) +{ + using ::std::swap; + swap(a.policy_name, b.policy_name); + swap(a.add_appids, b.add_appids); + swap(a.removal_appids, b.removal_appids); + swap(a.new_backup_interval_sec, b.new_backup_interval_sec); + swap(a.backup_history_count_to_keep, b.backup_history_count_to_keep); + swap(a.is_disable, b.is_disable); + swap(a.start_time, b.start_time); + swap(a.__isset, b.__isset); +} + +configuration_modify_backup_policy_request::configuration_modify_backup_policy_request( + const configuration_modify_backup_policy_request &other369) +{ + policy_name = other369.policy_name; + add_appids = other369.add_appids; + removal_appids = other369.removal_appids; + new_backup_interval_sec = other369.new_backup_interval_sec; + backup_history_count_to_keep = other369.backup_history_count_to_keep; + is_disable = other369.is_disable; + start_time = other369.start_time; + __isset = other369.__isset; +} +configuration_modify_backup_policy_request::configuration_modify_backup_policy_request( + configuration_modify_backup_policy_request &&other370) +{ + policy_name = std::move(other370.policy_name); + add_appids = std::move(other370.add_appids); + removal_appids = std::move(other370.removal_appids); + new_backup_interval_sec = std::move(other370.new_backup_interval_sec); + backup_history_count_to_keep = std::move(other370.backup_history_count_to_keep); + is_disable = std::move(other370.is_disable); + start_time = std::move(other370.start_time); + __isset = std::move(other370.__isset); +} +configuration_modify_backup_policy_request &configuration_modify_backup_policy_request:: +operator=(const configuration_modify_backup_policy_request &other371) +{ + policy_name = other371.policy_name; + add_appids = other371.add_appids; + removal_appids = other371.removal_appids; + new_backup_interval_sec = other371.new_backup_interval_sec; + backup_history_count_to_keep = other371.backup_history_count_to_keep; + is_disable = other371.is_disable; + start_time = other371.start_time; + __isset = other371.__isset; + return *this; +} +configuration_modify_backup_policy_request &configuration_modify_backup_policy_request:: +operator=(configuration_modify_backup_policy_request &&other372) +{ + policy_name = std::move(other372.policy_name); + add_appids = std::move(other372.add_appids); + removal_appids = std::move(other372.removal_appids); + new_backup_interval_sec = std::move(other372.new_backup_interval_sec); + backup_history_count_to_keep = std::move(other372.backup_history_count_to_keep); + is_disable = std::move(other372.is_disable); + start_time = std::move(other372.start_time); + __isset = std::move(other372.__isset); + return *this; +} +void configuration_modify_backup_policy_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_modify_backup_policy_request("; + out << "policy_name=" << to_string(policy_name); + out << ", " + << "add_appids="; + (__isset.add_appids ? (out << to_string(add_appids)) : (out << "")); + out << ", " + << "removal_appids="; + (__isset.removal_appids ? (out << to_string(removal_appids)) : (out << "")); + out << ", " + << "new_backup_interval_sec="; + (__isset.new_backup_interval_sec ? (out << to_string(new_backup_interval_sec)) + : (out << "")); + out << ", " + << "backup_history_count_to_keep="; + (__isset.backup_history_count_to_keep ? (out << to_string(backup_history_count_to_keep)) + : (out << "")); + out << ", " + << "is_disable="; + (__isset.is_disable ? (out << to_string(is_disable)) : (out << "")); + out << ", " + << "start_time="; + (__isset.start_time ? (out << to_string(start_time)) : (out << "")); + out << ")"; +} + +configuration_modify_backup_policy_response::~configuration_modify_backup_policy_response() throw() +{ +} + +void configuration_modify_backup_policy_response::__set_err(const ::dsn::error_code &val) +{ + this->err = val; +} + +void configuration_modify_backup_policy_response::__set_hint_message(const std::string &val) +{ + this->hint_message = val; +} + +uint32_t +configuration_modify_backup_policy_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint_message); + this->__isset.hint_message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->appid); - xfer += oprot->writeFieldEnd(); +uint32_t configuration_modify_backup_policy_response::write( + ::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_modify_backup_policy_response"); - xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->dupid); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - if (this->__isset.hint) { - xfer += oprot->writeFieldBegin("hint", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->hint); + xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->hint_message); xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(duplication_add_response &a, duplication_add_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.appid, b.appid); - swap(a.dupid, b.dupid); - swap(a.hint, b.hint); - swap(a.__isset, b.__isset); +void swap(configuration_modify_backup_policy_response &a, + configuration_modify_backup_policy_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.hint_message, b.hint_message); + swap(a.__isset, b.__isset); } -duplication_add_response::duplication_add_response(const duplication_add_response& other502) { - err = other502.err; - appid = other502.appid; - dupid = other502.dupid; - hint = other502.hint; - __isset = other502.__isset; +configuration_modify_backup_policy_response::configuration_modify_backup_policy_response( + const configuration_modify_backup_policy_response &other373) +{ + err = other373.err; + hint_message = other373.hint_message; + __isset = other373.__isset; } -duplication_add_response::duplication_add_response( duplication_add_response&& other503) { - err = std::move(other503.err); - appid = std::move(other503.appid); - dupid = std::move(other503.dupid); - hint = std::move(other503.hint); - __isset = std::move(other503.__isset); +configuration_modify_backup_policy_response::configuration_modify_backup_policy_response( + configuration_modify_backup_policy_response &&other374) +{ + err = std::move(other374.err); + hint_message = std::move(other374.hint_message); + __isset = std::move(other374.__isset); } -duplication_add_response& duplication_add_response::operator=(const duplication_add_response& other504) { - err = other504.err; - appid = other504.appid; - dupid = other504.dupid; - hint = other504.hint; - __isset = other504.__isset; - return *this; +configuration_modify_backup_policy_response &configuration_modify_backup_policy_response:: +operator=(const configuration_modify_backup_policy_response &other375) +{ + err = other375.err; + hint_message = other375.hint_message; + __isset = other375.__isset; + return *this; } -duplication_add_response& duplication_add_response::operator=(duplication_add_response&& other505) { - err = std::move(other505.err); - appid = std::move(other505.appid); - dupid = std::move(other505.dupid); - hint = std::move(other505.hint); - __isset = std::move(other505.__isset); - return *this; +configuration_modify_backup_policy_response &configuration_modify_backup_policy_response:: +operator=(configuration_modify_backup_policy_response &&other376) +{ + err = std::move(other376.err); + hint_message = std::move(other376.hint_message); + __isset = std::move(other376.__isset); + return *this; } -void duplication_add_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "duplication_add_response("; - out << "err=" << to_string(err); - out << ", " << "appid=" << to_string(appid); - out << ", " << "dupid=" << to_string(dupid); - out << ", " << "hint="; (__isset.hint ? (out << to_string(hint)) : (out << "")); - out << ")"; +void configuration_modify_backup_policy_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_modify_backup_policy_response("; + out << "err=" << to_string(err); + out << ", " + << "hint_message=" << to_string(hint_message); + out << ")"; } +configuration_add_backup_policy_request::~configuration_add_backup_policy_request() throw() {} -duplication_modify_request::~duplication_modify_request() throw() { +void configuration_add_backup_policy_request::__set_backup_provider_type(const std::string &val) +{ + this->backup_provider_type = val; } - -void duplication_modify_request::__set_app_name(const std::string& val) { - this->app_name = val; +void configuration_add_backup_policy_request::__set_policy_name(const std::string &val) +{ + this->policy_name = val; } -void duplication_modify_request::__set_dupid(const int32_t val) { - this->dupid = val; +void configuration_add_backup_policy_request::__set_app_ids(const std::vector &val) +{ + this->app_ids = val; } -void duplication_modify_request::__set_status(const duplication_status::type val) { - this->status = val; -__isset.status = true; +void configuration_add_backup_policy_request::__set_backup_interval_seconds(const int64_t val) +{ + this->backup_interval_seconds = val; } -void duplication_modify_request::__set_fail_mode(const duplication_fail_mode::type val) { - this->fail_mode = val; -__isset.fail_mode = true; +void configuration_add_backup_policy_request::__set_backup_history_count_to_keep(const int32_t val) +{ + this->backup_history_count_to_keep = val; } -uint32_t duplication_modify_request::read(::apache::thrift::protocol::TProtocol* iprot) { +void configuration_add_backup_policy_request::__set_start_time(const std::string &val) +{ + this->start_time = val; +} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t configuration_add_backup_policy_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->dupid); - this->__isset.dupid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast506; - xfer += iprot->readI32(ecast506); - this->status = (duplication_status::type)ecast506; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast507; - xfer += iprot->readI32(ecast507); - this->fail_mode = (duplication_fail_mode::type)ecast507; - this->__isset.fail_mode = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->backup_provider_type); + this->__isset.backup_provider_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->app_ids.clear(); + uint32_t _size377; + ::apache::thrift::protocol::TType _etype380; + xfer += iprot->readListBegin(_etype380, _size377); + this->app_ids.resize(_size377); + uint32_t _i381; + for (_i381 = 0; _i381 < _size377; ++_i381) { + xfer += iprot->readI32(this->app_ids[_i381]); + } + xfer += iprot->readListEnd(); + } + this->__isset.app_ids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->backup_interval_seconds); + this->__isset.backup_interval_seconds = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->backup_history_count_to_keep); + this->__isset.backup_history_count_to_keep = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->start_time); + this->__isset.start_time = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t duplication_modify_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_modify_request"); - - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); +uint32_t +configuration_add_backup_policy_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_add_backup_policy_request"); - xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->dupid); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.status) { - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.fail_mode) { - xfer += oprot->writeFieldBegin("fail_mode", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32((int32_t)this->fail_mode); + xfer += oprot->writeFieldBegin("backup_provider_type", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->backup_provider_type); xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(duplication_modify_request &a, duplication_modify_request &b) { - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.dupid, b.dupid); - swap(a.status, b.status); - swap(a.fail_mode, b.fail_mode); - swap(a.__isset, b.__isset); -} - -duplication_modify_request::duplication_modify_request(const duplication_modify_request& other508) { - app_name = other508.app_name; - dupid = other508.dupid; - status = other508.status; - fail_mode = other508.fail_mode; - __isset = other508.__isset; -} -duplication_modify_request::duplication_modify_request( duplication_modify_request&& other509) { - app_name = std::move(other509.app_name); - dupid = std::move(other509.dupid); - status = std::move(other509.status); - fail_mode = std::move(other509.fail_mode); - __isset = std::move(other509.__isset); -} -duplication_modify_request& duplication_modify_request::operator=(const duplication_modify_request& other510) { - app_name = other510.app_name; - dupid = other510.dupid; - status = other510.status; - fail_mode = other510.fail_mode; - __isset = other510.__isset; - return *this; -} -duplication_modify_request& duplication_modify_request::operator=(duplication_modify_request&& other511) { - app_name = std::move(other511.app_name); - dupid = std::move(other511.dupid); - status = std::move(other511.status); - fail_mode = std::move(other511.fail_mode); - __isset = std::move(other511.__isset); - return *this; -} -void duplication_modify_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "duplication_modify_request("; - out << "app_name=" << to_string(app_name); - out << ", " << "dupid=" << to_string(dupid); - out << ", " << "status="; (__isset.status ? (out << to_string(status)) : (out << "")); - out << ", " << "fail_mode="; (__isset.fail_mode ? (out << to_string(fail_mode)) : (out << "")); - out << ")"; -} - -duplication_modify_response::~duplication_modify_response() throw() { -} - - -void duplication_modify_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} - -void duplication_modify_response::__set_appid(const int32_t val) { - this->appid = val; -} - -uint32_t duplication_modify_response::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("app_ids", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, + static_cast(this->app_ids.size())); + std::vector::const_iterator _iter382; + for (_iter382 = this->app_ids.begin(); _iter382 != this->app_ids.end(); ++_iter382) { + xfer += oprot->writeI32((*_iter382)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("backup_interval_seconds", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->backup_interval_seconds); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin( + "backup_history_count_to_keep", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->backup_history_count_to_keep); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("start_time", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->start_time); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->appid); - this->__isset.appid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_add_backup_policy_request &a, configuration_add_backup_policy_request &b) +{ + using ::std::swap; + swap(a.backup_provider_type, b.backup_provider_type); + swap(a.policy_name, b.policy_name); + swap(a.app_ids, b.app_ids); + swap(a.backup_interval_seconds, b.backup_interval_seconds); + swap(a.backup_history_count_to_keep, b.backup_history_count_to_keep); + swap(a.start_time, b.start_time); + swap(a.__isset, b.__isset); +} + +configuration_add_backup_policy_request::configuration_add_backup_policy_request( + const configuration_add_backup_policy_request &other383) +{ + backup_provider_type = other383.backup_provider_type; + policy_name = other383.policy_name; + app_ids = other383.app_ids; + backup_interval_seconds = other383.backup_interval_seconds; + backup_history_count_to_keep = other383.backup_history_count_to_keep; + start_time = other383.start_time; + __isset = other383.__isset; +} +configuration_add_backup_policy_request::configuration_add_backup_policy_request( + configuration_add_backup_policy_request &&other384) +{ + backup_provider_type = std::move(other384.backup_provider_type); + policy_name = std::move(other384.policy_name); + app_ids = std::move(other384.app_ids); + backup_interval_seconds = std::move(other384.backup_interval_seconds); + backup_history_count_to_keep = std::move(other384.backup_history_count_to_keep); + start_time = std::move(other384.start_time); + __isset = std::move(other384.__isset); +} +configuration_add_backup_policy_request &configuration_add_backup_policy_request:: +operator=(const configuration_add_backup_policy_request &other385) +{ + backup_provider_type = other385.backup_provider_type; + policy_name = other385.policy_name; + app_ids = other385.app_ids; + backup_interval_seconds = other385.backup_interval_seconds; + backup_history_count_to_keep = other385.backup_history_count_to_keep; + start_time = other385.start_time; + __isset = other385.__isset; + return *this; +} +configuration_add_backup_policy_request &configuration_add_backup_policy_request:: +operator=(configuration_add_backup_policy_request &&other386) +{ + backup_provider_type = std::move(other386.backup_provider_type); + policy_name = std::move(other386.policy_name); + app_ids = std::move(other386.app_ids); + backup_interval_seconds = std::move(other386.backup_interval_seconds); + backup_history_count_to_keep = std::move(other386.backup_history_count_to_keep); + start_time = std::move(other386.start_time); + __isset = std::move(other386.__isset); + return *this; +} +void configuration_add_backup_policy_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_add_backup_policy_request("; + out << "backup_provider_type=" << to_string(backup_provider_type); + out << ", " + << "policy_name=" << to_string(policy_name); + out << ", " + << "app_ids=" << to_string(app_ids); + out << ", " + << "backup_interval_seconds=" << to_string(backup_interval_seconds); + out << ", " + << "backup_history_count_to_keep=" << to_string(backup_history_count_to_keep); + out << ", " + << "start_time=" << to_string(start_time); + out << ")"; +} + +configuration_add_backup_policy_response::~configuration_add_backup_policy_response() throw() {} + +void configuration_add_backup_policy_response::__set_err(const ::dsn::error_code &val) +{ + this->err = val; +} + +void configuration_add_backup_policy_response::__set_hint_message(const std::string &val) +{ + this->hint_message = val; +} + +uint32_t +configuration_add_backup_policy_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint_message); + this->__isset.hint_message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t duplication_modify_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_modify_response"); +uint32_t +configuration_add_backup_policy_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_add_backup_policy_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->appid); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->hint_message); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(duplication_modify_response &a, duplication_modify_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.appid, b.appid); - swap(a.__isset, b.__isset); +void swap(configuration_add_backup_policy_response &a, configuration_add_backup_policy_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.hint_message, b.hint_message); + swap(a.__isset, b.__isset); } -duplication_modify_response::duplication_modify_response(const duplication_modify_response& other512) { - err = other512.err; - appid = other512.appid; - __isset = other512.__isset; +configuration_add_backup_policy_response::configuration_add_backup_policy_response( + const configuration_add_backup_policy_response &other387) +{ + err = other387.err; + hint_message = other387.hint_message; + __isset = other387.__isset; } -duplication_modify_response::duplication_modify_response( duplication_modify_response&& other513) { - err = std::move(other513.err); - appid = std::move(other513.appid); - __isset = std::move(other513.__isset); +configuration_add_backup_policy_response::configuration_add_backup_policy_response( + configuration_add_backup_policy_response &&other388) +{ + err = std::move(other388.err); + hint_message = std::move(other388.hint_message); + __isset = std::move(other388.__isset); } -duplication_modify_response& duplication_modify_response::operator=(const duplication_modify_response& other514) { - err = other514.err; - appid = other514.appid; - __isset = other514.__isset; - return *this; +configuration_add_backup_policy_response &configuration_add_backup_policy_response:: +operator=(const configuration_add_backup_policy_response &other389) +{ + err = other389.err; + hint_message = other389.hint_message; + __isset = other389.__isset; + return *this; } -duplication_modify_response& duplication_modify_response::operator=(duplication_modify_response&& other515) { - err = std::move(other515.err); - appid = std::move(other515.appid); - __isset = std::move(other515.__isset); - return *this; +configuration_add_backup_policy_response &configuration_add_backup_policy_response:: +operator=(configuration_add_backup_policy_response &&other390) +{ + err = std::move(other390.err); + hint_message = std::move(other390.hint_message); + __isset = std::move(other390.__isset); + return *this; } -void duplication_modify_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "duplication_modify_response("; - out << "err=" << to_string(err); - out << ", " << "appid=" << to_string(appid); - out << ")"; -} - - -duplication_entry::~duplication_entry() throw() { +void configuration_add_backup_policy_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_add_backup_policy_response("; + out << "err=" << to_string(err); + out << ", " + << "hint_message=" << to_string(hint_message); + out << ")"; } +policy_entry::~policy_entry() throw() {} -void duplication_entry::__set_dupid(const int32_t val) { - this->dupid = val; -} +void policy_entry::__set_policy_name(const std::string &val) { this->policy_name = val; } -void duplication_entry::__set_status(const duplication_status::type val) { - this->status = val; +void policy_entry::__set_backup_provider_type(const std::string &val) +{ + this->backup_provider_type = val; } -void duplication_entry::__set_remote(const std::string& val) { - this->remote = val; +void policy_entry::__set_backup_interval_seconds(const std::string &val) +{ + this->backup_interval_seconds = val; } -void duplication_entry::__set_create_ts(const int64_t val) { - this->create_ts = val; -} +void policy_entry::__set_app_ids(const std::set &val) { this->app_ids = val; } -void duplication_entry::__set_progress(const std::map & val) { - this->progress = val; -__isset.progress = true; +void policy_entry::__set_backup_history_count_to_keep(const int32_t val) +{ + this->backup_history_count_to_keep = val; } -void duplication_entry::__set_fail_mode(const duplication_fail_mode::type val) { - this->fail_mode = val; -__isset.fail_mode = true; -} +void policy_entry::__set_start_time(const std::string &val) { this->start_time = val; } -uint32_t duplication_entry::read(::apache::thrift::protocol::TProtocol* iprot) { +void policy_entry::__set_is_disable(const bool val) { this->is_disable = val; } - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t policy_entry::read(::apache::thrift::protocol::TProtocol *iprot) +{ - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->dupid); - this->__isset.dupid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast516; - xfer += iprot->readI32(ecast516); - this->status = (duplication_status::type)ecast516; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->remote); - this->__isset.remote = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->create_ts); - this->__isset.create_ts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->progress.clear(); - uint32_t _size517; - ::apache::thrift::protocol::TType _ktype518; - ::apache::thrift::protocol::TType _vtype519; - xfer += iprot->readMapBegin(_ktype518, _vtype519, _size517); - uint32_t _i521; - for (_i521 = 0; _i521 < _size517; ++_i521) - { - int32_t _key522; - xfer += iprot->readI32(_key522); - int64_t& _val523 = this->progress[_key522]; - xfer += iprot->readI64(_val523); - } - xfer += iprot->readMapEnd(); - } - this->__isset.progress = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast524; - xfer += iprot->readI32(ecast524); - this->fail_mode = (duplication_fail_mode::type)ecast524; - this->__isset.fail_mode = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->policy_name); + this->__isset.policy_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->backup_provider_type); + this->__isset.backup_provider_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->backup_interval_seconds); + this->__isset.backup_interval_seconds = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_SET) { + { + this->app_ids.clear(); + uint32_t _size391; + ::apache::thrift::protocol::TType _etype394; + xfer += iprot->readSetBegin(_etype394, _size391); + uint32_t _i395; + for (_i395 = 0; _i395 < _size391; ++_i395) { + int32_t _elem396; + xfer += iprot->readI32(_elem396); + this->app_ids.insert(_elem396); + } + xfer += iprot->readSetEnd(); + } + this->__isset.app_ids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->backup_history_count_to_keep); + this->__isset.backup_history_count_to_keep = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->start_time); + this->__isset.start_time = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_disable); + this->__isset.is_disable = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t duplication_entry::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_entry"); - - xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->dupid); - xfer += oprot->writeFieldEnd(); +uint32_t policy_entry::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("policy_entry"); - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("policy_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->policy_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("remote", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->remote); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("backup_provider_type", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->backup_provider_type); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("create_ts", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->create_ts); - xfer += oprot->writeFieldEnd(); + xfer += + oprot->writeFieldBegin("backup_interval_seconds", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->backup_interval_seconds); + xfer += oprot->writeFieldEnd(); - if (this->__isset.progress) { - xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_MAP, 5); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_I64, static_cast(this->progress.size())); - std::map ::const_iterator _iter525; - for (_iter525 = this->progress.begin(); _iter525 != this->progress.end(); ++_iter525) - { - xfer += oprot->writeI32(_iter525->first); - xfer += oprot->writeI64(_iter525->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.fail_mode) { - xfer += oprot->writeFieldBegin("fail_mode", ::apache::thrift::protocol::T_I32, 7); - xfer += oprot->writeI32((int32_t)this->fail_mode); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(duplication_entry &a, duplication_entry &b) { - using ::std::swap; - swap(a.dupid, b.dupid); - swap(a.status, b.status); - swap(a.remote, b.remote); - swap(a.create_ts, b.create_ts); - swap(a.progress, b.progress); - swap(a.fail_mode, b.fail_mode); - swap(a.__isset, b.__isset); -} - -duplication_entry::duplication_entry(const duplication_entry& other526) { - dupid = other526.dupid; - status = other526.status; - remote = other526.remote; - create_ts = other526.create_ts; - progress = other526.progress; - fail_mode = other526.fail_mode; - __isset = other526.__isset; -} -duplication_entry::duplication_entry( duplication_entry&& other527) { - dupid = std::move(other527.dupid); - status = std::move(other527.status); - remote = std::move(other527.remote); - create_ts = std::move(other527.create_ts); - progress = std::move(other527.progress); - fail_mode = std::move(other527.fail_mode); - __isset = std::move(other527.__isset); -} -duplication_entry& duplication_entry::operator=(const duplication_entry& other528) { - dupid = other528.dupid; - status = other528.status; - remote = other528.remote; - create_ts = other528.create_ts; - progress = other528.progress; - fail_mode = other528.fail_mode; - __isset = other528.__isset; - return *this; -} -duplication_entry& duplication_entry::operator=(duplication_entry&& other529) { - dupid = std::move(other529.dupid); - status = std::move(other529.status); - remote = std::move(other529.remote); - create_ts = std::move(other529.create_ts); - progress = std::move(other529.progress); - fail_mode = std::move(other529.fail_mode); - __isset = std::move(other529.__isset); - return *this; -} -void duplication_entry::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "duplication_entry("; - out << "dupid=" << to_string(dupid); - out << ", " << "status=" << to_string(status); - out << ", " << "remote=" << to_string(remote); - out << ", " << "create_ts=" << to_string(create_ts); - out << ", " << "progress="; (__isset.progress ? (out << to_string(progress)) : (out << "")); - out << ", " << "fail_mode="; (__isset.fail_mode ? (out << to_string(fail_mode)) : (out << "")); - out << ")"; -} - - -duplication_query_request::~duplication_query_request() throw() { -} - - -void duplication_query_request::__set_app_name(const std::string& val) { - this->app_name = val; -} - -uint32_t duplication_query_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) + xfer += oprot->writeFieldBegin("app_ids", ::apache::thrift::protocol::T_SET, 4); { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I32, + static_cast(this->app_ids.size())); + std::set::const_iterator _iter397; + for (_iter397 = this->app_ids.begin(); _iter397 != this->app_ids.end(); ++_iter397) { + xfer += oprot->writeI32((*_iter397)); + } + xfer += oprot->writeSetEnd(); } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin( + "backup_history_count_to_keep", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->backup_history_count_to_keep); + xfer += oprot->writeFieldEnd(); -uint32_t duplication_query_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_query_request"); + xfer += oprot->writeFieldBegin("start_time", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->start_time); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_disable", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->is_disable); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(policy_entry &a, policy_entry &b) +{ + using ::std::swap; + swap(a.policy_name, b.policy_name); + swap(a.backup_provider_type, b.backup_provider_type); + swap(a.backup_interval_seconds, b.backup_interval_seconds); + swap(a.app_ids, b.app_ids); + swap(a.backup_history_count_to_keep, b.backup_history_count_to_keep); + swap(a.start_time, b.start_time); + swap(a.is_disable, b.is_disable); + swap(a.__isset, b.__isset); +} + +policy_entry::policy_entry(const policy_entry &other398) +{ + policy_name = other398.policy_name; + backup_provider_type = other398.backup_provider_type; + backup_interval_seconds = other398.backup_interval_seconds; + app_ids = other398.app_ids; + backup_history_count_to_keep = other398.backup_history_count_to_keep; + start_time = other398.start_time; + is_disable = other398.is_disable; + __isset = other398.__isset; +} +policy_entry::policy_entry(policy_entry &&other399) +{ + policy_name = std::move(other399.policy_name); + backup_provider_type = std::move(other399.backup_provider_type); + backup_interval_seconds = std::move(other399.backup_interval_seconds); + app_ids = std::move(other399.app_ids); + backup_history_count_to_keep = std::move(other399.backup_history_count_to_keep); + start_time = std::move(other399.start_time); + is_disable = std::move(other399.is_disable); + __isset = std::move(other399.__isset); +} +policy_entry &policy_entry::operator=(const policy_entry &other400) +{ + policy_name = other400.policy_name; + backup_provider_type = other400.backup_provider_type; + backup_interval_seconds = other400.backup_interval_seconds; + app_ids = other400.app_ids; + backup_history_count_to_keep = other400.backup_history_count_to_keep; + start_time = other400.start_time; + is_disable = other400.is_disable; + __isset = other400.__isset; + return *this; +} +policy_entry &policy_entry::operator=(policy_entry &&other401) +{ + policy_name = std::move(other401.policy_name); + backup_provider_type = std::move(other401.backup_provider_type); + backup_interval_seconds = std::move(other401.backup_interval_seconds); + app_ids = std::move(other401.app_ids); + backup_history_count_to_keep = std::move(other401.backup_history_count_to_keep); + start_time = std::move(other401.start_time); + is_disable = std::move(other401.is_disable); + __isset = std::move(other401.__isset); + return *this; +} +void policy_entry::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "policy_entry("; + out << "policy_name=" << to_string(policy_name); + out << ", " + << "backup_provider_type=" << to_string(backup_provider_type); + out << ", " + << "backup_interval_seconds=" << to_string(backup_interval_seconds); + out << ", " + << "app_ids=" << to_string(app_ids); + out << ", " + << "backup_history_count_to_keep=" << to_string(backup_history_count_to_keep); + out << ", " + << "start_time=" << to_string(start_time); + out << ", " + << "is_disable=" << to_string(is_disable); + out << ")"; +} + +backup_entry::~backup_entry() throw() {} + +void backup_entry::__set_backup_id(const int64_t val) { this->backup_id = val; } + +void backup_entry::__set_start_time_ms(const int64_t val) { this->start_time_ms = val; } + +void backup_entry::__set_end_time_ms(const int64_t val) { this->end_time_ms = val; } + +void backup_entry::__set_app_ids(const std::set &val) { this->app_ids = val; } + +uint32_t backup_entry::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->backup_id); + this->__isset.backup_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->start_time_ms); + this->__isset.start_time_ms = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->end_time_ms); + this->__isset.end_time_ms = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_SET) { + { + this->app_ids.clear(); + uint32_t _size402; + ::apache::thrift::protocol::TType _etype405; + xfer += iprot->readSetBegin(_etype405, _size402); + uint32_t _i406; + for (_i406 = 0; _i406 < _size402; ++_i406) { + int32_t _elem407; + xfer += iprot->readI32(_elem407); + this->app_ids.insert(_elem407); + } + xfer += iprot->readSetEnd(); + } + this->__isset.app_ids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -void swap(duplication_query_request &a, duplication_query_request &b) { - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.__isset, b.__isset); -} + xfer += iprot->readStructEnd(); -duplication_query_request::duplication_query_request(const duplication_query_request& other530) { - app_name = other530.app_name; - __isset = other530.__isset; -} -duplication_query_request::duplication_query_request( duplication_query_request&& other531) { - app_name = std::move(other531.app_name); - __isset = std::move(other531.__isset); -} -duplication_query_request& duplication_query_request::operator=(const duplication_query_request& other532) { - app_name = other532.app_name; - __isset = other532.__isset; - return *this; -} -duplication_query_request& duplication_query_request::operator=(duplication_query_request&& other533) { - app_name = std::move(other533.app_name); - __isset = std::move(other533.__isset); - return *this; -} -void duplication_query_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "duplication_query_request("; - out << "app_name=" << to_string(app_name); - out << ")"; + return xfer; } +uint32_t backup_entry::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("backup_entry"); -duplication_query_response::~duplication_query_response() throw() { -} + xfer += oprot->writeFieldBegin("backup_id", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->backup_id); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("start_time_ms", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->start_time_ms); + xfer += oprot->writeFieldEnd(); -void duplication_query_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} + xfer += oprot->writeFieldBegin("end_time_ms", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->end_time_ms); + xfer += oprot->writeFieldEnd(); -void duplication_query_response::__set_appid(const int32_t val) { - this->appid = val; -} + xfer += oprot->writeFieldBegin("app_ids", ::apache::thrift::protocol::T_SET, 4); + { + xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I32, + static_cast(this->app_ids.size())); + std::set::const_iterator _iter408; + for (_iter408 = this->app_ids.begin(); _iter408 != this->app_ids.end(); ++_iter408) { + xfer += oprot->writeI32((*_iter408)); + } + xfer += oprot->writeSetEnd(); + } + xfer += oprot->writeFieldEnd(); -void duplication_query_response::__set_entry_list(const std::vector & val) { - this->entry_list = val; -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(backup_entry &a, backup_entry &b) +{ + using ::std::swap; + swap(a.backup_id, b.backup_id); + swap(a.start_time_ms, b.start_time_ms); + swap(a.end_time_ms, b.end_time_ms); + swap(a.app_ids, b.app_ids); + swap(a.__isset, b.__isset); +} + +backup_entry::backup_entry(const backup_entry &other409) +{ + backup_id = other409.backup_id; + start_time_ms = other409.start_time_ms; + end_time_ms = other409.end_time_ms; + app_ids = other409.app_ids; + __isset = other409.__isset; +} +backup_entry::backup_entry(backup_entry &&other410) +{ + backup_id = std::move(other410.backup_id); + start_time_ms = std::move(other410.start_time_ms); + end_time_ms = std::move(other410.end_time_ms); + app_ids = std::move(other410.app_ids); + __isset = std::move(other410.__isset); +} +backup_entry &backup_entry::operator=(const backup_entry &other411) +{ + backup_id = other411.backup_id; + start_time_ms = other411.start_time_ms; + end_time_ms = other411.end_time_ms; + app_ids = other411.app_ids; + __isset = other411.__isset; + return *this; +} +backup_entry &backup_entry::operator=(backup_entry &&other412) +{ + backup_id = std::move(other412.backup_id); + start_time_ms = std::move(other412.start_time_ms); + end_time_ms = std::move(other412.end_time_ms); + app_ids = std::move(other412.app_ids); + __isset = std::move(other412.__isset); + return *this; +} +void backup_entry::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "backup_entry("; + out << "backup_id=" << to_string(backup_id); + out << ", " + << "start_time_ms=" << to_string(start_time_ms); + out << ", " + << "end_time_ms=" << to_string(end_time_ms); + out << ", " + << "app_ids=" << to_string(app_ids); + out << ")"; +} + +configuration_query_backup_policy_request::~configuration_query_backup_policy_request() throw() {} + +void configuration_query_backup_policy_request::__set_policy_names( + const std::vector &val) +{ + this->policy_names = val; +} + +void configuration_query_backup_policy_request::__set_backup_info_count(const int32_t val) +{ + this->backup_info_count = val; +} + +uint32_t +configuration_query_backup_policy_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->policy_names.clear(); + uint32_t _size413; + ::apache::thrift::protocol::TType _etype416; + xfer += iprot->readListBegin(_etype416, _size413); + this->policy_names.resize(_size413); + uint32_t _i417; + for (_i417 = 0; _i417 < _size413; ++_i417) { + xfer += iprot->readString(this->policy_names[_i417]); + } + xfer += iprot->readListEnd(); + } + this->__isset.policy_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->backup_info_count); + this->__isset.backup_info_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -uint32_t duplication_query_response::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += iprot->readStructEnd(); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + return xfer; +} - xfer += iprot->readStructBegin(fname); +uint32_t +configuration_query_backup_policy_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_backup_policy_request"); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("policy_names", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, + static_cast(this->policy_names.size())); + std::vector::const_iterator _iter418; + for (_iter418 = this->policy_names.begin(); _iter418 != this->policy_names.end(); + ++_iter418) { + xfer += oprot->writeString((*_iter418)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("backup_info_count", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->backup_info_count); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->appid); - this->__isset.appid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->entry_list.clear(); - uint32_t _size534; - ::apache::thrift::protocol::TType _etype537; - xfer += iprot->readListBegin(_etype537, _size534); - this->entry_list.resize(_size534); - uint32_t _i538; - for (_i538 = 0; _i538 < _size534; ++_i538) - { - xfer += this->entry_list[_i538].read(iprot); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_query_backup_policy_request &a, + configuration_query_backup_policy_request &b) +{ + using ::std::swap; + swap(a.policy_names, b.policy_names); + swap(a.backup_info_count, b.backup_info_count); + swap(a.__isset, b.__isset); +} + +configuration_query_backup_policy_request::configuration_query_backup_policy_request( + const configuration_query_backup_policy_request &other419) +{ + policy_names = other419.policy_names; + backup_info_count = other419.backup_info_count; + __isset = other419.__isset; +} +configuration_query_backup_policy_request::configuration_query_backup_policy_request( + configuration_query_backup_policy_request &&other420) +{ + policy_names = std::move(other420.policy_names); + backup_info_count = std::move(other420.backup_info_count); + __isset = std::move(other420.__isset); +} +configuration_query_backup_policy_request &configuration_query_backup_policy_request:: +operator=(const configuration_query_backup_policy_request &other421) +{ + policy_names = other421.policy_names; + backup_info_count = other421.backup_info_count; + __isset = other421.__isset; + return *this; +} +configuration_query_backup_policy_request &configuration_query_backup_policy_request:: +operator=(configuration_query_backup_policy_request &&other422) +{ + policy_names = std::move(other422.policy_names); + backup_info_count = std::move(other422.backup_info_count); + __isset = std::move(other422.__isset); + return *this; +} +void configuration_query_backup_policy_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_query_backup_policy_request("; + out << "policy_names=" << to_string(policy_names); + out << ", " + << "backup_info_count=" << to_string(backup_info_count); + out << ")"; +} + +configuration_query_backup_policy_response::~configuration_query_backup_policy_response() throw() {} + +void configuration_query_backup_policy_response::__set_err(const ::dsn::error_code &val) +{ + this->err = val; +} + +void configuration_query_backup_policy_response::__set_policys(const std::vector &val) +{ + this->policys = val; +} + +void configuration_query_backup_policy_response::__set_backup_infos( + const std::vector> &val) +{ + this->backup_infos = val; +} + +void configuration_query_backup_policy_response::__set_hint_msg(const std::string &val) +{ + this->hint_msg = val; + __isset.hint_msg = true; +} + +uint32_t +configuration_query_backup_policy_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readListEnd(); - } - this->__isset.entry_list = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->policys.clear(); + uint32_t _size423; + ::apache::thrift::protocol::TType _etype426; + xfer += iprot->readListBegin(_etype426, _size423); + this->policys.resize(_size423); + uint32_t _i427; + for (_i427 = 0; _i427 < _size423; ++_i427) { + xfer += this->policys[_i427].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.policys = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->backup_infos.clear(); + uint32_t _size428; + ::apache::thrift::protocol::TType _etype431; + xfer += iprot->readListBegin(_etype431, _size428); + this->backup_infos.resize(_size428); + uint32_t _i432; + for (_i432 = 0; _i432 < _size428; ++_i432) { + { + this->backup_infos[_i432].clear(); + uint32_t _size433; + ::apache::thrift::protocol::TType _etype436; + xfer += iprot->readListBegin(_etype436, _size433); + this->backup_infos[_i432].resize(_size433); + uint32_t _i437; + for (_i437 = 0; _i437 < _size433; ++_i437) { + xfer += this->backup_infos[_i432][_i437].read(iprot); + } + xfer += iprot->readListEnd(); + } + } + xfer += iprot->readListEnd(); + } + this->__isset.backup_infos = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint_msg); + this->__isset.hint_msg = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t duplication_query_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_query_response"); +uint32_t configuration_query_backup_policy_response::write( + ::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_backup_policy_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->appid); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("policys", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->policys.size())); + std::vector::const_iterator _iter438; + for (_iter438 = this->policys.begin(); _iter438 != this->policys.end(); ++_iter438) { + xfer += (*_iter438).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("entry_list", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->entry_list.size())); - std::vector ::const_iterator _iter539; - for (_iter539 = this->entry_list.begin(); _iter539 != this->entry_list.end(); ++_iter539) + xfer += oprot->writeFieldBegin("backup_infos", ::apache::thrift::protocol::T_LIST, 3); { - xfer += (*_iter539).write(oprot); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, + static_cast(this->backup_infos.size())); + std::vector>::const_iterator _iter439; + for (_iter439 = this->backup_infos.begin(); _iter439 != this->backup_infos.end(); + ++_iter439) { + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast((*_iter439).size())); + std::vector::const_iterator _iter440; + for (_iter440 = (*_iter439).begin(); _iter440 != (*_iter439).end(); ++_iter440) { + xfer += (*_iter440).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeListEnd(); } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + if (this->__isset.hint_msg) { + xfer += oprot->writeFieldBegin("hint_msg", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->hint_msg); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_query_backup_policy_response &a, + configuration_query_backup_policy_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.policys, b.policys); + swap(a.backup_infos, b.backup_infos); + swap(a.hint_msg, b.hint_msg); + swap(a.__isset, b.__isset); +} + +configuration_query_backup_policy_response::configuration_query_backup_policy_response( + const configuration_query_backup_policy_response &other441) +{ + err = other441.err; + policys = other441.policys; + backup_infos = other441.backup_infos; + hint_msg = other441.hint_msg; + __isset = other441.__isset; +} +configuration_query_backup_policy_response::configuration_query_backup_policy_response( + configuration_query_backup_policy_response &&other442) +{ + err = std::move(other442.err); + policys = std::move(other442.policys); + backup_infos = std::move(other442.backup_infos); + hint_msg = std::move(other442.hint_msg); + __isset = std::move(other442.__isset); +} +configuration_query_backup_policy_response &configuration_query_backup_policy_response:: +operator=(const configuration_query_backup_policy_response &other443) +{ + err = other443.err; + policys = other443.policys; + backup_infos = other443.backup_infos; + hint_msg = other443.hint_msg; + __isset = other443.__isset; + return *this; +} +configuration_query_backup_policy_response &configuration_query_backup_policy_response:: +operator=(configuration_query_backup_policy_response &&other444) +{ + err = std::move(other444.err); + policys = std::move(other444.policys); + backup_infos = std::move(other444.backup_infos); + hint_msg = std::move(other444.hint_msg); + __isset = std::move(other444.__isset); + return *this; +} +void configuration_query_backup_policy_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_query_backup_policy_response("; + out << "err=" << to_string(err); + out << ", " + << "policys=" << to_string(policys); + out << ", " + << "backup_infos=" << to_string(backup_infos); + out << ", " + << "hint_msg="; + (__isset.hint_msg ? (out << to_string(hint_msg)) : (out << "")); + out << ")"; +} + +configuration_report_restore_status_request::~configuration_report_restore_status_request() throw() +{ +} + +void configuration_report_restore_status_request::__set_pid(const ::dsn::gpid &val) +{ + this->pid = val; +} + +void configuration_report_restore_status_request::__set_restore_status(const ::dsn::error_code &val) +{ + this->restore_status = val; +} + +void configuration_report_restore_status_request::__set_progress(const int32_t val) +{ + this->progress = val; +} + +void configuration_report_restore_status_request::__set_reason(const std::string &val) +{ + this->reason = val; + __isset.reason = true; +} + +uint32_t +configuration_report_restore_status_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->restore_status.read(iprot); + this->__isset.restore_status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->progress); + this->__isset.progress = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->reason); + this->__isset.reason = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -void swap(duplication_query_response &a, duplication_query_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.appid, b.appid); - swap(a.entry_list, b.entry_list); - swap(a.__isset, b.__isset); -} + xfer += iprot->readStructEnd(); -duplication_query_response::duplication_query_response(const duplication_query_response& other540) { - err = other540.err; - appid = other540.appid; - entry_list = other540.entry_list; - __isset = other540.__isset; -} -duplication_query_response::duplication_query_response( duplication_query_response&& other541) { - err = std::move(other541.err); - appid = std::move(other541.appid); - entry_list = std::move(other541.entry_list); - __isset = std::move(other541.__isset); -} -duplication_query_response& duplication_query_response::operator=(const duplication_query_response& other542) { - err = other542.err; - appid = other542.appid; - entry_list = other542.entry_list; - __isset = other542.__isset; - return *this; -} -duplication_query_response& duplication_query_response::operator=(duplication_query_response&& other543) { - err = std::move(other543.err); - appid = std::move(other543.appid); - entry_list = std::move(other543.entry_list); - __isset = std::move(other543.__isset); - return *this; -} -void duplication_query_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "duplication_query_response("; - out << "err=" << to_string(err); - out << ", " << "appid=" << to_string(appid); - out << ", " << "entry_list=" << to_string(entry_list); - out << ")"; + return xfer; } +uint32_t configuration_report_restore_status_request::write( + ::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_report_restore_status_request"); -duplication_confirm_entry::~duplication_confirm_entry() throw() { -} - + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); -void duplication_confirm_entry::__set_dupid(const int32_t val) { - this->dupid = val; -} + xfer += oprot->writeFieldBegin("restore_status", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->restore_status.write(oprot); + xfer += oprot->writeFieldEnd(); -void duplication_confirm_entry::__set_confirmed_decree(const int64_t val) { - this->confirmed_decree = val; -} + xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->progress); + xfer += oprot->writeFieldEnd(); -uint32_t duplication_confirm_entry::read(::apache::thrift::protocol::TProtocol* iprot) { + if (this->__isset.reason) { + xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->reason); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_report_restore_status_request &a, + configuration_report_restore_status_request &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.restore_status, b.restore_status); + swap(a.progress, b.progress); + swap(a.reason, b.reason); + swap(a.__isset, b.__isset); +} + +configuration_report_restore_status_request::configuration_report_restore_status_request( + const configuration_report_restore_status_request &other445) +{ + pid = other445.pid; + restore_status = other445.restore_status; + progress = other445.progress; + reason = other445.reason; + __isset = other445.__isset; +} +configuration_report_restore_status_request::configuration_report_restore_status_request( + configuration_report_restore_status_request &&other446) +{ + pid = std::move(other446.pid); + restore_status = std::move(other446.restore_status); + progress = std::move(other446.progress); + reason = std::move(other446.reason); + __isset = std::move(other446.__isset); +} +configuration_report_restore_status_request &configuration_report_restore_status_request:: +operator=(const configuration_report_restore_status_request &other447) +{ + pid = other447.pid; + restore_status = other447.restore_status; + progress = other447.progress; + reason = other447.reason; + __isset = other447.__isset; + return *this; +} +configuration_report_restore_status_request &configuration_report_restore_status_request:: +operator=(configuration_report_restore_status_request &&other448) +{ + pid = std::move(other448.pid); + restore_status = std::move(other448.restore_status); + progress = std::move(other448.progress); + reason = std::move(other448.reason); + __isset = std::move(other448.__isset); + return *this; +} +void configuration_report_restore_status_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_report_restore_status_request("; + out << "pid=" << to_string(pid); + out << ", " + << "restore_status=" << to_string(restore_status); + out << ", " + << "progress=" << to_string(progress); + out << ", " + << "reason="; + (__isset.reason ? (out << to_string(reason)) : (out << "")); + out << ")"; +} + +configuration_report_restore_status_response:: + ~configuration_report_restore_status_response() throw() +{ +} + +void configuration_report_restore_status_response::__set_err(const ::dsn::error_code &val) +{ + this->err = val; +} + +uint32_t +configuration_report_restore_status_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += iprot->readStructEnd(); - xfer += iprot->readStructBegin(fname); + return xfer; +} - using ::apache::thrift::protocol::TProtocolException; +uint32_t configuration_report_restore_status_response::write( + ::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_report_restore_status_response"); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->dupid); - this->__isset.dupid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->confirmed_decree); - this->__isset.confirmed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_report_restore_status_response &a, + configuration_report_restore_status_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.__isset, b.__isset); +} + +configuration_report_restore_status_response::configuration_report_restore_status_response( + const configuration_report_restore_status_response &other449) +{ + err = other449.err; + __isset = other449.__isset; +} +configuration_report_restore_status_response::configuration_report_restore_status_response( + configuration_report_restore_status_response &&other450) +{ + err = std::move(other450.err); + __isset = std::move(other450.__isset); +} +configuration_report_restore_status_response &configuration_report_restore_status_response:: +operator=(const configuration_report_restore_status_response &other451) +{ + err = other451.err; + __isset = other451.__isset; + return *this; +} +configuration_report_restore_status_response &configuration_report_restore_status_response:: +operator=(configuration_report_restore_status_response &&other452) +{ + err = std::move(other452.err); + __isset = std::move(other452.__isset); + return *this; +} +void configuration_report_restore_status_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_report_restore_status_response("; + out << "err=" << to_string(err); + out << ")"; +} + +configuration_query_restore_request::~configuration_query_restore_request() throw() {} + +void configuration_query_restore_request::__set_restore_app_id(const int32_t val) +{ + this->restore_app_id = val; +} + +uint32_t configuration_query_restore_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->restore_app_id); + this->__isset.restore_app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t duplication_confirm_entry::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_confirm_entry"); - - xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->dupid); - xfer += oprot->writeFieldEnd(); +uint32_t +configuration_query_restore_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_restore_request"); - xfer += oprot->writeFieldBegin("confirmed_decree", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->confirmed_decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("restore_app_id", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->restore_app_id); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(duplication_confirm_entry &a, duplication_confirm_entry &b) { - using ::std::swap; - swap(a.dupid, b.dupid); - swap(a.confirmed_decree, b.confirmed_decree); - swap(a.__isset, b.__isset); +void swap(configuration_query_restore_request &a, configuration_query_restore_request &b) +{ + using ::std::swap; + swap(a.restore_app_id, b.restore_app_id); + swap(a.__isset, b.__isset); } -duplication_confirm_entry::duplication_confirm_entry(const duplication_confirm_entry& other544) { - dupid = other544.dupid; - confirmed_decree = other544.confirmed_decree; - __isset = other544.__isset; +configuration_query_restore_request::configuration_query_restore_request( + const configuration_query_restore_request &other453) +{ + restore_app_id = other453.restore_app_id; + __isset = other453.__isset; } -duplication_confirm_entry::duplication_confirm_entry( duplication_confirm_entry&& other545) { - dupid = std::move(other545.dupid); - confirmed_decree = std::move(other545.confirmed_decree); - __isset = std::move(other545.__isset); +configuration_query_restore_request::configuration_query_restore_request( + configuration_query_restore_request &&other454) +{ + restore_app_id = std::move(other454.restore_app_id); + __isset = std::move(other454.__isset); } -duplication_confirm_entry& duplication_confirm_entry::operator=(const duplication_confirm_entry& other546) { - dupid = other546.dupid; - confirmed_decree = other546.confirmed_decree; - __isset = other546.__isset; - return *this; +configuration_query_restore_request &configuration_query_restore_request:: +operator=(const configuration_query_restore_request &other455) +{ + restore_app_id = other455.restore_app_id; + __isset = other455.__isset; + return *this; } -duplication_confirm_entry& duplication_confirm_entry::operator=(duplication_confirm_entry&& other547) { - dupid = std::move(other547.dupid); - confirmed_decree = std::move(other547.confirmed_decree); - __isset = std::move(other547.__isset); - return *this; +configuration_query_restore_request &configuration_query_restore_request:: +operator=(configuration_query_restore_request &&other456) +{ + restore_app_id = std::move(other456.restore_app_id); + __isset = std::move(other456.__isset); + return *this; } -void duplication_confirm_entry::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "duplication_confirm_entry("; - out << "dupid=" << to_string(dupid); - out << ", " << "confirmed_decree=" << to_string(confirmed_decree); - out << ")"; +void configuration_query_restore_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_query_restore_request("; + out << "restore_app_id=" << to_string(restore_app_id); + out << ")"; } +configuration_query_restore_response::~configuration_query_restore_response() throw() {} -duplication_sync_request::~duplication_sync_request() throw() { +void configuration_query_restore_response::__set_err(const ::dsn::error_code &val) +{ + this->err = val; } - -void duplication_sync_request::__set_node(const ::dsn::rpc_address& val) { - this->node = val; +void configuration_query_restore_response::__set_restore_status( + const std::vector<::dsn::error_code> &val) +{ + this->restore_status = val; } -void duplication_sync_request::__set_confirm_list(const std::map< ::dsn::gpid, std::vector > & val) { - this->confirm_list = val; +void configuration_query_restore_response::__set_restore_progress(const std::vector &val) +{ + this->restore_progress = val; } -uint32_t duplication_sync_request::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t configuration_query_restore_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - xfer += iprot->readStructBegin(fname); + xfer += iprot->readStructBegin(fname); - using ::apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->confirm_list.clear(); - uint32_t _size548; - ::apache::thrift::protocol::TType _ktype549; - ::apache::thrift::protocol::TType _vtype550; - xfer += iprot->readMapBegin(_ktype549, _vtype550, _size548); - uint32_t _i552; - for (_i552 = 0; _i552 < _size548; ++_i552) - { - ::dsn::gpid _key553; - xfer += _key553.read(iprot); - std::vector & _val554 = this->confirm_list[_key553]; - { - _val554.clear(); - uint32_t _size555; - ::apache::thrift::protocol::TType _etype558; - xfer += iprot->readListBegin(_etype558, _size555); - _val554.resize(_size555); - uint32_t _i559; - for (_i559 = 0; _i559 < _size555; ++_i559) + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->restore_status.clear(); + uint32_t _size457; + ::apache::thrift::protocol::TType _etype460; + xfer += iprot->readListBegin(_etype460, _size457); + this->restore_status.resize(_size457); + uint32_t _i461; + for (_i461 = 0; _i461 < _size457; ++_i461) { + xfer += this->restore_status[_i461].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.restore_status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { { - xfer += _val554[_i559].read(iprot); + this->restore_progress.clear(); + uint32_t _size462; + ::apache::thrift::protocol::TType _etype465; + xfer += iprot->readListBegin(_etype465, _size462); + this->restore_progress.resize(_size462); + uint32_t _i466; + for (_i466 = 0; _i466 < _size462; ++_i466) { + xfer += iprot->readI32(this->restore_progress[_i466]); + } + xfer += iprot->readListEnd(); } - xfer += iprot->readListEnd(); - } + this->__isset.restore_progress = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readMapEnd(); - } - this->__isset.confirm_list = true; - } else { - xfer += iprot->skip(ftype); + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t duplication_sync_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_sync_request"); +uint32_t +configuration_query_restore_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_restore_response"); - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("confirm_list", ::apache::thrift::protocol::T_MAP, 2); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_LIST, static_cast(this->confirm_list.size())); - std::map< ::dsn::gpid, std::vector > ::const_iterator _iter560; - for (_iter560 = this->confirm_list.begin(); _iter560 != this->confirm_list.end(); ++_iter560) + xfer += oprot->writeFieldBegin("restore_status", ::apache::thrift::protocol::T_LIST, 2); { - xfer += _iter560->first.write(oprot); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter560->second.size())); - std::vector ::const_iterator _iter561; - for (_iter561 = _iter560->second.begin(); _iter561 != _iter560->second.end(); ++_iter561) - { - xfer += (*_iter561).write(oprot); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->restore_status.size())); + std::vector<::dsn::error_code>::const_iterator _iter467; + for (_iter467 = this->restore_status.begin(); _iter467 != this->restore_status.end(); + ++_iter467) { + xfer += (*_iter467).write(oprot); } xfer += oprot->writeListEnd(); - } } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(duplication_sync_request &a, duplication_sync_request &b) { - using ::std::swap; - swap(a.node, b.node); - swap(a.confirm_list, b.confirm_list); - swap(a.__isset, b.__isset); -} - -duplication_sync_request::duplication_sync_request(const duplication_sync_request& other562) { - node = other562.node; - confirm_list = other562.confirm_list; - __isset = other562.__isset; -} -duplication_sync_request::duplication_sync_request( duplication_sync_request&& other563) { - node = std::move(other563.node); - confirm_list = std::move(other563.confirm_list); - __isset = std::move(other563.__isset); -} -duplication_sync_request& duplication_sync_request::operator=(const duplication_sync_request& other564) { - node = other564.node; - confirm_list = other564.confirm_list; - __isset = other564.__isset; - return *this; -} -duplication_sync_request& duplication_sync_request::operator=(duplication_sync_request&& other565) { - node = std::move(other565.node); - confirm_list = std::move(other565.confirm_list); - __isset = std::move(other565.__isset); - return *this; -} -void duplication_sync_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "duplication_sync_request("; - out << "node=" << to_string(node); - out << ", " << "confirm_list=" << to_string(confirm_list); - out << ")"; -} - + xfer += oprot->writeFieldEnd(); -duplication_sync_response::~duplication_sync_response() throw() { -} + xfer += oprot->writeFieldBegin("restore_progress", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, + static_cast(this->restore_progress.size())); + std::vector::const_iterator _iter468; + for (_iter468 = this->restore_progress.begin(); _iter468 != this->restore_progress.end(); + ++_iter468) { + xfer += oprot->writeI32((*_iter468)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_query_restore_response &a, configuration_query_restore_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.restore_status, b.restore_status); + swap(a.restore_progress, b.restore_progress); + swap(a.__isset, b.__isset); +} + +configuration_query_restore_response::configuration_query_restore_response( + const configuration_query_restore_response &other469) +{ + err = other469.err; + restore_status = other469.restore_status; + restore_progress = other469.restore_progress; + __isset = other469.__isset; +} +configuration_query_restore_response::configuration_query_restore_response( + configuration_query_restore_response &&other470) +{ + err = std::move(other470.err); + restore_status = std::move(other470.restore_status); + restore_progress = std::move(other470.restore_progress); + __isset = std::move(other470.__isset); +} +configuration_query_restore_response &configuration_query_restore_response:: +operator=(const configuration_query_restore_response &other471) +{ + err = other471.err; + restore_status = other471.restore_status; + restore_progress = other471.restore_progress; + __isset = other471.__isset; + return *this; +} +configuration_query_restore_response &configuration_query_restore_response:: +operator=(configuration_query_restore_response &&other472) +{ + err = std::move(other472.err); + restore_status = std::move(other472.restore_status); + restore_progress = std::move(other472.restore_progress); + __isset = std::move(other472.__isset); + return *this; +} +void configuration_query_restore_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_query_restore_response("; + out << "err=" << to_string(err); + out << ", " + << "restore_status=" << to_string(restore_status); + out << ", " + << "restore_progress=" << to_string(restore_progress); + out << ")"; +} + +file_meta::~file_meta() throw() {} + +void file_meta::__set_name(const std::string &val) { this->name = val; } + +void file_meta::__set_size(const int64_t val) { this->size = val; } + +void file_meta::__set_md5(const std::string &val) { this->md5 = val; } + +uint32_t file_meta::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->size); + this->__isset.size = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->md5); + this->__isset.md5 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -void duplication_sync_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} + xfer += iprot->readStructEnd(); -void duplication_sync_response::__set_dup_map(const std::map > & val) { - this->dup_map = val; + return xfer; } -uint32_t duplication_sync_response::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t file_meta::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("file_meta"); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->name); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("size", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->size); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("md5", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->md5); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->dup_map.clear(); - uint32_t _size566; - ::apache::thrift::protocol::TType _ktype567; - ::apache::thrift::protocol::TType _vtype568; - xfer += iprot->readMapBegin(_ktype567, _vtype568, _size566); - uint32_t _i570; - for (_i570 = 0; _i570 < _size566; ++_i570) - { - int32_t _key571; - xfer += iprot->readI32(_key571); - std::map & _val572 = this->dup_map[_key571]; - { - _val572.clear(); - uint32_t _size573; - ::apache::thrift::protocol::TType _ktype574; - ::apache::thrift::protocol::TType _vtype575; - xfer += iprot->readMapBegin(_ktype574, _vtype575, _size573); - uint32_t _i577; - for (_i577 = 0; _i577 < _size573; ++_i577) +void swap(file_meta &a, file_meta &b) +{ + using ::std::swap; + swap(a.name, b.name); + swap(a.size, b.size); + swap(a.md5, b.md5); + swap(a.__isset, b.__isset); +} + +file_meta::file_meta(const file_meta &other473) +{ + name = other473.name; + size = other473.size; + md5 = other473.md5; + __isset = other473.__isset; +} +file_meta::file_meta(file_meta &&other474) +{ + name = std::move(other474.name); + size = std::move(other474.size); + md5 = std::move(other474.md5); + __isset = std::move(other474.__isset); +} +file_meta &file_meta::operator=(const file_meta &other475) +{ + name = other475.name; + size = other475.size; + md5 = other475.md5; + __isset = other475.__isset; + return *this; +} +file_meta &file_meta::operator=(file_meta &&other476) +{ + name = std::move(other476.name); + size = std::move(other476.size); + md5 = std::move(other476.md5); + __isset = std::move(other476.__isset); + return *this; +} +void file_meta::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "file_meta("; + out << "name=" << to_string(name); + out << ", " + << "size=" << to_string(size); + out << ", " + << "md5=" << to_string(md5); + out << ")"; +} + +configuration_update_app_env_request::~configuration_update_app_env_request() throw() {} + +void configuration_update_app_env_request::__set_app_name(const std::string &val) +{ + this->app_name = val; +} + +void configuration_update_app_env_request::__set_op(const app_env_operation::type val) +{ + this->op = val; +} + +void configuration_update_app_env_request::__set_keys(const std::vector &val) +{ + this->keys = val; + __isset.keys = true; +} + +void configuration_update_app_env_request::__set_values(const std::vector &val) +{ + this->values = val; + __isset.values = true; +} + +void configuration_update_app_env_request::__set_clear_prefix(const std::string &val) +{ + this->clear_prefix = val; + __isset.clear_prefix = true; +} + +uint32_t configuration_update_app_env_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast477; + xfer += iprot->readI32(ecast477); + this->op = (app_env_operation::type)ecast477; + this->__isset.op = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->keys.clear(); + uint32_t _size478; + ::apache::thrift::protocol::TType _etype481; + xfer += iprot->readListBegin(_etype481, _size478); + this->keys.resize(_size478); + uint32_t _i482; + for (_i482 = 0; _i482 < _size478; ++_i482) { + xfer += iprot->readString(this->keys[_i482]); + } + xfer += iprot->readListEnd(); + } + this->__isset.keys = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { { - int32_t _key578; - xfer += iprot->readI32(_key578); - duplication_entry& _val579 = _val572[_key578]; - xfer += _val579.read(iprot); + this->values.clear(); + uint32_t _size483; + ::apache::thrift::protocol::TType _etype486; + xfer += iprot->readListBegin(_etype486, _size483); + this->values.resize(_size483); + uint32_t _i487; + for (_i487 = 0; _i487 < _size483; ++_i487) { + xfer += iprot->readString(this->values[_i487]); + } + xfer += iprot->readListEnd(); } - xfer += iprot->readMapEnd(); - } + this->__isset.values = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readMapEnd(); - } - this->__isset.dup_map = true; - } else { - xfer += iprot->skip(ftype); + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->clear_prefix); + this->__isset.clear_prefix = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t duplication_sync_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("duplication_sync_response"); +uint32_t +configuration_update_app_env_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_update_app_env_request"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("dup_map", ::apache::thrift::protocol::T_MAP, 2); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_MAP, static_cast(this->dup_map.size())); - std::map > ::const_iterator _iter580; - for (_iter580 = this->dup_map.begin(); _iter580 != this->dup_map.end(); ++_iter580) - { - xfer += oprot->writeI32(_iter580->first); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_STRUCT, static_cast(_iter580->second.size())); - std::map ::const_iterator _iter581; - for (_iter581 = _iter580->second.begin(); _iter581 != _iter580->second.end(); ++_iter581) + xfer += oprot->writeFieldBegin("op", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->op); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.keys) { + xfer += oprot->writeFieldBegin("keys", ::apache::thrift::protocol::T_LIST, 3); { - xfer += oprot->writeI32(_iter581->first); - xfer += _iter581->second.write(oprot); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, + static_cast(this->keys.size())); + std::vector::const_iterator _iter488; + for (_iter488 = this->keys.begin(); _iter488 != this->keys.end(); ++_iter488) { + xfer += oprot->writeString((*_iter488)); + } + xfer += oprot->writeListEnd(); } - xfer += oprot->writeMapEnd(); - } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.values) { + xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, + static_cast(this->values.size())); + std::vector::const_iterator _iter489; + for (_iter489 = this->values.begin(); _iter489 != this->values.end(); ++_iter489) { + xfer += oprot->writeString((*_iter489)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.clear_prefix) { + xfer += oprot->writeFieldBegin("clear_prefix", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->clear_prefix); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_update_app_env_request &a, configuration_update_app_env_request &b) +{ + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.op, b.op); + swap(a.keys, b.keys); + swap(a.values, b.values); + swap(a.clear_prefix, b.clear_prefix); + swap(a.__isset, b.__isset); +} + +configuration_update_app_env_request::configuration_update_app_env_request( + const configuration_update_app_env_request &other490) +{ + app_name = other490.app_name; + op = other490.op; + keys = other490.keys; + values = other490.values; + clear_prefix = other490.clear_prefix; + __isset = other490.__isset; +} +configuration_update_app_env_request::configuration_update_app_env_request( + configuration_update_app_env_request &&other491) +{ + app_name = std::move(other491.app_name); + op = std::move(other491.op); + keys = std::move(other491.keys); + values = std::move(other491.values); + clear_prefix = std::move(other491.clear_prefix); + __isset = std::move(other491.__isset); +} +configuration_update_app_env_request &configuration_update_app_env_request:: +operator=(const configuration_update_app_env_request &other492) +{ + app_name = other492.app_name; + op = other492.op; + keys = other492.keys; + values = other492.values; + clear_prefix = other492.clear_prefix; + __isset = other492.__isset; + return *this; +} +configuration_update_app_env_request &configuration_update_app_env_request:: +operator=(configuration_update_app_env_request &&other493) +{ + app_name = std::move(other493.app_name); + op = std::move(other493.op); + keys = std::move(other493.keys); + values = std::move(other493.values); + clear_prefix = std::move(other493.clear_prefix); + __isset = std::move(other493.__isset); + return *this; +} +void configuration_update_app_env_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_update_app_env_request("; + out << "app_name=" << to_string(app_name); + out << ", " + << "op=" << to_string(op); + out << ", " + << "keys="; + (__isset.keys ? (out << to_string(keys)) : (out << "")); + out << ", " + << "values="; + (__isset.values ? (out << to_string(values)) : (out << "")); + out << ", " + << "clear_prefix="; + (__isset.clear_prefix ? (out << to_string(clear_prefix)) : (out << "")); + out << ")"; +} + +configuration_update_app_env_response::~configuration_update_app_env_response() throw() {} + +void configuration_update_app_env_response::__set_err(const ::dsn::error_code &val) +{ + this->err = val; +} + +void configuration_update_app_env_response::__set_hint_message(const std::string &val) +{ + this->hint_message = val; +} + +uint32_t configuration_update_app_env_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint_message); + this->__isset.hint_message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(duplication_sync_response &a, duplication_sync_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.dup_map, b.dup_map); - swap(a.__isset, b.__isset); -} - -duplication_sync_response::duplication_sync_response(const duplication_sync_response& other582) { - err = other582.err; - dup_map = other582.dup_map; - __isset = other582.__isset; -} -duplication_sync_response::duplication_sync_response( duplication_sync_response&& other583) { - err = std::move(other583.err); - dup_map = std::move(other583.dup_map); - __isset = std::move(other583.__isset); -} -duplication_sync_response& duplication_sync_response::operator=(const duplication_sync_response& other584) { - err = other584.err; - dup_map = other584.dup_map; - __isset = other584.__isset; - return *this; -} -duplication_sync_response& duplication_sync_response::operator=(duplication_sync_response&& other585) { - err = std::move(other585.err); - dup_map = std::move(other585.dup_map); - __isset = std::move(other585.__isset); - return *this; -} -void duplication_sync_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "duplication_sync_response("; - out << "err=" << to_string(err); - out << ", " << "dup_map=" << to_string(dup_map); - out << ")"; -} - - -ddd_diagnose_request::~ddd_diagnose_request() throw() { -} + xfer += iprot->readStructEnd(); -void ddd_diagnose_request::__set_pid(const ::dsn::gpid& val) { - this->pid = val; + return xfer; } -uint32_t ddd_diagnose_request::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t +configuration_update_app_env_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_update_app_env_response"); - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("hint_message", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->hint_message); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(configuration_update_app_env_response &a, configuration_update_app_env_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.hint_message, b.hint_message); + swap(a.__isset, b.__isset); +} + +configuration_update_app_env_response::configuration_update_app_env_response( + const configuration_update_app_env_response &other494) +{ + err = other494.err; + hint_message = other494.hint_message; + __isset = other494.__isset; +} +configuration_update_app_env_response::configuration_update_app_env_response( + configuration_update_app_env_response &&other495) +{ + err = std::move(other495.err); + hint_message = std::move(other495.hint_message); + __isset = std::move(other495.__isset); +} +configuration_update_app_env_response &configuration_update_app_env_response:: +operator=(const configuration_update_app_env_response &other496) +{ + err = other496.err; + hint_message = other496.hint_message; + __isset = other496.__isset; + return *this; +} +configuration_update_app_env_response &configuration_update_app_env_response:: +operator=(configuration_update_app_env_response &&other497) +{ + err = std::move(other497.err); + hint_message = std::move(other497.hint_message); + __isset = std::move(other497.__isset); + return *this; +} +void configuration_update_app_env_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "configuration_update_app_env_response("; + out << "err=" << to_string(err); + out << ", " + << "hint_message=" << to_string(hint_message); + out << ")"; +} + +duplication_add_request::~duplication_add_request() throw() {} + +void duplication_add_request::__set_app_name(const std::string &val) { this->app_name = val; } + +void duplication_add_request::__set_remote_cluster_name(const std::string &val) +{ + this->remote_cluster_name = val; +} + +void duplication_add_request::__set_freezed(const bool val) { this->freezed = val; } + +uint32_t duplication_add_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->remote_cluster_name); + this->__isset.remote_cluster_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->freezed); + this->__isset.freezed = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t ddd_diagnose_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ddd_diagnose_request"); +uint32_t duplication_add_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_add_request"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("remote_cluster_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->remote_cluster_name); + xfer += oprot->writeFieldEnd(); -void swap(ddd_diagnose_request &a, ddd_diagnose_request &b) { - using ::std::swap; - swap(a.pid, b.pid); - swap(a.__isset, b.__isset); -} + xfer += oprot->writeFieldBegin("freezed", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->freezed); + xfer += oprot->writeFieldEnd(); -ddd_diagnose_request::ddd_diagnose_request(const ddd_diagnose_request& other586) { - pid = other586.pid; - __isset = other586.__isset; -} -ddd_diagnose_request::ddd_diagnose_request( ddd_diagnose_request&& other587) { - pid = std::move(other587.pid); - __isset = std::move(other587.__isset); -} -ddd_diagnose_request& ddd_diagnose_request::operator=(const ddd_diagnose_request& other588) { - pid = other588.pid; - __isset = other588.__isset; - return *this; -} -ddd_diagnose_request& ddd_diagnose_request::operator=(ddd_diagnose_request&& other589) { - pid = std::move(other589.pid); - __isset = std::move(other589.__isset); - return *this; -} -void ddd_diagnose_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ddd_diagnose_request("; - out << "pid=" << to_string(pid); - out << ")"; -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_add_request &a, duplication_add_request &b) +{ + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.remote_cluster_name, b.remote_cluster_name); + swap(a.freezed, b.freezed); + swap(a.__isset, b.__isset); +} + +duplication_add_request::duplication_add_request(const duplication_add_request &other498) +{ + app_name = other498.app_name; + remote_cluster_name = other498.remote_cluster_name; + freezed = other498.freezed; + __isset = other498.__isset; +} +duplication_add_request::duplication_add_request(duplication_add_request &&other499) +{ + app_name = std::move(other499.app_name); + remote_cluster_name = std::move(other499.remote_cluster_name); + freezed = std::move(other499.freezed); + __isset = std::move(other499.__isset); +} +duplication_add_request &duplication_add_request::operator=(const duplication_add_request &other500) +{ + app_name = other500.app_name; + remote_cluster_name = other500.remote_cluster_name; + freezed = other500.freezed; + __isset = other500.__isset; + return *this; +} +duplication_add_request &duplication_add_request::operator=(duplication_add_request &&other501) +{ + app_name = std::move(other501.app_name); + remote_cluster_name = std::move(other501.remote_cluster_name); + freezed = std::move(other501.freezed); + __isset = std::move(other501.__isset); + return *this; +} +void duplication_add_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "duplication_add_request("; + out << "app_name=" << to_string(app_name); + out << ", " + << "remote_cluster_name=" << to_string(remote_cluster_name); + out << ", " + << "freezed=" << to_string(freezed); + out << ")"; +} + +duplication_add_response::~duplication_add_response() throw() {} + +void duplication_add_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void duplication_add_response::__set_appid(const int32_t val) { this->appid = val; } + +void duplication_add_response::__set_dupid(const int32_t val) { this->dupid = val; } + +void duplication_add_response::__set_hint(const std::string &val) +{ + this->hint = val; + __isset.hint = true; +} + +uint32_t duplication_add_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->appid); + this->__isset.appid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->dupid); + this->__isset.dupid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint); + this->__isset.hint = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + xfer += iprot->readStructEnd(); -ddd_node_info::~ddd_node_info() throw() { + return xfer; } +uint32_t duplication_add_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_add_response"); -void ddd_node_info::__set_node(const ::dsn::rpc_address& val) { - this->node = val; -} - -void ddd_node_info::__set_drop_time_ms(const int64_t val) { - this->drop_time_ms = val; -} + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); -void ddd_node_info::__set_is_alive(const bool val) { - this->is_alive = val; -} + xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->appid); + xfer += oprot->writeFieldEnd(); -void ddd_node_info::__set_is_collected(const bool val) { - this->is_collected = val; -} + xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->dupid); + xfer += oprot->writeFieldEnd(); -void ddd_node_info::__set_ballot(const int64_t val) { - this->ballot = val; -} + if (this->__isset.hint) { + xfer += oprot->writeFieldBegin("hint", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->hint); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_add_response &a, duplication_add_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.appid, b.appid); + swap(a.dupid, b.dupid); + swap(a.hint, b.hint); + swap(a.__isset, b.__isset); +} + +duplication_add_response::duplication_add_response(const duplication_add_response &other502) +{ + err = other502.err; + appid = other502.appid; + dupid = other502.dupid; + hint = other502.hint; + __isset = other502.__isset; +} +duplication_add_response::duplication_add_response(duplication_add_response &&other503) +{ + err = std::move(other503.err); + appid = std::move(other503.appid); + dupid = std::move(other503.dupid); + hint = std::move(other503.hint); + __isset = std::move(other503.__isset); +} +duplication_add_response &duplication_add_response:: +operator=(const duplication_add_response &other504) +{ + err = other504.err; + appid = other504.appid; + dupid = other504.dupid; + hint = other504.hint; + __isset = other504.__isset; + return *this; +} +duplication_add_response &duplication_add_response::operator=(duplication_add_response &&other505) +{ + err = std::move(other505.err); + appid = std::move(other505.appid); + dupid = std::move(other505.dupid); + hint = std::move(other505.hint); + __isset = std::move(other505.__isset); + return *this; +} +void duplication_add_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "duplication_add_response("; + out << "err=" << to_string(err); + out << ", " + << "appid=" << to_string(appid); + out << ", " + << "dupid=" << to_string(dupid); + out << ", " + << "hint="; + (__isset.hint ? (out << to_string(hint)) : (out << "")); + out << ")"; +} + +duplication_modify_request::~duplication_modify_request() throw() {} + +void duplication_modify_request::__set_app_name(const std::string &val) { this->app_name = val; } + +void duplication_modify_request::__set_dupid(const int32_t val) { this->dupid = val; } + +void duplication_modify_request::__set_status(const duplication_status::type val) +{ + this->status = val; + __isset.status = true; +} + +void duplication_modify_request::__set_fail_mode(const duplication_fail_mode::type val) +{ + this->fail_mode = val; + __isset.fail_mode = true; +} + +uint32_t duplication_modify_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->dupid); + this->__isset.dupid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast506; + xfer += iprot->readI32(ecast506); + this->status = (duplication_status::type)ecast506; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast507; + xfer += iprot->readI32(ecast507); + this->fail_mode = (duplication_fail_mode::type)ecast507; + this->__isset.fail_mode = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -void ddd_node_info::__set_last_committed_decree(const int64_t val) { - this->last_committed_decree = val; -} + xfer += iprot->readStructEnd(); -void ddd_node_info::__set_last_prepared_decree(const int64_t val) { - this->last_prepared_decree = val; + return xfer; } -uint32_t ddd_node_info::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t duplication_modify_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_modify_request"); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->dupid); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + if (this->__isset.status) { + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.fail_mode) { + xfer += oprot->writeFieldBegin("fail_mode", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((int32_t)this->fail_mode); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_modify_request &a, duplication_modify_request &b) +{ + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.dupid, b.dupid); + swap(a.status, b.status); + swap(a.fail_mode, b.fail_mode); + swap(a.__isset, b.__isset); +} + +duplication_modify_request::duplication_modify_request(const duplication_modify_request &other508) +{ + app_name = other508.app_name; + dupid = other508.dupid; + status = other508.status; + fail_mode = other508.fail_mode; + __isset = other508.__isset; +} +duplication_modify_request::duplication_modify_request(duplication_modify_request &&other509) +{ + app_name = std::move(other509.app_name); + dupid = std::move(other509.dupid); + status = std::move(other509.status); + fail_mode = std::move(other509.fail_mode); + __isset = std::move(other509.__isset); +} +duplication_modify_request &duplication_modify_request:: +operator=(const duplication_modify_request &other510) +{ + app_name = other510.app_name; + dupid = other510.dupid; + status = other510.status; + fail_mode = other510.fail_mode; + __isset = other510.__isset; + return *this; +} +duplication_modify_request &duplication_modify_request:: +operator=(duplication_modify_request &&other511) +{ + app_name = std::move(other511.app_name); + dupid = std::move(other511.dupid); + status = std::move(other511.status); + fail_mode = std::move(other511.fail_mode); + __isset = std::move(other511.__isset); + return *this; +} +void duplication_modify_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "duplication_modify_request("; + out << "app_name=" << to_string(app_name); + out << ", " + << "dupid=" << to_string(dupid); + out << ", " + << "status="; + (__isset.status ? (out << to_string(status)) : (out << "")); + out << ", " + << "fail_mode="; + (__isset.fail_mode ? (out << to_string(fail_mode)) : (out << "")); + out << ")"; +} + +duplication_modify_response::~duplication_modify_response() throw() {} + +void duplication_modify_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void duplication_modify_response::__set_appid(const int32_t val) { this->appid = val; } + +uint32_t duplication_modify_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->appid); + this->__isset.appid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + xfer += iprot->readStructEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->node.read(iprot); - this->__isset.node = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->drop_time_ms); - this->__isset.drop_time_ms = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_alive); - this->__isset.is_alive = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_collected); - this->__isset.is_collected = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_prepared_decree); - this->__isset.last_prepared_decree = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ddd_node_info::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ddd_node_info"); - - xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->node.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("drop_time_ms", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->drop_time_ms); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("is_alive", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->is_alive); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("is_collected", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->is_collected); - xfer += oprot->writeFieldEnd(); + return xfer; +} - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); +uint32_t duplication_modify_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_modify_response"); - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 6); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("last_prepared_decree", ::apache::thrift::protocol::T_I64, 7); - xfer += oprot->writeI64(this->last_prepared_decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->appid); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(ddd_node_info &a, ddd_node_info &b) { - using ::std::swap; - swap(a.node, b.node); - swap(a.drop_time_ms, b.drop_time_ms); - swap(a.is_alive, b.is_alive); - swap(a.is_collected, b.is_collected); - swap(a.ballot, b.ballot); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.last_prepared_decree, b.last_prepared_decree); - swap(a.__isset, b.__isset); +void swap(duplication_modify_response &a, duplication_modify_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.appid, b.appid); + swap(a.__isset, b.__isset); } -ddd_node_info::ddd_node_info(const ddd_node_info& other590) { - node = other590.node; - drop_time_ms = other590.drop_time_ms; - is_alive = other590.is_alive; - is_collected = other590.is_collected; - ballot = other590.ballot; - last_committed_decree = other590.last_committed_decree; - last_prepared_decree = other590.last_prepared_decree; - __isset = other590.__isset; +duplication_modify_response::duplication_modify_response( + const duplication_modify_response &other512) +{ + err = other512.err; + appid = other512.appid; + __isset = other512.__isset; } -ddd_node_info::ddd_node_info( ddd_node_info&& other591) { - node = std::move(other591.node); - drop_time_ms = std::move(other591.drop_time_ms); - is_alive = std::move(other591.is_alive); - is_collected = std::move(other591.is_collected); - ballot = std::move(other591.ballot); - last_committed_decree = std::move(other591.last_committed_decree); - last_prepared_decree = std::move(other591.last_prepared_decree); - __isset = std::move(other591.__isset); +duplication_modify_response::duplication_modify_response(duplication_modify_response &&other513) +{ + err = std::move(other513.err); + appid = std::move(other513.appid); + __isset = std::move(other513.__isset); } -ddd_node_info& ddd_node_info::operator=(const ddd_node_info& other592) { - node = other592.node; - drop_time_ms = other592.drop_time_ms; - is_alive = other592.is_alive; - is_collected = other592.is_collected; - ballot = other592.ballot; - last_committed_decree = other592.last_committed_decree; - last_prepared_decree = other592.last_prepared_decree; - __isset = other592.__isset; - return *this; +duplication_modify_response &duplication_modify_response:: +operator=(const duplication_modify_response &other514) +{ + err = other514.err; + appid = other514.appid; + __isset = other514.__isset; + return *this; } -ddd_node_info& ddd_node_info::operator=(ddd_node_info&& other593) { - node = std::move(other593.node); - drop_time_ms = std::move(other593.drop_time_ms); - is_alive = std::move(other593.is_alive); - is_collected = std::move(other593.is_collected); - ballot = std::move(other593.ballot); - last_committed_decree = std::move(other593.last_committed_decree); - last_prepared_decree = std::move(other593.last_prepared_decree); - __isset = std::move(other593.__isset); - return *this; +duplication_modify_response &duplication_modify_response:: +operator=(duplication_modify_response &&other515) +{ + err = std::move(other515.err); + appid = std::move(other515.appid); + __isset = std::move(other515.__isset); + return *this; } -void ddd_node_info::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ddd_node_info("; - out << "node=" << to_string(node); - out << ", " << "drop_time_ms=" << to_string(drop_time_ms); - out << ", " << "is_alive=" << to_string(is_alive); - out << ", " << "is_collected=" << to_string(is_collected); - out << ", " << "ballot=" << to_string(ballot); - out << ", " << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " << "last_prepared_decree=" << to_string(last_prepared_decree); - out << ")"; +void duplication_modify_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "duplication_modify_response("; + out << "err=" << to_string(err); + out << ", " + << "appid=" << to_string(appid); + out << ")"; } +duplication_entry::~duplication_entry() throw() {} -ddd_partition_info::~ddd_partition_info() throw() { -} - - -void ddd_partition_info::__set_config(const ::dsn::partition_configuration& val) { - this->config = val; -} - -void ddd_partition_info::__set_dropped(const std::vector & val) { - this->dropped = val; +void duplication_entry::__set_dupid(const int32_t val) { this->dupid = val; } + +void duplication_entry::__set_status(const duplication_status::type val) { this->status = val; } + +void duplication_entry::__set_remote(const std::string &val) { this->remote = val; } + +void duplication_entry::__set_create_ts(const int64_t val) { this->create_ts = val; } + +void duplication_entry::__set_progress(const std::map &val) +{ + this->progress = val; + __isset.progress = true; } - -void ddd_partition_info::__set_reason(const std::string& val) { - this->reason = val; + +void duplication_entry::__set_fail_mode(const duplication_fail_mode::type val) +{ + this->fail_mode = val; + __isset.fail_mode = true; } -uint32_t ddd_partition_info::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); +uint32_t duplication_entry::read(::apache::thrift::protocol::TProtocol *iprot) +{ - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->config.read(iprot); - this->__isset.config = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->dropped.clear(); - uint32_t _size594; - ::apache::thrift::protocol::TType _etype597; - xfer += iprot->readListBegin(_etype597, _size594); - this->dropped.resize(_size594); - uint32_t _i598; - for (_i598 = 0; _i598 < _size594; ++_i598) - { - xfer += this->dropped[_i598].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.dropped = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->reason); - this->__isset.reason = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->dupid); + this->__isset.dupid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast516; + xfer += iprot->readI32(ecast516); + this->status = (duplication_status::type)ecast516; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->remote); + this->__isset.remote = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->create_ts); + this->__isset.create_ts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->progress.clear(); + uint32_t _size517; + ::apache::thrift::protocol::TType _ktype518; + ::apache::thrift::protocol::TType _vtype519; + xfer += iprot->readMapBegin(_ktype518, _vtype519, _size517); + uint32_t _i521; + for (_i521 = 0; _i521 < _size517; ++_i521) { + int32_t _key522; + xfer += iprot->readI32(_key522); + int64_t &_val523 = this->progress[_key522]; + xfer += iprot->readI64(_val523); + } + xfer += iprot->readMapEnd(); + } + this->__isset.progress = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast524; + xfer += iprot->readI32(ecast524); + this->fail_mode = (duplication_fail_mode::type)ecast524; + this->__isset.fail_mode = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t ddd_partition_info::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ddd_partition_info"); +uint32_t duplication_entry::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_entry"); - xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->config.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->dupid); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("dropped", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->dropped.size())); - std::vector ::const_iterator _iter599; - for (_iter599 = this->dropped.begin(); _iter599 != this->dropped.end(); ++_iter599) - { - xfer += (*_iter599).write(oprot); + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("remote", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->remote); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("create_ts", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->create_ts); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.progress) { + xfer += oprot->writeFieldBegin("progress", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, + ::apache::thrift::protocol::T_I64, + static_cast(this->progress.size())); + std::map::const_iterator _iter525; + for (_iter525 = this->progress.begin(); _iter525 != this->progress.end(); ++_iter525) { + xfer += oprot->writeI32(_iter525->first); + xfer += oprot->writeI64(_iter525->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.fail_mode) { + xfer += oprot->writeFieldBegin("fail_mode", ::apache::thrift::protocol::T_I32, 7); + xfer += oprot->writeI32((int32_t)this->fail_mode); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_entry &a, duplication_entry &b) +{ + using ::std::swap; + swap(a.dupid, b.dupid); + swap(a.status, b.status); + swap(a.remote, b.remote); + swap(a.create_ts, b.create_ts); + swap(a.progress, b.progress); + swap(a.fail_mode, b.fail_mode); + swap(a.__isset, b.__isset); +} + +duplication_entry::duplication_entry(const duplication_entry &other526) +{ + dupid = other526.dupid; + status = other526.status; + remote = other526.remote; + create_ts = other526.create_ts; + progress = other526.progress; + fail_mode = other526.fail_mode; + __isset = other526.__isset; +} +duplication_entry::duplication_entry(duplication_entry &&other527) +{ + dupid = std::move(other527.dupid); + status = std::move(other527.status); + remote = std::move(other527.remote); + create_ts = std::move(other527.create_ts); + progress = std::move(other527.progress); + fail_mode = std::move(other527.fail_mode); + __isset = std::move(other527.__isset); +} +duplication_entry &duplication_entry::operator=(const duplication_entry &other528) +{ + dupid = other528.dupid; + status = other528.status; + remote = other528.remote; + create_ts = other528.create_ts; + progress = other528.progress; + fail_mode = other528.fail_mode; + __isset = other528.__isset; + return *this; +} +duplication_entry &duplication_entry::operator=(duplication_entry &&other529) +{ + dupid = std::move(other529.dupid); + status = std::move(other529.status); + remote = std::move(other529.remote); + create_ts = std::move(other529.create_ts); + progress = std::move(other529.progress); + fail_mode = std::move(other529.fail_mode); + __isset = std::move(other529.__isset); + return *this; +} +void duplication_entry::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "duplication_entry("; + out << "dupid=" << to_string(dupid); + out << ", " + << "status=" << to_string(status); + out << ", " + << "remote=" << to_string(remote); + out << ", " + << "create_ts=" << to_string(create_ts); + out << ", " + << "progress="; + (__isset.progress ? (out << to_string(progress)) : (out << "")); + out << ", " + << "fail_mode="; + (__isset.fail_mode ? (out << to_string(fail_mode)) : (out << "")); + out << ")"; +} + +duplication_query_request::~duplication_query_request() throw() {} + +void duplication_query_request::__set_app_name(const std::string &val) { this->app_name = val; } + +uint32_t duplication_query_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->reason); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + return xfer; } -void swap(ddd_partition_info &a, ddd_partition_info &b) { - using ::std::swap; - swap(a.config, b.config); - swap(a.dropped, b.dropped); - swap(a.reason, b.reason); - swap(a.__isset, b.__isset); +uint32_t duplication_query_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_query_request"); + + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -ddd_partition_info::ddd_partition_info(const ddd_partition_info& other600) { - config = other600.config; - dropped = other600.dropped; - reason = other600.reason; - __isset = other600.__isset; +void swap(duplication_query_request &a, duplication_query_request &b) +{ + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.__isset, b.__isset); } -ddd_partition_info::ddd_partition_info( ddd_partition_info&& other601) { - config = std::move(other601.config); - dropped = std::move(other601.dropped); - reason = std::move(other601.reason); - __isset = std::move(other601.__isset); + +duplication_query_request::duplication_query_request(const duplication_query_request &other530) +{ + app_name = other530.app_name; + __isset = other530.__isset; } -ddd_partition_info& ddd_partition_info::operator=(const ddd_partition_info& other602) { - config = other602.config; - dropped = other602.dropped; - reason = other602.reason; - __isset = other602.__isset; - return *this; +duplication_query_request::duplication_query_request(duplication_query_request &&other531) +{ + app_name = std::move(other531.app_name); + __isset = std::move(other531.__isset); } -ddd_partition_info& ddd_partition_info::operator=(ddd_partition_info&& other603) { - config = std::move(other603.config); - dropped = std::move(other603.dropped); - reason = std::move(other603.reason); - __isset = std::move(other603.__isset); - return *this; +duplication_query_request &duplication_query_request:: +operator=(const duplication_query_request &other532) +{ + app_name = other532.app_name; + __isset = other532.__isset; + return *this; } -void ddd_partition_info::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ddd_partition_info("; - out << "config=" << to_string(config); - out << ", " << "dropped=" << to_string(dropped); - out << ", " << "reason=" << to_string(reason); - out << ")"; +duplication_query_request &duplication_query_request:: +operator=(duplication_query_request &&other533) +{ + app_name = std::move(other533.app_name); + __isset = std::move(other533.__isset); + return *this; } - - -ddd_diagnose_response::~ddd_diagnose_response() throw() { +void duplication_query_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "duplication_query_request("; + out << "app_name=" << to_string(app_name); + out << ")"; } +duplication_query_response::~duplication_query_response() throw() {} -void ddd_diagnose_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} +void duplication_query_response::__set_err(const ::dsn::error_code &val) { this->err = val; } -void ddd_diagnose_response::__set_partitions(const std::vector & val) { - this->partitions = val; -} +void duplication_query_response::__set_appid(const int32_t val) { this->appid = val; } -uint32_t ddd_diagnose_response::read(::apache::thrift::protocol::TProtocol* iprot) { +void duplication_query_response::__set_entry_list(const std::vector &val) +{ + this->entry_list = val; +} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t duplication_query_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitions.clear(); - uint32_t _size604; - ::apache::thrift::protocol::TType _etype607; - xfer += iprot->readListBegin(_etype607, _size604); - this->partitions.resize(_size604); - uint32_t _i608; - for (_i608 = 0; _i608 < _size604; ++_i608) - { - xfer += this->partitions[_i608].read(iprot); + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->appid); + this->__isset.appid = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readListEnd(); - } - this->__isset.partitions = true; - } else { - xfer += iprot->skip(ftype); + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->entry_list.clear(); + uint32_t _size534; + ::apache::thrift::protocol::TType _etype537; + xfer += iprot->readListBegin(_etype537, _size534); + this->entry_list.resize(_size534); + uint32_t _i538; + for (_i538 = 0; _i538 < _size534; ++_i538) { + xfer += this->entry_list[_i538].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.entry_list = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t ddd_diagnose_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ddd_diagnose_response"); +uint32_t duplication_query_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_query_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("appid", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->appid); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); - std::vector ::const_iterator _iter609; - for (_iter609 = this->partitions.begin(); _iter609 != this->partitions.end(); ++_iter609) + xfer += oprot->writeFieldBegin("entry_list", ::apache::thrift::protocol::T_LIST, 4); { - xfer += (*_iter609).write(oprot); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->entry_list.size())); + std::vector::const_iterator _iter539; + for (_iter539 = this->entry_list.begin(); _iter539 != this->entry_list.end(); ++_iter539) { + xfer += (*_iter539).write(oprot); + } + xfer += oprot->writeListEnd(); } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_query_response &a, duplication_query_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.appid, b.appid); + swap(a.entry_list, b.entry_list); + swap(a.__isset, b.__isset); +} + +duplication_query_response::duplication_query_response(const duplication_query_response &other540) +{ + err = other540.err; + appid = other540.appid; + entry_list = other540.entry_list; + __isset = other540.__isset; +} +duplication_query_response::duplication_query_response(duplication_query_response &&other541) +{ + err = std::move(other541.err); + appid = std::move(other541.appid); + entry_list = std::move(other541.entry_list); + __isset = std::move(other541.__isset); +} +duplication_query_response &duplication_query_response:: +operator=(const duplication_query_response &other542) +{ + err = other542.err; + appid = other542.appid; + entry_list = other542.entry_list; + __isset = other542.__isset; + return *this; +} +duplication_query_response &duplication_query_response:: +operator=(duplication_query_response &&other543) +{ + err = std::move(other543.err); + appid = std::move(other543.appid); + entry_list = std::move(other543.entry_list); + __isset = std::move(other543.__isset); + return *this; +} +void duplication_query_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "duplication_query_response("; + out << "err=" << to_string(err); + out << ", " + << "appid=" << to_string(appid); + out << ", " + << "entry_list=" << to_string(entry_list); + out << ")"; +} + +duplication_confirm_entry::~duplication_confirm_entry() throw() {} + +void duplication_confirm_entry::__set_dupid(const int32_t val) { this->dupid = val; } + +void duplication_confirm_entry::__set_confirmed_decree(const int64_t val) +{ + this->confirmed_decree = val; +} + +uint32_t duplication_confirm_entry::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->dupid); + this->__isset.dupid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->confirmed_decree); + this->__isset.confirmed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -void swap(ddd_diagnose_response &a, ddd_diagnose_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.partitions, b.partitions); - swap(a.__isset, b.__isset); -} + xfer += iprot->readStructEnd(); -ddd_diagnose_response::ddd_diagnose_response(const ddd_diagnose_response& other610) { - err = other610.err; - partitions = other610.partitions; - __isset = other610.__isset; -} -ddd_diagnose_response::ddd_diagnose_response( ddd_diagnose_response&& other611) { - err = std::move(other611.err); - partitions = std::move(other611.partitions); - __isset = std::move(other611.__isset); -} -ddd_diagnose_response& ddd_diagnose_response::operator=(const ddd_diagnose_response& other612) { - err = other612.err; - partitions = other612.partitions; - __isset = other612.__isset; - return *this; -} -ddd_diagnose_response& ddd_diagnose_response::operator=(ddd_diagnose_response&& other613) { - err = std::move(other613.err); - partitions = std::move(other613.partitions); - __isset = std::move(other613.__isset); - return *this; -} -void ddd_diagnose_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ddd_diagnose_response("; - out << "err=" << to_string(err); - out << ", " << "partitions=" << to_string(partitions); - out << ")"; + return xfer; } +uint32_t duplication_confirm_entry::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_confirm_entry"); -app_partition_split_request::~app_partition_split_request() throw() { -} + xfer += oprot->writeFieldBegin("dupid", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->dupid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("confirmed_decree", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->confirmed_decree); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_confirm_entry &a, duplication_confirm_entry &b) +{ + using ::std::swap; + swap(a.dupid, b.dupid); + swap(a.confirmed_decree, b.confirmed_decree); + swap(a.__isset, b.__isset); +} + +duplication_confirm_entry::duplication_confirm_entry(const duplication_confirm_entry &other544) +{ + dupid = other544.dupid; + confirmed_decree = other544.confirmed_decree; + __isset = other544.__isset; +} +duplication_confirm_entry::duplication_confirm_entry(duplication_confirm_entry &&other545) +{ + dupid = std::move(other545.dupid); + confirmed_decree = std::move(other545.confirmed_decree); + __isset = std::move(other545.__isset); +} +duplication_confirm_entry &duplication_confirm_entry:: +operator=(const duplication_confirm_entry &other546) +{ + dupid = other546.dupid; + confirmed_decree = other546.confirmed_decree; + __isset = other546.__isset; + return *this; +} +duplication_confirm_entry &duplication_confirm_entry:: +operator=(duplication_confirm_entry &&other547) +{ + dupid = std::move(other547.dupid); + confirmed_decree = std::move(other547.confirmed_decree); + __isset = std::move(other547.__isset); + return *this; +} +void duplication_confirm_entry::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "duplication_confirm_entry("; + out << "dupid=" << to_string(dupid); + out << ", " + << "confirmed_decree=" << to_string(confirmed_decree); + out << ")"; +} + +duplication_sync_request::~duplication_sync_request() throw() {} + +void duplication_sync_request::__set_node(const ::dsn::rpc_address &val) { this->node = val; } + +void duplication_sync_request::__set_confirm_list( + const std::map<::dsn::gpid, std::vector> &val) +{ + this->confirm_list = val; +} + +uint32_t duplication_sync_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->confirm_list.clear(); + uint32_t _size548; + ::apache::thrift::protocol::TType _ktype549; + ::apache::thrift::protocol::TType _vtype550; + xfer += iprot->readMapBegin(_ktype549, _vtype550, _size548); + uint32_t _i552; + for (_i552 = 0; _i552 < _size548; ++_i552) { + ::dsn::gpid _key553; + xfer += _key553.read(iprot); + std::vector &_val554 = + this->confirm_list[_key553]; + { + _val554.clear(); + uint32_t _size555; + ::apache::thrift::protocol::TType _etype558; + xfer += iprot->readListBegin(_etype558, _size555); + _val554.resize(_size555); + uint32_t _i559; + for (_i559 = 0; _i559 < _size555; ++_i559) { + xfer += _val554[_i559].read(iprot); + } + xfer += iprot->readListEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.confirm_list = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -void app_partition_split_request::__set_app_name(const std::string& val) { - this->app_name = val; -} + xfer += iprot->readStructEnd(); -void app_partition_split_request::__set_new_partition_count(const int32_t val) { - this->new_partition_count = val; + return xfer; } -uint32_t app_partition_split_request::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t duplication_sync_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_sync_request"); + + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("confirm_list", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, + ::apache::thrift::protocol::T_LIST, + static_cast(this->confirm_list.size())); + std::map<::dsn::gpid, std::vector>::const_iterator _iter560; + for (_iter560 = this->confirm_list.begin(); _iter560 != this->confirm_list.end(); + ++_iter560) { + xfer += _iter560->first.write(oprot); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(_iter560->second.size())); + std::vector::const_iterator _iter561; + for (_iter561 = _iter560->second.begin(); _iter561 != _iter560->second.end(); + ++_iter561) { + xfer += (*_iter561).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_sync_request &a, duplication_sync_request &b) +{ + using ::std::swap; + swap(a.node, b.node); + swap(a.confirm_list, b.confirm_list); + swap(a.__isset, b.__isset); +} + +duplication_sync_request::duplication_sync_request(const duplication_sync_request &other562) +{ + node = other562.node; + confirm_list = other562.confirm_list; + __isset = other562.__isset; +} +duplication_sync_request::duplication_sync_request(duplication_sync_request &&other563) +{ + node = std::move(other563.node); + confirm_list = std::move(other563.confirm_list); + __isset = std::move(other563.__isset); +} +duplication_sync_request &duplication_sync_request:: +operator=(const duplication_sync_request &other564) +{ + node = other564.node; + confirm_list = other564.confirm_list; + __isset = other564.__isset; + return *this; +} +duplication_sync_request &duplication_sync_request::operator=(duplication_sync_request &&other565) +{ + node = std::move(other565.node); + confirm_list = std::move(other565.confirm_list); + __isset = std::move(other565.__isset); + return *this; +} +void duplication_sync_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "duplication_sync_request("; + out << "node=" << to_string(node); + out << ", " + << "confirm_list=" << to_string(confirm_list); + out << ")"; +} + +duplication_sync_response::~duplication_sync_response() throw() {} + +void duplication_sync_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void duplication_sync_response::__set_dup_map( + const std::map> &val) +{ + this->dup_map = val; +} + +uint32_t duplication_sync_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->dup_map.clear(); + uint32_t _size566; + ::apache::thrift::protocol::TType _ktype567; + ::apache::thrift::protocol::TType _vtype568; + xfer += iprot->readMapBegin(_ktype567, _vtype568, _size566); + uint32_t _i570; + for (_i570 = 0; _i570 < _size566; ++_i570) { + int32_t _key571; + xfer += iprot->readI32(_key571); + std::map &_val572 = this->dup_map[_key571]; + { + _val572.clear(); + uint32_t _size573; + ::apache::thrift::protocol::TType _ktype574; + ::apache::thrift::protocol::TType _vtype575; + xfer += iprot->readMapBegin(_ktype574, _vtype575, _size573); + uint32_t _i577; + for (_i577 = 0; _i577 < _size573; ++_i577) { + int32_t _key578; + xfer += iprot->readI32(_key578); + duplication_entry &_val579 = _val572[_key578]; + xfer += _val579.read(iprot); + } + xfer += iprot->readMapEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.dup_map = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += iprot->readStructEnd(); - xfer += iprot->readStructBegin(fname); + return xfer; +} - using ::apache::thrift::protocol::TProtocolException; +uint32_t duplication_sync_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("duplication_sync_response"); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) + xfer += oprot->writeFieldBegin("dup_map", ::apache::thrift::protocol::T_MAP, 2); { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->new_partition_count); - this->__isset.new_partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, + ::apache::thrift::protocol::T_MAP, + static_cast(this->dup_map.size())); + std::map>::const_iterator _iter580; + for (_iter580 = this->dup_map.begin(); _iter580 != this->dup_map.end(); ++_iter580) { + xfer += oprot->writeI32(_iter580->first); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, + ::apache::thrift::protocol::T_STRUCT, + static_cast(_iter580->second.size())); + std::map::const_iterator _iter581; + for (_iter581 = _iter580->second.begin(); _iter581 != _iter580->second.end(); + ++_iter581) { + xfer += oprot->writeI32(_iter581->first); + xfer += _iter581->second.write(oprot); + } + xfer += oprot->writeMapEnd(); + } + } + xfer += oprot->writeMapEnd(); } - xfer += iprot->readFieldEnd(); - } + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(duplication_sync_response &a, duplication_sync_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.dup_map, b.dup_map); + swap(a.__isset, b.__isset); +} + +duplication_sync_response::duplication_sync_response(const duplication_sync_response &other582) +{ + err = other582.err; + dup_map = other582.dup_map; + __isset = other582.__isset; +} +duplication_sync_response::duplication_sync_response(duplication_sync_response &&other583) +{ + err = std::move(other583.err); + dup_map = std::move(other583.dup_map); + __isset = std::move(other583.__isset); +} +duplication_sync_response &duplication_sync_response:: +operator=(const duplication_sync_response &other584) +{ + err = other584.err; + dup_map = other584.dup_map; + __isset = other584.__isset; + return *this; +} +duplication_sync_response &duplication_sync_response:: +operator=(duplication_sync_response &&other585) +{ + err = std::move(other585.err); + dup_map = std::move(other585.dup_map); + __isset = std::move(other585.__isset); + return *this; +} +void duplication_sync_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "duplication_sync_response("; + out << "err=" << to_string(err); + out << ", " + << "dup_map=" << to_string(dup_map); + out << ")"; +} + +ddd_diagnose_request::~ddd_diagnose_request() throw() {} + +void ddd_diagnose_request::__set_pid(const ::dsn::gpid &val) { this->pid = val; } + +uint32_t ddd_diagnose_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - return xfer; -} + xfer += iprot->readStructEnd(); -uint32_t app_partition_split_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("app_partition_split_request"); + return xfer; +} - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); +uint32_t ddd_diagnose_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ddd_diagnose_request"); - xfer += oprot->writeFieldBegin("new_partition_count", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->new_partition_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(app_partition_split_request &a, app_partition_split_request &b) { - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.new_partition_count, b.new_partition_count); - swap(a.__isset, b.__isset); +void swap(ddd_diagnose_request &a, ddd_diagnose_request &b) +{ + using ::std::swap; + swap(a.pid, b.pid); + swap(a.__isset, b.__isset); } -app_partition_split_request::app_partition_split_request(const app_partition_split_request& other614) { - app_name = other614.app_name; - new_partition_count = other614.new_partition_count; - __isset = other614.__isset; +ddd_diagnose_request::ddd_diagnose_request(const ddd_diagnose_request &other586) +{ + pid = other586.pid; + __isset = other586.__isset; } -app_partition_split_request::app_partition_split_request( app_partition_split_request&& other615) { - app_name = std::move(other615.app_name); - new_partition_count = std::move(other615.new_partition_count); - __isset = std::move(other615.__isset); +ddd_diagnose_request::ddd_diagnose_request(ddd_diagnose_request &&other587) +{ + pid = std::move(other587.pid); + __isset = std::move(other587.__isset); } -app_partition_split_request& app_partition_split_request::operator=(const app_partition_split_request& other616) { - app_name = other616.app_name; - new_partition_count = other616.new_partition_count; - __isset = other616.__isset; - return *this; +ddd_diagnose_request &ddd_diagnose_request::operator=(const ddd_diagnose_request &other588) +{ + pid = other588.pid; + __isset = other588.__isset; + return *this; } -app_partition_split_request& app_partition_split_request::operator=(app_partition_split_request&& other617) { - app_name = std::move(other617.app_name); - new_partition_count = std::move(other617.new_partition_count); - __isset = std::move(other617.__isset); - return *this; +ddd_diagnose_request &ddd_diagnose_request::operator=(ddd_diagnose_request &&other589) +{ + pid = std::move(other589.pid); + __isset = std::move(other589.__isset); + return *this; } -void app_partition_split_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "app_partition_split_request("; - out << "app_name=" << to_string(app_name); - out << ", " << "new_partition_count=" << to_string(new_partition_count); - out << ")"; +void ddd_diagnose_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "ddd_diagnose_request("; + out << "pid=" << to_string(pid); + out << ")"; } +ddd_node_info::~ddd_node_info() throw() {} -app_partition_split_response::~app_partition_split_response() throw() { -} +void ddd_node_info::__set_node(const ::dsn::rpc_address &val) { this->node = val; } +void ddd_node_info::__set_drop_time_ms(const int64_t val) { this->drop_time_ms = val; } -void app_partition_split_response::__set_err(const ::dsn::error_code& val) { - this->err = val; -} +void ddd_node_info::__set_is_alive(const bool val) { this->is_alive = val; } -void app_partition_split_response::__set_app_id(const int32_t val) { - this->app_id = val; -} +void ddd_node_info::__set_is_collected(const bool val) { this->is_collected = val; } + +void ddd_node_info::__set_ballot(const int64_t val) { this->ballot = val; } -void app_partition_split_response::__set_partition_count(const int32_t val) { - this->partition_count = val; +void ddd_node_info::__set_last_committed_decree(const int64_t val) +{ + this->last_committed_decree = val; } -uint32_t app_partition_split_response::read(::apache::thrift::protocol::TProtocol* iprot) { +void ddd_node_info::__set_last_prepared_decree(const int64_t val) +{ + this->last_prepared_decree = val; +} - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t ddd_node_info::read(::apache::thrift::protocol::TProtocol *iprot) +{ - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_count); - this->__isset.partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->node.read(iprot); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->drop_time_ms); + this->__isset.drop_time_ms = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_alive); + this->__isset.is_alive = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_collected); + this->__isset.is_collected = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_prepared_decree); + this->__isset.last_prepared_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t app_partition_split_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("app_partition_split_response"); +uint32_t ddd_node_info::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ddd_node_info"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->node.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("drop_time_ms", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->drop_time_ms); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->partition_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_alive", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_alive); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} + xfer += oprot->writeFieldBegin("is_collected", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->is_collected); + xfer += oprot->writeFieldEnd(); -void swap(app_partition_split_response &a, app_partition_split_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.app_id, b.app_id); - swap(a.partition_count, b.partition_count); - swap(a.__isset, b.__isset); -} + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); -app_partition_split_response::app_partition_split_response(const app_partition_split_response& other618) { - err = other618.err; - app_id = other618.app_id; - partition_count = other618.partition_count; - __isset = other618.__isset; -} -app_partition_split_response::app_partition_split_response( app_partition_split_response&& other619) { - err = std::move(other619.err); - app_id = std::move(other619.app_id); - partition_count = std::move(other619.partition_count); - __isset = std::move(other619.__isset); -} -app_partition_split_response& app_partition_split_response::operator=(const app_partition_split_response& other620) { - err = other620.err; - app_id = other620.app_id; - partition_count = other620.partition_count; - __isset = other620.__isset; - return *this; -} -app_partition_split_response& app_partition_split_response::operator=(app_partition_split_response&& other621) { - err = std::move(other621.err); - app_id = std::move(other621.app_id); - partition_count = std::move(other621.partition_count); - __isset = std::move(other621.__isset); - return *this; -} -void app_partition_split_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "app_partition_split_response("; - out << "err=" << to_string(err); - out << ", " << "app_id=" << to_string(app_id); - out << ", " << "partition_count=" << to_string(partition_count); - out << ")"; -} + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("last_prepared_decree", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64(this->last_prepared_decree); + xfer += oprot->writeFieldEnd(); -notify_catch_up_request::~notify_catch_up_request() throw() { -} + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ddd_node_info &a, ddd_node_info &b) +{ + using ::std::swap; + swap(a.node, b.node); + swap(a.drop_time_ms, b.drop_time_ms); + swap(a.is_alive, b.is_alive); + swap(a.is_collected, b.is_collected); + swap(a.ballot, b.ballot); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.last_prepared_decree, b.last_prepared_decree); + swap(a.__isset, b.__isset); +} + +ddd_node_info::ddd_node_info(const ddd_node_info &other590) +{ + node = other590.node; + drop_time_ms = other590.drop_time_ms; + is_alive = other590.is_alive; + is_collected = other590.is_collected; + ballot = other590.ballot; + last_committed_decree = other590.last_committed_decree; + last_prepared_decree = other590.last_prepared_decree; + __isset = other590.__isset; +} +ddd_node_info::ddd_node_info(ddd_node_info &&other591) +{ + node = std::move(other591.node); + drop_time_ms = std::move(other591.drop_time_ms); + is_alive = std::move(other591.is_alive); + is_collected = std::move(other591.is_collected); + ballot = std::move(other591.ballot); + last_committed_decree = std::move(other591.last_committed_decree); + last_prepared_decree = std::move(other591.last_prepared_decree); + __isset = std::move(other591.__isset); +} +ddd_node_info &ddd_node_info::operator=(const ddd_node_info &other592) +{ + node = other592.node; + drop_time_ms = other592.drop_time_ms; + is_alive = other592.is_alive; + is_collected = other592.is_collected; + ballot = other592.ballot; + last_committed_decree = other592.last_committed_decree; + last_prepared_decree = other592.last_prepared_decree; + __isset = other592.__isset; + return *this; +} +ddd_node_info &ddd_node_info::operator=(ddd_node_info &&other593) +{ + node = std::move(other593.node); + drop_time_ms = std::move(other593.drop_time_ms); + is_alive = std::move(other593.is_alive); + is_collected = std::move(other593.is_collected); + ballot = std::move(other593.ballot); + last_committed_decree = std::move(other593.last_committed_decree); + last_prepared_decree = std::move(other593.last_prepared_decree); + __isset = std::move(other593.__isset); + return *this; +} +void ddd_node_info::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "ddd_node_info("; + out << "node=" << to_string(node); + out << ", " + << "drop_time_ms=" << to_string(drop_time_ms); + out << ", " + << "is_alive=" << to_string(is_alive); + out << ", " + << "is_collected=" << to_string(is_collected); + out << ", " + << "ballot=" << to_string(ballot); + out << ", " + << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " + << "last_prepared_decree=" << to_string(last_prepared_decree); + out << ")"; +} + +ddd_partition_info::~ddd_partition_info() throw() {} + +void ddd_partition_info::__set_config(const ::dsn::partition_configuration &val) +{ + this->config = val; +} + +void ddd_partition_info::__set_dropped(const std::vector &val) +{ + this->dropped = val; +} + +void ddd_partition_info::__set_reason(const std::string &val) { this->reason = val; } + +uint32_t ddd_partition_info::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->config.read(iprot); + this->__isset.config = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->dropped.clear(); + uint32_t _size594; + ::apache::thrift::protocol::TType _etype597; + xfer += iprot->readListBegin(_etype597, _size594); + this->dropped.resize(_size594); + uint32_t _i598; + for (_i598 = 0; _i598 < _size594; ++_i598) { + xfer += this->dropped[_i598].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.dropped = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->reason); + this->__isset.reason = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + xfer += iprot->readStructEnd(); -void notify_catch_up_request::__set_parent_gpid(const ::dsn::gpid& val) { - this->parent_gpid = val; + return xfer; } -void notify_catch_up_request::__set_child_gpid(const ::dsn::gpid& val) { - this->child_gpid = val; -} +uint32_t ddd_partition_info::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ddd_partition_info"); -void notify_catch_up_request::__set_child_ballot(const int64_t val) { - this->child_ballot = val; -} + xfer += oprot->writeFieldBegin("config", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->config.write(oprot); + xfer += oprot->writeFieldEnd(); -void notify_catch_up_request::__set_child_address(const ::dsn::rpc_address& val) { - this->child_address = val; -} + xfer += oprot->writeFieldBegin("dropped", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->dropped.size())); + std::vector::const_iterator _iter599; + for (_iter599 = this->dropped.begin(); _iter599 != this->dropped.end(); ++_iter599) { + xfer += (*_iter599).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->reason); + xfer += oprot->writeFieldEnd(); -uint32_t notify_catch_up_request::read(::apache::thrift::protocol::TProtocol* iprot) { + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ddd_partition_info &a, ddd_partition_info &b) +{ + using ::std::swap; + swap(a.config, b.config); + swap(a.dropped, b.dropped); + swap(a.reason, b.reason); + swap(a.__isset, b.__isset); +} + +ddd_partition_info::ddd_partition_info(const ddd_partition_info &other600) +{ + config = other600.config; + dropped = other600.dropped; + reason = other600.reason; + __isset = other600.__isset; +} +ddd_partition_info::ddd_partition_info(ddd_partition_info &&other601) +{ + config = std::move(other601.config); + dropped = std::move(other601.dropped); + reason = std::move(other601.reason); + __isset = std::move(other601.__isset); +} +ddd_partition_info &ddd_partition_info::operator=(const ddd_partition_info &other602) +{ + config = other602.config; + dropped = other602.dropped; + reason = other602.reason; + __isset = other602.__isset; + return *this; +} +ddd_partition_info &ddd_partition_info::operator=(ddd_partition_info &&other603) +{ + config = std::move(other603.config); + dropped = std::move(other603.dropped); + reason = std::move(other603.reason); + __isset = std::move(other603.__isset); + return *this; +} +void ddd_partition_info::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "ddd_partition_info("; + out << "config=" << to_string(config); + out << ", " + << "dropped=" << to_string(dropped); + out << ", " + << "reason=" << to_string(reason); + out << ")"; +} + +ddd_diagnose_response::~ddd_diagnose_response() throw() {} + +void ddd_diagnose_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void ddd_diagnose_response::__set_partitions(const std::vector &val) +{ + this->partitions = val; +} + +uint32_t ddd_diagnose_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitions.clear(); + uint32_t _size604; + ::apache::thrift::protocol::TType _etype607; + xfer += iprot->readListBegin(_etype607, _size604); + this->partitions.resize(_size604); + uint32_t _i608; + for (_i608 = 0; _i608 < _size604; ++_i608) { + xfer += this->partitions[_i608].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.partitions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += iprot->readStructEnd(); - xfer += iprot->readStructBegin(fname); + return xfer; +} - using ::apache::thrift::protocol::TProtocolException; +uint32_t ddd_diagnose_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ddd_diagnose_response"); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) + xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 2); { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->parent_gpid.read(iprot); - this->__isset.parent_gpid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->child_gpid.read(iprot); - this->__isset.child_gpid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->child_ballot); - this->__isset.child_ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->child_address.read(iprot); - this->__isset.child_address = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->partitions.size())); + std::vector::const_iterator _iter609; + for (_iter609 = this->partitions.begin(); _iter609 != this->partitions.end(); ++_iter609) { + xfer += (*_iter609).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ddd_diagnose_response &a, ddd_diagnose_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.partitions, b.partitions); + swap(a.__isset, b.__isset); +} + +ddd_diagnose_response::ddd_diagnose_response(const ddd_diagnose_response &other610) +{ + err = other610.err; + partitions = other610.partitions; + __isset = other610.__isset; +} +ddd_diagnose_response::ddd_diagnose_response(ddd_diagnose_response &&other611) +{ + err = std::move(other611.err); + partitions = std::move(other611.partitions); + __isset = std::move(other611.__isset); +} +ddd_diagnose_response &ddd_diagnose_response::operator=(const ddd_diagnose_response &other612) +{ + err = other612.err; + partitions = other612.partitions; + __isset = other612.__isset; + return *this; +} +ddd_diagnose_response &ddd_diagnose_response::operator=(ddd_diagnose_response &&other613) +{ + err = std::move(other613.err); + partitions = std::move(other613.partitions); + __isset = std::move(other613.__isset); + return *this; +} +void ddd_diagnose_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "ddd_diagnose_response("; + out << "err=" << to_string(err); + out << ", " + << "partitions=" << to_string(partitions); + out << ")"; +} + +app_partition_split_request::~app_partition_split_request() throw() {} + +void app_partition_split_request::__set_app_name(const std::string &val) { this->app_name = val; } + +void app_partition_split_request::__set_new_partition_count(const int32_t val) +{ + this->new_partition_count = val; +} + +uint32_t app_partition_split_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->new_partition_count); + this->__isset.new_partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t notify_catch_up_request::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("notify_catch_up_request"); +uint32_t app_partition_split_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("app_partition_split_request"); - xfer += oprot->writeFieldBegin("parent_gpid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->parent_gpid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("child_gpid", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->child_gpid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_partition_count", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->new_partition_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("child_ballot", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->child_ballot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(app_partition_split_request &a, app_partition_split_request &b) +{ + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.new_partition_count, b.new_partition_count); + swap(a.__isset, b.__isset); +} + +app_partition_split_request::app_partition_split_request( + const app_partition_split_request &other614) +{ + app_name = other614.app_name; + new_partition_count = other614.new_partition_count; + __isset = other614.__isset; +} +app_partition_split_request::app_partition_split_request(app_partition_split_request &&other615) +{ + app_name = std::move(other615.app_name); + new_partition_count = std::move(other615.new_partition_count); + __isset = std::move(other615.__isset); +} +app_partition_split_request &app_partition_split_request:: +operator=(const app_partition_split_request &other616) +{ + app_name = other616.app_name; + new_partition_count = other616.new_partition_count; + __isset = other616.__isset; + return *this; +} +app_partition_split_request &app_partition_split_request:: +operator=(app_partition_split_request &&other617) +{ + app_name = std::move(other617.app_name); + new_partition_count = std::move(other617.new_partition_count); + __isset = std::move(other617.__isset); + return *this; +} +void app_partition_split_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "app_partition_split_request("; + out << "app_name=" << to_string(app_name); + out << ", " + << "new_partition_count=" << to_string(new_partition_count); + out << ")"; +} + +app_partition_split_response::~app_partition_split_response() throw() {} + +void app_partition_split_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void app_partition_split_response::__set_app_id(const int32_t val) { this->app_id = val; } + +void app_partition_split_response::__set_partition_count(const int32_t val) +{ + this->partition_count = val; +} + +uint32_t app_partition_split_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_count); + this->__isset.partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } - xfer += oprot->writeFieldBegin("child_address", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->child_address.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += iprot->readStructEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + return xfer; } -void swap(notify_catch_up_request &a, notify_catch_up_request &b) { - using ::std::swap; - swap(a.parent_gpid, b.parent_gpid); - swap(a.child_gpid, b.child_gpid); - swap(a.child_ballot, b.child_ballot); - swap(a.child_address, b.child_address); - swap(a.__isset, b.__isset); -} +uint32_t app_partition_split_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("app_partition_split_response"); -notify_catch_up_request::notify_catch_up_request(const notify_catch_up_request& other622) { - parent_gpid = other622.parent_gpid; - child_gpid = other622.child_gpid; - child_ballot = other622.child_ballot; - child_address = other622.child_address; - __isset = other622.__isset; -} -notify_catch_up_request::notify_catch_up_request( notify_catch_up_request&& other623) { - parent_gpid = std::move(other623.parent_gpid); - child_gpid = std::move(other623.child_gpid); - child_ballot = std::move(other623.child_ballot); - child_address = std::move(other623.child_address); - __isset = std::move(other623.__isset); -} -notify_catch_up_request& notify_catch_up_request::operator=(const notify_catch_up_request& other624) { - parent_gpid = other624.parent_gpid; - child_gpid = other624.child_gpid; - child_ballot = other624.child_ballot; - child_address = other624.child_address; - __isset = other624.__isset; - return *this; -} -notify_catch_up_request& notify_catch_up_request::operator=(notify_catch_up_request&& other625) { - parent_gpid = std::move(other625.parent_gpid); - child_gpid = std::move(other625.child_gpid); - child_ballot = std::move(other625.child_ballot); - child_address = std::move(other625.child_address); - __isset = std::move(other625.__isset); - return *this; -} -void notify_catch_up_request::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "notify_catch_up_request("; - out << "parent_gpid=" << to_string(parent_gpid); - out << ", " << "child_gpid=" << to_string(child_gpid); - out << ", " << "child_ballot=" << to_string(child_ballot); - out << ", " << "child_address=" << to_string(child_address); - out << ")"; -} + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); -notify_cacth_up_response::~notify_cacth_up_response() throw() { -} + xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->partition_count); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(app_partition_split_response &a, app_partition_split_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.app_id, b.app_id); + swap(a.partition_count, b.partition_count); + swap(a.__isset, b.__isset); +} + +app_partition_split_response::app_partition_split_response( + const app_partition_split_response &other618) +{ + err = other618.err; + app_id = other618.app_id; + partition_count = other618.partition_count; + __isset = other618.__isset; +} +app_partition_split_response::app_partition_split_response(app_partition_split_response &&other619) +{ + err = std::move(other619.err); + app_id = std::move(other619.app_id); + partition_count = std::move(other619.partition_count); + __isset = std::move(other619.__isset); +} +app_partition_split_response &app_partition_split_response:: +operator=(const app_partition_split_response &other620) +{ + err = other620.err; + app_id = other620.app_id; + partition_count = other620.partition_count; + __isset = other620.__isset; + return *this; +} +app_partition_split_response &app_partition_split_response:: +operator=(app_partition_split_response &&other621) +{ + err = std::move(other621.err); + app_id = std::move(other621.app_id); + partition_count = std::move(other621.partition_count); + __isset = std::move(other621.__isset); + return *this; +} +void app_partition_split_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "app_partition_split_response("; + out << "err=" << to_string(err); + out << ", " + << "app_id=" << to_string(app_id); + out << ", " + << "partition_count=" << to_string(partition_count); + out << ")"; +} + +notify_catch_up_request::~notify_catch_up_request() throw() {} + +void notify_catch_up_request::__set_parent_gpid(const ::dsn::gpid &val) { this->parent_gpid = val; } + +void notify_catch_up_request::__set_child_gpid(const ::dsn::gpid &val) { this->child_gpid = val; } + +void notify_catch_up_request::__set_child_ballot(const int64_t val) { this->child_ballot = val; } + +void notify_catch_up_request::__set_child_address(const ::dsn::rpc_address &val) +{ + this->child_address = val; +} + +uint32_t notify_catch_up_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->parent_gpid.read(iprot); + this->__isset.parent_gpid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->child_gpid.read(iprot); + this->__isset.child_gpid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->child_ballot); + this->__isset.child_ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->child_address.read(iprot); + this->__isset.child_address = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } -void notify_cacth_up_response::__set_err(const ::dsn::error_code& val) { - this->err = val; + xfer += iprot->readStructEnd(); + + return xfer; } -uint32_t notify_cacth_up_response::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t notify_catch_up_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("notify_catch_up_request"); - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += oprot->writeFieldBegin("parent_gpid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->parent_gpid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += iprot->readStructBegin(fname); + xfer += oprot->writeFieldBegin("child_gpid", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->child_gpid.write(oprot); + xfer += oprot->writeFieldEnd(); - using ::apache::thrift::protocol::TProtocolException; + xfer += oprot->writeFieldBegin("child_ballot", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->child_ballot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("child_address", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->child_address.write(oprot); + xfer += oprot->writeFieldEnd(); - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(notify_catch_up_request &a, notify_catch_up_request &b) +{ + using ::std::swap; + swap(a.parent_gpid, b.parent_gpid); + swap(a.child_gpid, b.child_gpid); + swap(a.child_ballot, b.child_ballot); + swap(a.child_address, b.child_address); + swap(a.__isset, b.__isset); +} + +notify_catch_up_request::notify_catch_up_request(const notify_catch_up_request &other622) +{ + parent_gpid = other622.parent_gpid; + child_gpid = other622.child_gpid; + child_ballot = other622.child_ballot; + child_address = other622.child_address; + __isset = other622.__isset; +} +notify_catch_up_request::notify_catch_up_request(notify_catch_up_request &&other623) +{ + parent_gpid = std::move(other623.parent_gpid); + child_gpid = std::move(other623.child_gpid); + child_ballot = std::move(other623.child_ballot); + child_address = std::move(other623.child_address); + __isset = std::move(other623.__isset); +} +notify_catch_up_request ¬ify_catch_up_request::operator=(const notify_catch_up_request &other624) +{ + parent_gpid = other624.parent_gpid; + child_gpid = other624.child_gpid; + child_ballot = other624.child_ballot; + child_address = other624.child_address; + __isset = other624.__isset; + return *this; +} +notify_catch_up_request ¬ify_catch_up_request::operator=(notify_catch_up_request &&other625) +{ + parent_gpid = std::move(other625.parent_gpid); + child_gpid = std::move(other625.child_gpid); + child_ballot = std::move(other625.child_ballot); + child_address = std::move(other625.child_address); + __isset = std::move(other625.__isset); + return *this; +} +void notify_catch_up_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "notify_catch_up_request("; + out << "parent_gpid=" << to_string(parent_gpid); + out << ", " + << "child_gpid=" << to_string(child_gpid); + out << ", " + << "child_ballot=" << to_string(child_ballot); + out << ", " + << "child_address=" << to_string(child_address); + out << ")"; +} + +notify_cacth_up_response::~notify_cacth_up_response() throw() {} + +void notify_cacth_up_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +uint32_t notify_cacth_up_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t notify_cacth_up_response::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("notify_cacth_up_response"); +uint32_t notify_cacth_up_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("notify_cacth_up_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(notify_cacth_up_response &a, notify_cacth_up_response &b) { - using ::std::swap; - swap(a.err, b.err); - swap(a.__isset, b.__isset); +void swap(notify_cacth_up_response &a, notify_cacth_up_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.__isset, b.__isset); } -notify_cacth_up_response::notify_cacth_up_response(const notify_cacth_up_response& other626) { - err = other626.err; - __isset = other626.__isset; +notify_cacth_up_response::notify_cacth_up_response(const notify_cacth_up_response &other626) +{ + err = other626.err; + __isset = other626.__isset; } -notify_cacth_up_response::notify_cacth_up_response( notify_cacth_up_response&& other627) { - err = std::move(other627.err); - __isset = std::move(other627.__isset); +notify_cacth_up_response::notify_cacth_up_response(notify_cacth_up_response &&other627) +{ + err = std::move(other627.err); + __isset = std::move(other627.__isset); } -notify_cacth_up_response& notify_cacth_up_response::operator=(const notify_cacth_up_response& other628) { - err = other628.err; - __isset = other628.__isset; - return *this; +notify_cacth_up_response ¬ify_cacth_up_response:: +operator=(const notify_cacth_up_response &other628) +{ + err = other628.err; + __isset = other628.__isset; + return *this; } -notify_cacth_up_response& notify_cacth_up_response::operator=(notify_cacth_up_response&& other629) { - err = std::move(other629.err); - __isset = std::move(other629.__isset); - return *this; +notify_cacth_up_response ¬ify_cacth_up_response::operator=(notify_cacth_up_response &&other629) +{ + err = std::move(other629.err); + __isset = std::move(other629.__isset); + return *this; } -void notify_cacth_up_response::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "notify_cacth_up_response("; - out << "err=" << to_string(err); - out << ")"; -} - - -bulk_load_metadata::~bulk_load_metadata() throw() { +void notify_cacth_up_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "notify_cacth_up_response("; + out << "err=" << to_string(err); + out << ")"; } +bulk_load_metadata::~bulk_load_metadata() throw() {} -void bulk_load_metadata::__set_files(const std::vector & val) { - this->files = val; -} - -void bulk_load_metadata::__set_file_total_size(const int64_t val) { - this->file_total_size = val; -} +void bulk_load_metadata::__set_files(const std::vector &val) { this->files = val; } -uint32_t bulk_load_metadata::read(::apache::thrift::protocol::TProtocol* iprot) { +void bulk_load_metadata::__set_file_total_size(const int64_t val) { this->file_total_size = val; } - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; +uint32_t bulk_load_metadata::read(::apache::thrift::protocol::TProtocol *iprot) +{ - xfer += iprot->readStructBegin(fname); + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - using ::apache::thrift::protocol::TProtocolException; + xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->files.clear(); - uint32_t _size630; - ::apache::thrift::protocol::TType _etype633; - xfer += iprot->readListBegin(_etype633, _size630); - this->files.resize(_size630); - uint32_t _i634; - for (_i634 = 0; _i634 < _size630; ++_i634) - { - xfer += this->files[_i634].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.files = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->file_total_size); - this->__isset.file_total_size = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->files.clear(); + uint32_t _size630; + ::apache::thrift::protocol::TType _etype633; + xfer += iprot->readListBegin(_etype633, _size630); + this->files.resize(_size630); + uint32_t _i634; + for (_i634 = 0; _i634 < _size630; ++_i634) { + xfer += this->files[_i634].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.files = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->file_total_size); + this->__isset.file_total_size = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - xfer += iprot->readFieldEnd(); - } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t bulk_load_metadata::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("bulk_load_metadata"); +uint32_t bulk_load_metadata::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("bulk_load_metadata"); - xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->files.size())); - std::vector ::const_iterator _iter635; - for (_iter635 = this->files.begin(); _iter635 != this->files.end(); ++_iter635) + xfer += oprot->writeFieldBegin("files", ::apache::thrift::protocol::T_LIST, 1); { - xfer += (*_iter635).write(oprot); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, + static_cast(this->files.size())); + std::vector::const_iterator _iter635; + for (_iter635 = this->files.begin(); _iter635 != this->files.end(); ++_iter635) { + xfer += (*_iter635).write(oprot); + } + xfer += oprot->writeListEnd(); } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("file_total_size", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->file_total_size); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(bulk_load_metadata &a, bulk_load_metadata &b) { - using ::std::swap; - swap(a.files, b.files); - swap(a.file_total_size, b.file_total_size); - swap(a.__isset, b.__isset); -} + xfer += oprot->writeFieldEnd(); -bulk_load_metadata::bulk_load_metadata(const bulk_load_metadata& other636) { - files = other636.files; - file_total_size = other636.file_total_size; - __isset = other636.__isset; -} -bulk_load_metadata::bulk_load_metadata( bulk_load_metadata&& other637) { - files = std::move(other637.files); - file_total_size = std::move(other637.file_total_size); - __isset = std::move(other637.__isset); -} -bulk_load_metadata& bulk_load_metadata::operator=(const bulk_load_metadata& other638) { - files = other638.files; - file_total_size = other638.file_total_size; - __isset = other638.__isset; - return *this; -} -bulk_load_metadata& bulk_load_metadata::operator=(bulk_load_metadata&& other639) { - files = std::move(other639.files); - file_total_size = std::move(other639.file_total_size); - __isset = std::move(other639.__isset); - return *this; -} -void bulk_load_metadata::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "bulk_load_metadata("; - out << "files=" << to_string(files); - out << ", " << "file_total_size=" << to_string(file_total_size); - out << ")"; -} + xfer += oprot->writeFieldBegin("file_total_size", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->file_total_size); + xfer += oprot->writeFieldEnd(); -}} // namespace + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(bulk_load_metadata &a, bulk_load_metadata &b) +{ + using ::std::swap; + swap(a.files, b.files); + swap(a.file_total_size, b.file_total_size); + swap(a.__isset, b.__isset); +} + +bulk_load_metadata::bulk_load_metadata(const bulk_load_metadata &other636) +{ + files = other636.files; + file_total_size = other636.file_total_size; + __isset = other636.__isset; +} +bulk_load_metadata::bulk_load_metadata(bulk_load_metadata &&other637) +{ + files = std::move(other637.files); + file_total_size = std::move(other637.file_total_size); + __isset = std::move(other637.__isset); +} +bulk_load_metadata &bulk_load_metadata::operator=(const bulk_load_metadata &other638) +{ + files = other638.files; + file_total_size = other638.file_total_size; + __isset = other638.__isset; + return *this; +} +bulk_load_metadata &bulk_load_metadata::operator=(bulk_load_metadata &&other639) +{ + files = std::move(other639.files); + file_total_size = std::move(other639.file_total_size); + __isset = std::move(other639.__isset); + return *this; +} +void bulk_load_metadata::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "bulk_load_metadata("; + out << "files=" << to_string(files); + out << ", " + << "file_total_size=" << to_string(file_total_size); + out << ")"; +} +} +} // namespace diff --git a/src/dist/replication/meta_server/meta_bulk_load_service.cpp b/src/dist/replication/meta_server/meta_bulk_load_service.cpp index dfa4702006..7e05ee8640 100644 --- a/src/dist/replication/meta_server/meta_bulk_load_service.cpp +++ b/src/dist/replication/meta_server/meta_bulk_load_service.cpp @@ -58,7 +58,8 @@ void bulk_load_service::create_bulk_load_root_dir(error_code &err, task_tracker &tracker); } -void bulk_load_service::sync_apps_bulk_load_from_remote_stroage(error_code &err, task_tracker &tracker) +void bulk_load_service::sync_apps_bulk_load_from_remote_stroage(error_code &err, + task_tracker &tracker) { // TODO(heyuchen): TBD } diff --git a/src/dist/replication/meta_server/meta_bulk_load_service.h b/src/dist/replication/meta_server/meta_bulk_load_service.h index 0b38a902ba..1920e5547c 100644 --- a/src/dist/replication/meta_server/meta_bulk_load_service.h +++ b/src/dist/replication/meta_server/meta_bulk_load_service.h @@ -50,7 +50,7 @@ class bulk_load_service void initialize_bulk_load_service(); -private: +private: void create_bulk_load_root_dir(error_code &err, task_tracker &tracker); /// diff --git a/src/dist/replication/test/meta_test/unit_test/meta_test_base.h b/src/dist/replication/test/meta_test/unit_test/meta_test_base.h index 8c55d86922..1be4c69bd4 100644 --- a/src/dist/replication/test/meta_test/unit_test/meta_test_base.h +++ b/src/dist/replication/test/meta_test/unit_test/meta_test_base.h @@ -32,9 +32,9 @@ class meta_test_base : public testing::Test _ms->_split_svc = make_unique(_ms.get()); ASSERT_TRUE(_ms->_split_svc); _ms->_bulk_load_svc = make_unique( - _ms.get(), meta_options::concat_path_unix_style(_ms->_cluster_root, "bulk_load")); - ASSERT_TRUE(_ms->_bulk_load_svc); - _ms->_bulk_load_svc->initialize_bulk_load_service(); + _ms.get(), meta_options::concat_path_unix_style(_ms->_cluster_root, "bulk_load")); + ASSERT_TRUE(_ms->_bulk_load_svc); + _ms->_bulk_load_svc->initialize_bulk_load_service(); _ss = _ms->_state; _ss->initialize(_ms.get(), _ms->_cluster_root + "/apps"); From 45fbf7b28caf655f0567f0f2b9fd240d013e65bd Mon Sep 17 00:00:00 2001 From: heyuchen Date: Sun, 26 Apr 2020 11:29:59 +0800 Subject: [PATCH 5/9] format code --- .../dsn/dist/replication/replication.codes.h | 152 +++++++++--------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/include/dsn/dist/replication/replication.codes.h b/include/dsn/dist/replication/replication.codes.h index 16251865a8..695668f7de 100644 --- a/include/dsn/dist/replication/replication.codes.h +++ b/include/dsn/dist/replication/replication.codes.h @@ -113,99 +113,99 @@ MAKE_EVENT_CODE(LPC_META_STATE_NORMAL, TASK_PRIORITY_COMMON) // THREAD_POOL_REPLICATION #define CURRENT_THREAD_POOL THREAD_POOL_REPLICATION - MAKE_EVENT_CODE(LPC_REPLICATION_INIT_LOAD, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE( - RPC_REPLICATION_WRITE_EMPTY, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_PER_REPLICA_CHECKPOINT_TIMER, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE(LPC_PER_REPLICA_COLLECT_INFO_TIMER, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE( - LPC_WRITE_THROTTLING_DELAY, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_GROUP_CHECK, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_CM_DISCONNECTED_SCATTER, - TASK_PRIORITY_HIGH) - MAKE_EVENT_CODE(LPC_QUERY_NODE_CONFIGURATION_SCATTER, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE( - LPC_QUERY_NODE_CONFIGURATION_SCATTER2, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_DELAY_UPDATE_CONFIG, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_DELAY_LEARN, - TASK_PRIORITY_HIGH) - MAKE_EVENT_CODE(LPC_LEARN_REMOTE_DELTA_FILES_COMPLETED, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE( - LPC_CHECKPOINT_REPLICA_COMPLETED, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_SIM_UPDATE_PARTITION_CONFIGURATION_REPLY, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_AIO(LPC_WRITE_REPLICATION_LOG, - TASK_PRIORITY_HIGH) - MAKE_EVENT_CODE(LPC_REPLICATION_ERROR, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_AIO( - LPC_LERARN_REMOTE_DISK_STATE, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC(RPC_CONFIG_PROPOSAL, - TASK_PRIORITY_HIGH) - MAKE_EVENT_CODE_RPC(RPC_QUERY_PN_DECREE, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC( - RPC_QUERY_REPLICA_INFO, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC(RPC_PREPARE, TASK_PRIORITY_HIGH) - MAKE_EVENT_CODE(LPC_DELAY_PREPARE, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC( - RPC_GROUP_CHECK, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC(RPC_QUERY_APP_INFO, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE_RPC(RPC_LEARN, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC( - RPC_LEARN_COMPLETION_NOTIFY, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC(RPC_LEARN_ADD_LEARNER, - TASK_PRIORITY_HIGH) - MAKE_EVENT_CODE_RPC(RPC_REMOVE_REPLICA, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC( - RPC_REPLICA_COPY_LAST_CHECKPOINT, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_AIO(LPC_REPLICA_COPY_LAST_CHECKPOINT_DONE, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE_RPC(RPC_COLD_BACKUP, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC( - RPC_CLEAR_COLD_BACKUP, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_REPLICATION_COLD_BACKUP, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE(LPC_EXEC_COMMAND_ON_REPLICA, TASK_PRIORITY_LOW) MAKE_EVENT_CODE( - LPC_PARTITION_SPLIT, - TASK_PRIORITY_LOW) MAKE_EVENT_CODE(LPC_PARTITION_SPLIT_ERROR, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE_RPC( - RPC_SPLIT_NOTIFY_CATCH_UP, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_REPLICATION_LOW, - TASK_PRIORITY_LOW) - MAKE_EVENT_CODE( - LPC_REPLICATION_COMMON, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_REPLICATION_HIGH, - TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE(LPC_REPLICATION_INIT_LOAD, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(RPC_REPLICATION_WRITE_EMPTY, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE( + LPC_PER_REPLICA_CHECKPOINT_TIMER, + TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_PER_REPLICA_COLLECT_INFO_TIMER, + TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_WRITE_THROTTLING_DELAY, + TASK_PRIORITY_COMMON) + MAKE_EVENT_CODE(LPC_GROUP_CHECK, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE( + LPC_CM_DISCONNECTED_SCATTER, + TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_QUERY_NODE_CONFIGURATION_SCATTER, + TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_QUERY_NODE_CONFIGURATION_SCATTER2, + TASK_PRIORITY_HIGH) + MAKE_EVENT_CODE(LPC_DELAY_UPDATE_CONFIG, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE( + LPC_DELAY_LEARN, + TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_LEARN_REMOTE_DELTA_FILES_COMPLETED, + TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_CHECKPOINT_REPLICA_COMPLETED, + TASK_PRIORITY_HIGH) + MAKE_EVENT_CODE(LPC_SIM_UPDATE_PARTITION_CONFIGURATION_REPLY, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_AIO( + LPC_WRITE_REPLICATION_LOG, + TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_REPLICATION_ERROR, + TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_AIO(LPC_LERARN_REMOTE_DISK_STATE, + TASK_PRIORITY_HIGH) + MAKE_EVENT_CODE_RPC(RPC_CONFIG_PROPOSAL, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC( + RPC_QUERY_PN_DECREE, + TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC(RPC_QUERY_REPLICA_INFO, + TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC(RPC_PREPARE, + TASK_PRIORITY_HIGH) + MAKE_EVENT_CODE(LPC_DELAY_PREPARE, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC( + RPC_GROUP_CHECK, + TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC(RPC_QUERY_APP_INFO, + TASK_PRIORITY_COMMON) + MAKE_EVENT_CODE_RPC(RPC_LEARN, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC( + RPC_LEARN_COMPLETION_NOTIFY, + TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC(RPC_LEARN_ADD_LEARNER, + TASK_PRIORITY_HIGH) + MAKE_EVENT_CODE_RPC(RPC_REMOVE_REPLICA, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC( + RPC_REPLICA_COPY_LAST_CHECKPOINT, + TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_AIO(LPC_REPLICA_COPY_LAST_CHECKPOINT_DONE, + TASK_PRIORITY_COMMON) + MAKE_EVENT_CODE_RPC(RPC_COLD_BACKUP, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC( + RPC_CLEAR_COLD_BACKUP, + TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_REPLICATION_COLD_BACKUP, + TASK_PRIORITY_COMMON) + MAKE_EVENT_CODE(LPC_EXEC_COMMAND_ON_REPLICA, TASK_PRIORITY_LOW) MAKE_EVENT_CODE( + LPC_PARTITION_SPLIT, + TASK_PRIORITY_LOW) MAKE_EVENT_CODE(LPC_PARTITION_SPLIT_ERROR, + TASK_PRIORITY_COMMON) + MAKE_EVENT_CODE_RPC( + RPC_SPLIT_NOTIFY_CATCH_UP, + TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_REPLICATION_LOW, + TASK_PRIORITY_LOW) + MAKE_EVENT_CODE( + LPC_REPLICATION_COMMON, + TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_REPLICATION_HIGH, + TASK_PRIORITY_HIGH) #undef CURRENT_THREAD_POOL // THREAD_POOL_LOCAL_APP #define CURRENT_THREAD_POOL THREAD_POOL_LOCAL_APP - MAKE_EVENT_CODE(LPC_WRITE, - TASK_PRIORITY_COMMON) + MAKE_EVENT_CODE(LPC_WRITE, TASK_PRIORITY_COMMON) #undef CURRENT_THREAD_POOL // THREAD_POOL_REPLICATION_LONG #define CURRENT_THREAD_POOL THREAD_POOL_REPLICATION_LONG - MAKE_EVENT_CODE(LPC_LEARN_REMOTE_DELTA_FILES, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_AIO( - LPC_REPLICATION_COPY_REMOTE_FILES, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_GARBAGE_COLLECT_LOGS_AND_REPLICAS, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE(LPC_OPEN_REPLICA, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE( - LPC_CLOSE_REPLICA, + MAKE_EVENT_CODE(LPC_LEARN_REMOTE_DELTA_FILES, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_AIO( + LPC_REPLICATION_COPY_REMOTE_FILES, + TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_GARBAGE_COLLECT_LOGS_AND_REPLICAS, + TASK_PRIORITY_COMMON) + MAKE_EVENT_CODE( + LPC_OPEN_REPLICA, + TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_CLOSE_REPLICA, + TASK_PRIORITY_COMMON) + MAKE_EVENT_CODE( + LPC_CHECKPOINT_REPLICA, + TASK_PRIORITY_COMMON) + MAKE_EVENT_CODE( + LPC_CATCHUP_WITH_PRIVATE_LOGS, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE( - LPC_CHECKPOINT_REPLICA, + LPC_DISK_STAT, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE( - LPC_CATCHUP_WITH_PRIVATE_LOGS, + LPC_BACKGROUND_COLD_BACKUP, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE( - LPC_DISK_STAT, + LPC_PARTITION_SPLIT_ASYNC_LEARN, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE( - LPC_BACKGROUND_COLD_BACKUP, - TASK_PRIORITY_COMMON) + LPC_REPLICATION_LONG_LOW, + TASK_PRIORITY_LOW) MAKE_EVENT_CODE( - LPC_PARTITION_SPLIT_ASYNC_LEARN, + LPC_REPLICATION_LONG_COMMON, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE( - LPC_REPLICATION_LONG_LOW, - TASK_PRIORITY_LOW) - MAKE_EVENT_CODE( - LPC_REPLICATION_LONG_COMMON, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE( - LPC_REPLICATION_LONG_HIGH, - TASK_PRIORITY_HIGH) + LPC_REPLICATION_LONG_HIGH, + TASK_PRIORITY_HIGH) #undef CURRENT_THREAD_POOL From 3789f14ab29f83feff39aac06efffc09c61b1097 Mon Sep 17 00:00:00 2001 From: heyuchen Date: Sun, 26 Apr 2020 11:38:20 +0800 Subject: [PATCH 6/9] format code --- .../dsn/dist/replication/replication.codes.h | 139 +++++++----------- 1 file changed, 53 insertions(+), 86 deletions(-) diff --git a/include/dsn/dist/replication/replication.codes.h b/include/dsn/dist/replication/replication.codes.h index 695668f7de..bb3a5fee1f 100644 --- a/include/dsn/dist/replication/replication.codes.h +++ b/include/dsn/dist/replication/replication.codes.h @@ -114,98 +114,65 @@ MAKE_EVENT_CODE(LPC_META_STATE_NORMAL, TASK_PRIORITY_COMMON) // THREAD_POOL_REPLICATION #define CURRENT_THREAD_POOL THREAD_POOL_REPLICATION MAKE_EVENT_CODE(LPC_REPLICATION_INIT_LOAD, TASK_PRIORITY_COMMON) -MAKE_EVENT_CODE(RPC_REPLICATION_WRITE_EMPTY, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE( - LPC_PER_REPLICA_CHECKPOINT_TIMER, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_PER_REPLICA_COLLECT_INFO_TIMER, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_WRITE_THROTTLING_DELAY, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE(LPC_GROUP_CHECK, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE( - LPC_CM_DISCONNECTED_SCATTER, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_QUERY_NODE_CONFIGURATION_SCATTER, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_QUERY_NODE_CONFIGURATION_SCATTER2, - TASK_PRIORITY_HIGH) - MAKE_EVENT_CODE(LPC_DELAY_UPDATE_CONFIG, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE( - LPC_DELAY_LEARN, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_LEARN_REMOTE_DELTA_FILES_COMPLETED, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_CHECKPOINT_REPLICA_COMPLETED, - TASK_PRIORITY_HIGH) - MAKE_EVENT_CODE(LPC_SIM_UPDATE_PARTITION_CONFIGURATION_REPLY, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_AIO( - LPC_WRITE_REPLICATION_LOG, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE(LPC_REPLICATION_ERROR, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_AIO(LPC_LERARN_REMOTE_DISK_STATE, - TASK_PRIORITY_HIGH) - MAKE_EVENT_CODE_RPC(RPC_CONFIG_PROPOSAL, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC( - RPC_QUERY_PN_DECREE, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC(RPC_QUERY_REPLICA_INFO, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC(RPC_PREPARE, - TASK_PRIORITY_HIGH) - MAKE_EVENT_CODE(LPC_DELAY_PREPARE, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC( - RPC_GROUP_CHECK, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC(RPC_QUERY_APP_INFO, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE_RPC(RPC_LEARN, TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC( - RPC_LEARN_COMPLETION_NOTIFY, - TASK_PRIORITY_HIGH) MAKE_EVENT_CODE_RPC(RPC_LEARN_ADD_LEARNER, - TASK_PRIORITY_HIGH) - MAKE_EVENT_CODE_RPC(RPC_REMOVE_REPLICA, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC( - RPC_REPLICA_COPY_LAST_CHECKPOINT, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_AIO(LPC_REPLICA_COPY_LAST_CHECKPOINT_DONE, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE_RPC(RPC_COLD_BACKUP, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC( - RPC_CLEAR_COLD_BACKUP, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_REPLICATION_COLD_BACKUP, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE(LPC_EXEC_COMMAND_ON_REPLICA, TASK_PRIORITY_LOW) MAKE_EVENT_CODE( - LPC_PARTITION_SPLIT, - TASK_PRIORITY_LOW) MAKE_EVENT_CODE(LPC_PARTITION_SPLIT_ERROR, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE_RPC( - RPC_SPLIT_NOTIFY_CATCH_UP, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_REPLICATION_LOW, - TASK_PRIORITY_LOW) - MAKE_EVENT_CODE( - LPC_REPLICATION_COMMON, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_REPLICATION_HIGH, - TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE(RPC_REPLICATION_WRITE_EMPTY, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_PER_REPLICA_CHECKPOINT_TIMER, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_PER_REPLICA_COLLECT_INFO_TIMER, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_WRITE_THROTTLING_DELAY, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_GROUP_CHECK, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_CM_DISCONNECTED_SCATTER, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE(LPC_QUERY_NODE_CONFIGURATION_SCATTER, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE(LPC_QUERY_NODE_CONFIGURATION_SCATTER2, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE(LPC_DELAY_UPDATE_CONFIG, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE(LPC_DELAY_LEARN, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE(LPC_LEARN_REMOTE_DELTA_FILES_COMPLETED, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE(LPC_CHECKPOINT_REPLICA_COMPLETED, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE(LPC_SIM_UPDATE_PARTITION_CONFIGURATION_REPLY, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE_AIO(LPC_WRITE_REPLICATION_LOG, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE(LPC_REPLICATION_ERROR, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE_AIO(LPC_LERARN_REMOTE_DISK_STATE, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE_RPC(RPC_CONFIG_PROPOSAL, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE_RPC(RPC_QUERY_PN_DECREE, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE_RPC(RPC_QUERY_REPLICA_INFO, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE_RPC(RPC_PREPARE, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE(LPC_DELAY_PREPARE, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE_RPC(RPC_GROUP_CHECK, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE_RPC(RPC_QUERY_APP_INFO, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE_RPC(RPC_LEARN, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE_RPC(RPC_LEARN_COMPLETION_NOTIFY, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE_RPC(RPC_LEARN_ADD_LEARNER, TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE_RPC(RPC_REMOVE_REPLICA, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE_RPC(RPC_REPLICA_COPY_LAST_CHECKPOINT, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE_AIO(LPC_REPLICA_COPY_LAST_CHECKPOINT_DONE, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE_RPC(RPC_COLD_BACKUP, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE_RPC(RPC_CLEAR_COLD_BACKUP, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_REPLICATION_COLD_BACKUP, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_EXEC_COMMAND_ON_REPLICA, TASK_PRIORITY_LOW) +MAKE_EVENT_CODE(LPC_PARTITION_SPLIT, TASK_PRIORITY_LOW) +MAKE_EVENT_CODE(LPC_PARTITION_SPLIT_ERROR, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE_RPC(RPC_SPLIT_NOTIFY_CATCH_UP, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_REPLICATION_LOW, TASK_PRIORITY_LOW) +MAKE_EVENT_CODE(LPC_REPLICATION_COMMON, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_REPLICATION_HIGH, TASK_PRIORITY_HIGH) #undef CURRENT_THREAD_POOL // THREAD_POOL_LOCAL_APP #define CURRENT_THREAD_POOL THREAD_POOL_LOCAL_APP - MAKE_EVENT_CODE(LPC_WRITE, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_WRITE, TASK_PRIORITY_COMMON) #undef CURRENT_THREAD_POOL // THREAD_POOL_REPLICATION_LONG #define CURRENT_THREAD_POOL THREAD_POOL_REPLICATION_LONG - MAKE_EVENT_CODE(LPC_LEARN_REMOTE_DELTA_FILES, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_AIO( - LPC_REPLICATION_COPY_REMOTE_FILES, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_GARBAGE_COLLECT_LOGS_AND_REPLICAS, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE( - LPC_OPEN_REPLICA, - TASK_PRIORITY_COMMON) MAKE_EVENT_CODE(LPC_CLOSE_REPLICA, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE( - LPC_CHECKPOINT_REPLICA, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE( - LPC_CATCHUP_WITH_PRIVATE_LOGS, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE( - LPC_DISK_STAT, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE( - LPC_BACKGROUND_COLD_BACKUP, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE( - LPC_PARTITION_SPLIT_ASYNC_LEARN, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE( - LPC_REPLICATION_LONG_LOW, - TASK_PRIORITY_LOW) - MAKE_EVENT_CODE( - LPC_REPLICATION_LONG_COMMON, - TASK_PRIORITY_COMMON) - MAKE_EVENT_CODE( - LPC_REPLICATION_LONG_HIGH, - TASK_PRIORITY_HIGH) +MAKE_EVENT_CODE(LPC_LEARN_REMOTE_DELTA_FILES, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE_AIO(LPC_REPLICATION_COPY_REMOTE_FILES, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_GARBAGE_COLLECT_LOGS_AND_REPLICAS, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_OPEN_REPLICA, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_CLOSE_REPLICA, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_CHECKPOINT_REPLICA, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_CATCHUP_WITH_PRIVATE_LOGS, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_DISK_STAT, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_BACKGROUND_COLD_BACKUP, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_PARTITION_SPLIT_ASYNC_LEARN, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_REPLICATION_LONG_LOW, TASK_PRIORITY_LOW) +MAKE_EVENT_CODE(LPC_REPLICATION_LONG_COMMON, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE(LPC_REPLICATION_LONG_HIGH, TASK_PRIORITY_HIGH) #undef CURRENT_THREAD_POOL From 641d4aaf9fcd8ae3cae3a6c2d338bab66027e502 Mon Sep 17 00:00:00 2001 From: heyuchen Date: Sun, 26 Apr 2020 15:31:33 +0800 Subject: [PATCH 7/9] small fix --- src/dist/replication/meta_server/meta_bulk_load_service.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dist/replication/meta_server/meta_bulk_load_service.cpp b/src/dist/replication/meta_server/meta_bulk_load_service.cpp index 7e05ee8640..d1077e10ce 100644 --- a/src/dist/replication/meta_server/meta_bulk_load_service.cpp +++ b/src/dist/replication/meta_server/meta_bulk_load_service.cpp @@ -47,7 +47,7 @@ void bulk_load_service::create_bulk_load_root_dir(error_code &err, task_tracker nullptr, std::bind(&bulk_load_service::create_bulk_load_root_dir, this, err, tracker), 0, - std::chrono::milliseconds(1000)); + std::chrono::seconds(1)); } else { err = ec; dfatal_f( From cab9a4d123956385f2318a28669021c2ebd7b1ac Mon Sep 17 00:00:00 2001 From: heyuchen Date: Mon, 27 Apr 2020 17:12:05 +0800 Subject: [PATCH 8/9] small fix --- .../replication/common/replication_common.cpp | 6 ++-- .../meta_server/meta_bulk_load_service.h | 35 +++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/src/dist/replication/common/replication_common.cpp b/src/dist/replication/common/replication_common.cpp index 5f852e37af..59e3957ced 100644 --- a/src/dist/replication/common/replication_common.cpp +++ b/src/dist/replication/common/replication_common.cpp @@ -514,8 +514,10 @@ void replication_options::initialize() cold_backup_checkpoint_reserve_minutes, "reserve minutes of cold backup checkpoint"); - bulk_load_provider_root = dsn_config_get_value_string( - "replication", "bulk_load_provider_root", "", "bulk load root on remote file provider"); + bulk_load_provider_root = dsn_config_get_value_string("replication", + "bulk_load_provider_root", + "bulk_load_root", + "bulk load root on remote file provider"); replica_helper::load_meta_servers(meta_servers); diff --git a/src/dist/replication/meta_server/meta_bulk_load_service.h b/src/dist/replication/meta_server/meta_bulk_load_service.h index 1920e5547c..f5e3869ce5 100644 --- a/src/dist/replication/meta_server/meta_bulk_load_service.h +++ b/src/dist/replication/meta_server/meta_bulk_load_service.h @@ -43,6 +43,41 @@ struct bulk_load_info DEFINE_JSON_SERIALIZATION(app_id, app_name, partition_count) }; +/// +/// Bulk load process: +/// when client sent `start_bulk_load_rpc` to meta server to start bulk load, +/// meta server create bulk load structures on remote storage, and send `RPC_BULK_LOAD` rpc to +/// each primary replica periodically until bulk load succeed or failed. whole process below: +/// +/// start bulk load +/// | +/// v +/// is_bulk_loading = true +/// | +/// v +/// create bulk load info on remote storage +/// | +/// Err v +/// ---------Downloading <---------| +/// | | | +/// | v Err | +/// | Downloaded --------->| +/// | | | +/// | IngestErr v Err | +/// |<------- Ingesting --------->| +/// | | | +/// v v Err | +/// Failed Succeed --------->| +/// | | +/// v v +/// remove bulk load info on remote storage +/// | +/// v +/// is_bulk_loading = false +/// | +/// v +/// bulk load end + class bulk_load_service { public: From 860bfdd6c32ccb8795ecc57e18c30faab76d0d61 Mon Sep 17 00:00:00 2001 From: heyuchen Date: Thu, 30 Apr 2020 15:26:39 +0800 Subject: [PATCH 9/9] small fix --- src/dist/replication/meta_server/meta_bulk_load_service.cpp | 2 +- src/dist/replication/meta_server/meta_bulk_load_service.h | 2 +- src/dist/replication/meta_server/meta_service.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dist/replication/meta_server/meta_bulk_load_service.cpp b/src/dist/replication/meta_server/meta_bulk_load_service.cpp index d1077e10ce..fce0f6968c 100644 --- a/src/dist/replication/meta_server/meta_bulk_load_service.cpp +++ b/src/dist/replication/meta_server/meta_bulk_load_service.cpp @@ -44,7 +44,7 @@ void bulk_load_service::create_bulk_load_root_dir(error_code &err, task_tracker dwarn_f("create bulk load root({}) failed, retry later", _bulk_load_root); tasking::enqueue( LPC_META_STATE_NORMAL, - nullptr, + _meta_svc->tracker(), std::bind(&bulk_load_service::create_bulk_load_root_dir, this, err, tracker), 0, std::chrono::seconds(1)); diff --git a/src/dist/replication/meta_server/meta_bulk_load_service.h b/src/dist/replication/meta_server/meta_bulk_load_service.h index f5e3869ce5..41b641559c 100644 --- a/src/dist/replication/meta_server/meta_bulk_load_service.h +++ b/src/dist/replication/meta_server/meta_bulk_load_service.h @@ -109,7 +109,7 @@ class bulk_load_service zrwlock_nr &app_lock() const { return _state->_lock; } zrwlock_nr _lock; // bulk load states lock - std::string _bulk_load_root; // /bulk_load + const std::string _bulk_load_root; // /bulk_load /// bulk load states std::unordered_set _bulk_load_app_id; diff --git a/src/dist/replication/meta_server/meta_service.cpp b/src/dist/replication/meta_server/meta_service.cpp index dfb1deb1cb..574824c2e2 100644 --- a/src/dist/replication/meta_server/meta_service.cpp +++ b/src/dist/replication/meta_server/meta_service.cpp @@ -243,7 +243,7 @@ void meta_service::start_service() if (_bulk_load_svc) { ddebug("start bulk load service"); - tasking::enqueue(LPC_META_STATE_NORMAL, nullptr, [this]() { + tasking::enqueue(LPC_META_STATE_NORMAL, tracker(), [this]() { _bulk_load_svc->initialize_bulk_load_service(); }); }