5264 lines
183 KiB
C++
5264 lines
183 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: paxos.proto
|
|
|
|
#include "paxos.pb.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include <google/protobuf/stubs/common.h>
|
|
#include <google/protobuf/stubs/port.h>
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
#include <google/protobuf/wire_format_lite_inl.h>
|
|
#include <google/protobuf/descriptor.h>
|
|
#include <google/protobuf/generated_message_reflection.h>
|
|
#include <google/protobuf/reflection_ops.h>
|
|
#include <google/protobuf/wire_format.h>
|
|
// This is a temporary google only hack
|
|
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
|
|
#include "third_party/protobuf/version.h"
|
|
#endif
|
|
// @@protoc_insertion_point(includes)
|
|
|
|
namespace protobuf_paxos_2eproto {
|
|
extern PROTOBUF_INTERNAL_EXPORT_protobuf_paxos_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ClusterInfoEntry;
|
|
extern PROTOBUF_INTERNAL_EXPORT_protobuf_paxos_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_CompressedLogEntries;
|
|
extern PROTOBUF_INTERNAL_EXPORT_protobuf_paxos_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_LogEntry;
|
|
} // namespace protobuf_paxos_2eproto
|
|
namespace alisql {
|
|
class LogEntryDefaultTypeInternal {
|
|
public:
|
|
::google::protobuf::internal::ExplicitlyConstructed<LogEntry>
|
|
_instance;
|
|
} _LogEntry_default_instance_;
|
|
class RDSFieldsDefaultTypeInternal {
|
|
public:
|
|
::google::protobuf::internal::ExplicitlyConstructed<RDSFields>
|
|
_instance;
|
|
} _RDSFields_default_instance_;
|
|
class PolarFieldsDefaultTypeInternal {
|
|
public:
|
|
::google::protobuf::internal::ExplicitlyConstructed<PolarFields>
|
|
_instance;
|
|
} _PolarFields_default_instance_;
|
|
class CompressedLogEntriesDefaultTypeInternal {
|
|
public:
|
|
::google::protobuf::internal::ExplicitlyConstructed<CompressedLogEntries>
|
|
_instance;
|
|
} _CompressedLogEntries_default_instance_;
|
|
class ConfigureChangeValueDefaultTypeInternal {
|
|
public:
|
|
::google::protobuf::internal::ExplicitlyConstructed<ConfigureChangeValue>
|
|
_instance;
|
|
} _ConfigureChangeValue_default_instance_;
|
|
class ClusterInfoEntryDefaultTypeInternal {
|
|
public:
|
|
::google::protobuf::internal::ExplicitlyConstructed<ClusterInfoEntry>
|
|
_instance;
|
|
} _ClusterInfoEntry_default_instance_;
|
|
class PaxosMsgDefaultTypeInternal {
|
|
public:
|
|
::google::protobuf::internal::ExplicitlyConstructed<PaxosMsg>
|
|
_instance;
|
|
} _PaxosMsg_default_instance_;
|
|
class TestMsg1DefaultTypeInternal {
|
|
public:
|
|
::google::protobuf::internal::ExplicitlyConstructed<TestMsg1>
|
|
_instance;
|
|
} _TestMsg1_default_instance_;
|
|
class TestMsg2DefaultTypeInternal {
|
|
public:
|
|
::google::protobuf::internal::ExplicitlyConstructed<TestMsg2>
|
|
_instance;
|
|
} _TestMsg2_default_instance_;
|
|
} // namespace alisql
|
|
namespace protobuf_paxos_2eproto {
|
|
static void InitDefaultsLogEntry() {
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
{
|
|
void* ptr = &::alisql::_LogEntry_default_instance_;
|
|
new (ptr) ::alisql::LogEntry();
|
|
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
}
|
|
::alisql::LogEntry::InitAsDefaultInstance();
|
|
}
|
|
|
|
::google::protobuf::internal::SCCInfo<0> scc_info_LogEntry =
|
|
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsLogEntry}, {}};
|
|
|
|
static void InitDefaultsRDSFields() {
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
{
|
|
void* ptr = &::alisql::_RDSFields_default_instance_;
|
|
new (ptr) ::alisql::RDSFields();
|
|
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
}
|
|
::alisql::RDSFields::InitAsDefaultInstance();
|
|
}
|
|
|
|
::google::protobuf::internal::SCCInfo<0> scc_info_RDSFields =
|
|
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRDSFields}, {}};
|
|
|
|
static void InitDefaultsPolarFields() {
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
{
|
|
void* ptr = &::alisql::_PolarFields_default_instance_;
|
|
new (ptr) ::alisql::PolarFields();
|
|
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
}
|
|
::alisql::PolarFields::InitAsDefaultInstance();
|
|
}
|
|
|
|
::google::protobuf::internal::SCCInfo<0> scc_info_PolarFields =
|
|
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPolarFields}, {}};
|
|
|
|
static void InitDefaultsCompressedLogEntries() {
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
{
|
|
void* ptr = &::alisql::_CompressedLogEntries_default_instance_;
|
|
new (ptr) ::alisql::CompressedLogEntries();
|
|
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
}
|
|
::alisql::CompressedLogEntries::InitAsDefaultInstance();
|
|
}
|
|
|
|
::google::protobuf::internal::SCCInfo<0> scc_info_CompressedLogEntries =
|
|
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCompressedLogEntries}, {}};
|
|
|
|
static void InitDefaultsConfigureChangeValue() {
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
{
|
|
void* ptr = &::alisql::_ConfigureChangeValue_default_instance_;
|
|
new (ptr) ::alisql::ConfigureChangeValue();
|
|
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
}
|
|
::alisql::ConfigureChangeValue::InitAsDefaultInstance();
|
|
}
|
|
|
|
::google::protobuf::internal::SCCInfo<0> scc_info_ConfigureChangeValue =
|
|
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsConfigureChangeValue}, {}};
|
|
|
|
static void InitDefaultsClusterInfoEntry() {
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
{
|
|
void* ptr = &::alisql::_ClusterInfoEntry_default_instance_;
|
|
new (ptr) ::alisql::ClusterInfoEntry();
|
|
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
}
|
|
::alisql::ClusterInfoEntry::InitAsDefaultInstance();
|
|
}
|
|
|
|
::google::protobuf::internal::SCCInfo<0> scc_info_ClusterInfoEntry =
|
|
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsClusterInfoEntry}, {}};
|
|
|
|
static void InitDefaultsPaxosMsg() {
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
{
|
|
void* ptr = &::alisql::_PaxosMsg_default_instance_;
|
|
new (ptr) ::alisql::PaxosMsg();
|
|
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
}
|
|
::alisql::PaxosMsg::InitAsDefaultInstance();
|
|
}
|
|
|
|
::google::protobuf::internal::SCCInfo<3> scc_info_PaxosMsg =
|
|
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsPaxosMsg}, {
|
|
&protobuf_paxos_2eproto::scc_info_LogEntry.base,
|
|
&protobuf_paxos_2eproto::scc_info_ClusterInfoEntry.base,
|
|
&protobuf_paxos_2eproto::scc_info_CompressedLogEntries.base,}};
|
|
|
|
static void InitDefaultsTestMsg1() {
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
{
|
|
void* ptr = &::alisql::_TestMsg1_default_instance_;
|
|
new (ptr) ::alisql::TestMsg1();
|
|
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
}
|
|
::alisql::TestMsg1::InitAsDefaultInstance();
|
|
}
|
|
|
|
::google::protobuf::internal::SCCInfo<0> scc_info_TestMsg1 =
|
|
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestMsg1}, {}};
|
|
|
|
static void InitDefaultsTestMsg2() {
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
{
|
|
void* ptr = &::alisql::_TestMsg2_default_instance_;
|
|
new (ptr) ::alisql::TestMsg2();
|
|
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
}
|
|
::alisql::TestMsg2::InitAsDefaultInstance();
|
|
}
|
|
|
|
::google::protobuf::internal::SCCInfo<0> scc_info_TestMsg2 =
|
|
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestMsg2}, {}};
|
|
|
|
void InitDefaults() {
|
|
::google::protobuf::internal::InitSCC(&scc_info_LogEntry.base);
|
|
::google::protobuf::internal::InitSCC(&scc_info_RDSFields.base);
|
|
::google::protobuf::internal::InitSCC(&scc_info_PolarFields.base);
|
|
::google::protobuf::internal::InitSCC(&scc_info_CompressedLogEntries.base);
|
|
::google::protobuf::internal::InitSCC(&scc_info_ConfigureChangeValue.base);
|
|
::google::protobuf::internal::InitSCC(&scc_info_ClusterInfoEntry.base);
|
|
::google::protobuf::internal::InitSCC(&scc_info_PaxosMsg.base);
|
|
::google::protobuf::internal::InitSCC(&scc_info_TestMsg1.base);
|
|
::google::protobuf::internal::InitSCC(&scc_info_TestMsg2.base);
|
|
}
|
|
|
|
::google::protobuf::Metadata file_level_metadata[9];
|
|
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
|
|
|
|
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::LogEntry, _has_bits_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::LogEntry, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::LogEntry, term_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::LogEntry, index_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::LogEntry, optype_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::LogEntry, ikey_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::LogEntry, value_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::LogEntry, info_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::LogEntry, checksum_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::LogEntry, opaque_),
|
|
3,
|
|
4,
|
|
5,
|
|
0,
|
|
1,
|
|
6,
|
|
7,
|
|
2,
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::RDSFields, _has_bits_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::RDSFields, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::RDSFields, rdsserverid_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::RDSFields, source_),
|
|
0,
|
|
1,
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PolarFields, _has_bits_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PolarFields, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PolarFields, version_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PolarFields, start_lsn_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PolarFields, extra_value_),
|
|
2,
|
|
1,
|
|
0,
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::CompressedLogEntries, _has_bits_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::CompressedLogEntries, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::CompressedLogEntries, type_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::CompressedLogEntries, rawsize_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::CompressedLogEntries, data_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::CompressedLogEntries, checksum_),
|
|
1,
|
|
2,
|
|
0,
|
|
3,
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ConfigureChangeValue, _has_bits_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ConfigureChangeValue, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ConfigureChangeValue, cctype_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ConfigureChangeValue, optype_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ConfigureChangeValue, addrs_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ConfigureChangeValue, allservers_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ConfigureChangeValue, alllearners_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ConfigureChangeValue, serverid_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ConfigureChangeValue, forcesync_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ConfigureChangeValue, electionweight_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ConfigureChangeValue, learnersource_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ConfigureChangeValue, applymode_),
|
|
0,
|
|
1,
|
|
~0u,
|
|
~0u,
|
|
~0u,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ClusterInfoEntry, _has_bits_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ClusterInfoEntry, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ClusterInfoEntry, serverid_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ClusterInfoEntry, matchindex_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ClusterInfoEntry, nextindex_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ClusterInfoEntry, role_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ClusterInfoEntry, hasvoted_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ClusterInfoEntry, forcesync_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ClusterInfoEntry, electionweight_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ClusterInfoEntry, learnersource_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ClusterInfoEntry, appliedindex_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::ClusterInfoEntry, pipelining_),
|
|
0,
|
|
1,
|
|
2,
|
|
4,
|
|
3,
|
|
5,
|
|
7,
|
|
6,
|
|
9,
|
|
8,
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, _has_bits_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, configid_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, clusterid_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, serverid_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, msgtype_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, term_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, msgid_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, leaderid_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, prevlogindex_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, prevlogterm_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, entries_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, commitindex_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, nocache_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, issuccess_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, candidateid_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, lastlogindex_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, lastlogterm_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, force_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, addr_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, votegranted_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, ignorecheck_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, lctype_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, minmatchindex_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, appliedindex_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, newclusterid_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, cientries_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, role_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, compressedentries_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, extra_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::PaxosMsg, msgerror_),
|
|
3,
|
|
4,
|
|
5,
|
|
12,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
~0u,
|
|
11,
|
|
13,
|
|
14,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
0,
|
|
15,
|
|
16,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
~0u,
|
|
25,
|
|
2,
|
|
1,
|
|
26,
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::TestMsg1, _has_bits_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::TestMsg1, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::TestMsg1, id_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::TestMsg1, c1_),
|
|
0,
|
|
1,
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::TestMsg2, _has_bits_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::TestMsg2, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::TestMsg2, id_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::TestMsg2, c1_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::alisql::TestMsg2, c2_),
|
|
0,
|
|
1,
|
|
~0u,
|
|
};
|
|
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
{ 0, 13, sizeof(::alisql::LogEntry)},
|
|
{ 21, 28, sizeof(::alisql::RDSFields)},
|
|
{ 30, 38, sizeof(::alisql::PolarFields)},
|
|
{ 41, 50, sizeof(::alisql::CompressedLogEntries)},
|
|
{ 54, 69, sizeof(::alisql::ConfigureChangeValue)},
|
|
{ 79, 94, sizeof(::alisql::ClusterInfoEntry)},
|
|
{ 104, 138, sizeof(::alisql::PaxosMsg)},
|
|
{ 167, 174, sizeof(::alisql::TestMsg1)},
|
|
{ 176, 184, sizeof(::alisql::TestMsg2)},
|
|
};
|
|
|
|
static ::google::protobuf::Message const * const file_default_instances[] = {
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::alisql::_LogEntry_default_instance_),
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::alisql::_RDSFields_default_instance_),
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::alisql::_PolarFields_default_instance_),
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::alisql::_CompressedLogEntries_default_instance_),
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::alisql::_ConfigureChangeValue_default_instance_),
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::alisql::_ClusterInfoEntry_default_instance_),
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::alisql::_PaxosMsg_default_instance_),
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::alisql::_TestMsg1_default_instance_),
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::alisql::_TestMsg2_default_instance_),
|
|
};
|
|
|
|
void protobuf_AssignDescriptors() {
|
|
AddDescriptors();
|
|
AssignDescriptors(
|
|
"paxos.proto", schemas, file_default_instances, TableStruct::offsets,
|
|
file_level_metadata, file_level_enum_descriptors, NULL);
|
|
}
|
|
|
|
void protobuf_AssignDescriptorsOnce() {
|
|
static ::google::protobuf::internal::once_flag once;
|
|
::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
|
|
}
|
|
|
|
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
|
|
void protobuf_RegisterTypes(const ::std::string&) {
|
|
protobuf_AssignDescriptorsOnce();
|
|
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 9);
|
|
}
|
|
|
|
void AddDescriptorsImpl() {
|
|
InitDefaults();
|
|
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
"\n\013paxos.proto\022\006alisql\"\204\001\n\010LogEntry\022\014\n\004te"
|
|
"rm\030\001 \002(\004\022\r\n\005index\030\002 \002(\004\022\016\n\006opType\030\003 \002(\004\022"
|
|
"\014\n\004ikey\030\004 \001(\014\022\r\n\005value\030\005 \001(\014\022\014\n\004info\030\006 \001"
|
|
"(\004\022\020\n\010checksum\030\007 \001(\004\022\016\n\006opaque\030\t \001(\014\"0\n\t"
|
|
"RDSFields\022\023\n\013rdsServerId\030\001 \001(\r\022\016\n\006source"
|
|
"\030\002 \001(\r\"F\n\013PolarFields\022\017\n\007version\030\001 \002(\r\022\021"
|
|
"\n\tstart_lsn\030\002 \002(\004\022\023\n\013extra_value\030\003 \001(\014\"U"
|
|
"\n\024CompressedLogEntries\022\014\n\004type\030\001 \002(\r\022\017\n\007"
|
|
"rawSize\030\002 \002(\r\022\014\n\004data\030\003 \002(\014\022\020\n\010checksum\030"
|
|
"\004 \001(\r\"\325\001\n\024ConfigureChangeValue\022\016\n\006ccType"
|
|
"\030\001 \001(\005\022\016\n\006opType\030\002 \001(\005\022\r\n\005addrs\030\003 \003(\014\022\022\n"
|
|
"\nallServers\030\004 \003(\014\022\023\n\013allLearners\030\005 \003(\014\022\020"
|
|
"\n\010serverId\030\006 \001(\004\022\021\n\tforceSync\030\007 \001(\r\022\026\n\016e"
|
|
"lectionWeight\030\010 \001(\r\022\025\n\rlearnerSource\030\t \001"
|
|
"(\004\022\021\n\tapplyMode\030\n \001(\010\"\327\001\n\020ClusterInfoEnt"
|
|
"ry\022\020\n\010serverId\030\001 \002(\004\022\022\n\nmatchIndex\030\002 \001(\004"
|
|
"\022\021\n\tnextIndex\030\003 \001(\004\022\014\n\004role\030\004 \001(\r\022\020\n\010has"
|
|
"Voted\030\005 \001(\004\022\021\n\tforceSync\030\006 \001(\r\022\026\n\016electi"
|
|
"onWeight\030\007 \001(\r\022\025\n\rlearnerSource\030\010 \001(\004\022\024\n"
|
|
"\014appliedIndex\030\t \001(\004\022\022\n\npipelining\030\n \001(\r\""
|
|
"\274\005\n\010PaxosMsg\022\020\n\010configId\030\001 \001(\004\022\021\n\tcluste"
|
|
"rId\030\002 \002(\004\022\020\n\010serverId\030\003 \002(\004\022\017\n\007msgType\030\004"
|
|
" \002(\005\022\014\n\004term\030\005 \002(\004\022\r\n\005msgId\030\006 \002(\004\022\020\n\010lea"
|
|
"derId\030\007 \001(\004\022\024\n\014prevLogIndex\030\010 \001(\004\022\023\n\013pre"
|
|
"vLogTerm\030\t \001(\004\022!\n\007entries\030\n \003(\0132\020.alisql"
|
|
".LogEntry\022\023\n\013commitIndex\030\013 \001(\004\022\017\n\007nocach"
|
|
"e\030\014 \001(\010\022\021\n\tisSuccess\030\r \001(\010\022\023\n\013candidateI"
|
|
"d\030\016 \001(\004\022\024\n\014lastLogIndex\030\017 \001(\004\022\023\n\013lastLog"
|
|
"Term\030\020 \001(\004\022\r\n\005force\030\021 \001(\004\022\014\n\004addr\030\022 \001(\014\022"
|
|
"\023\n\013voteGranted\030\023 \001(\010\022\023\n\013ignoreCheck\030\024 \001("
|
|
"\010\022\016\n\006lcType\030\025 \001(\004\022\025\n\rminMatchIndex\030\026 \001(\004"
|
|
"\022\024\n\014appliedIndex\030\027 \001(\004\022\024\n\014newClusterId\030\030"
|
|
" \001(\004\022+\n\tciEntries\030\031 \003(\0132\030.alisql.Cluster"
|
|
"InfoEntry\022\014\n\004role\030\032 \001(\r\0227\n\021compressedEnt"
|
|
"ries\030\033 \001(\0132\034.alisql.CompressedLogEntries"
|
|
"\022\r\n\005extra\030\034 \001(\014\022/\n\010msgError\030\036 \001(\0162\035.alis"
|
|
"ql.PaxosMsg.MsgErrorType\"$\n\014MsgErrorType"
|
|
"\022\010\n\004NONE\020\000\022\n\n\006APPEND\020\001\"\"\n\010TestMsg1\022\n\n\002id"
|
|
"\030\001 \002(\004\022\n\n\002c1\030\002 \001(\004\".\n\010TestMsg2\022\n\n\002id\030\001 \002"
|
|
"(\004\022\n\n\002c1\030\002 \001(\004\022\n\n\002c2\030\003 \003(\004"
|
|
};
|
|
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
|
descriptor, 1586);
|
|
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
|
|
"paxos.proto", &protobuf_RegisterTypes);
|
|
}
|
|
|
|
void AddDescriptors() {
|
|
static ::google::protobuf::internal::once_flag once;
|
|
::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
|
|
}
|
|
// Force AddDescriptors() to be called at dynamic initialization time.
|
|
struct StaticDescriptorInitializer {
|
|
StaticDescriptorInitializer() {
|
|
AddDescriptors();
|
|
}
|
|
} static_descriptor_initializer;
|
|
} // namespace protobuf_paxos_2eproto
|
|
namespace alisql {
|
|
const ::google::protobuf::EnumDescriptor* PaxosMsg_MsgErrorType_descriptor() {
|
|
protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return protobuf_paxos_2eproto::file_level_enum_descriptors[0];
|
|
}
|
|
bool PaxosMsg_MsgErrorType_IsValid(int value) {
|
|
switch (value) {
|
|
case 0:
|
|
case 1:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
const PaxosMsg_MsgErrorType PaxosMsg::NONE;
|
|
const PaxosMsg_MsgErrorType PaxosMsg::APPEND;
|
|
const PaxosMsg_MsgErrorType PaxosMsg::MsgErrorType_MIN;
|
|
const PaxosMsg_MsgErrorType PaxosMsg::MsgErrorType_MAX;
|
|
const int PaxosMsg::MsgErrorType_ARRAYSIZE;
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
// ===================================================================
|
|
|
|
void LogEntry::InitAsDefaultInstance() {
|
|
}
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
const int LogEntry::kTermFieldNumber;
|
|
const int LogEntry::kIndexFieldNumber;
|
|
const int LogEntry::kOpTypeFieldNumber;
|
|
const int LogEntry::kIkeyFieldNumber;
|
|
const int LogEntry::kValueFieldNumber;
|
|
const int LogEntry::kInfoFieldNumber;
|
|
const int LogEntry::kChecksumFieldNumber;
|
|
const int LogEntry::kOpaqueFieldNumber;
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
LogEntry::LogEntry()
|
|
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
::google::protobuf::internal::InitSCC(
|
|
&protobuf_paxos_2eproto::scc_info_LogEntry.base);
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(constructor:alisql.LogEntry)
|
|
}
|
|
LogEntry::LogEntry(const LogEntry& from)
|
|
: ::google::protobuf::Message(),
|
|
_internal_metadata_(NULL),
|
|
_has_bits_(from._has_bits_) {
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
ikey_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
if (from.has_ikey()) {
|
|
ikey_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ikey_);
|
|
}
|
|
value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
if (from.has_value()) {
|
|
value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
|
|
}
|
|
opaque_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
if (from.has_opaque()) {
|
|
opaque_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.opaque_);
|
|
}
|
|
::memcpy(&term_, &from.term_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&checksum_) -
|
|
reinterpret_cast<char*>(&term_)) + sizeof(checksum_));
|
|
// @@protoc_insertion_point(copy_constructor:alisql.LogEntry)
|
|
}
|
|
|
|
void LogEntry::SharedCtor() {
|
|
ikey_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
opaque_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
::memset(&term_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&checksum_) -
|
|
reinterpret_cast<char*>(&term_)) + sizeof(checksum_));
|
|
}
|
|
|
|
LogEntry::~LogEntry() {
|
|
// @@protoc_insertion_point(destructor:alisql.LogEntry)
|
|
SharedDtor();
|
|
}
|
|
|
|
void LogEntry::SharedDtor() {
|
|
ikey_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
opaque_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
|
|
void LogEntry::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
const ::google::protobuf::Descriptor* LogEntry::descriptor() {
|
|
::protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
}
|
|
|
|
const LogEntry& LogEntry::default_instance() {
|
|
::google::protobuf::internal::InitSCC(&protobuf_paxos_2eproto::scc_info_LogEntry.base);
|
|
return *internal_default_instance();
|
|
}
|
|
|
|
|
|
void LogEntry::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:alisql.LogEntry)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
if (cached_has_bits & 7u) {
|
|
if (cached_has_bits & 0x00000001u) {
|
|
ikey_.ClearNonDefaultToEmptyNoArena();
|
|
}
|
|
if (cached_has_bits & 0x00000002u) {
|
|
value_.ClearNonDefaultToEmptyNoArena();
|
|
}
|
|
if (cached_has_bits & 0x00000004u) {
|
|
opaque_.ClearNonDefaultToEmptyNoArena();
|
|
}
|
|
}
|
|
if (cached_has_bits & 248u) {
|
|
::memset(&term_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&checksum_) -
|
|
reinterpret_cast<char*>(&term_)) + sizeof(checksum_));
|
|
}
|
|
_has_bits_.Clear();
|
|
_internal_metadata_.Clear();
|
|
}
|
|
|
|
bool LogEntry::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
::google::protobuf::uint32 tag;
|
|
// @@protoc_insertion_point(parse_start:alisql.LogEntry)
|
|
for (;;) {
|
|
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
tag = p.first;
|
|
if (!p.second) goto handle_unusual;
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// required uint64 term = 1;
|
|
case 1: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
set_has_term();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &term_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// required uint64 index = 2;
|
|
case 2: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
set_has_index();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &index_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// required uint64 opType = 3;
|
|
case 3: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
|
|
set_has_optype();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &optype_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional bytes ikey = 4;
|
|
case 4: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->mutable_ikey()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional bytes value = 5;
|
|
case 5: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->mutable_value()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 info = 6;
|
|
case 6: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
|
|
set_has_info();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &info_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 checksum = 7;
|
|
case 7: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
|
|
set_has_checksum();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &checksum_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional bytes opaque = 9;
|
|
case 9: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->mutable_opaque()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_unusual:
|
|
if (tag == 0) {
|
|
goto success;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
success:
|
|
// @@protoc_insertion_point(parse_success:alisql.LogEntry)
|
|
return true;
|
|
failure:
|
|
// @@protoc_insertion_point(parse_failure:alisql.LogEntry)
|
|
return false;
|
|
#undef DO_
|
|
}
|
|
|
|
void LogEntry::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// @@protoc_insertion_point(serialize_start:alisql.LogEntry)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required uint64 term = 1;
|
|
if (cached_has_bits & 0x00000008u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->term(), output);
|
|
}
|
|
|
|
// required uint64 index = 2;
|
|
if (cached_has_bits & 0x00000010u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->index(), output);
|
|
}
|
|
|
|
// required uint64 opType = 3;
|
|
if (cached_has_bits & 0x00000020u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->optype(), output);
|
|
}
|
|
|
|
// optional bytes ikey = 4;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
|
|
4, this->ikey(), output);
|
|
}
|
|
|
|
// optional bytes value = 5;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
|
|
5, this->value(), output);
|
|
}
|
|
|
|
// optional uint64 info = 6;
|
|
if (cached_has_bits & 0x00000040u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(6, this->info(), output);
|
|
}
|
|
|
|
// optional uint64 checksum = 7;
|
|
if (cached_has_bits & 0x00000080u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(7, this->checksum(), output);
|
|
}
|
|
|
|
// optional bytes opaque = 9;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
|
|
9, this->opaque(), output);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
_internal_metadata_.unknown_fields(), output);
|
|
}
|
|
// @@protoc_insertion_point(serialize_end:alisql.LogEntry)
|
|
}
|
|
|
|
::google::protobuf::uint8* LogEntry::InternalSerializeWithCachedSizesToArray(
|
|
bool deterministic, ::google::protobuf::uint8* target) const {
|
|
(void)deterministic; // Unused
|
|
// @@protoc_insertion_point(serialize_to_array_start:alisql.LogEntry)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required uint64 term = 1;
|
|
if (cached_has_bits & 0x00000008u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->term(), target);
|
|
}
|
|
|
|
// required uint64 index = 2;
|
|
if (cached_has_bits & 0x00000010u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->index(), target);
|
|
}
|
|
|
|
// required uint64 opType = 3;
|
|
if (cached_has_bits & 0x00000020u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->optype(), target);
|
|
}
|
|
|
|
// optional bytes ikey = 4;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target =
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
|
|
4, this->ikey(), target);
|
|
}
|
|
|
|
// optional bytes value = 5;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
target =
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
|
|
5, this->value(), target);
|
|
}
|
|
|
|
// optional uint64 info = 6;
|
|
if (cached_has_bits & 0x00000040u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(6, this->info(), target);
|
|
}
|
|
|
|
// optional uint64 checksum = 7;
|
|
if (cached_has_bits & 0x00000080u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(7, this->checksum(), target);
|
|
}
|
|
|
|
// optional bytes opaque = 9;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
target =
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
|
|
9, this->opaque(), target);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields(), target);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:alisql.LogEntry)
|
|
return target;
|
|
}
|
|
|
|
size_t LogEntry::RequiredFieldsByteSizeFallback() const {
|
|
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:alisql.LogEntry)
|
|
size_t total_size = 0;
|
|
|
|
if (has_term()) {
|
|
// required uint64 term = 1;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->term());
|
|
}
|
|
|
|
if (has_index()) {
|
|
// required uint64 index = 2;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->index());
|
|
}
|
|
|
|
if (has_optype()) {
|
|
// required uint64 opType = 3;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->optype());
|
|
}
|
|
|
|
return total_size;
|
|
}
|
|
size_t LogEntry::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:alisql.LogEntry)
|
|
size_t total_size = 0;
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
_internal_metadata_.unknown_fields());
|
|
}
|
|
if (((_has_bits_[0] & 0x00000038) ^ 0x00000038) == 0) { // All required fields are present.
|
|
// required uint64 term = 1;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->term());
|
|
|
|
// required uint64 index = 2;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->index());
|
|
|
|
// required uint64 opType = 3;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->optype());
|
|
|
|
} else {
|
|
total_size += RequiredFieldsByteSizeFallback();
|
|
}
|
|
if (_has_bits_[0 / 32] & 7u) {
|
|
// optional bytes ikey = 4;
|
|
if (has_ikey()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->ikey());
|
|
}
|
|
|
|
// optional bytes value = 5;
|
|
if (has_value()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->value());
|
|
}
|
|
|
|
// optional bytes opaque = 9;
|
|
if (has_opaque()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->opaque());
|
|
}
|
|
|
|
}
|
|
if (_has_bits_[0 / 32] & 192u) {
|
|
// optional uint64 info = 6;
|
|
if (has_info()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->info());
|
|
}
|
|
|
|
// optional uint64 checksum = 7;
|
|
if (has_checksum()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->checksum());
|
|
}
|
|
|
|
}
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
SetCachedSize(cached_size);
|
|
return total_size;
|
|
}
|
|
|
|
void LogEntry::MergeFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_merge_from_start:alisql.LogEntry)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
const LogEntry* source =
|
|
::google::protobuf::internal::DynamicCastToGenerated<const LogEntry>(
|
|
&from);
|
|
if (source == NULL) {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:alisql.LogEntry)
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:alisql.LogEntry)
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void LogEntry::MergeFrom(const LogEntry& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:alisql.LogEntry)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = from._has_bits_[0];
|
|
if (cached_has_bits & 255u) {
|
|
if (cached_has_bits & 0x00000001u) {
|
|
set_has_ikey();
|
|
ikey_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ikey_);
|
|
}
|
|
if (cached_has_bits & 0x00000002u) {
|
|
set_has_value();
|
|
value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
|
|
}
|
|
if (cached_has_bits & 0x00000004u) {
|
|
set_has_opaque();
|
|
opaque_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.opaque_);
|
|
}
|
|
if (cached_has_bits & 0x00000008u) {
|
|
term_ = from.term_;
|
|
}
|
|
if (cached_has_bits & 0x00000010u) {
|
|
index_ = from.index_;
|
|
}
|
|
if (cached_has_bits & 0x00000020u) {
|
|
optype_ = from.optype_;
|
|
}
|
|
if (cached_has_bits & 0x00000040u) {
|
|
info_ = from.info_;
|
|
}
|
|
if (cached_has_bits & 0x00000080u) {
|
|
checksum_ = from.checksum_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
}
|
|
|
|
void LogEntry::CopyFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_copy_from_start:alisql.LogEntry)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void LogEntry::CopyFrom(const LogEntry& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:alisql.LogEntry)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool LogEntry::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x00000038) != 0x00000038) return false;
|
|
return true;
|
|
}
|
|
|
|
void LogEntry::Swap(LogEntry* other) {
|
|
if (other == this) return;
|
|
InternalSwap(other);
|
|
}
|
|
void LogEntry::InternalSwap(LogEntry* other) {
|
|
using std::swap;
|
|
ikey_.Swap(&other->ikey_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
opaque_.Swap(&other->opaque_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
swap(term_, other->term_);
|
|
swap(index_, other->index_);
|
|
swap(optype_, other->optype_);
|
|
swap(info_, other->info_);
|
|
swap(checksum_, other->checksum_);
|
|
swap(_has_bits_[0], other->_has_bits_[0]);
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
|
}
|
|
|
|
::google::protobuf::Metadata LogEntry::GetMetadata() const {
|
|
protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
}
|
|
|
|
|
|
// ===================================================================
|
|
|
|
void RDSFields::InitAsDefaultInstance() {
|
|
}
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
const int RDSFields::kRdsServerIdFieldNumber;
|
|
const int RDSFields::kSourceFieldNumber;
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
RDSFields::RDSFields()
|
|
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
::google::protobuf::internal::InitSCC(
|
|
&protobuf_paxos_2eproto::scc_info_RDSFields.base);
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(constructor:alisql.RDSFields)
|
|
}
|
|
RDSFields::RDSFields(const RDSFields& from)
|
|
: ::google::protobuf::Message(),
|
|
_internal_metadata_(NULL),
|
|
_has_bits_(from._has_bits_) {
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::memcpy(&rdsserverid_, &from.rdsserverid_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&source_) -
|
|
reinterpret_cast<char*>(&rdsserverid_)) + sizeof(source_));
|
|
// @@protoc_insertion_point(copy_constructor:alisql.RDSFields)
|
|
}
|
|
|
|
void RDSFields::SharedCtor() {
|
|
::memset(&rdsserverid_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&source_) -
|
|
reinterpret_cast<char*>(&rdsserverid_)) + sizeof(source_));
|
|
}
|
|
|
|
RDSFields::~RDSFields() {
|
|
// @@protoc_insertion_point(destructor:alisql.RDSFields)
|
|
SharedDtor();
|
|
}
|
|
|
|
void RDSFields::SharedDtor() {
|
|
}
|
|
|
|
void RDSFields::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
const ::google::protobuf::Descriptor* RDSFields::descriptor() {
|
|
::protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
}
|
|
|
|
const RDSFields& RDSFields::default_instance() {
|
|
::google::protobuf::internal::InitSCC(&protobuf_paxos_2eproto::scc_info_RDSFields.base);
|
|
return *internal_default_instance();
|
|
}
|
|
|
|
|
|
void RDSFields::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:alisql.RDSFields)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
if (cached_has_bits & 3u) {
|
|
::memset(&rdsserverid_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&source_) -
|
|
reinterpret_cast<char*>(&rdsserverid_)) + sizeof(source_));
|
|
}
|
|
_has_bits_.Clear();
|
|
_internal_metadata_.Clear();
|
|
}
|
|
|
|
bool RDSFields::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
::google::protobuf::uint32 tag;
|
|
// @@protoc_insertion_point(parse_start:alisql.RDSFields)
|
|
for (;;) {
|
|
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
tag = p.first;
|
|
if (!p.second) goto handle_unusual;
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// optional uint32 rdsServerId = 1;
|
|
case 1: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
set_has_rdsserverid();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &rdsserverid_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint32 source = 2;
|
|
case 2: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
set_has_source();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &source_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_unusual:
|
|
if (tag == 0) {
|
|
goto success;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
success:
|
|
// @@protoc_insertion_point(parse_success:alisql.RDSFields)
|
|
return true;
|
|
failure:
|
|
// @@protoc_insertion_point(parse_failure:alisql.RDSFields)
|
|
return false;
|
|
#undef DO_
|
|
}
|
|
|
|
void RDSFields::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// @@protoc_insertion_point(serialize_start:alisql.RDSFields)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// optional uint32 rdsServerId = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->rdsserverid(), output);
|
|
}
|
|
|
|
// optional uint32 source = 2;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->source(), output);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
_internal_metadata_.unknown_fields(), output);
|
|
}
|
|
// @@protoc_insertion_point(serialize_end:alisql.RDSFields)
|
|
}
|
|
|
|
::google::protobuf::uint8* RDSFields::InternalSerializeWithCachedSizesToArray(
|
|
bool deterministic, ::google::protobuf::uint8* target) const {
|
|
(void)deterministic; // Unused
|
|
// @@protoc_insertion_point(serialize_to_array_start:alisql.RDSFields)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// optional uint32 rdsServerId = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->rdsserverid(), target);
|
|
}
|
|
|
|
// optional uint32 source = 2;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->source(), target);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields(), target);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:alisql.RDSFields)
|
|
return target;
|
|
}
|
|
|
|
size_t RDSFields::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:alisql.RDSFields)
|
|
size_t total_size = 0;
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
_internal_metadata_.unknown_fields());
|
|
}
|
|
if (_has_bits_[0 / 32] & 3u) {
|
|
// optional uint32 rdsServerId = 1;
|
|
if (has_rdsserverid()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->rdsserverid());
|
|
}
|
|
|
|
// optional uint32 source = 2;
|
|
if (has_source()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->source());
|
|
}
|
|
|
|
}
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
SetCachedSize(cached_size);
|
|
return total_size;
|
|
}
|
|
|
|
void RDSFields::MergeFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_merge_from_start:alisql.RDSFields)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
const RDSFields* source =
|
|
::google::protobuf::internal::DynamicCastToGenerated<const RDSFields>(
|
|
&from);
|
|
if (source == NULL) {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:alisql.RDSFields)
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:alisql.RDSFields)
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void RDSFields::MergeFrom(const RDSFields& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:alisql.RDSFields)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = from._has_bits_[0];
|
|
if (cached_has_bits & 3u) {
|
|
if (cached_has_bits & 0x00000001u) {
|
|
rdsserverid_ = from.rdsserverid_;
|
|
}
|
|
if (cached_has_bits & 0x00000002u) {
|
|
source_ = from.source_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
}
|
|
|
|
void RDSFields::CopyFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_copy_from_start:alisql.RDSFields)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void RDSFields::CopyFrom(const RDSFields& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:alisql.RDSFields)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool RDSFields::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void RDSFields::Swap(RDSFields* other) {
|
|
if (other == this) return;
|
|
InternalSwap(other);
|
|
}
|
|
void RDSFields::InternalSwap(RDSFields* other) {
|
|
using std::swap;
|
|
swap(rdsserverid_, other->rdsserverid_);
|
|
swap(source_, other->source_);
|
|
swap(_has_bits_[0], other->_has_bits_[0]);
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
|
}
|
|
|
|
::google::protobuf::Metadata RDSFields::GetMetadata() const {
|
|
protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
}
|
|
|
|
|
|
// ===================================================================
|
|
|
|
void PolarFields::InitAsDefaultInstance() {
|
|
}
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
const int PolarFields::kVersionFieldNumber;
|
|
const int PolarFields::kStartLsnFieldNumber;
|
|
const int PolarFields::kExtraValueFieldNumber;
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
PolarFields::PolarFields()
|
|
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
::google::protobuf::internal::InitSCC(
|
|
&protobuf_paxos_2eproto::scc_info_PolarFields.base);
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(constructor:alisql.PolarFields)
|
|
}
|
|
PolarFields::PolarFields(const PolarFields& from)
|
|
: ::google::protobuf::Message(),
|
|
_internal_metadata_(NULL),
|
|
_has_bits_(from._has_bits_) {
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
extra_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
if (from.has_extra_value()) {
|
|
extra_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extra_value_);
|
|
}
|
|
::memcpy(&start_lsn_, &from.start_lsn_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&version_) -
|
|
reinterpret_cast<char*>(&start_lsn_)) + sizeof(version_));
|
|
// @@protoc_insertion_point(copy_constructor:alisql.PolarFields)
|
|
}
|
|
|
|
void PolarFields::SharedCtor() {
|
|
extra_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
::memset(&start_lsn_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&version_) -
|
|
reinterpret_cast<char*>(&start_lsn_)) + sizeof(version_));
|
|
}
|
|
|
|
PolarFields::~PolarFields() {
|
|
// @@protoc_insertion_point(destructor:alisql.PolarFields)
|
|
SharedDtor();
|
|
}
|
|
|
|
void PolarFields::SharedDtor() {
|
|
extra_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
|
|
void PolarFields::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
const ::google::protobuf::Descriptor* PolarFields::descriptor() {
|
|
::protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
}
|
|
|
|
const PolarFields& PolarFields::default_instance() {
|
|
::google::protobuf::internal::InitSCC(&protobuf_paxos_2eproto::scc_info_PolarFields.base);
|
|
return *internal_default_instance();
|
|
}
|
|
|
|
|
|
void PolarFields::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:alisql.PolarFields)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
if (cached_has_bits & 0x00000001u) {
|
|
extra_value_.ClearNonDefaultToEmptyNoArena();
|
|
}
|
|
if (cached_has_bits & 6u) {
|
|
::memset(&start_lsn_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&version_) -
|
|
reinterpret_cast<char*>(&start_lsn_)) + sizeof(version_));
|
|
}
|
|
_has_bits_.Clear();
|
|
_internal_metadata_.Clear();
|
|
}
|
|
|
|
bool PolarFields::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
::google::protobuf::uint32 tag;
|
|
// @@protoc_insertion_point(parse_start:alisql.PolarFields)
|
|
for (;;) {
|
|
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
tag = p.first;
|
|
if (!p.second) goto handle_unusual;
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// required uint32 version = 1;
|
|
case 1: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
set_has_version();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &version_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// required uint64 start_lsn = 2;
|
|
case 2: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
set_has_start_lsn();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &start_lsn_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional bytes extra_value = 3;
|
|
case 3: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->mutable_extra_value()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_unusual:
|
|
if (tag == 0) {
|
|
goto success;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
success:
|
|
// @@protoc_insertion_point(parse_success:alisql.PolarFields)
|
|
return true;
|
|
failure:
|
|
// @@protoc_insertion_point(parse_failure:alisql.PolarFields)
|
|
return false;
|
|
#undef DO_
|
|
}
|
|
|
|
void PolarFields::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// @@protoc_insertion_point(serialize_start:alisql.PolarFields)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required uint32 version = 1;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->version(), output);
|
|
}
|
|
|
|
// required uint64 start_lsn = 2;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->start_lsn(), output);
|
|
}
|
|
|
|
// optional bytes extra_value = 3;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
|
|
3, this->extra_value(), output);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
_internal_metadata_.unknown_fields(), output);
|
|
}
|
|
// @@protoc_insertion_point(serialize_end:alisql.PolarFields)
|
|
}
|
|
|
|
::google::protobuf::uint8* PolarFields::InternalSerializeWithCachedSizesToArray(
|
|
bool deterministic, ::google::protobuf::uint8* target) const {
|
|
(void)deterministic; // Unused
|
|
// @@protoc_insertion_point(serialize_to_array_start:alisql.PolarFields)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required uint32 version = 1;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->version(), target);
|
|
}
|
|
|
|
// required uint64 start_lsn = 2;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->start_lsn(), target);
|
|
}
|
|
|
|
// optional bytes extra_value = 3;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target =
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
|
|
3, this->extra_value(), target);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields(), target);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:alisql.PolarFields)
|
|
return target;
|
|
}
|
|
|
|
size_t PolarFields::RequiredFieldsByteSizeFallback() const {
|
|
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:alisql.PolarFields)
|
|
size_t total_size = 0;
|
|
|
|
if (has_start_lsn()) {
|
|
// required uint64 start_lsn = 2;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->start_lsn());
|
|
}
|
|
|
|
if (has_version()) {
|
|
// required uint32 version = 1;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->version());
|
|
}
|
|
|
|
return total_size;
|
|
}
|
|
size_t PolarFields::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:alisql.PolarFields)
|
|
size_t total_size = 0;
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
_internal_metadata_.unknown_fields());
|
|
}
|
|
if (((_has_bits_[0] & 0x00000006) ^ 0x00000006) == 0) { // All required fields are present.
|
|
// required uint64 start_lsn = 2;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->start_lsn());
|
|
|
|
// required uint32 version = 1;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->version());
|
|
|
|
} else {
|
|
total_size += RequiredFieldsByteSizeFallback();
|
|
}
|
|
// optional bytes extra_value = 3;
|
|
if (has_extra_value()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->extra_value());
|
|
}
|
|
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
SetCachedSize(cached_size);
|
|
return total_size;
|
|
}
|
|
|
|
void PolarFields::MergeFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_merge_from_start:alisql.PolarFields)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
const PolarFields* source =
|
|
::google::protobuf::internal::DynamicCastToGenerated<const PolarFields>(
|
|
&from);
|
|
if (source == NULL) {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:alisql.PolarFields)
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:alisql.PolarFields)
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void PolarFields::MergeFrom(const PolarFields& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:alisql.PolarFields)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = from._has_bits_[0];
|
|
if (cached_has_bits & 7u) {
|
|
if (cached_has_bits & 0x00000001u) {
|
|
set_has_extra_value();
|
|
extra_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extra_value_);
|
|
}
|
|
if (cached_has_bits & 0x00000002u) {
|
|
start_lsn_ = from.start_lsn_;
|
|
}
|
|
if (cached_has_bits & 0x00000004u) {
|
|
version_ = from.version_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
}
|
|
|
|
void PolarFields::CopyFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_copy_from_start:alisql.PolarFields)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void PolarFields::CopyFrom(const PolarFields& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:alisql.PolarFields)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool PolarFields::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x00000006) != 0x00000006) return false;
|
|
return true;
|
|
}
|
|
|
|
void PolarFields::Swap(PolarFields* other) {
|
|
if (other == this) return;
|
|
InternalSwap(other);
|
|
}
|
|
void PolarFields::InternalSwap(PolarFields* other) {
|
|
using std::swap;
|
|
extra_value_.Swap(&other->extra_value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
swap(start_lsn_, other->start_lsn_);
|
|
swap(version_, other->version_);
|
|
swap(_has_bits_[0], other->_has_bits_[0]);
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
|
}
|
|
|
|
::google::protobuf::Metadata PolarFields::GetMetadata() const {
|
|
protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
}
|
|
|
|
|
|
// ===================================================================
|
|
|
|
void CompressedLogEntries::InitAsDefaultInstance() {
|
|
}
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
const int CompressedLogEntries::kTypeFieldNumber;
|
|
const int CompressedLogEntries::kRawSizeFieldNumber;
|
|
const int CompressedLogEntries::kDataFieldNumber;
|
|
const int CompressedLogEntries::kChecksumFieldNumber;
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
CompressedLogEntries::CompressedLogEntries()
|
|
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
::google::protobuf::internal::InitSCC(
|
|
&protobuf_paxos_2eproto::scc_info_CompressedLogEntries.base);
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(constructor:alisql.CompressedLogEntries)
|
|
}
|
|
CompressedLogEntries::CompressedLogEntries(const CompressedLogEntries& from)
|
|
: ::google::protobuf::Message(),
|
|
_internal_metadata_(NULL),
|
|
_has_bits_(from._has_bits_) {
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
if (from.has_data()) {
|
|
data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_);
|
|
}
|
|
::memcpy(&type_, &from.type_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&checksum_) -
|
|
reinterpret_cast<char*>(&type_)) + sizeof(checksum_));
|
|
// @@protoc_insertion_point(copy_constructor:alisql.CompressedLogEntries)
|
|
}
|
|
|
|
void CompressedLogEntries::SharedCtor() {
|
|
data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
::memset(&type_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&checksum_) -
|
|
reinterpret_cast<char*>(&type_)) + sizeof(checksum_));
|
|
}
|
|
|
|
CompressedLogEntries::~CompressedLogEntries() {
|
|
// @@protoc_insertion_point(destructor:alisql.CompressedLogEntries)
|
|
SharedDtor();
|
|
}
|
|
|
|
void CompressedLogEntries::SharedDtor() {
|
|
data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
|
|
void CompressedLogEntries::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
const ::google::protobuf::Descriptor* CompressedLogEntries::descriptor() {
|
|
::protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
}
|
|
|
|
const CompressedLogEntries& CompressedLogEntries::default_instance() {
|
|
::google::protobuf::internal::InitSCC(&protobuf_paxos_2eproto::scc_info_CompressedLogEntries.base);
|
|
return *internal_default_instance();
|
|
}
|
|
|
|
|
|
void CompressedLogEntries::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:alisql.CompressedLogEntries)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
if (cached_has_bits & 0x00000001u) {
|
|
data_.ClearNonDefaultToEmptyNoArena();
|
|
}
|
|
if (cached_has_bits & 14u) {
|
|
::memset(&type_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&checksum_) -
|
|
reinterpret_cast<char*>(&type_)) + sizeof(checksum_));
|
|
}
|
|
_has_bits_.Clear();
|
|
_internal_metadata_.Clear();
|
|
}
|
|
|
|
bool CompressedLogEntries::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
::google::protobuf::uint32 tag;
|
|
// @@protoc_insertion_point(parse_start:alisql.CompressedLogEntries)
|
|
for (;;) {
|
|
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
tag = p.first;
|
|
if (!p.second) goto handle_unusual;
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// required uint32 type = 1;
|
|
case 1: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
set_has_type();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &type_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// required uint32 rawSize = 2;
|
|
case 2: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
set_has_rawsize();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &rawsize_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// required bytes data = 3;
|
|
case 3: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->mutable_data()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint32 checksum = 4;
|
|
case 4: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
|
|
set_has_checksum();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &checksum_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_unusual:
|
|
if (tag == 0) {
|
|
goto success;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
success:
|
|
// @@protoc_insertion_point(parse_success:alisql.CompressedLogEntries)
|
|
return true;
|
|
failure:
|
|
// @@protoc_insertion_point(parse_failure:alisql.CompressedLogEntries)
|
|
return false;
|
|
#undef DO_
|
|
}
|
|
|
|
void CompressedLogEntries::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// @@protoc_insertion_point(serialize_start:alisql.CompressedLogEntries)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required uint32 type = 1;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->type(), output);
|
|
}
|
|
|
|
// required uint32 rawSize = 2;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->rawsize(), output);
|
|
}
|
|
|
|
// required bytes data = 3;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
|
|
3, this->data(), output);
|
|
}
|
|
|
|
// optional uint32 checksum = 4;
|
|
if (cached_has_bits & 0x00000008u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->checksum(), output);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
_internal_metadata_.unknown_fields(), output);
|
|
}
|
|
// @@protoc_insertion_point(serialize_end:alisql.CompressedLogEntries)
|
|
}
|
|
|
|
::google::protobuf::uint8* CompressedLogEntries::InternalSerializeWithCachedSizesToArray(
|
|
bool deterministic, ::google::protobuf::uint8* target) const {
|
|
(void)deterministic; // Unused
|
|
// @@protoc_insertion_point(serialize_to_array_start:alisql.CompressedLogEntries)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required uint32 type = 1;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->type(), target);
|
|
}
|
|
|
|
// required uint32 rawSize = 2;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->rawsize(), target);
|
|
}
|
|
|
|
// required bytes data = 3;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target =
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
|
|
3, this->data(), target);
|
|
}
|
|
|
|
// optional uint32 checksum = 4;
|
|
if (cached_has_bits & 0x00000008u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->checksum(), target);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields(), target);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:alisql.CompressedLogEntries)
|
|
return target;
|
|
}
|
|
|
|
size_t CompressedLogEntries::RequiredFieldsByteSizeFallback() const {
|
|
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:alisql.CompressedLogEntries)
|
|
size_t total_size = 0;
|
|
|
|
if (has_data()) {
|
|
// required bytes data = 3;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->data());
|
|
}
|
|
|
|
if (has_type()) {
|
|
// required uint32 type = 1;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->type());
|
|
}
|
|
|
|
if (has_rawsize()) {
|
|
// required uint32 rawSize = 2;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->rawsize());
|
|
}
|
|
|
|
return total_size;
|
|
}
|
|
size_t CompressedLogEntries::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:alisql.CompressedLogEntries)
|
|
size_t total_size = 0;
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
_internal_metadata_.unknown_fields());
|
|
}
|
|
if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present.
|
|
// required bytes data = 3;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->data());
|
|
|
|
// required uint32 type = 1;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->type());
|
|
|
|
// required uint32 rawSize = 2;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->rawsize());
|
|
|
|
} else {
|
|
total_size += RequiredFieldsByteSizeFallback();
|
|
}
|
|
// optional uint32 checksum = 4;
|
|
if (has_checksum()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->checksum());
|
|
}
|
|
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
SetCachedSize(cached_size);
|
|
return total_size;
|
|
}
|
|
|
|
void CompressedLogEntries::MergeFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_merge_from_start:alisql.CompressedLogEntries)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
const CompressedLogEntries* source =
|
|
::google::protobuf::internal::DynamicCastToGenerated<const CompressedLogEntries>(
|
|
&from);
|
|
if (source == NULL) {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:alisql.CompressedLogEntries)
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:alisql.CompressedLogEntries)
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void CompressedLogEntries::MergeFrom(const CompressedLogEntries& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:alisql.CompressedLogEntries)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = from._has_bits_[0];
|
|
if (cached_has_bits & 15u) {
|
|
if (cached_has_bits & 0x00000001u) {
|
|
set_has_data();
|
|
data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_);
|
|
}
|
|
if (cached_has_bits & 0x00000002u) {
|
|
type_ = from.type_;
|
|
}
|
|
if (cached_has_bits & 0x00000004u) {
|
|
rawsize_ = from.rawsize_;
|
|
}
|
|
if (cached_has_bits & 0x00000008u) {
|
|
checksum_ = from.checksum_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
}
|
|
|
|
void CompressedLogEntries::CopyFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_copy_from_start:alisql.CompressedLogEntries)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void CompressedLogEntries::CopyFrom(const CompressedLogEntries& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:alisql.CompressedLogEntries)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool CompressedLogEntries::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
|
|
return true;
|
|
}
|
|
|
|
void CompressedLogEntries::Swap(CompressedLogEntries* other) {
|
|
if (other == this) return;
|
|
InternalSwap(other);
|
|
}
|
|
void CompressedLogEntries::InternalSwap(CompressedLogEntries* other) {
|
|
using std::swap;
|
|
data_.Swap(&other->data_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
swap(type_, other->type_);
|
|
swap(rawsize_, other->rawsize_);
|
|
swap(checksum_, other->checksum_);
|
|
swap(_has_bits_[0], other->_has_bits_[0]);
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
|
}
|
|
|
|
::google::protobuf::Metadata CompressedLogEntries::GetMetadata() const {
|
|
protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
}
|
|
|
|
|
|
// ===================================================================
|
|
|
|
void ConfigureChangeValue::InitAsDefaultInstance() {
|
|
}
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
const int ConfigureChangeValue::kCcTypeFieldNumber;
|
|
const int ConfigureChangeValue::kOpTypeFieldNumber;
|
|
const int ConfigureChangeValue::kAddrsFieldNumber;
|
|
const int ConfigureChangeValue::kAllServersFieldNumber;
|
|
const int ConfigureChangeValue::kAllLearnersFieldNumber;
|
|
const int ConfigureChangeValue::kServerIdFieldNumber;
|
|
const int ConfigureChangeValue::kForceSyncFieldNumber;
|
|
const int ConfigureChangeValue::kElectionWeightFieldNumber;
|
|
const int ConfigureChangeValue::kLearnerSourceFieldNumber;
|
|
const int ConfigureChangeValue::kApplyModeFieldNumber;
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
ConfigureChangeValue::ConfigureChangeValue()
|
|
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
::google::protobuf::internal::InitSCC(
|
|
&protobuf_paxos_2eproto::scc_info_ConfigureChangeValue.base);
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(constructor:alisql.ConfigureChangeValue)
|
|
}
|
|
ConfigureChangeValue::ConfigureChangeValue(const ConfigureChangeValue& from)
|
|
: ::google::protobuf::Message(),
|
|
_internal_metadata_(NULL),
|
|
_has_bits_(from._has_bits_),
|
|
addrs_(from.addrs_),
|
|
allservers_(from.allservers_),
|
|
alllearners_(from.alllearners_) {
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::memcpy(&cctype_, &from.cctype_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&applymode_) -
|
|
reinterpret_cast<char*>(&cctype_)) + sizeof(applymode_));
|
|
// @@protoc_insertion_point(copy_constructor:alisql.ConfigureChangeValue)
|
|
}
|
|
|
|
void ConfigureChangeValue::SharedCtor() {
|
|
::memset(&cctype_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&applymode_) -
|
|
reinterpret_cast<char*>(&cctype_)) + sizeof(applymode_));
|
|
}
|
|
|
|
ConfigureChangeValue::~ConfigureChangeValue() {
|
|
// @@protoc_insertion_point(destructor:alisql.ConfigureChangeValue)
|
|
SharedDtor();
|
|
}
|
|
|
|
void ConfigureChangeValue::SharedDtor() {
|
|
}
|
|
|
|
void ConfigureChangeValue::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
const ::google::protobuf::Descriptor* ConfigureChangeValue::descriptor() {
|
|
::protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
}
|
|
|
|
const ConfigureChangeValue& ConfigureChangeValue::default_instance() {
|
|
::google::protobuf::internal::InitSCC(&protobuf_paxos_2eproto::scc_info_ConfigureChangeValue.base);
|
|
return *internal_default_instance();
|
|
}
|
|
|
|
|
|
void ConfigureChangeValue::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:alisql.ConfigureChangeValue)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
addrs_.Clear();
|
|
allservers_.Clear();
|
|
alllearners_.Clear();
|
|
cached_has_bits = _has_bits_[0];
|
|
if (cached_has_bits & 127u) {
|
|
::memset(&cctype_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&applymode_) -
|
|
reinterpret_cast<char*>(&cctype_)) + sizeof(applymode_));
|
|
}
|
|
_has_bits_.Clear();
|
|
_internal_metadata_.Clear();
|
|
}
|
|
|
|
bool ConfigureChangeValue::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
::google::protobuf::uint32 tag;
|
|
// @@protoc_insertion_point(parse_start:alisql.ConfigureChangeValue)
|
|
for (;;) {
|
|
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
tag = p.first;
|
|
if (!p.second) goto handle_unusual;
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// optional int32 ccType = 1;
|
|
case 1: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
set_has_cctype();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
|
input, &cctype_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional int32 opType = 2;
|
|
case 2: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
set_has_optype();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
|
input, &optype_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// repeated bytes addrs = 3;
|
|
case 3: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->add_addrs()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// repeated bytes allServers = 4;
|
|
case 4: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->add_allservers()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// repeated bytes allLearners = 5;
|
|
case 5: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->add_alllearners()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 serverId = 6;
|
|
case 6: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
|
|
set_has_serverid();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &serverid_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint32 forceSync = 7;
|
|
case 7: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
|
|
set_has_forcesync();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &forcesync_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint32 electionWeight = 8;
|
|
case 8: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
|
|
set_has_electionweight();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &electionweight_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 learnerSource = 9;
|
|
case 9: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
|
|
set_has_learnersource();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &learnersource_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional bool applyMode = 10;
|
|
case 10: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) {
|
|
set_has_applymode();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
|
input, &applymode_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_unusual:
|
|
if (tag == 0) {
|
|
goto success;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
success:
|
|
// @@protoc_insertion_point(parse_success:alisql.ConfigureChangeValue)
|
|
return true;
|
|
failure:
|
|
// @@protoc_insertion_point(parse_failure:alisql.ConfigureChangeValue)
|
|
return false;
|
|
#undef DO_
|
|
}
|
|
|
|
void ConfigureChangeValue::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// @@protoc_insertion_point(serialize_start:alisql.ConfigureChangeValue)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// optional int32 ccType = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->cctype(), output);
|
|
}
|
|
|
|
// optional int32 opType = 2;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->optype(), output);
|
|
}
|
|
|
|
// repeated bytes addrs = 3;
|
|
for (int i = 0, n = this->addrs_size(); i < n; i++) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytes(
|
|
3, this->addrs(i), output);
|
|
}
|
|
|
|
// repeated bytes allServers = 4;
|
|
for (int i = 0, n = this->allservers_size(); i < n; i++) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytes(
|
|
4, this->allservers(i), output);
|
|
}
|
|
|
|
// repeated bytes allLearners = 5;
|
|
for (int i = 0, n = this->alllearners_size(); i < n; i++) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytes(
|
|
5, this->alllearners(i), output);
|
|
}
|
|
|
|
// optional uint64 serverId = 6;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(6, this->serverid(), output);
|
|
}
|
|
|
|
// optional uint32 forceSync = 7;
|
|
if (cached_has_bits & 0x00000008u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->forcesync(), output);
|
|
}
|
|
|
|
// optional uint32 electionWeight = 8;
|
|
if (cached_has_bits & 0x00000010u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->electionweight(), output);
|
|
}
|
|
|
|
// optional uint64 learnerSource = 9;
|
|
if (cached_has_bits & 0x00000020u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(9, this->learnersource(), output);
|
|
}
|
|
|
|
// optional bool applyMode = 10;
|
|
if (cached_has_bits & 0x00000040u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBool(10, this->applymode(), output);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
_internal_metadata_.unknown_fields(), output);
|
|
}
|
|
// @@protoc_insertion_point(serialize_end:alisql.ConfigureChangeValue)
|
|
}
|
|
|
|
::google::protobuf::uint8* ConfigureChangeValue::InternalSerializeWithCachedSizesToArray(
|
|
bool deterministic, ::google::protobuf::uint8* target) const {
|
|
(void)deterministic; // Unused
|
|
// @@protoc_insertion_point(serialize_to_array_start:alisql.ConfigureChangeValue)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// optional int32 ccType = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->cctype(), target);
|
|
}
|
|
|
|
// optional int32 opType = 2;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->optype(), target);
|
|
}
|
|
|
|
// repeated bytes addrs = 3;
|
|
for (int i = 0, n = this->addrs_size(); i < n; i++) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteBytesToArray(3, this->addrs(i), target);
|
|
}
|
|
|
|
// repeated bytes allServers = 4;
|
|
for (int i = 0, n = this->allservers_size(); i < n; i++) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteBytesToArray(4, this->allservers(i), target);
|
|
}
|
|
|
|
// repeated bytes allLearners = 5;
|
|
for (int i = 0, n = this->alllearners_size(); i < n; i++) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteBytesToArray(5, this->alllearners(i), target);
|
|
}
|
|
|
|
// optional uint64 serverId = 6;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(6, this->serverid(), target);
|
|
}
|
|
|
|
// optional uint32 forceSync = 7;
|
|
if (cached_has_bits & 0x00000008u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->forcesync(), target);
|
|
}
|
|
|
|
// optional uint32 electionWeight = 8;
|
|
if (cached_has_bits & 0x00000010u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->electionweight(), target);
|
|
}
|
|
|
|
// optional uint64 learnerSource = 9;
|
|
if (cached_has_bits & 0x00000020u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(9, this->learnersource(), target);
|
|
}
|
|
|
|
// optional bool applyMode = 10;
|
|
if (cached_has_bits & 0x00000040u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->applymode(), target);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields(), target);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:alisql.ConfigureChangeValue)
|
|
return target;
|
|
}
|
|
|
|
size_t ConfigureChangeValue::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:alisql.ConfigureChangeValue)
|
|
size_t total_size = 0;
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
_internal_metadata_.unknown_fields());
|
|
}
|
|
// repeated bytes addrs = 3;
|
|
total_size += 1 *
|
|
::google::protobuf::internal::FromIntSize(this->addrs_size());
|
|
for (int i = 0, n = this->addrs_size(); i < n; i++) {
|
|
total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->addrs(i));
|
|
}
|
|
|
|
// repeated bytes allServers = 4;
|
|
total_size += 1 *
|
|
::google::protobuf::internal::FromIntSize(this->allservers_size());
|
|
for (int i = 0, n = this->allservers_size(); i < n; i++) {
|
|
total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->allservers(i));
|
|
}
|
|
|
|
// repeated bytes allLearners = 5;
|
|
total_size += 1 *
|
|
::google::protobuf::internal::FromIntSize(this->alllearners_size());
|
|
for (int i = 0, n = this->alllearners_size(); i < n; i++) {
|
|
total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->alllearners(i));
|
|
}
|
|
|
|
if (_has_bits_[0 / 32] & 127u) {
|
|
// optional int32 ccType = 1;
|
|
if (has_cctype()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
this->cctype());
|
|
}
|
|
|
|
// optional int32 opType = 2;
|
|
if (has_optype()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
this->optype());
|
|
}
|
|
|
|
// optional uint64 serverId = 6;
|
|
if (has_serverid()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->serverid());
|
|
}
|
|
|
|
// optional uint32 forceSync = 7;
|
|
if (has_forcesync()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->forcesync());
|
|
}
|
|
|
|
// optional uint32 electionWeight = 8;
|
|
if (has_electionweight()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->electionweight());
|
|
}
|
|
|
|
// optional uint64 learnerSource = 9;
|
|
if (has_learnersource()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->learnersource());
|
|
}
|
|
|
|
// optional bool applyMode = 10;
|
|
if (has_applymode()) {
|
|
total_size += 1 + 1;
|
|
}
|
|
|
|
}
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
SetCachedSize(cached_size);
|
|
return total_size;
|
|
}
|
|
|
|
void ConfigureChangeValue::MergeFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_merge_from_start:alisql.ConfigureChangeValue)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
const ConfigureChangeValue* source =
|
|
::google::protobuf::internal::DynamicCastToGenerated<const ConfigureChangeValue>(
|
|
&from);
|
|
if (source == NULL) {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:alisql.ConfigureChangeValue)
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:alisql.ConfigureChangeValue)
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void ConfigureChangeValue::MergeFrom(const ConfigureChangeValue& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:alisql.ConfigureChangeValue)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
addrs_.MergeFrom(from.addrs_);
|
|
allservers_.MergeFrom(from.allservers_);
|
|
alllearners_.MergeFrom(from.alllearners_);
|
|
cached_has_bits = from._has_bits_[0];
|
|
if (cached_has_bits & 127u) {
|
|
if (cached_has_bits & 0x00000001u) {
|
|
cctype_ = from.cctype_;
|
|
}
|
|
if (cached_has_bits & 0x00000002u) {
|
|
optype_ = from.optype_;
|
|
}
|
|
if (cached_has_bits & 0x00000004u) {
|
|
serverid_ = from.serverid_;
|
|
}
|
|
if (cached_has_bits & 0x00000008u) {
|
|
forcesync_ = from.forcesync_;
|
|
}
|
|
if (cached_has_bits & 0x00000010u) {
|
|
electionweight_ = from.electionweight_;
|
|
}
|
|
if (cached_has_bits & 0x00000020u) {
|
|
learnersource_ = from.learnersource_;
|
|
}
|
|
if (cached_has_bits & 0x00000040u) {
|
|
applymode_ = from.applymode_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
}
|
|
|
|
void ConfigureChangeValue::CopyFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_copy_from_start:alisql.ConfigureChangeValue)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ConfigureChangeValue::CopyFrom(const ConfigureChangeValue& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:alisql.ConfigureChangeValue)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ConfigureChangeValue::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void ConfigureChangeValue::Swap(ConfigureChangeValue* other) {
|
|
if (other == this) return;
|
|
InternalSwap(other);
|
|
}
|
|
void ConfigureChangeValue::InternalSwap(ConfigureChangeValue* other) {
|
|
using std::swap;
|
|
addrs_.InternalSwap(CastToBase(&other->addrs_));
|
|
allservers_.InternalSwap(CastToBase(&other->allservers_));
|
|
alllearners_.InternalSwap(CastToBase(&other->alllearners_));
|
|
swap(cctype_, other->cctype_);
|
|
swap(optype_, other->optype_);
|
|
swap(serverid_, other->serverid_);
|
|
swap(forcesync_, other->forcesync_);
|
|
swap(electionweight_, other->electionweight_);
|
|
swap(learnersource_, other->learnersource_);
|
|
swap(applymode_, other->applymode_);
|
|
swap(_has_bits_[0], other->_has_bits_[0]);
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
|
}
|
|
|
|
::google::protobuf::Metadata ConfigureChangeValue::GetMetadata() const {
|
|
protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
}
|
|
|
|
|
|
// ===================================================================
|
|
|
|
void ClusterInfoEntry::InitAsDefaultInstance() {
|
|
}
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
const int ClusterInfoEntry::kServerIdFieldNumber;
|
|
const int ClusterInfoEntry::kMatchIndexFieldNumber;
|
|
const int ClusterInfoEntry::kNextIndexFieldNumber;
|
|
const int ClusterInfoEntry::kRoleFieldNumber;
|
|
const int ClusterInfoEntry::kHasVotedFieldNumber;
|
|
const int ClusterInfoEntry::kForceSyncFieldNumber;
|
|
const int ClusterInfoEntry::kElectionWeightFieldNumber;
|
|
const int ClusterInfoEntry::kLearnerSourceFieldNumber;
|
|
const int ClusterInfoEntry::kAppliedIndexFieldNumber;
|
|
const int ClusterInfoEntry::kPipeliningFieldNumber;
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
ClusterInfoEntry::ClusterInfoEntry()
|
|
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
::google::protobuf::internal::InitSCC(
|
|
&protobuf_paxos_2eproto::scc_info_ClusterInfoEntry.base);
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(constructor:alisql.ClusterInfoEntry)
|
|
}
|
|
ClusterInfoEntry::ClusterInfoEntry(const ClusterInfoEntry& from)
|
|
: ::google::protobuf::Message(),
|
|
_internal_metadata_(NULL),
|
|
_has_bits_(from._has_bits_) {
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::memcpy(&serverid_, &from.serverid_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&appliedindex_) -
|
|
reinterpret_cast<char*>(&serverid_)) + sizeof(appliedindex_));
|
|
// @@protoc_insertion_point(copy_constructor:alisql.ClusterInfoEntry)
|
|
}
|
|
|
|
void ClusterInfoEntry::SharedCtor() {
|
|
::memset(&serverid_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&appliedindex_) -
|
|
reinterpret_cast<char*>(&serverid_)) + sizeof(appliedindex_));
|
|
}
|
|
|
|
ClusterInfoEntry::~ClusterInfoEntry() {
|
|
// @@protoc_insertion_point(destructor:alisql.ClusterInfoEntry)
|
|
SharedDtor();
|
|
}
|
|
|
|
void ClusterInfoEntry::SharedDtor() {
|
|
}
|
|
|
|
void ClusterInfoEntry::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
const ::google::protobuf::Descriptor* ClusterInfoEntry::descriptor() {
|
|
::protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
}
|
|
|
|
const ClusterInfoEntry& ClusterInfoEntry::default_instance() {
|
|
::google::protobuf::internal::InitSCC(&protobuf_paxos_2eproto::scc_info_ClusterInfoEntry.base);
|
|
return *internal_default_instance();
|
|
}
|
|
|
|
|
|
void ClusterInfoEntry::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:alisql.ClusterInfoEntry)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
if (cached_has_bits & 255u) {
|
|
::memset(&serverid_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&electionweight_) -
|
|
reinterpret_cast<char*>(&serverid_)) + sizeof(electionweight_));
|
|
}
|
|
if (cached_has_bits & 768u) {
|
|
::memset(&pipelining_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&appliedindex_) -
|
|
reinterpret_cast<char*>(&pipelining_)) + sizeof(appliedindex_));
|
|
}
|
|
_has_bits_.Clear();
|
|
_internal_metadata_.Clear();
|
|
}
|
|
|
|
bool ClusterInfoEntry::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
::google::protobuf::uint32 tag;
|
|
// @@protoc_insertion_point(parse_start:alisql.ClusterInfoEntry)
|
|
for (;;) {
|
|
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
tag = p.first;
|
|
if (!p.second) goto handle_unusual;
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// required uint64 serverId = 1;
|
|
case 1: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
set_has_serverid();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &serverid_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 matchIndex = 2;
|
|
case 2: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
set_has_matchindex();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &matchindex_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 nextIndex = 3;
|
|
case 3: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
|
|
set_has_nextindex();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &nextindex_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint32 role = 4;
|
|
case 4: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
|
|
set_has_role();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &role_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 hasVoted = 5;
|
|
case 5: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
|
|
set_has_hasvoted();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &hasvoted_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint32 forceSync = 6;
|
|
case 6: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
|
|
set_has_forcesync();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &forcesync_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint32 electionWeight = 7;
|
|
case 7: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
|
|
set_has_electionweight();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &electionweight_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 learnerSource = 8;
|
|
case 8: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
|
|
set_has_learnersource();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &learnersource_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 appliedIndex = 9;
|
|
case 9: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
|
|
set_has_appliedindex();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &appliedindex_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint32 pipelining = 10;
|
|
case 10: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) {
|
|
set_has_pipelining();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &pipelining_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_unusual:
|
|
if (tag == 0) {
|
|
goto success;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
success:
|
|
// @@protoc_insertion_point(parse_success:alisql.ClusterInfoEntry)
|
|
return true;
|
|
failure:
|
|
// @@protoc_insertion_point(parse_failure:alisql.ClusterInfoEntry)
|
|
return false;
|
|
#undef DO_
|
|
}
|
|
|
|
void ClusterInfoEntry::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// @@protoc_insertion_point(serialize_start:alisql.ClusterInfoEntry)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required uint64 serverId = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->serverid(), output);
|
|
}
|
|
|
|
// optional uint64 matchIndex = 2;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->matchindex(), output);
|
|
}
|
|
|
|
// optional uint64 nextIndex = 3;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->nextindex(), output);
|
|
}
|
|
|
|
// optional uint32 role = 4;
|
|
if (cached_has_bits & 0x00000010u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->role(), output);
|
|
}
|
|
|
|
// optional uint64 hasVoted = 5;
|
|
if (cached_has_bits & 0x00000008u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(5, this->hasvoted(), output);
|
|
}
|
|
|
|
// optional uint32 forceSync = 6;
|
|
if (cached_has_bits & 0x00000020u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->forcesync(), output);
|
|
}
|
|
|
|
// optional uint32 electionWeight = 7;
|
|
if (cached_has_bits & 0x00000080u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->electionweight(), output);
|
|
}
|
|
|
|
// optional uint64 learnerSource = 8;
|
|
if (cached_has_bits & 0x00000040u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(8, this->learnersource(), output);
|
|
}
|
|
|
|
// optional uint64 appliedIndex = 9;
|
|
if (cached_has_bits & 0x00000200u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(9, this->appliedindex(), output);
|
|
}
|
|
|
|
// optional uint32 pipelining = 10;
|
|
if (cached_has_bits & 0x00000100u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(10, this->pipelining(), output);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
_internal_metadata_.unknown_fields(), output);
|
|
}
|
|
// @@protoc_insertion_point(serialize_end:alisql.ClusterInfoEntry)
|
|
}
|
|
|
|
::google::protobuf::uint8* ClusterInfoEntry::InternalSerializeWithCachedSizesToArray(
|
|
bool deterministic, ::google::protobuf::uint8* target) const {
|
|
(void)deterministic; // Unused
|
|
// @@protoc_insertion_point(serialize_to_array_start:alisql.ClusterInfoEntry)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required uint64 serverId = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->serverid(), target);
|
|
}
|
|
|
|
// optional uint64 matchIndex = 2;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->matchindex(), target);
|
|
}
|
|
|
|
// optional uint64 nextIndex = 3;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->nextindex(), target);
|
|
}
|
|
|
|
// optional uint32 role = 4;
|
|
if (cached_has_bits & 0x00000010u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->role(), target);
|
|
}
|
|
|
|
// optional uint64 hasVoted = 5;
|
|
if (cached_has_bits & 0x00000008u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(5, this->hasvoted(), target);
|
|
}
|
|
|
|
// optional uint32 forceSync = 6;
|
|
if (cached_has_bits & 0x00000020u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, this->forcesync(), target);
|
|
}
|
|
|
|
// optional uint32 electionWeight = 7;
|
|
if (cached_has_bits & 0x00000080u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->electionweight(), target);
|
|
}
|
|
|
|
// optional uint64 learnerSource = 8;
|
|
if (cached_has_bits & 0x00000040u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(8, this->learnersource(), target);
|
|
}
|
|
|
|
// optional uint64 appliedIndex = 9;
|
|
if (cached_has_bits & 0x00000200u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(9, this->appliedindex(), target);
|
|
}
|
|
|
|
// optional uint32 pipelining = 10;
|
|
if (cached_has_bits & 0x00000100u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(10, this->pipelining(), target);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields(), target);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:alisql.ClusterInfoEntry)
|
|
return target;
|
|
}
|
|
|
|
size_t ClusterInfoEntry::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:alisql.ClusterInfoEntry)
|
|
size_t total_size = 0;
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
_internal_metadata_.unknown_fields());
|
|
}
|
|
// required uint64 serverId = 1;
|
|
if (has_serverid()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->serverid());
|
|
}
|
|
if (_has_bits_[0 / 32] & 254u) {
|
|
// optional uint64 matchIndex = 2;
|
|
if (has_matchindex()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->matchindex());
|
|
}
|
|
|
|
// optional uint64 nextIndex = 3;
|
|
if (has_nextindex()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->nextindex());
|
|
}
|
|
|
|
// optional uint64 hasVoted = 5;
|
|
if (has_hasvoted()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->hasvoted());
|
|
}
|
|
|
|
// optional uint32 role = 4;
|
|
if (has_role()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->role());
|
|
}
|
|
|
|
// optional uint32 forceSync = 6;
|
|
if (has_forcesync()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->forcesync());
|
|
}
|
|
|
|
// optional uint64 learnerSource = 8;
|
|
if (has_learnersource()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->learnersource());
|
|
}
|
|
|
|
// optional uint32 electionWeight = 7;
|
|
if (has_electionweight()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->electionweight());
|
|
}
|
|
|
|
}
|
|
if (_has_bits_[8 / 32] & 768u) {
|
|
// optional uint32 pipelining = 10;
|
|
if (has_pipelining()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->pipelining());
|
|
}
|
|
|
|
// optional uint64 appliedIndex = 9;
|
|
if (has_appliedindex()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->appliedindex());
|
|
}
|
|
|
|
}
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
SetCachedSize(cached_size);
|
|
return total_size;
|
|
}
|
|
|
|
void ClusterInfoEntry::MergeFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_merge_from_start:alisql.ClusterInfoEntry)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
const ClusterInfoEntry* source =
|
|
::google::protobuf::internal::DynamicCastToGenerated<const ClusterInfoEntry>(
|
|
&from);
|
|
if (source == NULL) {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:alisql.ClusterInfoEntry)
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:alisql.ClusterInfoEntry)
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void ClusterInfoEntry::MergeFrom(const ClusterInfoEntry& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:alisql.ClusterInfoEntry)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = from._has_bits_[0];
|
|
if (cached_has_bits & 255u) {
|
|
if (cached_has_bits & 0x00000001u) {
|
|
serverid_ = from.serverid_;
|
|
}
|
|
if (cached_has_bits & 0x00000002u) {
|
|
matchindex_ = from.matchindex_;
|
|
}
|
|
if (cached_has_bits & 0x00000004u) {
|
|
nextindex_ = from.nextindex_;
|
|
}
|
|
if (cached_has_bits & 0x00000008u) {
|
|
hasvoted_ = from.hasvoted_;
|
|
}
|
|
if (cached_has_bits & 0x00000010u) {
|
|
role_ = from.role_;
|
|
}
|
|
if (cached_has_bits & 0x00000020u) {
|
|
forcesync_ = from.forcesync_;
|
|
}
|
|
if (cached_has_bits & 0x00000040u) {
|
|
learnersource_ = from.learnersource_;
|
|
}
|
|
if (cached_has_bits & 0x00000080u) {
|
|
electionweight_ = from.electionweight_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
if (cached_has_bits & 768u) {
|
|
if (cached_has_bits & 0x00000100u) {
|
|
pipelining_ = from.pipelining_;
|
|
}
|
|
if (cached_has_bits & 0x00000200u) {
|
|
appliedindex_ = from.appliedindex_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
}
|
|
|
|
void ClusterInfoEntry::CopyFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_copy_from_start:alisql.ClusterInfoEntry)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ClusterInfoEntry::CopyFrom(const ClusterInfoEntry& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:alisql.ClusterInfoEntry)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ClusterInfoEntry::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
|
|
return true;
|
|
}
|
|
|
|
void ClusterInfoEntry::Swap(ClusterInfoEntry* other) {
|
|
if (other == this) return;
|
|
InternalSwap(other);
|
|
}
|
|
void ClusterInfoEntry::InternalSwap(ClusterInfoEntry* other) {
|
|
using std::swap;
|
|
swap(serverid_, other->serverid_);
|
|
swap(matchindex_, other->matchindex_);
|
|
swap(nextindex_, other->nextindex_);
|
|
swap(hasvoted_, other->hasvoted_);
|
|
swap(role_, other->role_);
|
|
swap(forcesync_, other->forcesync_);
|
|
swap(learnersource_, other->learnersource_);
|
|
swap(electionweight_, other->electionweight_);
|
|
swap(pipelining_, other->pipelining_);
|
|
swap(appliedindex_, other->appliedindex_);
|
|
swap(_has_bits_[0], other->_has_bits_[0]);
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
|
}
|
|
|
|
::google::protobuf::Metadata ClusterInfoEntry::GetMetadata() const {
|
|
protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
}
|
|
|
|
|
|
// ===================================================================
|
|
|
|
void PaxosMsg::InitAsDefaultInstance() {
|
|
::alisql::_PaxosMsg_default_instance_._instance.get_mutable()->compressedentries_ = const_cast< ::alisql::CompressedLogEntries*>(
|
|
::alisql::CompressedLogEntries::internal_default_instance());
|
|
}
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
const int PaxosMsg::kConfigIdFieldNumber;
|
|
const int PaxosMsg::kClusterIdFieldNumber;
|
|
const int PaxosMsg::kServerIdFieldNumber;
|
|
const int PaxosMsg::kMsgTypeFieldNumber;
|
|
const int PaxosMsg::kTermFieldNumber;
|
|
const int PaxosMsg::kMsgIdFieldNumber;
|
|
const int PaxosMsg::kLeaderIdFieldNumber;
|
|
const int PaxosMsg::kPrevLogIndexFieldNumber;
|
|
const int PaxosMsg::kPrevLogTermFieldNumber;
|
|
const int PaxosMsg::kEntriesFieldNumber;
|
|
const int PaxosMsg::kCommitIndexFieldNumber;
|
|
const int PaxosMsg::kNocacheFieldNumber;
|
|
const int PaxosMsg::kIsSuccessFieldNumber;
|
|
const int PaxosMsg::kCandidateIdFieldNumber;
|
|
const int PaxosMsg::kLastLogIndexFieldNumber;
|
|
const int PaxosMsg::kLastLogTermFieldNumber;
|
|
const int PaxosMsg::kForceFieldNumber;
|
|
const int PaxosMsg::kAddrFieldNumber;
|
|
const int PaxosMsg::kVoteGrantedFieldNumber;
|
|
const int PaxosMsg::kIgnoreCheckFieldNumber;
|
|
const int PaxosMsg::kLcTypeFieldNumber;
|
|
const int PaxosMsg::kMinMatchIndexFieldNumber;
|
|
const int PaxosMsg::kAppliedIndexFieldNumber;
|
|
const int PaxosMsg::kNewClusterIdFieldNumber;
|
|
const int PaxosMsg::kCiEntriesFieldNumber;
|
|
const int PaxosMsg::kRoleFieldNumber;
|
|
const int PaxosMsg::kCompressedEntriesFieldNumber;
|
|
const int PaxosMsg::kExtraFieldNumber;
|
|
const int PaxosMsg::kMsgErrorFieldNumber;
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
PaxosMsg::PaxosMsg()
|
|
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
::google::protobuf::internal::InitSCC(
|
|
&protobuf_paxos_2eproto::scc_info_PaxosMsg.base);
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(constructor:alisql.PaxosMsg)
|
|
}
|
|
PaxosMsg::PaxosMsg(const PaxosMsg& from)
|
|
: ::google::protobuf::Message(),
|
|
_internal_metadata_(NULL),
|
|
_has_bits_(from._has_bits_),
|
|
entries_(from.entries_),
|
|
cientries_(from.cientries_) {
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
addr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
if (from.has_addr()) {
|
|
addr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.addr_);
|
|
}
|
|
extra_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
if (from.has_extra()) {
|
|
extra_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extra_);
|
|
}
|
|
if (from.has_compressedentries()) {
|
|
compressedentries_ = new ::alisql::CompressedLogEntries(*from.compressedentries_);
|
|
} else {
|
|
compressedentries_ = NULL;
|
|
}
|
|
::memcpy(&configid_, &from.configid_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&msgerror_) -
|
|
reinterpret_cast<char*>(&configid_)) + sizeof(msgerror_));
|
|
// @@protoc_insertion_point(copy_constructor:alisql.PaxosMsg)
|
|
}
|
|
|
|
void PaxosMsg::SharedCtor() {
|
|
addr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
extra_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
::memset(&compressedentries_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&msgerror_) -
|
|
reinterpret_cast<char*>(&compressedentries_)) + sizeof(msgerror_));
|
|
}
|
|
|
|
PaxosMsg::~PaxosMsg() {
|
|
// @@protoc_insertion_point(destructor:alisql.PaxosMsg)
|
|
SharedDtor();
|
|
}
|
|
|
|
void PaxosMsg::SharedDtor() {
|
|
addr_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
extra_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
if (this != internal_default_instance()) delete compressedentries_;
|
|
}
|
|
|
|
void PaxosMsg::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
const ::google::protobuf::Descriptor* PaxosMsg::descriptor() {
|
|
::protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
}
|
|
|
|
const PaxosMsg& PaxosMsg::default_instance() {
|
|
::google::protobuf::internal::InitSCC(&protobuf_paxos_2eproto::scc_info_PaxosMsg.base);
|
|
return *internal_default_instance();
|
|
}
|
|
|
|
|
|
void PaxosMsg::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:alisql.PaxosMsg)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
entries_.Clear();
|
|
cientries_.Clear();
|
|
cached_has_bits = _has_bits_[0];
|
|
if (cached_has_bits & 7u) {
|
|
if (cached_has_bits & 0x00000001u) {
|
|
addr_.ClearNonDefaultToEmptyNoArena();
|
|
}
|
|
if (cached_has_bits & 0x00000002u) {
|
|
extra_.ClearNonDefaultToEmptyNoArena();
|
|
}
|
|
if (cached_has_bits & 0x00000004u) {
|
|
GOOGLE_DCHECK(compressedentries_ != NULL);
|
|
compressedentries_->Clear();
|
|
}
|
|
}
|
|
if (cached_has_bits & 248u) {
|
|
::memset(&configid_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&msgid_) -
|
|
reinterpret_cast<char*>(&configid_)) + sizeof(msgid_));
|
|
}
|
|
if (cached_has_bits & 65280u) {
|
|
::memset(&leaderid_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&votegranted_) -
|
|
reinterpret_cast<char*>(&leaderid_)) + sizeof(votegranted_));
|
|
}
|
|
if (cached_has_bits & 16711680u) {
|
|
::memset(&ignorecheck_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&appliedindex_) -
|
|
reinterpret_cast<char*>(&ignorecheck_)) + sizeof(appliedindex_));
|
|
}
|
|
if (cached_has_bits & 117440512u) {
|
|
::memset(&newclusterid_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&msgerror_) -
|
|
reinterpret_cast<char*>(&newclusterid_)) + sizeof(msgerror_));
|
|
}
|
|
_has_bits_.Clear();
|
|
_internal_metadata_.Clear();
|
|
}
|
|
|
|
bool PaxosMsg::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
::google::protobuf::uint32 tag;
|
|
// @@protoc_insertion_point(parse_start:alisql.PaxosMsg)
|
|
for (;;) {
|
|
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
|
|
tag = p.first;
|
|
if (!p.second) goto handle_unusual;
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// optional uint64 configId = 1;
|
|
case 1: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
set_has_configid();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &configid_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// required uint64 clusterId = 2;
|
|
case 2: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
set_has_clusterid();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &clusterid_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// required uint64 serverId = 3;
|
|
case 3: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
|
|
set_has_serverid();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &serverid_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// required int32 msgType = 4;
|
|
case 4: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
|
|
set_has_msgtype();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
|
input, &msgtype_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// required uint64 term = 5;
|
|
case 5: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
|
|
set_has_term();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &term_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// required uint64 msgId = 6;
|
|
case 6: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
|
|
set_has_msgid();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &msgid_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 leaderId = 7;
|
|
case 7: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
|
|
set_has_leaderid();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &leaderid_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 prevLogIndex = 8;
|
|
case 8: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
|
|
set_has_prevlogindex();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &prevlogindex_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 prevLogTerm = 9;
|
|
case 9: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
|
|
set_has_prevlogterm();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &prevlogterm_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// repeated .alisql.LogEntry entries = 10;
|
|
case 10: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
|
|
input, add_entries()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 commitIndex = 11;
|
|
case 11: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(88u /* 88 & 0xFF */)) {
|
|
set_has_commitindex();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &commitindex_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional bool nocache = 12;
|
|
case 12: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(96u /* 96 & 0xFF */)) {
|
|
set_has_nocache();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
|
input, &nocache_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional bool isSuccess = 13;
|
|
case 13: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
|
|
set_has_issuccess();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
|
input, &issuccess_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 candidateId = 14;
|
|
case 14: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(112u /* 112 & 0xFF */)) {
|
|
set_has_candidateid();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &candidateid_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 lastLogIndex = 15;
|
|
case 15: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(120u /* 120 & 0xFF */)) {
|
|
set_has_lastlogindex();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &lastlogindex_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 lastLogTerm = 16;
|
|
case 16: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(128u /* 128 & 0xFF */)) {
|
|
set_has_lastlogterm();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &lastlogterm_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 force = 17;
|
|
case 17: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
|
|
set_has_force();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &force_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional bytes addr = 18;
|
|
case 18: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(146u /* 146 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->mutable_addr()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional bool voteGranted = 19;
|
|
case 19: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(152u /* 152 & 0xFF */)) {
|
|
set_has_votegranted();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
|
input, &votegranted_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional bool ignoreCheck = 20;
|
|
case 20: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(160u /* 160 & 0xFF */)) {
|
|
set_has_ignorecheck();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
|
input, &ignorecheck_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 lcType = 21;
|
|
case 21: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(168u /* 168 & 0xFF */)) {
|
|
set_has_lctype();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &lctype_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 minMatchIndex = 22;
|
|
case 22: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) {
|
|
set_has_minmatchindex();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &minmatchindex_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 appliedIndex = 23;
|
|
case 23: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(184u /* 184 & 0xFF */)) {
|
|
set_has_appliedindex();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &appliedindex_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 newClusterId = 24;
|
|
case 24: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(192u /* 192 & 0xFF */)) {
|
|
set_has_newclusterid();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &newclusterid_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// repeated .alisql.ClusterInfoEntry ciEntries = 25;
|
|
case 25: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(202u /* 202 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
|
|
input, add_cientries()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint32 role = 26;
|
|
case 26: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(208u /* 208 & 0xFF */)) {
|
|
set_has_role();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
input, &role_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional .alisql.CompressedLogEntries compressedEntries = 27;
|
|
case 27: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(218u /* 218 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
|
|
input, mutable_compressedentries()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional bytes extra = 28;
|
|
case 28: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(226u /* 226 & 0xFF */)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->mutable_extra()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional .alisql.PaxosMsg.MsgErrorType msgError = 30;
|
|
case 30: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(240u /* 240 & 0xFF */)) {
|
|
int value;
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
|
input, &value)));
|
|
if (::alisql::PaxosMsg_MsgErrorType_IsValid(value)) {
|
|
set_msgerror(static_cast< ::alisql::PaxosMsg_MsgErrorType >(value));
|
|
} else {
|
|
mutable_unknown_fields()->AddVarint(
|
|
30, static_cast< ::google::protobuf::uint64>(value));
|
|
}
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_unusual:
|
|
if (tag == 0) {
|
|
goto success;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
success:
|
|
// @@protoc_insertion_point(parse_success:alisql.PaxosMsg)
|
|
return true;
|
|
failure:
|
|
// @@protoc_insertion_point(parse_failure:alisql.PaxosMsg)
|
|
return false;
|
|
#undef DO_
|
|
}
|
|
|
|
void PaxosMsg::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// @@protoc_insertion_point(serialize_start:alisql.PaxosMsg)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// optional uint64 configId = 1;
|
|
if (cached_has_bits & 0x00000008u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->configid(), output);
|
|
}
|
|
|
|
// required uint64 clusterId = 2;
|
|
if (cached_has_bits & 0x00000010u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->clusterid(), output);
|
|
}
|
|
|
|
// required uint64 serverId = 3;
|
|
if (cached_has_bits & 0x00000020u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->serverid(), output);
|
|
}
|
|
|
|
// required int32 msgType = 4;
|
|
if (cached_has_bits & 0x00001000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->msgtype(), output);
|
|
}
|
|
|
|
// required uint64 term = 5;
|
|
if (cached_has_bits & 0x00000040u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(5, this->term(), output);
|
|
}
|
|
|
|
// required uint64 msgId = 6;
|
|
if (cached_has_bits & 0x00000080u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(6, this->msgid(), output);
|
|
}
|
|
|
|
// optional uint64 leaderId = 7;
|
|
if (cached_has_bits & 0x00000100u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(7, this->leaderid(), output);
|
|
}
|
|
|
|
// optional uint64 prevLogIndex = 8;
|
|
if (cached_has_bits & 0x00000200u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(8, this->prevlogindex(), output);
|
|
}
|
|
|
|
// optional uint64 prevLogTerm = 9;
|
|
if (cached_has_bits & 0x00000400u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(9, this->prevlogterm(), output);
|
|
}
|
|
|
|
// repeated .alisql.LogEntry entries = 10;
|
|
for (unsigned int i = 0,
|
|
n = static_cast<unsigned int>(this->entries_size()); i < n; i++) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
10,
|
|
this->entries(static_cast<int>(i)),
|
|
output);
|
|
}
|
|
|
|
// optional uint64 commitIndex = 11;
|
|
if (cached_has_bits & 0x00000800u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(11, this->commitindex(), output);
|
|
}
|
|
|
|
// optional bool nocache = 12;
|
|
if (cached_has_bits & 0x00002000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBool(12, this->nocache(), output);
|
|
}
|
|
|
|
// optional bool isSuccess = 13;
|
|
if (cached_has_bits & 0x00004000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBool(13, this->issuccess(), output);
|
|
}
|
|
|
|
// optional uint64 candidateId = 14;
|
|
if (cached_has_bits & 0x00020000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(14, this->candidateid(), output);
|
|
}
|
|
|
|
// optional uint64 lastLogIndex = 15;
|
|
if (cached_has_bits & 0x00040000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(15, this->lastlogindex(), output);
|
|
}
|
|
|
|
// optional uint64 lastLogTerm = 16;
|
|
if (cached_has_bits & 0x00080000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(16, this->lastlogterm(), output);
|
|
}
|
|
|
|
// optional uint64 force = 17;
|
|
if (cached_has_bits & 0x00100000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(17, this->force(), output);
|
|
}
|
|
|
|
// optional bytes addr = 18;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
|
|
18, this->addr(), output);
|
|
}
|
|
|
|
// optional bool voteGranted = 19;
|
|
if (cached_has_bits & 0x00008000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBool(19, this->votegranted(), output);
|
|
}
|
|
|
|
// optional bool ignoreCheck = 20;
|
|
if (cached_has_bits & 0x00010000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBool(20, this->ignorecheck(), output);
|
|
}
|
|
|
|
// optional uint64 lcType = 21;
|
|
if (cached_has_bits & 0x00200000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(21, this->lctype(), output);
|
|
}
|
|
|
|
// optional uint64 minMatchIndex = 22;
|
|
if (cached_has_bits & 0x00400000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(22, this->minmatchindex(), output);
|
|
}
|
|
|
|
// optional uint64 appliedIndex = 23;
|
|
if (cached_has_bits & 0x00800000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(23, this->appliedindex(), output);
|
|
}
|
|
|
|
// optional uint64 newClusterId = 24;
|
|
if (cached_has_bits & 0x01000000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(24, this->newclusterid(), output);
|
|
}
|
|
|
|
// repeated .alisql.ClusterInfoEntry ciEntries = 25;
|
|
for (unsigned int i = 0,
|
|
n = static_cast<unsigned int>(this->cientries_size()); i < n; i++) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
25,
|
|
this->cientries(static_cast<int>(i)),
|
|
output);
|
|
}
|
|
|
|
// optional uint32 role = 26;
|
|
if (cached_has_bits & 0x02000000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt32(26, this->role(), output);
|
|
}
|
|
|
|
// optional .alisql.CompressedLogEntries compressedEntries = 27;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
27, this->_internal_compressedentries(), output);
|
|
}
|
|
|
|
// optional bytes extra = 28;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
|
|
28, this->extra(), output);
|
|
}
|
|
|
|
// optional .alisql.PaxosMsg.MsgErrorType msgError = 30;
|
|
if (cached_has_bits & 0x04000000u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteEnum(
|
|
30, this->msgerror(), output);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
_internal_metadata_.unknown_fields(), output);
|
|
}
|
|
// @@protoc_insertion_point(serialize_end:alisql.PaxosMsg)
|
|
}
|
|
|
|
::google::protobuf::uint8* PaxosMsg::InternalSerializeWithCachedSizesToArray(
|
|
bool deterministic, ::google::protobuf::uint8* target) const {
|
|
(void)deterministic; // Unused
|
|
// @@protoc_insertion_point(serialize_to_array_start:alisql.PaxosMsg)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// optional uint64 configId = 1;
|
|
if (cached_has_bits & 0x00000008u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->configid(), target);
|
|
}
|
|
|
|
// required uint64 clusterId = 2;
|
|
if (cached_has_bits & 0x00000010u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->clusterid(), target);
|
|
}
|
|
|
|
// required uint64 serverId = 3;
|
|
if (cached_has_bits & 0x00000020u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->serverid(), target);
|
|
}
|
|
|
|
// required int32 msgType = 4;
|
|
if (cached_has_bits & 0x00001000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->msgtype(), target);
|
|
}
|
|
|
|
// required uint64 term = 5;
|
|
if (cached_has_bits & 0x00000040u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(5, this->term(), target);
|
|
}
|
|
|
|
// required uint64 msgId = 6;
|
|
if (cached_has_bits & 0x00000080u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(6, this->msgid(), target);
|
|
}
|
|
|
|
// optional uint64 leaderId = 7;
|
|
if (cached_has_bits & 0x00000100u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(7, this->leaderid(), target);
|
|
}
|
|
|
|
// optional uint64 prevLogIndex = 8;
|
|
if (cached_has_bits & 0x00000200u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(8, this->prevlogindex(), target);
|
|
}
|
|
|
|
// optional uint64 prevLogTerm = 9;
|
|
if (cached_has_bits & 0x00000400u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(9, this->prevlogterm(), target);
|
|
}
|
|
|
|
// repeated .alisql.LogEntry entries = 10;
|
|
for (unsigned int i = 0,
|
|
n = static_cast<unsigned int>(this->entries_size()); i < n; i++) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
InternalWriteMessageToArray(
|
|
10, this->entries(static_cast<int>(i)), deterministic, target);
|
|
}
|
|
|
|
// optional uint64 commitIndex = 11;
|
|
if (cached_has_bits & 0x00000800u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(11, this->commitindex(), target);
|
|
}
|
|
|
|
// optional bool nocache = 12;
|
|
if (cached_has_bits & 0x00002000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(12, this->nocache(), target);
|
|
}
|
|
|
|
// optional bool isSuccess = 13;
|
|
if (cached_has_bits & 0x00004000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(13, this->issuccess(), target);
|
|
}
|
|
|
|
// optional uint64 candidateId = 14;
|
|
if (cached_has_bits & 0x00020000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(14, this->candidateid(), target);
|
|
}
|
|
|
|
// optional uint64 lastLogIndex = 15;
|
|
if (cached_has_bits & 0x00040000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(15, this->lastlogindex(), target);
|
|
}
|
|
|
|
// optional uint64 lastLogTerm = 16;
|
|
if (cached_has_bits & 0x00080000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(16, this->lastlogterm(), target);
|
|
}
|
|
|
|
// optional uint64 force = 17;
|
|
if (cached_has_bits & 0x00100000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(17, this->force(), target);
|
|
}
|
|
|
|
// optional bytes addr = 18;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target =
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
|
|
18, this->addr(), target);
|
|
}
|
|
|
|
// optional bool voteGranted = 19;
|
|
if (cached_has_bits & 0x00008000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(19, this->votegranted(), target);
|
|
}
|
|
|
|
// optional bool ignoreCheck = 20;
|
|
if (cached_has_bits & 0x00010000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(20, this->ignorecheck(), target);
|
|
}
|
|
|
|
// optional uint64 lcType = 21;
|
|
if (cached_has_bits & 0x00200000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(21, this->lctype(), target);
|
|
}
|
|
|
|
// optional uint64 minMatchIndex = 22;
|
|
if (cached_has_bits & 0x00400000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(22, this->minmatchindex(), target);
|
|
}
|
|
|
|
// optional uint64 appliedIndex = 23;
|
|
if (cached_has_bits & 0x00800000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(23, this->appliedindex(), target);
|
|
}
|
|
|
|
// optional uint64 newClusterId = 24;
|
|
if (cached_has_bits & 0x01000000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(24, this->newclusterid(), target);
|
|
}
|
|
|
|
// repeated .alisql.ClusterInfoEntry ciEntries = 25;
|
|
for (unsigned int i = 0,
|
|
n = static_cast<unsigned int>(this->cientries_size()); i < n; i++) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
InternalWriteMessageToArray(
|
|
25, this->cientries(static_cast<int>(i)), deterministic, target);
|
|
}
|
|
|
|
// optional uint32 role = 26;
|
|
if (cached_has_bits & 0x02000000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(26, this->role(), target);
|
|
}
|
|
|
|
// optional .alisql.CompressedLogEntries compressedEntries = 27;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
InternalWriteMessageToArray(
|
|
27, this->_internal_compressedentries(), deterministic, target);
|
|
}
|
|
|
|
// optional bytes extra = 28;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
target =
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
|
|
28, this->extra(), target);
|
|
}
|
|
|
|
// optional .alisql.PaxosMsg.MsgErrorType msgError = 30;
|
|
if (cached_has_bits & 0x04000000u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
|
|
30, this->msgerror(), target);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields(), target);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:alisql.PaxosMsg)
|
|
return target;
|
|
}
|
|
|
|
size_t PaxosMsg::RequiredFieldsByteSizeFallback() const {
|
|
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:alisql.PaxosMsg)
|
|
size_t total_size = 0;
|
|
|
|
if (has_clusterid()) {
|
|
// required uint64 clusterId = 2;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->clusterid());
|
|
}
|
|
|
|
if (has_serverid()) {
|
|
// required uint64 serverId = 3;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->serverid());
|
|
}
|
|
|
|
if (has_term()) {
|
|
// required uint64 term = 5;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->term());
|
|
}
|
|
|
|
if (has_msgid()) {
|
|
// required uint64 msgId = 6;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->msgid());
|
|
}
|
|
|
|
if (has_msgtype()) {
|
|
// required int32 msgType = 4;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
this->msgtype());
|
|
}
|
|
|
|
return total_size;
|
|
}
|
|
size_t PaxosMsg::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:alisql.PaxosMsg)
|
|
size_t total_size = 0;
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
_internal_metadata_.unknown_fields());
|
|
}
|
|
if (((_has_bits_[0] & 0x000010f0) ^ 0x000010f0) == 0) { // All required fields are present.
|
|
// required uint64 clusterId = 2;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->clusterid());
|
|
|
|
// required uint64 serverId = 3;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->serverid());
|
|
|
|
// required uint64 term = 5;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->term());
|
|
|
|
// required uint64 msgId = 6;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->msgid());
|
|
|
|
// required int32 msgType = 4;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
this->msgtype());
|
|
|
|
} else {
|
|
total_size += RequiredFieldsByteSizeFallback();
|
|
}
|
|
// repeated .alisql.LogEntry entries = 10;
|
|
{
|
|
unsigned int count = static_cast<unsigned int>(this->entries_size());
|
|
total_size += 1UL * count;
|
|
for (unsigned int i = 0; i < count; i++) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(
|
|
this->entries(static_cast<int>(i)));
|
|
}
|
|
}
|
|
|
|
// repeated .alisql.ClusterInfoEntry ciEntries = 25;
|
|
{
|
|
unsigned int count = static_cast<unsigned int>(this->cientries_size());
|
|
total_size += 2UL * count;
|
|
for (unsigned int i = 0; i < count; i++) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(
|
|
this->cientries(static_cast<int>(i)));
|
|
}
|
|
}
|
|
|
|
if (_has_bits_[0 / 32] & 15u) {
|
|
// optional bytes addr = 18;
|
|
if (has_addr()) {
|
|
total_size += 2 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->addr());
|
|
}
|
|
|
|
// optional bytes extra = 28;
|
|
if (has_extra()) {
|
|
total_size += 2 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->extra());
|
|
}
|
|
|
|
// optional .alisql.CompressedLogEntries compressedEntries = 27;
|
|
if (has_compressedentries()) {
|
|
total_size += 2 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(
|
|
*compressedentries_);
|
|
}
|
|
|
|
// optional uint64 configId = 1;
|
|
if (has_configid()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->configid());
|
|
}
|
|
|
|
}
|
|
if (_has_bits_[8 / 32] & 3840u) {
|
|
// optional uint64 leaderId = 7;
|
|
if (has_leaderid()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->leaderid());
|
|
}
|
|
|
|
// optional uint64 prevLogIndex = 8;
|
|
if (has_prevlogindex()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->prevlogindex());
|
|
}
|
|
|
|
// optional uint64 prevLogTerm = 9;
|
|
if (has_prevlogterm()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->prevlogterm());
|
|
}
|
|
|
|
// optional uint64 commitIndex = 11;
|
|
if (has_commitindex()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->commitindex());
|
|
}
|
|
|
|
}
|
|
if (_has_bits_[8 / 32] & 57344u) {
|
|
// optional bool nocache = 12;
|
|
if (has_nocache()) {
|
|
total_size += 1 + 1;
|
|
}
|
|
|
|
// optional bool isSuccess = 13;
|
|
if (has_issuccess()) {
|
|
total_size += 1 + 1;
|
|
}
|
|
|
|
// optional bool voteGranted = 19;
|
|
if (has_votegranted()) {
|
|
total_size += 2 + 1;
|
|
}
|
|
|
|
}
|
|
if (_has_bits_[16 / 32] & 16711680u) {
|
|
// optional bool ignoreCheck = 20;
|
|
if (has_ignorecheck()) {
|
|
total_size += 2 + 1;
|
|
}
|
|
|
|
// optional uint64 candidateId = 14;
|
|
if (has_candidateid()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->candidateid());
|
|
}
|
|
|
|
// optional uint64 lastLogIndex = 15;
|
|
if (has_lastlogindex()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->lastlogindex());
|
|
}
|
|
|
|
// optional uint64 lastLogTerm = 16;
|
|
if (has_lastlogterm()) {
|
|
total_size += 2 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->lastlogterm());
|
|
}
|
|
|
|
// optional uint64 force = 17;
|
|
if (has_force()) {
|
|
total_size += 2 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->force());
|
|
}
|
|
|
|
// optional uint64 lcType = 21;
|
|
if (has_lctype()) {
|
|
total_size += 2 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->lctype());
|
|
}
|
|
|
|
// optional uint64 minMatchIndex = 22;
|
|
if (has_minmatchindex()) {
|
|
total_size += 2 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->minmatchindex());
|
|
}
|
|
|
|
// optional uint64 appliedIndex = 23;
|
|
if (has_appliedindex()) {
|
|
total_size += 2 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->appliedindex());
|
|
}
|
|
|
|
}
|
|
if (_has_bits_[24 / 32] & 117440512u) {
|
|
// optional uint64 newClusterId = 24;
|
|
if (has_newclusterid()) {
|
|
total_size += 2 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->newclusterid());
|
|
}
|
|
|
|
// optional uint32 role = 26;
|
|
if (has_role()) {
|
|
total_size += 2 +
|
|
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
this->role());
|
|
}
|
|
|
|
// optional .alisql.PaxosMsg.MsgErrorType msgError = 30;
|
|
if (has_msgerror()) {
|
|
total_size += 2 +
|
|
::google::protobuf::internal::WireFormatLite::EnumSize(this->msgerror());
|
|
}
|
|
|
|
}
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
SetCachedSize(cached_size);
|
|
return total_size;
|
|
}
|
|
|
|
void PaxosMsg::MergeFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_merge_from_start:alisql.PaxosMsg)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
const PaxosMsg* source =
|
|
::google::protobuf::internal::DynamicCastToGenerated<const PaxosMsg>(
|
|
&from);
|
|
if (source == NULL) {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:alisql.PaxosMsg)
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:alisql.PaxosMsg)
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void PaxosMsg::MergeFrom(const PaxosMsg& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:alisql.PaxosMsg)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
entries_.MergeFrom(from.entries_);
|
|
cientries_.MergeFrom(from.cientries_);
|
|
cached_has_bits = from._has_bits_[0];
|
|
if (cached_has_bits & 255u) {
|
|
if (cached_has_bits & 0x00000001u) {
|
|
set_has_addr();
|
|
addr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.addr_);
|
|
}
|
|
if (cached_has_bits & 0x00000002u) {
|
|
set_has_extra();
|
|
extra_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extra_);
|
|
}
|
|
if (cached_has_bits & 0x00000004u) {
|
|
mutable_compressedentries()->::alisql::CompressedLogEntries::MergeFrom(from.compressedentries());
|
|
}
|
|
if (cached_has_bits & 0x00000008u) {
|
|
configid_ = from.configid_;
|
|
}
|
|
if (cached_has_bits & 0x00000010u) {
|
|
clusterid_ = from.clusterid_;
|
|
}
|
|
if (cached_has_bits & 0x00000020u) {
|
|
serverid_ = from.serverid_;
|
|
}
|
|
if (cached_has_bits & 0x00000040u) {
|
|
term_ = from.term_;
|
|
}
|
|
if (cached_has_bits & 0x00000080u) {
|
|
msgid_ = from.msgid_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
if (cached_has_bits & 65280u) {
|
|
if (cached_has_bits & 0x00000100u) {
|
|
leaderid_ = from.leaderid_;
|
|
}
|
|
if (cached_has_bits & 0x00000200u) {
|
|
prevlogindex_ = from.prevlogindex_;
|
|
}
|
|
if (cached_has_bits & 0x00000400u) {
|
|
prevlogterm_ = from.prevlogterm_;
|
|
}
|
|
if (cached_has_bits & 0x00000800u) {
|
|
commitindex_ = from.commitindex_;
|
|
}
|
|
if (cached_has_bits & 0x00001000u) {
|
|
msgtype_ = from.msgtype_;
|
|
}
|
|
if (cached_has_bits & 0x00002000u) {
|
|
nocache_ = from.nocache_;
|
|
}
|
|
if (cached_has_bits & 0x00004000u) {
|
|
issuccess_ = from.issuccess_;
|
|
}
|
|
if (cached_has_bits & 0x00008000u) {
|
|
votegranted_ = from.votegranted_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
if (cached_has_bits & 16711680u) {
|
|
if (cached_has_bits & 0x00010000u) {
|
|
ignorecheck_ = from.ignorecheck_;
|
|
}
|
|
if (cached_has_bits & 0x00020000u) {
|
|
candidateid_ = from.candidateid_;
|
|
}
|
|
if (cached_has_bits & 0x00040000u) {
|
|
lastlogindex_ = from.lastlogindex_;
|
|
}
|
|
if (cached_has_bits & 0x00080000u) {
|
|
lastlogterm_ = from.lastlogterm_;
|
|
}
|
|
if (cached_has_bits & 0x00100000u) {
|
|
force_ = from.force_;
|
|
}
|
|
if (cached_has_bits & 0x00200000u) {
|
|
lctype_ = from.lctype_;
|
|
}
|
|
if (cached_has_bits & 0x00400000u) {
|
|
minmatchindex_ = from.minmatchindex_;
|
|
}
|
|
if (cached_has_bits & 0x00800000u) {
|
|
appliedindex_ = from.appliedindex_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
if (cached_has_bits & 117440512u) {
|
|
if (cached_has_bits & 0x01000000u) {
|
|
newclusterid_ = from.newclusterid_;
|
|
}
|
|
if (cached_has_bits & 0x02000000u) {
|
|
role_ = from.role_;
|
|
}
|
|
if (cached_has_bits & 0x04000000u) {
|
|
msgerror_ = from.msgerror_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
}
|
|
|
|
void PaxosMsg::CopyFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_copy_from_start:alisql.PaxosMsg)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void PaxosMsg::CopyFrom(const PaxosMsg& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:alisql.PaxosMsg)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool PaxosMsg::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x000010f0) != 0x000010f0) return false;
|
|
if (!::google::protobuf::internal::AllAreInitialized(this->entries())) return false;
|
|
if (!::google::protobuf::internal::AllAreInitialized(this->cientries())) return false;
|
|
if (has_compressedentries()) {
|
|
if (!this->compressedentries_->IsInitialized()) return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
void PaxosMsg::Swap(PaxosMsg* other) {
|
|
if (other == this) return;
|
|
InternalSwap(other);
|
|
}
|
|
void PaxosMsg::InternalSwap(PaxosMsg* other) {
|
|
using std::swap;
|
|
CastToBase(&entries_)->InternalSwap(CastToBase(&other->entries_));
|
|
CastToBase(&cientries_)->InternalSwap(CastToBase(&other->cientries_));
|
|
addr_.Swap(&other->addr_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
extra_.Swap(&other->extra_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
GetArenaNoVirtual());
|
|
swap(compressedentries_, other->compressedentries_);
|
|
swap(configid_, other->configid_);
|
|
swap(clusterid_, other->clusterid_);
|
|
swap(serverid_, other->serverid_);
|
|
swap(term_, other->term_);
|
|
swap(msgid_, other->msgid_);
|
|
swap(leaderid_, other->leaderid_);
|
|
swap(prevlogindex_, other->prevlogindex_);
|
|
swap(prevlogterm_, other->prevlogterm_);
|
|
swap(commitindex_, other->commitindex_);
|
|
swap(msgtype_, other->msgtype_);
|
|
swap(nocache_, other->nocache_);
|
|
swap(issuccess_, other->issuccess_);
|
|
swap(votegranted_, other->votegranted_);
|
|
swap(ignorecheck_, other->ignorecheck_);
|
|
swap(candidateid_, other->candidateid_);
|
|
swap(lastlogindex_, other->lastlogindex_);
|
|
swap(lastlogterm_, other->lastlogterm_);
|
|
swap(force_, other->force_);
|
|
swap(lctype_, other->lctype_);
|
|
swap(minmatchindex_, other->minmatchindex_);
|
|
swap(appliedindex_, other->appliedindex_);
|
|
swap(newclusterid_, other->newclusterid_);
|
|
swap(role_, other->role_);
|
|
swap(msgerror_, other->msgerror_);
|
|
swap(_has_bits_[0], other->_has_bits_[0]);
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
|
}
|
|
|
|
::google::protobuf::Metadata PaxosMsg::GetMetadata() const {
|
|
protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
}
|
|
|
|
|
|
// ===================================================================
|
|
|
|
void TestMsg1::InitAsDefaultInstance() {
|
|
}
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
const int TestMsg1::kIdFieldNumber;
|
|
const int TestMsg1::kC1FieldNumber;
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
TestMsg1::TestMsg1()
|
|
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
::google::protobuf::internal::InitSCC(
|
|
&protobuf_paxos_2eproto::scc_info_TestMsg1.base);
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(constructor:alisql.TestMsg1)
|
|
}
|
|
TestMsg1::TestMsg1(const TestMsg1& from)
|
|
: ::google::protobuf::Message(),
|
|
_internal_metadata_(NULL),
|
|
_has_bits_(from._has_bits_) {
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::memcpy(&id_, &from.id_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&c1_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(c1_));
|
|
// @@protoc_insertion_point(copy_constructor:alisql.TestMsg1)
|
|
}
|
|
|
|
void TestMsg1::SharedCtor() {
|
|
::memset(&id_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&c1_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(c1_));
|
|
}
|
|
|
|
TestMsg1::~TestMsg1() {
|
|
// @@protoc_insertion_point(destructor:alisql.TestMsg1)
|
|
SharedDtor();
|
|
}
|
|
|
|
void TestMsg1::SharedDtor() {
|
|
}
|
|
|
|
void TestMsg1::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
const ::google::protobuf::Descriptor* TestMsg1::descriptor() {
|
|
::protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
}
|
|
|
|
const TestMsg1& TestMsg1::default_instance() {
|
|
::google::protobuf::internal::InitSCC(&protobuf_paxos_2eproto::scc_info_TestMsg1.base);
|
|
return *internal_default_instance();
|
|
}
|
|
|
|
|
|
void TestMsg1::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:alisql.TestMsg1)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
if (cached_has_bits & 3u) {
|
|
::memset(&id_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&c1_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(c1_));
|
|
}
|
|
_has_bits_.Clear();
|
|
_internal_metadata_.Clear();
|
|
}
|
|
|
|
bool TestMsg1::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
::google::protobuf::uint32 tag;
|
|
// @@protoc_insertion_point(parse_start:alisql.TestMsg1)
|
|
for (;;) {
|
|
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
tag = p.first;
|
|
if (!p.second) goto handle_unusual;
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// required uint64 id = 1;
|
|
case 1: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
set_has_id();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &id_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 c1 = 2;
|
|
case 2: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
set_has_c1();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &c1_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_unusual:
|
|
if (tag == 0) {
|
|
goto success;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
success:
|
|
// @@protoc_insertion_point(parse_success:alisql.TestMsg1)
|
|
return true;
|
|
failure:
|
|
// @@protoc_insertion_point(parse_failure:alisql.TestMsg1)
|
|
return false;
|
|
#undef DO_
|
|
}
|
|
|
|
void TestMsg1::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// @@protoc_insertion_point(serialize_start:alisql.TestMsg1)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required uint64 id = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->id(), output);
|
|
}
|
|
|
|
// optional uint64 c1 = 2;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->c1(), output);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
_internal_metadata_.unknown_fields(), output);
|
|
}
|
|
// @@protoc_insertion_point(serialize_end:alisql.TestMsg1)
|
|
}
|
|
|
|
::google::protobuf::uint8* TestMsg1::InternalSerializeWithCachedSizesToArray(
|
|
bool deterministic, ::google::protobuf::uint8* target) const {
|
|
(void)deterministic; // Unused
|
|
// @@protoc_insertion_point(serialize_to_array_start:alisql.TestMsg1)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required uint64 id = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->id(), target);
|
|
}
|
|
|
|
// optional uint64 c1 = 2;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->c1(), target);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields(), target);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:alisql.TestMsg1)
|
|
return target;
|
|
}
|
|
|
|
size_t TestMsg1::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:alisql.TestMsg1)
|
|
size_t total_size = 0;
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
_internal_metadata_.unknown_fields());
|
|
}
|
|
// required uint64 id = 1;
|
|
if (has_id()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->id());
|
|
}
|
|
// optional uint64 c1 = 2;
|
|
if (has_c1()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->c1());
|
|
}
|
|
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
SetCachedSize(cached_size);
|
|
return total_size;
|
|
}
|
|
|
|
void TestMsg1::MergeFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_merge_from_start:alisql.TestMsg1)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
const TestMsg1* source =
|
|
::google::protobuf::internal::DynamicCastToGenerated<const TestMsg1>(
|
|
&from);
|
|
if (source == NULL) {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:alisql.TestMsg1)
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:alisql.TestMsg1)
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void TestMsg1::MergeFrom(const TestMsg1& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:alisql.TestMsg1)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = from._has_bits_[0];
|
|
if (cached_has_bits & 3u) {
|
|
if (cached_has_bits & 0x00000001u) {
|
|
id_ = from.id_;
|
|
}
|
|
if (cached_has_bits & 0x00000002u) {
|
|
c1_ = from.c1_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
}
|
|
|
|
void TestMsg1::CopyFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_copy_from_start:alisql.TestMsg1)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void TestMsg1::CopyFrom(const TestMsg1& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:alisql.TestMsg1)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool TestMsg1::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
|
|
return true;
|
|
}
|
|
|
|
void TestMsg1::Swap(TestMsg1* other) {
|
|
if (other == this) return;
|
|
InternalSwap(other);
|
|
}
|
|
void TestMsg1::InternalSwap(TestMsg1* other) {
|
|
using std::swap;
|
|
swap(id_, other->id_);
|
|
swap(c1_, other->c1_);
|
|
swap(_has_bits_[0], other->_has_bits_[0]);
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
|
}
|
|
|
|
::google::protobuf::Metadata TestMsg1::GetMetadata() const {
|
|
protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
}
|
|
|
|
|
|
// ===================================================================
|
|
|
|
void TestMsg2::InitAsDefaultInstance() {
|
|
}
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
const int TestMsg2::kIdFieldNumber;
|
|
const int TestMsg2::kC1FieldNumber;
|
|
const int TestMsg2::kC2FieldNumber;
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
TestMsg2::TestMsg2()
|
|
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
::google::protobuf::internal::InitSCC(
|
|
&protobuf_paxos_2eproto::scc_info_TestMsg2.base);
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(constructor:alisql.TestMsg2)
|
|
}
|
|
TestMsg2::TestMsg2(const TestMsg2& from)
|
|
: ::google::protobuf::Message(),
|
|
_internal_metadata_(NULL),
|
|
_has_bits_(from._has_bits_),
|
|
c2_(from.c2_) {
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::memcpy(&id_, &from.id_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&c1_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(c1_));
|
|
// @@protoc_insertion_point(copy_constructor:alisql.TestMsg2)
|
|
}
|
|
|
|
void TestMsg2::SharedCtor() {
|
|
::memset(&id_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&c1_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(c1_));
|
|
}
|
|
|
|
TestMsg2::~TestMsg2() {
|
|
// @@protoc_insertion_point(destructor:alisql.TestMsg2)
|
|
SharedDtor();
|
|
}
|
|
|
|
void TestMsg2::SharedDtor() {
|
|
}
|
|
|
|
void TestMsg2::SetCachedSize(int size) const {
|
|
_cached_size_.Set(size);
|
|
}
|
|
const ::google::protobuf::Descriptor* TestMsg2::descriptor() {
|
|
::protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
}
|
|
|
|
const TestMsg2& TestMsg2::default_instance() {
|
|
::google::protobuf::internal::InitSCC(&protobuf_paxos_2eproto::scc_info_TestMsg2.base);
|
|
return *internal_default_instance();
|
|
}
|
|
|
|
|
|
void TestMsg2::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:alisql.TestMsg2)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
c2_.Clear();
|
|
cached_has_bits = _has_bits_[0];
|
|
if (cached_has_bits & 3u) {
|
|
::memset(&id_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&c1_) -
|
|
reinterpret_cast<char*>(&id_)) + sizeof(c1_));
|
|
}
|
|
_has_bits_.Clear();
|
|
_internal_metadata_.Clear();
|
|
}
|
|
|
|
bool TestMsg2::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
::google::protobuf::uint32 tag;
|
|
// @@protoc_insertion_point(parse_start:alisql.TestMsg2)
|
|
for (;;) {
|
|
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
tag = p.first;
|
|
if (!p.second) goto handle_unusual;
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// required uint64 id = 1;
|
|
case 1: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
set_has_id();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &id_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional uint64 c1 = 2;
|
|
case 2: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
set_has_c1();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &c1_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// repeated uint64 c2 = 3;
|
|
case 3: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
1, 24u, input, this->mutable_c2())));
|
|
} else if (
|
|
static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, this->mutable_c2())));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_unusual:
|
|
if (tag == 0) {
|
|
goto success;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
success:
|
|
// @@protoc_insertion_point(parse_success:alisql.TestMsg2)
|
|
return true;
|
|
failure:
|
|
// @@protoc_insertion_point(parse_failure:alisql.TestMsg2)
|
|
return false;
|
|
#undef DO_
|
|
}
|
|
|
|
void TestMsg2::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// @@protoc_insertion_point(serialize_start:alisql.TestMsg2)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required uint64 id = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->id(), output);
|
|
}
|
|
|
|
// optional uint64 c1 = 2;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->c1(), output);
|
|
}
|
|
|
|
// repeated uint64 c2 = 3;
|
|
for (int i = 0, n = this->c2_size(); i < n; i++) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(
|
|
3, this->c2(i), output);
|
|
}
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
_internal_metadata_.unknown_fields(), output);
|
|
}
|
|
// @@protoc_insertion_point(serialize_end:alisql.TestMsg2)
|
|
}
|
|
|
|
::google::protobuf::uint8* TestMsg2::InternalSerializeWithCachedSizesToArray(
|
|
bool deterministic, ::google::protobuf::uint8* target) const {
|
|
(void)deterministic; // Unused
|
|
// @@protoc_insertion_point(serialize_to_array_start:alisql.TestMsg2)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required uint64 id = 1;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->id(), target);
|
|
}
|
|
|
|
// optional uint64 c1 = 2;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->c1(), target);
|
|
}
|
|
|
|
// repeated uint64 c2 = 3;
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteUInt64ToArray(3, this->c2_, target);
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields(), target);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:alisql.TestMsg2)
|
|
return target;
|
|
}
|
|
|
|
size_t TestMsg2::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:alisql.TestMsg2)
|
|
size_t total_size = 0;
|
|
|
|
if (_internal_metadata_.have_unknown_fields()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
_internal_metadata_.unknown_fields());
|
|
}
|
|
// required uint64 id = 1;
|
|
if (has_id()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->id());
|
|
}
|
|
// repeated uint64 c2 = 3;
|
|
{
|
|
size_t data_size = ::google::protobuf::internal::WireFormatLite::
|
|
UInt64Size(this->c2_);
|
|
total_size += 1 *
|
|
::google::protobuf::internal::FromIntSize(this->c2_size());
|
|
total_size += data_size;
|
|
}
|
|
|
|
// optional uint64 c1 = 2;
|
|
if (has_c1()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->c1());
|
|
}
|
|
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
SetCachedSize(cached_size);
|
|
return total_size;
|
|
}
|
|
|
|
void TestMsg2::MergeFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_merge_from_start:alisql.TestMsg2)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
const TestMsg2* source =
|
|
::google::protobuf::internal::DynamicCastToGenerated<const TestMsg2>(
|
|
&from);
|
|
if (source == NULL) {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:alisql.TestMsg2)
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:alisql.TestMsg2)
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void TestMsg2::MergeFrom(const TestMsg2& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:alisql.TestMsg2)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
c2_.MergeFrom(from.c2_);
|
|
cached_has_bits = from._has_bits_[0];
|
|
if (cached_has_bits & 3u) {
|
|
if (cached_has_bits & 0x00000001u) {
|
|
id_ = from.id_;
|
|
}
|
|
if (cached_has_bits & 0x00000002u) {
|
|
c1_ = from.c1_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
}
|
|
|
|
void TestMsg2::CopyFrom(const ::google::protobuf::Message& from) {
|
|
// @@protoc_insertion_point(generalized_copy_from_start:alisql.TestMsg2)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void TestMsg2::CopyFrom(const TestMsg2& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:alisql.TestMsg2)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool TestMsg2::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
|
|
return true;
|
|
}
|
|
|
|
void TestMsg2::Swap(TestMsg2* other) {
|
|
if (other == this) return;
|
|
InternalSwap(other);
|
|
}
|
|
void TestMsg2::InternalSwap(TestMsg2* other) {
|
|
using std::swap;
|
|
c2_.InternalSwap(&other->c2_);
|
|
swap(id_, other->id_);
|
|
swap(c1_, other->c1_);
|
|
swap(_has_bits_[0], other->_has_bits_[0]);
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
|
}
|
|
|
|
::google::protobuf::Metadata TestMsg2::GetMetadata() const {
|
|
protobuf_paxos_2eproto::protobuf_AssignDescriptorsOnce();
|
|
return ::protobuf_paxos_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
}
|
|
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
} // namespace alisql
|
|
namespace google {
|
|
namespace protobuf {
|
|
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::alisql::LogEntry* Arena::CreateMaybeMessage< ::alisql::LogEntry >(Arena* arena) {
|
|
return Arena::CreateInternal< ::alisql::LogEntry >(arena);
|
|
}
|
|
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::alisql::RDSFields* Arena::CreateMaybeMessage< ::alisql::RDSFields >(Arena* arena) {
|
|
return Arena::CreateInternal< ::alisql::RDSFields >(arena);
|
|
}
|
|
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::alisql::PolarFields* Arena::CreateMaybeMessage< ::alisql::PolarFields >(Arena* arena) {
|
|
return Arena::CreateInternal< ::alisql::PolarFields >(arena);
|
|
}
|
|
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::alisql::CompressedLogEntries* Arena::CreateMaybeMessage< ::alisql::CompressedLogEntries >(Arena* arena) {
|
|
return Arena::CreateInternal< ::alisql::CompressedLogEntries >(arena);
|
|
}
|
|
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::alisql::ConfigureChangeValue* Arena::CreateMaybeMessage< ::alisql::ConfigureChangeValue >(Arena* arena) {
|
|
return Arena::CreateInternal< ::alisql::ConfigureChangeValue >(arena);
|
|
}
|
|
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::alisql::ClusterInfoEntry* Arena::CreateMaybeMessage< ::alisql::ClusterInfoEntry >(Arena* arena) {
|
|
return Arena::CreateInternal< ::alisql::ClusterInfoEntry >(arena);
|
|
}
|
|
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::alisql::PaxosMsg* Arena::CreateMaybeMessage< ::alisql::PaxosMsg >(Arena* arena) {
|
|
return Arena::CreateInternal< ::alisql::PaxosMsg >(arena);
|
|
}
|
|
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::alisql::TestMsg1* Arena::CreateMaybeMessage< ::alisql::TestMsg1 >(Arena* arena) {
|
|
return Arena::CreateInternal< ::alisql::TestMsg1 >(arena);
|
|
}
|
|
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::alisql::TestMsg2* Arena::CreateMaybeMessage< ::alisql::TestMsg2 >(Arena* arena) {
|
|
return Arena::CreateInternal< ::alisql::TestMsg2 >(arena);
|
|
}
|
|
} // namespace protobuf
|
|
} // namespace google
|
|
|
|
// @@protoc_insertion_point(global_scope)
|