Class HedgePolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<HedgePolicy.Builder>
com.google.protobuf.GeneratedMessage.Builder<HedgePolicy.Builder>
io.envoyproxy.envoy.config.route.v3.HedgePolicy.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, HedgePolicyOrBuilder, Cloneable
Enclosing class:
HedgePolicy

public static final class HedgePolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<HedgePolicy.Builder> implements HedgePolicyOrBuilder
 HTTP request hedging :ref:`architecture overview <arch_overview_http_routing_hedging>`.
 
Protobuf type envoy.config.route.v3.HedgePolicy
  • Field Details

    • bitField0_

      private int bitField0_
    • initialRequests_

      private com.google.protobuf.UInt32Value initialRequests_
    • initialRequestsBuilder_

      private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.UInt32Value,com.google.protobuf.UInt32Value.Builder,com.google.protobuf.UInt32ValueOrBuilder> initialRequestsBuilder_
    • additionalRequestChance_

      private FractionalPercent additionalRequestChance_
    • additionalRequestChanceBuilder_

      private com.google.protobuf.SingleFieldBuilder<FractionalPercent,FractionalPercent.Builder,FractionalPercentOrBuilder> additionalRequestChanceBuilder_
    • hedgeOnPerTryTimeout_

      private boolean hedgeOnPerTryTimeout_
  • Constructor Details

    • Builder

      private Builder()
    • Builder

      private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<HedgePolicy.Builder>
    • maybeForceBuilderInitialization

      private void maybeForceBuilderInitialization()
    • clear

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

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

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

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

      private void buildPartial0(HedgePolicy result)
    • mergeFrom

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

      public HedgePolicy.Builder mergeFrom(HedgePolicy other)
    • isInitialized

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

      public HedgePolicy.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<HedgePolicy.Builder>
      Throws:
      IOException
    • hasInitialRequests

      public boolean hasInitialRequests()
       Specifies the number of initial requests that should be sent upstream.
       Must be at least 1.
       Defaults to 1.
       [#not-implemented-hide:]
       
      .google.protobuf.UInt32Value initial_requests = 1 [(.validate.rules) = { ... }
      Specified by:
      hasInitialRequests in interface HedgePolicyOrBuilder
      Returns:
      Whether the initialRequests field is set.
    • getInitialRequests

      public com.google.protobuf.UInt32Value getInitialRequests()
       Specifies the number of initial requests that should be sent upstream.
       Must be at least 1.
       Defaults to 1.
       [#not-implemented-hide:]
       
      .google.protobuf.UInt32Value initial_requests = 1 [(.validate.rules) = { ... }
      Specified by:
      getInitialRequests in interface HedgePolicyOrBuilder
      Returns:
      The initialRequests.
    • setInitialRequests

      public HedgePolicy.Builder setInitialRequests(com.google.protobuf.UInt32Value value)
       Specifies the number of initial requests that should be sent upstream.
       Must be at least 1.
       Defaults to 1.
       [#not-implemented-hide:]
       
      .google.protobuf.UInt32Value initial_requests = 1 [(.validate.rules) = { ... }
    • setInitialRequests

      public HedgePolicy.Builder setInitialRequests(com.google.protobuf.UInt32Value.Builder builderForValue)
       Specifies the number of initial requests that should be sent upstream.
       Must be at least 1.
       Defaults to 1.
       [#not-implemented-hide:]
       
      .google.protobuf.UInt32Value initial_requests = 1 [(.validate.rules) = { ... }
    • mergeInitialRequests

      public HedgePolicy.Builder mergeInitialRequests(com.google.protobuf.UInt32Value value)
       Specifies the number of initial requests that should be sent upstream.
       Must be at least 1.
       Defaults to 1.
       [#not-implemented-hide:]
       
      .google.protobuf.UInt32Value initial_requests = 1 [(.validate.rules) = { ... }
    • clearInitialRequests

      public HedgePolicy.Builder clearInitialRequests()
       Specifies the number of initial requests that should be sent upstream.
       Must be at least 1.
       Defaults to 1.
       [#not-implemented-hide:]
       
      .google.protobuf.UInt32Value initial_requests = 1 [(.validate.rules) = { ... }
    • getInitialRequestsBuilder

      public com.google.protobuf.UInt32Value.Builder getInitialRequestsBuilder()
       Specifies the number of initial requests that should be sent upstream.
       Must be at least 1.
       Defaults to 1.
       [#not-implemented-hide:]
       
      .google.protobuf.UInt32Value initial_requests = 1 [(.validate.rules) = { ... }
    • getInitialRequestsOrBuilder

      public com.google.protobuf.UInt32ValueOrBuilder getInitialRequestsOrBuilder()
       Specifies the number of initial requests that should be sent upstream.
       Must be at least 1.
       Defaults to 1.
       [#not-implemented-hide:]
       
      .google.protobuf.UInt32Value initial_requests = 1 [(.validate.rules) = { ... }
      Specified by:
      getInitialRequestsOrBuilder in interface HedgePolicyOrBuilder
    • getInitialRequestsFieldBuilder

      private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.UInt32Value,com.google.protobuf.UInt32Value.Builder,com.google.protobuf.UInt32ValueOrBuilder> getInitialRequestsFieldBuilder()
       Specifies the number of initial requests that should be sent upstream.
       Must be at least 1.
       Defaults to 1.
       [#not-implemented-hide:]
       
      .google.protobuf.UInt32Value initial_requests = 1 [(.validate.rules) = { ... }
    • hasAdditionalRequestChance

      public boolean hasAdditionalRequestChance()
       Specifies a probability that an additional upstream request should be sent
       on top of what is specified by initial_requests.
       Defaults to 0.
       [#not-implemented-hide:]
       
      .envoy.type.v3.FractionalPercent additional_request_chance = 2;
      Specified by:
      hasAdditionalRequestChance in interface HedgePolicyOrBuilder
      Returns:
      Whether the additionalRequestChance field is set.
    • getAdditionalRequestChance

      public FractionalPercent getAdditionalRequestChance()
       Specifies a probability that an additional upstream request should be sent
       on top of what is specified by initial_requests.
       Defaults to 0.
       [#not-implemented-hide:]
       
      .envoy.type.v3.FractionalPercent additional_request_chance = 2;
      Specified by:
      getAdditionalRequestChance in interface HedgePolicyOrBuilder
      Returns:
      The additionalRequestChance.
    • setAdditionalRequestChance

      public HedgePolicy.Builder setAdditionalRequestChance(FractionalPercent value)
       Specifies a probability that an additional upstream request should be sent
       on top of what is specified by initial_requests.
       Defaults to 0.
       [#not-implemented-hide:]
       
      .envoy.type.v3.FractionalPercent additional_request_chance = 2;
    • setAdditionalRequestChance

      public HedgePolicy.Builder setAdditionalRequestChance(FractionalPercent.Builder builderForValue)
       Specifies a probability that an additional upstream request should be sent
       on top of what is specified by initial_requests.
       Defaults to 0.
       [#not-implemented-hide:]
       
      .envoy.type.v3.FractionalPercent additional_request_chance = 2;
    • mergeAdditionalRequestChance

      public HedgePolicy.Builder mergeAdditionalRequestChance(FractionalPercent value)
       Specifies a probability that an additional upstream request should be sent
       on top of what is specified by initial_requests.
       Defaults to 0.
       [#not-implemented-hide:]
       
      .envoy.type.v3.FractionalPercent additional_request_chance = 2;
    • clearAdditionalRequestChance

      public HedgePolicy.Builder clearAdditionalRequestChance()
       Specifies a probability that an additional upstream request should be sent
       on top of what is specified by initial_requests.
       Defaults to 0.
       [#not-implemented-hide:]
       
      .envoy.type.v3.FractionalPercent additional_request_chance = 2;
    • getAdditionalRequestChanceBuilder

      public FractionalPercent.Builder getAdditionalRequestChanceBuilder()
       Specifies a probability that an additional upstream request should be sent
       on top of what is specified by initial_requests.
       Defaults to 0.
       [#not-implemented-hide:]
       
      .envoy.type.v3.FractionalPercent additional_request_chance = 2;
    • getAdditionalRequestChanceOrBuilder

      public FractionalPercentOrBuilder getAdditionalRequestChanceOrBuilder()
       Specifies a probability that an additional upstream request should be sent
       on top of what is specified by initial_requests.
       Defaults to 0.
       [#not-implemented-hide:]
       
      .envoy.type.v3.FractionalPercent additional_request_chance = 2;
      Specified by:
      getAdditionalRequestChanceOrBuilder in interface HedgePolicyOrBuilder
    • getAdditionalRequestChanceFieldBuilder

      private com.google.protobuf.SingleFieldBuilder<FractionalPercent,FractionalPercent.Builder,FractionalPercentOrBuilder> getAdditionalRequestChanceFieldBuilder()
       Specifies a probability that an additional upstream request should be sent
       on top of what is specified by initial_requests.
       Defaults to 0.
       [#not-implemented-hide:]
       
      .envoy.type.v3.FractionalPercent additional_request_chance = 2;
    • getHedgeOnPerTryTimeout

      public boolean getHedgeOnPerTryTimeout()
       Indicates that a hedged request should be sent when the per-try timeout is hit.
       This means that a retry will be issued without resetting the original request, leaving multiple upstream requests in flight.
       The first request to complete successfully will be the one returned to the caller.
      
       * At any time, a successful response (i.e. not triggering any of the retry-on conditions) would be returned to the client.
       * Before per-try timeout, an error response (per retry-on conditions) would be retried immediately or returned ot the client
       if there are no more retries left.
       * After per-try timeout, an error response would be discarded, as a retry in the form of a hedged request is already in progress.
      
       Note: For this to have effect, you must have a :ref:`RetryPolicy <envoy_v3_api_msg_config.route.v3.RetryPolicy>` that retries at least
       one error code and specifies a maximum number of retries.
      
       Defaults to false.
       
      bool hedge_on_per_try_timeout = 3;
      Specified by:
      getHedgeOnPerTryTimeout in interface HedgePolicyOrBuilder
      Returns:
      The hedgeOnPerTryTimeout.
    • setHedgeOnPerTryTimeout

      public HedgePolicy.Builder setHedgeOnPerTryTimeout(boolean value)
       Indicates that a hedged request should be sent when the per-try timeout is hit.
       This means that a retry will be issued without resetting the original request, leaving multiple upstream requests in flight.
       The first request to complete successfully will be the one returned to the caller.
      
       * At any time, a successful response (i.e. not triggering any of the retry-on conditions) would be returned to the client.
       * Before per-try timeout, an error response (per retry-on conditions) would be retried immediately or returned ot the client
       if there are no more retries left.
       * After per-try timeout, an error response would be discarded, as a retry in the form of a hedged request is already in progress.
      
       Note: For this to have effect, you must have a :ref:`RetryPolicy <envoy_v3_api_msg_config.route.v3.RetryPolicy>` that retries at least
       one error code and specifies a maximum number of retries.
      
       Defaults to false.
       
      bool hedge_on_per_try_timeout = 3;
      Parameters:
      value - The hedgeOnPerTryTimeout to set.
      Returns:
      This builder for chaining.
    • clearHedgeOnPerTryTimeout

      public HedgePolicy.Builder clearHedgeOnPerTryTimeout()
       Indicates that a hedged request should be sent when the per-try timeout is hit.
       This means that a retry will be issued without resetting the original request, leaving multiple upstream requests in flight.
       The first request to complete successfully will be the one returned to the caller.
      
       * At any time, a successful response (i.e. not triggering any of the retry-on conditions) would be returned to the client.
       * Before per-try timeout, an error response (per retry-on conditions) would be retried immediately or returned ot the client
       if there are no more retries left.
       * After per-try timeout, an error response would be discarded, as a retry in the form of a hedged request is already in progress.
      
       Note: For this to have effect, you must have a :ref:`RetryPolicy <envoy_v3_api_msg_config.route.v3.RetryPolicy>` that retries at least
       one error code and specifies a maximum number of retries.
      
       Defaults to false.
       
      bool hedge_on_per_try_timeout = 3;
      Returns:
      This builder for chaining.