Class HedgePolicy.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.Builder<HedgePolicy.Builder>
-
- io.envoyproxy.envoy.config.route.v3.HedgePolicy.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,HedgePolicyOrBuilder
,java.lang.Cloneable
- Enclosing class:
- HedgePolicy
public static final class HedgePolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<HedgePolicy.Builder> implements HedgePolicyOrBuilder
HTTP request hedging :ref:`architecture overview <arch_overview_http_routing_hedging>`.
Protobuf typeenvoy.config.route.v3.HedgePolicy
-
-
Field Summary
Fields Modifier and Type Field Description private FractionalPercent
additionalRequestChance_
private com.google.protobuf.SingleFieldBuilder<FractionalPercent,FractionalPercent.Builder,FractionalPercentOrBuilder>
additionalRequestChanceBuilder_
private int
bitField0_
private boolean
hedgeOnPerTryTimeout_
private com.google.protobuf.UInt32Value
initialRequests_
private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.UInt32Value,com.google.protobuf.UInt32Value.Builder,com.google.protobuf.UInt32ValueOrBuilder>
initialRequestsBuilder_
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HedgePolicy
build()
HedgePolicy
buildPartial()
private void
buildPartial0(HedgePolicy result)
HedgePolicy.Builder
clear()
HedgePolicy.Builder
clearAdditionalRequestChance()
Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.HedgePolicy.Builder
clearHedgeOnPerTryTimeout()
Indicates that a hedged request should be sent when the per-try timeout is hit.HedgePolicy.Builder
clearInitialRequests()
Specifies the number of initial requests that should be sent upstream.FractionalPercent
getAdditionalRequestChance()
Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.FractionalPercent.Builder
getAdditionalRequestChanceBuilder()
Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.private com.google.protobuf.SingleFieldBuilder<FractionalPercent,FractionalPercent.Builder,FractionalPercentOrBuilder>
getAdditionalRequestChanceFieldBuilder()
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.HedgePolicy
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
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.UInt32Value.Builder
getInitialRequestsBuilder()
Specifies the number of initial requests that should be sent upstream.private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.UInt32Value,com.google.protobuf.UInt32Value.Builder,com.google.protobuf.UInt32ValueOrBuilder>
getInitialRequestsFieldBuilder()
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.boolean
hasAdditionalRequestChance()
Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.boolean
hasInitialRequests()
Specifies the number of initial requests that should be sent upstream.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
private void
maybeForceBuilderInitialization()
HedgePolicy.Builder
mergeAdditionalRequestChance(FractionalPercent value)
Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.HedgePolicy.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
HedgePolicy.Builder
mergeFrom(com.google.protobuf.Message other)
HedgePolicy.Builder
mergeFrom(HedgePolicy other)
HedgePolicy.Builder
mergeInitialRequests(com.google.protobuf.UInt32Value value)
Specifies the number of initial requests that should be sent upstream.HedgePolicy.Builder
setAdditionalRequestChance(FractionalPercent value)
Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.HedgePolicy.Builder
setAdditionalRequestChance(FractionalPercent.Builder builderForValue)
Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.HedgePolicy.Builder
setHedgeOnPerTryTimeout(boolean value)
Indicates that a hedged request should be sent when the per-try timeout is hit.HedgePolicy.Builder
setInitialRequests(com.google.protobuf.UInt32Value value)
Specifies the number of initial requests that should be sent upstream.HedgePolicy.Builder
setInitialRequests(com.google.protobuf.UInt32Value.Builder builderForValue)
Specifies the number of initial requests that should be sent upstream.-
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
bitField0_
private int bitField0_
-
initialRequests_
private com.google.protobuf.UInt32Value initialRequests_
-
initialRequestsBuilder_
private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.UInt32Value,com.google.protobuf.UInt32Value.Builder,com.google.protobuf.UInt32ValueOrBuilder> initialRequestsBuilder_
-
additionalRequestChance_
private FractionalPercent additionalRequestChance_
-
additionalRequestChanceBuilder_
private com.google.protobuf.SingleFieldBuilder<FractionalPercent,FractionalPercent.Builder,FractionalPercentOrBuilder> additionalRequestChanceBuilder_
-
hedgeOnPerTryTimeout_
private boolean hedgeOnPerTryTimeout_
-
-
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.Builder<HedgePolicy.Builder>
-
maybeForceBuilderInitialization
private void maybeForceBuilderInitialization()
-
clear
public HedgePolicy.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<HedgePolicy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<HedgePolicy.Builder>
-
getDefaultInstanceForType
public HedgePolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public HedgePolicy build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public HedgePolicy buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial0
private void buildPartial0(HedgePolicy result)
-
mergeFrom
public HedgePolicy.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<HedgePolicy.Builder>
-
mergeFrom
public HedgePolicy.Builder mergeFrom(HedgePolicy other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.Builder<HedgePolicy.Builder>
-
mergeFrom
public HedgePolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<HedgePolicy.Builder>
- Throws:
java.io.IOException
-
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.
-
setInitialRequests
public HedgePolicy.Builder setInitialRequests(com.google.protobuf.UInt32Value value)
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) = { ... }
-
setInitialRequests
public HedgePolicy.Builder setInitialRequests(com.google.protobuf.UInt32Value.Builder builderForValue)
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) = { ... }
-
mergeInitialRequests
public HedgePolicy.Builder mergeInitialRequests(com.google.protobuf.UInt32Value value)
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) = { ... }
-
clearInitialRequests
public HedgePolicy.Builder clearInitialRequests()
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) = { ... }
-
getInitialRequestsBuilder
public com.google.protobuf.UInt32Value.Builder getInitialRequestsBuilder()
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) = { ... }
-
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
-
getInitialRequestsFieldBuilder
private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.UInt32Value,com.google.protobuf.UInt32Value.Builder,com.google.protobuf.UInt32ValueOrBuilder> getInitialRequestsFieldBuilder()
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) = { ... }
-
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.
-
setAdditionalRequestChance
public HedgePolicy.Builder setAdditionalRequestChance(FractionalPercent value)
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;
-
setAdditionalRequestChance
public HedgePolicy.Builder setAdditionalRequestChance(FractionalPercent.Builder builderForValue)
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;
-
mergeAdditionalRequestChance
public HedgePolicy.Builder mergeAdditionalRequestChance(FractionalPercent value)
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;
-
clearAdditionalRequestChance
public HedgePolicy.Builder clearAdditionalRequestChance()
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;
-
getAdditionalRequestChanceBuilder
public FractionalPercent.Builder getAdditionalRequestChanceBuilder()
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;
-
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
-
getAdditionalRequestChanceFieldBuilder
private com.google.protobuf.SingleFieldBuilder<FractionalPercent,FractionalPercent.Builder,FractionalPercentOrBuilder> getAdditionalRequestChanceFieldBuilder()
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;
-
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.
-
setHedgeOnPerTryTimeout
public HedgePolicy.Builder setHedgeOnPerTryTimeout(boolean value)
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;
- Parameters:
value
- The hedgeOnPerTryTimeout to set.- Returns:
- This builder for chaining.
-
clearHedgeOnPerTryTimeout
public HedgePolicy.Builder clearHedgeOnPerTryTimeout()
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;
- Returns:
- This builder for chaining.
-
-