Class TxnRequest.Builder

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

    public static final class TxnRequest.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<TxnRequest.Builder>
    implements TxnRequestOrBuilder
     From google paxosdb paper:
     Our implementation hinges around a powerful primitive which we call MultiOp. All other database
     operations except for iteration are implemented as a single call to MultiOp. A MultiOp is applied atomically
     and consists of three components:
     1. A list of tests called guard. Each test in guard checks a single entry in the database. It may check
     for the absence or presence of a value, or compare with a given value. Two different tests in the guard
     may apply to the same or different entries in the database. All tests in the guard are applied and
     MultiOp returns the results. If all tests are true, MultiOp executes t op (see item 2 below), otherwise
     it executes f op (see item 3 below).
     2. A list of database operations called t op. Each operation in the list is either an insert, delete, or
     lookup operation, and applies to a single database entry. Two different operations in the list may apply
     to the same or different entries in the database. These operations are executed
     if guard evaluates to
     true.
     3. A list of database operations called f op. Like t op, but executed if guard evaluates to false.
     
    Protobuf type etcdserverpb.TxnRequest
    • 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<TxnRequest.Builder>
      • clear

        public TxnRequest.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<TxnRequest.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<TxnRequest.Builder>
      • getDefaultInstanceForType

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

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

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

        public TxnRequest.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<TxnRequest.Builder>
      • setField

        public TxnRequest.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<TxnRequest.Builder>
      • clearField

        public TxnRequest.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<TxnRequest.Builder>
      • clearOneof

        public TxnRequest.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<TxnRequest.Builder>
      • setRepeatedField

        public TxnRequest.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<TxnRequest.Builder>
      • addRepeatedField

        public TxnRequest.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<TxnRequest.Builder>
      • mergeFrom

        public TxnRequest.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<TxnRequest.Builder>
      • isInitialized

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

        public TxnRequest.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<TxnRequest.Builder>
        Throws:
        java.io.IOException
      • getCompareList

        public java.util.List<Compare> getCompareList()
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
        Specified by:
        getCompareList in interface TxnRequestOrBuilder
      • getCompareCount

        public int getCompareCount()
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
        Specified by:
        getCompareCount in interface TxnRequestOrBuilder
      • getCompare

        public Compare getCompare​(int index)
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
        Specified by:
        getCompare in interface TxnRequestOrBuilder
      • setCompare

        public TxnRequest.Builder setCompare​(int index,
                                             Compare value)
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • setCompare

        public TxnRequest.Builder setCompare​(int index,
                                             Compare.Builder builderForValue)
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • addCompare

        public TxnRequest.Builder addCompare​(Compare value)
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • addCompare

        public TxnRequest.Builder addCompare​(int index,
                                             Compare value)
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • addCompare

        public TxnRequest.Builder addCompare​(Compare.Builder builderForValue)
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • addCompare

        public TxnRequest.Builder addCompare​(int index,
                                             Compare.Builder builderForValue)
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • addAllCompare

        public TxnRequest.Builder addAllCompare​(java.lang.Iterable<? extends Compare> values)
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • clearCompare

        public TxnRequest.Builder clearCompare()
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • removeCompare

        public TxnRequest.Builder removeCompare​(int index)
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • getCompareBuilder

        public Compare.Builder getCompareBuilder​(int index)
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • getCompareOrBuilder

        public CompareOrBuilder getCompareOrBuilder​(int index)
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
        Specified by:
        getCompareOrBuilder in interface TxnRequestOrBuilder
      • getCompareOrBuilderList

        public java.util.List<? extends CompareOrBuilder> getCompareOrBuilderList()
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
        Specified by:
        getCompareOrBuilderList in interface TxnRequestOrBuilder
      • addCompareBuilder

        public Compare.Builder addCompareBuilder()
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • addCompareBuilder

        public Compare.Builder addCompareBuilder​(int index)
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • getCompareBuilderList

        public java.util.List<Compare.Builder> getCompareBuilderList()
         compare is a list of predicates representing a conjunction of terms.
         If the comparisons succeed, then the success requests will be processed in order,
         and the response will contain their respective responses in order.
         If the comparisons fail, then the failure requests will be processed in order,
         and the response will contain their respective responses in order.
         
        repeated .etcdserverpb.Compare compare = 1;
      • getSuccessList

        public java.util.List<RequestOp> getSuccessList()
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
        Specified by:
        getSuccessList in interface TxnRequestOrBuilder
      • getSuccessCount

        public int getSuccessCount()
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
        Specified by:
        getSuccessCount in interface TxnRequestOrBuilder
      • getSuccess

        public RequestOp getSuccess​(int index)
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
        Specified by:
        getSuccess in interface TxnRequestOrBuilder
      • setSuccess

        public TxnRequest.Builder setSuccess​(int index,
                                             RequestOp value)
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • setSuccess

        public TxnRequest.Builder setSuccess​(int index,
                                             RequestOp.Builder builderForValue)
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • addSuccess

        public TxnRequest.Builder addSuccess​(RequestOp value)
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • addSuccess

        public TxnRequest.Builder addSuccess​(int index,
                                             RequestOp value)
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • addSuccess

        public TxnRequest.Builder addSuccess​(RequestOp.Builder builderForValue)
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • addSuccess

        public TxnRequest.Builder addSuccess​(int index,
                                             RequestOp.Builder builderForValue)
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • addAllSuccess

        public TxnRequest.Builder addAllSuccess​(java.lang.Iterable<? extends RequestOp> values)
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • clearSuccess

        public TxnRequest.Builder clearSuccess()
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • removeSuccess

        public TxnRequest.Builder removeSuccess​(int index)
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • getSuccessBuilder

        public RequestOp.Builder getSuccessBuilder​(int index)
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • getSuccessOrBuilder

        public RequestOpOrBuilder getSuccessOrBuilder​(int index)
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
        Specified by:
        getSuccessOrBuilder in interface TxnRequestOrBuilder
      • getSuccessOrBuilderList

        public java.util.List<? extends RequestOpOrBuilder> getSuccessOrBuilderList()
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
        Specified by:
        getSuccessOrBuilderList in interface TxnRequestOrBuilder
      • addSuccessBuilder

        public RequestOp.Builder addSuccessBuilder()
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • addSuccessBuilder

        public RequestOp.Builder addSuccessBuilder​(int index)
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • getSuccessBuilderList

        public java.util.List<RequestOp.Builder> getSuccessBuilderList()
         success is a list of requests which will be applied when compare evaluates to true.
         
        repeated .etcdserverpb.RequestOp success = 2;
      • getFailureList

        public java.util.List<RequestOp> getFailureList()
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
        Specified by:
        getFailureList in interface TxnRequestOrBuilder
      • getFailureCount

        public int getFailureCount()
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
        Specified by:
        getFailureCount in interface TxnRequestOrBuilder
      • getFailure

        public RequestOp getFailure​(int index)
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
        Specified by:
        getFailure in interface TxnRequestOrBuilder
      • setFailure

        public TxnRequest.Builder setFailure​(int index,
                                             RequestOp value)
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • setFailure

        public TxnRequest.Builder setFailure​(int index,
                                             RequestOp.Builder builderForValue)
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • addFailure

        public TxnRequest.Builder addFailure​(RequestOp value)
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • addFailure

        public TxnRequest.Builder addFailure​(int index,
                                             RequestOp value)
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • addFailure

        public TxnRequest.Builder addFailure​(RequestOp.Builder builderForValue)
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • addFailure

        public TxnRequest.Builder addFailure​(int index,
                                             RequestOp.Builder builderForValue)
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • addAllFailure

        public TxnRequest.Builder addAllFailure​(java.lang.Iterable<? extends RequestOp> values)
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • clearFailure

        public TxnRequest.Builder clearFailure()
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • removeFailure

        public TxnRequest.Builder removeFailure​(int index)
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • getFailureBuilder

        public RequestOp.Builder getFailureBuilder​(int index)
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • getFailureOrBuilder

        public RequestOpOrBuilder getFailureOrBuilder​(int index)
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
        Specified by:
        getFailureOrBuilder in interface TxnRequestOrBuilder
      • getFailureOrBuilderList

        public java.util.List<? extends RequestOpOrBuilder> getFailureOrBuilderList()
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
        Specified by:
        getFailureOrBuilderList in interface TxnRequestOrBuilder
      • addFailureBuilder

        public RequestOp.Builder addFailureBuilder()
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • addFailureBuilder

        public RequestOp.Builder addFailureBuilder​(int index)
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • getFailureBuilderList

        public java.util.List<RequestOp.Builder> getFailureBuilderList()
         failure is a list of requests which will be applied when compare evaluates to false.
         
        repeated .etcdserverpb.RequestOp failure = 3;
      • setUnknownFields

        public final TxnRequest.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<TxnRequest.Builder>
      • mergeUnknownFields

        public final TxnRequest.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<TxnRequest.Builder>