Class MethodConfig.HedgingPolicy.Builder

    • 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<MethodConfig.HedgingPolicy.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<MethodConfig.HedgingPolicy.Builder>
      • getDefaultInstanceForType

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

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

        public MethodConfig.HedgingPolicy buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

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

        public MethodConfig.HedgingPolicy.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                     throws 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<MethodConfig.HedgingPolicy.Builder>
        Throws:
        IOException
      • getMaxAttempts

        public int getMaxAttempts()
         The hedging policy will send up to max_requests RPCs.
         This number represents the total number of all attempts, including
         the original attempt.
         This field is required and must be greater than 1.
         Any value greater than 5 will be treated as if it were 5.
         
        uint32 max_attempts = 1;
        Specified by:
        getMaxAttempts in interface MethodConfig.HedgingPolicyOrBuilder
        Returns:
        The maxAttempts.
      • setMaxAttempts

        public MethodConfig.HedgingPolicy.Builder setMaxAttempts​(int value)
         The hedging policy will send up to max_requests RPCs.
         This number represents the total number of all attempts, including
         the original attempt.
         This field is required and must be greater than 1.
         Any value greater than 5 will be treated as if it were 5.
         
        uint32 max_attempts = 1;
        Parameters:
        value - The maxAttempts to set.
        Returns:
        This builder for chaining.
      • clearMaxAttempts

        public MethodConfig.HedgingPolicy.Builder clearMaxAttempts()
         The hedging policy will send up to max_requests RPCs.
         This number represents the total number of all attempts, including
         the original attempt.
         This field is required and must be greater than 1.
         Any value greater than 5 will be treated as if it were 5.
         
        uint32 max_attempts = 1;
        Returns:
        This builder for chaining.
      • hasHedgingDelay

        public boolean hasHedgingDelay()
         The first RPC will be sent immediately, but the max_requests-1 subsequent
         hedged RPCs will be sent at intervals of every hedging_delay. Set this
         to 0 to immediately send all max_requests RPCs.
         
        .google.protobuf.Duration hedging_delay = 2;
        Specified by:
        hasHedgingDelay in interface MethodConfig.HedgingPolicyOrBuilder
        Returns:
        Whether the hedgingDelay field is set.
      • getHedgingDelay

        public com.google.protobuf.Duration getHedgingDelay()
         The first RPC will be sent immediately, but the max_requests-1 subsequent
         hedged RPCs will be sent at intervals of every hedging_delay. Set this
         to 0 to immediately send all max_requests RPCs.
         
        .google.protobuf.Duration hedging_delay = 2;
        Specified by:
        getHedgingDelay in interface MethodConfig.HedgingPolicyOrBuilder
        Returns:
        The hedgingDelay.
      • setHedgingDelay

        public MethodConfig.HedgingPolicy.Builder setHedgingDelay​(com.google.protobuf.Duration value)
         The first RPC will be sent immediately, but the max_requests-1 subsequent
         hedged RPCs will be sent at intervals of every hedging_delay. Set this
         to 0 to immediately send all max_requests RPCs.
         
        .google.protobuf.Duration hedging_delay = 2;
      • setHedgingDelay

        public MethodConfig.HedgingPolicy.Builder setHedgingDelay​(com.google.protobuf.Duration.Builder builderForValue)
         The first RPC will be sent immediately, but the max_requests-1 subsequent
         hedged RPCs will be sent at intervals of every hedging_delay. Set this
         to 0 to immediately send all max_requests RPCs.
         
        .google.protobuf.Duration hedging_delay = 2;
      • mergeHedgingDelay

        public MethodConfig.HedgingPolicy.Builder mergeHedgingDelay​(com.google.protobuf.Duration value)
         The first RPC will be sent immediately, but the max_requests-1 subsequent
         hedged RPCs will be sent at intervals of every hedging_delay. Set this
         to 0 to immediately send all max_requests RPCs.
         
        .google.protobuf.Duration hedging_delay = 2;
      • clearHedgingDelay

        public MethodConfig.HedgingPolicy.Builder clearHedgingDelay()
         The first RPC will be sent immediately, but the max_requests-1 subsequent
         hedged RPCs will be sent at intervals of every hedging_delay. Set this
         to 0 to immediately send all max_requests RPCs.
         
        .google.protobuf.Duration hedging_delay = 2;
      • getHedgingDelayBuilder

        public com.google.protobuf.Duration.Builder getHedgingDelayBuilder()
         The first RPC will be sent immediately, but the max_requests-1 subsequent
         hedged RPCs will be sent at intervals of every hedging_delay. Set this
         to 0 to immediately send all max_requests RPCs.
         
        .google.protobuf.Duration hedging_delay = 2;
      • getHedgingDelayOrBuilder

        public com.google.protobuf.DurationOrBuilder getHedgingDelayOrBuilder()
         The first RPC will be sent immediately, but the max_requests-1 subsequent
         hedged RPCs will be sent at intervals of every hedging_delay. Set this
         to 0 to immediately send all max_requests RPCs.
         
        .google.protobuf.Duration hedging_delay = 2;
        Specified by:
        getHedgingDelayOrBuilder in interface MethodConfig.HedgingPolicyOrBuilder
      • getNonFatalStatusCodesList

        public List<com.google.rpc.Code> getNonFatalStatusCodesList()
         The set of status codes which indicate other hedged RPCs may still
         succeed. If a non-fatal status code is returned by the server, hedged
         RPCs will continue. Otherwise, outstanding requests will be canceled and
         the error returned to the client application layer.
         This field is optional.
         
        repeated .google.rpc.Code non_fatal_status_codes = 3;
        Specified by:
        getNonFatalStatusCodesList in interface MethodConfig.HedgingPolicyOrBuilder
        Returns:
        A list containing the nonFatalStatusCodes.
      • getNonFatalStatusCodesCount

        public int getNonFatalStatusCodesCount()
         The set of status codes which indicate other hedged RPCs may still
         succeed. If a non-fatal status code is returned by the server, hedged
         RPCs will continue. Otherwise, outstanding requests will be canceled and
         the error returned to the client application layer.
         This field is optional.
         
        repeated .google.rpc.Code non_fatal_status_codes = 3;
        Specified by:
        getNonFatalStatusCodesCount in interface MethodConfig.HedgingPolicyOrBuilder
        Returns:
        The count of nonFatalStatusCodes.
      • getNonFatalStatusCodes

        public com.google.rpc.Code getNonFatalStatusCodes​(int index)
         The set of status codes which indicate other hedged RPCs may still
         succeed. If a non-fatal status code is returned by the server, hedged
         RPCs will continue. Otherwise, outstanding requests will be canceled and
         the error returned to the client application layer.
         This field is optional.
         
        repeated .google.rpc.Code non_fatal_status_codes = 3;
        Specified by:
        getNonFatalStatusCodes in interface MethodConfig.HedgingPolicyOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The nonFatalStatusCodes at the given index.
      • setNonFatalStatusCodes

        public MethodConfig.HedgingPolicy.Builder setNonFatalStatusCodes​(int index,
                                                                         com.google.rpc.Code value)
         The set of status codes which indicate other hedged RPCs may still
         succeed. If a non-fatal status code is returned by the server, hedged
         RPCs will continue. Otherwise, outstanding requests will be canceled and
         the error returned to the client application layer.
         This field is optional.
         
        repeated .google.rpc.Code non_fatal_status_codes = 3;
        Parameters:
        index - The index to set the value at.
        value - The nonFatalStatusCodes to set.
        Returns:
        This builder for chaining.
      • addNonFatalStatusCodes

        public MethodConfig.HedgingPolicy.Builder addNonFatalStatusCodes​(com.google.rpc.Code value)
         The set of status codes which indicate other hedged RPCs may still
         succeed. If a non-fatal status code is returned by the server, hedged
         RPCs will continue. Otherwise, outstanding requests will be canceled and
         the error returned to the client application layer.
         This field is optional.
         
        repeated .google.rpc.Code non_fatal_status_codes = 3;
        Parameters:
        value - The nonFatalStatusCodes to add.
        Returns:
        This builder for chaining.
      • addAllNonFatalStatusCodes

        public MethodConfig.HedgingPolicy.Builder addAllNonFatalStatusCodes​(Iterable<? extends com.google.rpc.Code> values)
         The set of status codes which indicate other hedged RPCs may still
         succeed. If a non-fatal status code is returned by the server, hedged
         RPCs will continue. Otherwise, outstanding requests will be canceled and
         the error returned to the client application layer.
         This field is optional.
         
        repeated .google.rpc.Code non_fatal_status_codes = 3;
        Parameters:
        values - The nonFatalStatusCodes to add.
        Returns:
        This builder for chaining.
      • clearNonFatalStatusCodes

        public MethodConfig.HedgingPolicy.Builder clearNonFatalStatusCodes()
         The set of status codes which indicate other hedged RPCs may still
         succeed. If a non-fatal status code is returned by the server, hedged
         RPCs will continue. Otherwise, outstanding requests will be canceled and
         the error returned to the client application layer.
         This field is optional.
         
        repeated .google.rpc.Code non_fatal_status_codes = 3;
        Returns:
        This builder for chaining.
      • getNonFatalStatusCodesValueList

        public List<Integer> getNonFatalStatusCodesValueList()
         The set of status codes which indicate other hedged RPCs may still
         succeed. If a non-fatal status code is returned by the server, hedged
         RPCs will continue. Otherwise, outstanding requests will be canceled and
         the error returned to the client application layer.
         This field is optional.
         
        repeated .google.rpc.Code non_fatal_status_codes = 3;
        Specified by:
        getNonFatalStatusCodesValueList in interface MethodConfig.HedgingPolicyOrBuilder
        Returns:
        A list containing the enum numeric values on the wire for nonFatalStatusCodes.
      • getNonFatalStatusCodesValue

        public int getNonFatalStatusCodesValue​(int index)
         The set of status codes which indicate other hedged RPCs may still
         succeed. If a non-fatal status code is returned by the server, hedged
         RPCs will continue. Otherwise, outstanding requests will be canceled and
         the error returned to the client application layer.
         This field is optional.
         
        repeated .google.rpc.Code non_fatal_status_codes = 3;
        Specified by:
        getNonFatalStatusCodesValue in interface MethodConfig.HedgingPolicyOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The enum numeric value on the wire of nonFatalStatusCodes at the given index.
      • setNonFatalStatusCodesValue

        public MethodConfig.HedgingPolicy.Builder setNonFatalStatusCodesValue​(int index,
                                                                              int value)
         The set of status codes which indicate other hedged RPCs may still
         succeed. If a non-fatal status code is returned by the server, hedged
         RPCs will continue. Otherwise, outstanding requests will be canceled and
         the error returned to the client application layer.
         This field is optional.
         
        repeated .google.rpc.Code non_fatal_status_codes = 3;
        Parameters:
        index - The index to set the value at.
        value - The enum numeric value on the wire for nonFatalStatusCodes to set.
        Returns:
        This builder for chaining.
      • addNonFatalStatusCodesValue

        public MethodConfig.HedgingPolicy.Builder addNonFatalStatusCodesValue​(int value)
         The set of status codes which indicate other hedged RPCs may still
         succeed. If a non-fatal status code is returned by the server, hedged
         RPCs will continue. Otherwise, outstanding requests will be canceled and
         the error returned to the client application layer.
         This field is optional.
         
        repeated .google.rpc.Code non_fatal_status_codes = 3;
        Parameters:
        value - The enum numeric value on the wire for nonFatalStatusCodes to add.
        Returns:
        This builder for chaining.
      • addAllNonFatalStatusCodesValue

        public MethodConfig.HedgingPolicy.Builder addAllNonFatalStatusCodesValue​(Iterable<Integer> values)
         The set of status codes which indicate other hedged RPCs may still
         succeed. If a non-fatal status code is returned by the server, hedged
         RPCs will continue. Otherwise, outstanding requests will be canceled and
         the error returned to the client application layer.
         This field is optional.
         
        repeated .google.rpc.Code non_fatal_status_codes = 3;
        Parameters:
        values - The enum numeric values on the wire for nonFatalStatusCodes to add.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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