Class HedgePolicy

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
io.envoyproxy.envoy.config.route.v3.HedgePolicy
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, HedgePolicyOrBuilder, Serializable

public final class HedgePolicy extends com.google.protobuf.GeneratedMessage implements HedgePolicyOrBuilder
 HTTP request hedging :ref:`architecture overview <arch_overview_http_routing_hedging>`.
 
Protobuf type envoy.config.route.v3.HedgePolicy
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    HTTP request hedging :ref:`architecture overview <arch_overview_http_routing_hedging>`.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

    com.google.protobuf.AbstractMessage.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
     
    private int
     
    private static final HedgePolicy
     
    static final int
     
    private boolean
     
    static final int
     
    private com.google.protobuf.UInt32Value
     
    private byte
     
    private static final com.google.protobuf.Parser<HedgePolicy>
     
    private static final long
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
    private
    HedgePolicy(com.google.protobuf.GeneratedMessage.Builder<?> builder)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.
    Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    boolean
    Indicates that a hedged request should be sent when the per-try timeout is hit.
    com.google.protobuf.UInt32Value
    Specifies the number of initial requests that should be sent upstream.
    com.google.protobuf.UInt32ValueOrBuilder
    Specifies the number of initial requests that should be sent upstream.
    com.google.protobuf.Parser<HedgePolicy>
     
    int
     
    boolean
    Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.
    int
     
    boolean
    Specifies the number of initial requests that should be sent upstream.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<HedgePolicy>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessage

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • bitField0_

      private int bitField0_
    • INITIAL_REQUESTS_FIELD_NUMBER

      public static final int INITIAL_REQUESTS_FIELD_NUMBER
      See Also:
    • initialRequests_

      private com.google.protobuf.UInt32Value initialRequests_
    • ADDITIONAL_REQUEST_CHANCE_FIELD_NUMBER

      public static final int ADDITIONAL_REQUEST_CHANCE_FIELD_NUMBER
      See Also:
    • additionalRequestChance_

      private FractionalPercent additionalRequestChance_
    • HEDGE_ON_PER_TRY_TIMEOUT_FIELD_NUMBER

      public static final int HEDGE_ON_PER_TRY_TIMEOUT_FIELD_NUMBER
      See Also:
    • hedgeOnPerTryTimeout_

      private boolean hedgeOnPerTryTimeout_
    • memoizedIsInitialized

      private byte memoizedIsInitialized
    • DEFAULT_INSTANCE

      private static final HedgePolicy DEFAULT_INSTANCE
    • PARSER

      private static final com.google.protobuf.Parser<HedgePolicy> PARSER
  • Constructor Details

    • HedgePolicy

      private HedgePolicy(com.google.protobuf.GeneratedMessage.Builder<?> builder)
    • HedgePolicy

      private HedgePolicy()
  • 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
    • 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.
    • 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
    • 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.
    • 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
    • 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.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static HedgePolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static HedgePolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static HedgePolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static HedgePolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static HedgePolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static HedgePolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static HedgePolicy parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static HedgePolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static HedgePolicy parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static HedgePolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static HedgePolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static HedgePolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

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

      public static HedgePolicy.Builder newBuilder()
    • newBuilder

      public static HedgePolicy.Builder newBuilder(HedgePolicy prototype)
    • toBuilder

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

      protected HedgePolicy.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static HedgePolicy getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<HedgePolicy> parser()
    • getParserForType

      public com.google.protobuf.Parser<HedgePolicy> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

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