8 #include <google/protobuf/stubs/common.h>
9 #include <google/protobuf/stubs/port.h>
10 #include <google/protobuf/stubs/once.h>
11 #include <google/protobuf/io/coded_stream.h>
12 #include <google/protobuf/wire_format_lite_inl.h>
13 #include <google/protobuf/descriptor.h>
14 #include <google/protobuf/generated_message_reflection.h>
15 #include <google/protobuf/reflection_ops.h>
16 #include <google/protobuf/wire_format.h>
18 #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
19 #include "third_party/protobuf/version.h"
25 ::google::protobuf::internal::ExplicitlyConstructed<KeyValue>
30 ::google::protobuf::internal::ExplicitlyConstructed<Event>
36 GOOGLE_PROTOBUF_VERIFY_VERSION;
38 #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
39 ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
41 ::google::protobuf::internal::InitProtobufDefaults();
46 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
52 static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
57 GOOGLE_PROTOBUF_VERIFY_VERSION;
59 #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
60 ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
62 ::google::protobuf::internal::InitProtobufDefaults();
68 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
74 static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
83 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::
mvccpb::KeyValue, _internal_metadata_),
88 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::
mvccpb::KeyValue, create_revision_),
89 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::
mvccpb::KeyValue, mod_revision_),
90 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::
mvccpb::KeyValue, version_),
94 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::
mvccpb::Event, _internal_metadata_),
98 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::
mvccpb::Event, type_),
99 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::
mvccpb::Event, kv_),
100 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::
mvccpb::Event, prev_kv_),
114 ::google::protobuf::MessageFactory* factory = NULL;
121 static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
134 "\n\010kv.proto\022\006mvccpb\"u\n\010KeyValue\022\013\n\003key\030\001 "
135 "\001(\014\022\027\n\017create_revision\030\002 \001(\003\022\024\n\014mod_revi"
136 "sion\030\003 \001(\003\022\017\n\007version\030\004 \001(\003\022\r\n\005value\030\005 \001"
137 "(\014\022\r\n\005lease\030\006 \001(\003\"\221\001\n\005Event\022%\n\004type\030\001 \001("
138 "\0162\027.mvccpb.Event.EventType\022\034\n\002kv\030\002 \001(\0132\020"
139 ".mvccpb.KeyValue\022!\n\007prev_kv\030\003 \001(\0132\020.mvcc"
140 "pb.KeyValue\" \n\tEventType\022\007\n\003PUT\020\000\022\n\n\006DEL"
141 "ETE\020\001b\006proto3"
143 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
145 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
150 static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
175 #if !defined(_MSC_VER) || _MSC_VER >= 1900
187 #if !defined(_MSC_VER) || _MSC_VER >= 1900
206 _internal_metadata_(NULL),
209 key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
210 if (from.
key().size() > 0) {
211 key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.
key_);
213 value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
214 if (from.
value().size() > 0) {
215 value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.
value_);
218 static_cast<size_t>(
reinterpret_cast<char*
>(&
lease_) -
224 key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
225 value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
227 reinterpret_cast<char*
>(&
lease_) -
238 key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
239 value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
243 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
245 GOOGLE_SAFE_CONCURRENT_WRITES_END();
267 ::google::protobuf::uint32 cached_has_bits = 0;
269 (void) cached_has_bits;
271 key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
272 value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
274 reinterpret_cast<char*
>(&
lease_) -
280 ::google::protobuf::io::CodedInputStream* input) {
281 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
282 ::google::protobuf::uint32 tag;
285 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
287 if (!p.second)
goto handle_unusual;
288 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
291 if (
static_cast< ::google::protobuf::uint8
>(tag) ==
292 static_cast< ::google::protobuf::uint8
>(10u )) {
293 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
303 if (
static_cast< ::google::protobuf::uint8
>(tag) ==
304 static_cast< ::google::protobuf::uint8
>(16u )) {
306 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
307 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
317 if (
static_cast< ::google::protobuf::uint8
>(tag) ==
318 static_cast< ::google::protobuf::uint8
>(24u )) {
320 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
321 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
331 if (
static_cast< ::google::protobuf::uint8
>(tag) ==
332 static_cast< ::google::protobuf::uint8
>(32u )) {
334 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
335 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
345 if (
static_cast< ::google::protobuf::uint8
>(tag) ==
346 static_cast< ::google::protobuf::uint8
>(42u )) {
347 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
357 if (
static_cast< ::google::protobuf::uint8
>(tag) ==
358 static_cast< ::google::protobuf::uint8
>(48u )) {
360 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
361 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
374 DO_(::google::protobuf::internal::WireFormat::SkipField(
390 ::google::protobuf::io::CodedOutputStream* output)
const {
392 ::google::protobuf::uint32 cached_has_bits = 0;
393 (void) cached_has_bits;
396 if (this->
key().size() > 0) {
397 ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
398 1, this->
key(), output);
403 ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->
create_revision(), output);
408 ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->
mod_revision(), output);
413 ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->
version(), output);
417 if (this->
value().size() > 0) {
418 ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
419 5, this->
value(), output);
423 if (this->
lease() != 0) {
424 ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->
lease(), output);
427 if ((
_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
428 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
435 bool deterministic, ::google::protobuf::uint8* target)
const {
438 ::google::protobuf::uint32 cached_has_bits = 0;
439 (void) cached_has_bits;
442 if (this->
key().size() > 0) {
444 ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
445 1, this->
key(), target);
450 target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->
create_revision(), target);
455 target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->
mod_revision(), target);
460 target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->
version(), target);
464 if (this->
value().size() > 0) {
466 ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
467 5, this->
value(), target);
471 if (this->
lease() != 0) {
472 target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->
lease(), target);
475 if ((
_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
476 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
485 size_t total_size = 0;
487 if ((
_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
489 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
493 if (this->
key().size() > 0) {
495 ::google::protobuf::internal::WireFormatLite::BytesSize(
500 if (this->
value().size() > 0) {
502 ::google::protobuf::internal::WireFormatLite::BytesSize(
509 ::google::protobuf::internal::WireFormatLite::Int64Size(
516 ::google::protobuf::internal::WireFormatLite::Int64Size(
523 ::google::protobuf::internal::WireFormatLite::Int64Size(
528 if (this->
lease() != 0) {
530 ::google::protobuf::internal::WireFormatLite::Int64Size(
534 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
535 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
537 GOOGLE_SAFE_CONCURRENT_WRITES_END();
543 GOOGLE_DCHECK_NE(&from,
this);
545 ::google::protobuf::internal::DynamicCastToGenerated<const KeyValue>(
547 if (source == NULL) {
549 ::google::protobuf::internal::ReflectionOps::Merge(from,
this);
558 GOOGLE_DCHECK_NE(&from,
this);
560 ::google::protobuf::uint32 cached_has_bits = 0;
561 (void) cached_has_bits;
563 if (from.
key().size() > 0) {
565 key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.
key_);
567 if (from.
value().size() > 0) {
569 value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.
value_);
580 if (from.
lease() != 0) {
587 if (&from ==
this)
return;
594 if (&from ==
this)
return;
604 if (other ==
this)
return;
633 #if !defined(_MSC_VER) || _MSC_VER >= 1900
649 _internal_metadata_(NULL),
653 kv_ = new ::mvccpb::KeyValue(*from.
kv_);
667 ::memset(&
kv_, 0,
static_cast<size_t>(
668 reinterpret_cast<char*
>(&
type_) -
669 reinterpret_cast<char*
>(&
kv_)) +
sizeof(
type_));
684 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
686 GOOGLE_SAFE_CONCURRENT_WRITES_END();
708 ::google::protobuf::uint32 cached_has_bits = 0;
710 (void) cached_has_bits;
725 ::google::protobuf::io::CodedInputStream* input) {
726 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
727 ::google::protobuf::uint32 tag;
730 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
732 if (!p.second)
goto handle_unusual;
733 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
736 if (
static_cast< ::google::protobuf::uint8
>(tag) ==
737 static_cast< ::google::protobuf::uint8
>(8u )) {
739 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
740 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
751 if (
static_cast< ::google::protobuf::uint8
>(tag) ==
752 static_cast< ::google::protobuf::uint8
>(18u )) {
753 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
763 if (
static_cast< ::google::protobuf::uint8
>(tag) ==
764 static_cast< ::google::protobuf::uint8
>(26u )) {
765 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
778 DO_(::google::protobuf::internal::WireFormat::SkipField(
794 ::google::protobuf::io::CodedOutputStream* output)
const {
796 ::google::protobuf::uint32 cached_has_bits = 0;
797 (void) cached_has_bits;
800 if (this->
type() != 0) {
801 ::google::protobuf::internal::WireFormatLite::WriteEnum(
802 1, this->
type(), output);
807 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
808 2, *this->
kv_, output);
813 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
817 if ((
_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
818 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
825 bool deterministic, ::google::protobuf::uint8* target)
const {
828 ::google::protobuf::uint32 cached_has_bits = 0;
829 (void) cached_has_bits;
832 if (this->
type() != 0) {
833 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
834 1, this->
type(), target);
839 target = ::google::protobuf::internal::WireFormatLite::
840 InternalWriteMessageToArray(
841 2, *this->
kv_, deterministic, target);
846 target = ::google::protobuf::internal::WireFormatLite::
847 InternalWriteMessageToArray(
848 3, *this->
prev_kv_, deterministic, target);
851 if ((
_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
852 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
861 size_t total_size = 0;
863 if ((
_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
865 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
871 ::google::protobuf::internal::WireFormatLite::MessageSize(
878 ::google::protobuf::internal::WireFormatLite::MessageSize(
883 if (this->
type() != 0) {
885 ::google::protobuf::internal::WireFormatLite::EnumSize(this->
type());
888 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
889 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
891 GOOGLE_SAFE_CONCURRENT_WRITES_END();
897 GOOGLE_DCHECK_NE(&from,
this);
898 const Event* source =
899 ::google::protobuf::internal::DynamicCastToGenerated<const Event>(
901 if (source == NULL) {
903 ::google::protobuf::internal::ReflectionOps::Merge(from,
this);
912 GOOGLE_DCHECK_NE(&from,
this);
914 ::google::protobuf::uint32 cached_has_bits = 0;
915 (void) cached_has_bits;
923 if (from.
type() != 0) {
930 if (&from ==
this)
return;
937 if (&from ==
this)
return;
947 if (other ==
this)
return;
::google::protobuf::internal::ExplicitlyConstructed< Event > _instance
static const ::google::protobuf::Descriptor * descriptor()
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages
static const int kTypeFieldNumber
friend void swap(Event &a, Event &b)
Event * New() const PROTOBUF_FINAL
::mvccpb::KeyValue * mutable_prev_kv()
::mvccpb::Event_EventType type() const
const ::mvccpb::KeyValue & kv() const
static const EventType EventType_MIN
static const EventType PUT
void InternalSwap(Event *other)
void MergeFrom(const ::google::protobuf::Message &from) PROTOBUF_FINAL
bool MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL
static void InitAsDefaultInstance()
static const EventType DELETE
void CopyFrom(const ::google::protobuf::Message &from) PROTOBUF_FINAL
inline ::google::protobuf::Arena * GetArenaNoVirtual() const
static const int kPrevKvFieldNumber
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL
void Clear() PROTOBUF_FINAL
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_
static const int EventType_ARRAYSIZE
void SetCachedSize(int size) const PROTOBUF_FINAL
::google::protobuf::uint8 * InternalSerializeWithCachedSizesToArray(bool deterministic, ::google::protobuf::uint8 *target) const PROTOBUF_FINAL
void SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL
const ::mvccpb::KeyValue & prev_kv() const
size_t ByteSizeLong() const PROTOBUF_FINAL
static const EventType EventType_MAX
::mvccpb::KeyValue * mutable_kv()
void set_type(::mvccpb::Event_EventType value)
static const Event & default_instance()
static const Event * internal_default_instance()
bool IsInitialized() const PROTOBUF_FINAL
static const int kKvFieldNumber
::mvccpb::KeyValue * prev_kv_
::google::protobuf::internal::ExplicitlyConstructed< KeyValue > _instance
static const int kValueFieldNumber
void Swap(KeyValue *other)
::google::protobuf::int64 lease_
void set_lease(::google::protobuf::int64 value)
::google::protobuf::internal::ArenaStringPtr value_
static const KeyValue * internal_default_instance()
KeyValue * New() const PROTOBUF_FINAL
void Clear() PROTOBUF_FINAL
void InternalSwap(KeyValue *other)
static const int kModRevisionFieldNumber
static const int kCreateRevisionFieldNumber
::google::protobuf::uint8 * InternalSerializeWithCachedSizesToArray(bool deterministic, ::google::protobuf::uint8 *target) const PROTOBUF_FINAL
void MergeFrom(const ::google::protobuf::Message &from) PROTOBUF_FINAL
void set_create_revision(::google::protobuf::int64 value)
static const ::google::protobuf::Descriptor * descriptor()
::google::protobuf::int64 mod_revision() const
::google::protobuf::int64 mod_revision_
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL
::std::string * mutable_value()
bool IsInitialized() const PROTOBUF_FINAL
const ::std::string & key() const
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages
static const int kVersionFieldNumber
friend void swap(KeyValue &a, KeyValue &b)
static const int kKeyFieldNumber
void SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream *output) const PROTOBUF_FINAL
::google::protobuf::int64 lease() const
void CopyFrom(const ::google::protobuf::Message &from) PROTOBUF_FINAL
::google::protobuf::int64 create_revision() const
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_
size_t ByteSizeLong() const PROTOBUF_FINAL
::google::protobuf::int64 version() const
static const KeyValue & default_instance()
::google::protobuf::internal::ArenaStringPtr key_
const ::std::string & value() const
bool MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream *input) PROTOBUF_FINAL
::google::protobuf::int64 create_revision_
static void InitAsDefaultInstance()
::google::protobuf::int64 version_
void set_mod_revision(::google::protobuf::int64 value)
static const int kLeaseFieldNumber
void SetCachedSize(int size) const PROTOBUF_FINAL
::std::string * mutable_key()
void set_version(::google::protobuf::int64 value)
bool Event_EventType_IsValid(int value)
class mvccpb::EventDefaultTypeInternal _Event_default_instance_
class mvccpb::KeyValueDefaultTypeInternal _KeyValue_default_instance_
const ::google::protobuf::EnumDescriptor * Event_EventType_descriptor()
void protobuf_AssignDescriptorsOnce()
::google::protobuf::Message const *const file_default_instances[]
void protobuf_AssignDescriptors()
void protobuf_RegisterTypes(const ::std::string &) GOOGLE_PROTOBUF_ATTRIBUTE_COLD
void InitDefaultsEventImpl()
const ::google::protobuf::EnumDescriptor * file_level_enum_descriptors[1]
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold)
struct protobuf_kv_2eproto::StaticDescriptorInitializer static_descriptor_initializer
::google::protobuf::Metadata file_level_metadata[2]
void InitDefaultsKeyValueImpl()
void InitDefaultsKeyValue()
void AddDescriptorsImpl()
void failure(const char *fmt,...)
StaticDescriptorInitializer()
static const ::google::protobuf::uint32 offsets[]