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 ClassesModifier and TypeClassDescriptionstatic 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
FieldsModifier and TypeFieldDescriptionstatic final int
private FractionalPercent
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
ConstructorsModifierConstructorDescriptionprivate
private
HedgePolicy
(com.google.protobuf.GeneratedMessage.Builder<?> builder) -
Method Summary
Modifier and TypeMethodDescriptionboolean
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 HedgePolicy
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
hashCode()
boolean
Specifies the number of initial requests that should be sent upstream.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
static HedgePolicy.Builder
static HedgePolicy.Builder
newBuilder
(HedgePolicy prototype) protected HedgePolicy.Builder
newBuilderForType
(com.google.protobuf.AbstractMessage.BuilderParent parent) static HedgePolicy
parseDelimitedFrom
(InputStream input) static HedgePolicy
parseDelimitedFrom
(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
(InputStream input) static HedgePolicy
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HedgePolicy
parseFrom
(ByteBuffer data) static HedgePolicy
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser
<HedgePolicy> parser()
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_
-
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
-
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 classcom.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 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:
getInitialRequests
in 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:
getInitialRequestsOrBuilder
in 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:
hasAdditionalRequestChance
in interfaceHedgePolicyOrBuilder
- Returns:
- Whether the additionalRequestChance field is set.
-
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 interfaceHedgePolicyOrBuilder
- Returns:
- The additionalRequestChance.
-
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 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:
getHedgeOnPerTryTimeout
in interfaceHedgePolicyOrBuilder
- Returns:
- The hedgeOnPerTryTimeout.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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
- Throws:
IOException
-
parseFrom
public static HedgePolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static HedgePolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static HedgePolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected HedgePolicy.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForType
in classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-