Class HedgePolicy
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- 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.GeneratedMessageV3 implements HedgePolicyOrBuilder
HTTP request hedging :ref:`architecture overview <arch_overview_http_routing_hedging>`.
Protobuf typeenvoy.config.route.v3.HedgePolicy- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHedgePolicy.BuilderHTTP 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
-
-
Field Summary
Fields Modifier and Type Field Description static intADDITIONAL_REQUEST_CHANCE_FIELD_NUMBERstatic intHEDGE_ON_PER_TRY_TIMEOUT_FIELD_NUMBERstatic intINITIAL_REQUESTS_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)FractionalPercentgetAdditionalRequestChance()Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.FractionalPercentOrBuildergetAdditionalRequestChanceOrBuilder()Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.static HedgePolicygetDefaultInstance()HedgePolicygetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()booleangetHedgeOnPerTryTimeout()Indicates that a hedged request should be sent when the per-try timeout is hit.com.google.protobuf.UInt32ValuegetInitialRequests()Specifies the number of initial requests that should be sent upstream.com.google.protobuf.UInt32ValueOrBuildergetInitialRequestsOrBuilder()Specifies the number of initial requests that should be sent upstream.com.google.protobuf.Parser<HedgePolicy>getParserForType()intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()booleanhasAdditionalRequestChance()Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.inthashCode()booleanhasInitialRequests()Specifies the number of initial requests that should be sent upstream.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static HedgePolicy.BuildernewBuilder()static HedgePolicy.BuildernewBuilder(HedgePolicy prototype)HedgePolicy.BuildernewBuilderForType()protected HedgePolicy.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static HedgePolicyparseDelimitedFrom(InputStream input)static HedgePolicyparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static HedgePolicyparseFrom(byte[] data)static HedgePolicyparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static HedgePolicyparseFrom(com.google.protobuf.ByteString data)static HedgePolicyparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static HedgePolicyparseFrom(com.google.protobuf.CodedInputStream input)static HedgePolicyparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static HedgePolicyparseFrom(InputStream input)static HedgePolicyparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static HedgePolicyparseFrom(ByteBuffer data)static HedgePolicyparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<HedgePolicy>parser()HedgePolicy.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, 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, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
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:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.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:
hasInitialRequestsin interfaceHedgePolicyOrBuilder- 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:
getInitialRequestsin interfaceHedgePolicyOrBuilder- 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:
getInitialRequestsOrBuilderin interfaceHedgePolicyOrBuilder
-
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:
hasAdditionalRequestChancein interfaceHedgePolicyOrBuilder- 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:
getAdditionalRequestChancein interfaceHedgePolicyOrBuilder- 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:
getAdditionalRequestChanceOrBuilderin interfaceHedgePolicyOrBuilder
-
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:
getHedgeOnPerTryTimeoutin interfaceHedgePolicyOrBuilder- Returns:
- The hedgeOnPerTryTimeout.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.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:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static HedgePolicy.Builder newBuilder()
-
newBuilder
public static HedgePolicy.Builder newBuilder(HedgePolicy prototype)
-
toBuilder
public HedgePolicy.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected HedgePolicy.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.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:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public HedgePolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-