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
,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 typeenvoy.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
-
-
Field Summary
Fields Modifier and Type Field Description static int
ADDITIONAL_REQUEST_CHANCE_FIELD_NUMBER
private FractionalPercent
additionalRequestChance_
private int
bitField0_
private static HedgePolicy
DEFAULT_INSTANCE
static int
HEDGE_ON_PER_TRY_TIMEOUT_FIELD_NUMBER
private boolean
hedgeOnPerTryTimeout_
static int
INITIAL_REQUESTS_FIELD_NUMBER
private com.google.protobuf.UInt32Value
initialRequests_
private byte
memoizedIsInitialized
private static com.google.protobuf.Parser<HedgePolicy>
PARSER
private static long
serialVersionUID
-
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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
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
-
additionalRequestChance_
private FractionalPercent additionalRequestChance_
-
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
-
-
Method Detail
-
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
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 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:
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
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
public boolean equals(java.lang.Object obj)
- 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(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 interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in 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:
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
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 interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
public HedgePolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-