Class HedgePolicy

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, HedgePolicyOrBuilder, java.io.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:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  HedgePolicy.Builder
      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 extends java.lang.Object>, 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
    • Constructor Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      FractionalPercent getAdditionalRequestChance()
      Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.
      FractionalPercentOrBuilder getAdditionalRequestChanceOrBuilder()
      Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.
      static HedgePolicy getDefaultInstance()  
      HedgePolicy getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      boolean getHedgeOnPerTryTimeout()
      Indicates that a hedged request should be sent when the per-try timeout is hit.
      com.google.protobuf.UInt32Value getInitialRequests()
      Specifies the number of initial requests that should be sent upstream.
      com.google.protobuf.UInt32ValueOrBuilder getInitialRequestsOrBuilder()
      Specifies the number of initial requests that should be sent upstream.
      com.google.protobuf.Parser<HedgePolicy> getParserForType()  
      int getSerializedSize()  
      boolean hasAdditionalRequestChance()
      Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.
      int hashCode()  
      boolean hasInitialRequests()
      Specifies the number of initial requests that should be sent upstream.
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      static HedgePolicy.Builder newBuilder()  
      static HedgePolicy.Builder newBuilder​(HedgePolicy prototype)  
      HedgePolicy.Builder newBuilderForType()  
      protected HedgePolicy.Builder newBuilderForType​(com.google.protobuf.AbstractMessage.BuilderParent parent)  
      static HedgePolicy parseDelimitedFrom​(java.io.InputStream input)  
      static HedgePolicy parseDelimitedFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static HedgePolicy parseFrom​(byte[] data)  
      static HedgePolicy parseFrom​(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static HedgePolicy parseFrom​(com.google.protobuf.ByteString data)  
      static HedgePolicy parseFrom​(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static HedgePolicy parseFrom​(com.google.protobuf.CodedInputStream input)  
      static HedgePolicy parseFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static HedgePolicy parseFrom​(java.io.InputStream input)  
      static HedgePolicy parseFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static HedgePolicy parseFrom​(java.nio.ByteBuffer data)  
      static HedgePolicy parseFrom​(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static com.google.protobuf.Parser<HedgePolicy> parser()  
      HedgePolicy.Builder toBuilder()  
      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 Detail

      • bitField0_

        private int bitField0_
      • INITIAL_REQUESTS_FIELD_NUMBER

        public static final int INITIAL_REQUESTS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • initialRequests_

        private com.google.protobuf.UInt32Value initialRequests_
      • ADDITIONAL_REQUEST_CHANCE_FIELD_NUMBER

        public static final int ADDITIONAL_REQUEST_CHANCE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • HEDGE_ON_PER_TRY_TIMEOUT_FIELD_NUMBER

        public static final int HEDGE_ON_PER_TRY_TIMEOUT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • 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 Detail

      • HedgePolicy

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

        private HedgePolicy()
    • Method Detail

      • 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 java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessage
        Throws:
        java.io.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​(java.lang.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​(java.nio.ByteBuffer data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static HedgePolicy parseFrom​(java.nio.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​(java.io.InputStream input)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

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

        public static HedgePolicy parseDelimitedFrom​(java.io.InputStream input)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

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

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

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

        public HedgePolicy.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • 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