Class KeyValue.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, KeyValueOrBuilder, java.lang.Cloneable
    Enclosing class:
    KeyValue

    public static final class KeyValue.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
    implements KeyValueOrBuilder
    Protobuf type mvccpb.KeyValue
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
      • clear

        public KeyValue.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
      • getDefaultInstanceForType

        public KeyValue getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public KeyValue build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public KeyValue buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public KeyValue.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
      • setField

        public KeyValue.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                         java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
      • clearField

        public KeyValue.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
      • clearOneof

        public KeyValue.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
      • setRepeatedField

        public KeyValue.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 int index,
                                                 java.lang.Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
      • addRepeatedField

        public KeyValue.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
      • mergeFrom

        public KeyValue.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<KeyValue.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
      • mergeFrom

        public KeyValue.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<KeyValue.Builder>
        Throws:
        java.io.IOException
      • getKey

        public com.google.protobuf.ByteString getKey()
         key is the key in bytes. An empty key is not allowed.
         
        bytes key = 1;
        Specified by:
        getKey in interface KeyValueOrBuilder
        Returns:
        The key.
      • setKey

        public KeyValue.Builder setKey​(com.google.protobuf.ByteString value)
         key is the key in bytes. An empty key is not allowed.
         
        bytes key = 1;
        Parameters:
        value - The key to set.
        Returns:
        This builder for chaining.
      • clearKey

        public KeyValue.Builder clearKey()
         key is the key in bytes. An empty key is not allowed.
         
        bytes key = 1;
        Returns:
        This builder for chaining.
      • getCreateRevision

        public long getCreateRevision()
         create_revision is the revision of last creation on this key.
         
        int64 create_revision = 2;
        Specified by:
        getCreateRevision in interface KeyValueOrBuilder
        Returns:
        The createRevision.
      • setCreateRevision

        public KeyValue.Builder setCreateRevision​(long value)
         create_revision is the revision of last creation on this key.
         
        int64 create_revision = 2;
        Parameters:
        value - The createRevision to set.
        Returns:
        This builder for chaining.
      • clearCreateRevision

        public KeyValue.Builder clearCreateRevision()
         create_revision is the revision of last creation on this key.
         
        int64 create_revision = 2;
        Returns:
        This builder for chaining.
      • getModRevision

        public long getModRevision()
         mod_revision is the revision of last modification on this key.
         
        int64 mod_revision = 3;
        Specified by:
        getModRevision in interface KeyValueOrBuilder
        Returns:
        The modRevision.
      • setModRevision

        public KeyValue.Builder setModRevision​(long value)
         mod_revision is the revision of last modification on this key.
         
        int64 mod_revision = 3;
        Parameters:
        value - The modRevision to set.
        Returns:
        This builder for chaining.
      • clearModRevision

        public KeyValue.Builder clearModRevision()
         mod_revision is the revision of last modification on this key.
         
        int64 mod_revision = 3;
        Returns:
        This builder for chaining.
      • getVersion

        public long getVersion()
         version is the version of the key. A deletion resets
         the version to zero and any modification of the key
         increases its version.
         
        int64 version = 4;
        Specified by:
        getVersion in interface KeyValueOrBuilder
        Returns:
        The version.
      • setVersion

        public KeyValue.Builder setVersion​(long value)
         version is the version of the key. A deletion resets
         the version to zero and any modification of the key
         increases its version.
         
        int64 version = 4;
        Parameters:
        value - The version to set.
        Returns:
        This builder for chaining.
      • clearVersion

        public KeyValue.Builder clearVersion()
         version is the version of the key. A deletion resets
         the version to zero and any modification of the key
         increases its version.
         
        int64 version = 4;
        Returns:
        This builder for chaining.
      • getValue

        public com.google.protobuf.ByteString getValue()
         value is the value held by the key, in bytes.
         
        bytes value = 5;
        Specified by:
        getValue in interface KeyValueOrBuilder
        Returns:
        The value.
      • setValue

        public KeyValue.Builder setValue​(com.google.protobuf.ByteString value)
         value is the value held by the key, in bytes.
         
        bytes value = 5;
        Parameters:
        value - The value to set.
        Returns:
        This builder for chaining.
      • clearValue

        public KeyValue.Builder clearValue()
         value is the value held by the key, in bytes.
         
        bytes value = 5;
        Returns:
        This builder for chaining.
      • getLease

        public long getLease()
         lease is the ID of the lease that attached to key.
         When the attached lease expires, the key will be deleted.
         If lease is 0, then no lease is attached to the key.
         
        int64 lease = 6;
        Specified by:
        getLease in interface KeyValueOrBuilder
        Returns:
        The lease.
      • setLease

        public KeyValue.Builder setLease​(long value)
         lease is the ID of the lease that attached to key.
         When the attached lease expires, the key will be deleted.
         If lease is 0, then no lease is attached to the key.
         
        int64 lease = 6;
        Parameters:
        value - The lease to set.
        Returns:
        This builder for chaining.
      • clearLease

        public KeyValue.Builder clearLease()
         lease is the ID of the lease that attached to key.
         When the attached lease expires, the key will be deleted.
         If lease is 0, then no lease is attached to the key.
         
        int64 lease = 6;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final KeyValue.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
      • mergeUnknownFields

        public final KeyValue.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>