Class 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.GeneratedMessageV3
    implements HedgePolicyOrBuilder
     HTTP request hedging :ref:`architecture overview <arch_overview_http_routing_hedging>`.
     
    Protobuf type envoy.api.v2.route.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.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,​BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,​BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

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

      • INITIAL_REQUESTS_FIELD_NUMBER

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

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • 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
      • 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.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.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.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_api_msg_route.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.GeneratedMessageV3
      • 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.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • 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​(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
      • 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.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
      • getDefaultInstanceForType

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