Class HedgePolicy.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<HedgePolicy.Builder>
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
,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 type
envoy.config.route.v3.HedgePolicy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FractionalPercent
private com.google.protobuf.SingleFieldBuilder
<FractionalPercent, FractionalPercent.Builder, FractionalPercentOrBuilder> private int
private boolean
private com.google.protobuf.UInt32Value
private com.google.protobuf.SingleFieldBuilder
<com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
private void
buildPartial0
(HedgePolicy result) clear()
Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.Indicates that a hedged request should be sent when the per-try timeout is hit.Specifies the number of initial requests that should be sent upstream.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.private com.google.protobuf.SingleFieldBuilder
<FractionalPercent, FractionalPercent.Builder, FractionalPercentOrBuilder> 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 final com.google.protobuf.Descriptors.Descriptor
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.UInt32Value.Builder
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> 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.boolean
Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.boolean
Specifies the number of initial requests that should be sent upstream.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
private void
Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeFrom
(HedgePolicy other) mergeInitialRequests
(com.google.protobuf.UInt32Value value) Specifies the number of initial requests that should be sent upstream.Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.setAdditionalRequestChance
(FractionalPercent.Builder builderForValue) Specifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.setHedgeOnPerTryTimeout
(boolean value) Indicates that a hedged request should be sent when the per-try timeout is hit.setInitialRequests
(com.google.protobuf.UInt32Value value) Specifies the number of initial requests that should be sent upstream.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
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
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, initialRequestsBuilder_com.google.protobuf.UInt32ValueOrBuilder> -
additionalRequestChance_
-
additionalRequestChanceBuilder_
private com.google.protobuf.SingleFieldBuilder<FractionalPercent,FractionalPercent.Builder, additionalRequestChanceBuilder_FractionalPercentOrBuilder> -
hedgeOnPerTryTimeout_
private boolean hedgeOnPerTryTimeout_
-
-
Constructor Details
-
Builder
private Builder() -
Builder
private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
-
-
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.Builder<HedgePolicy.Builder>
-
maybeForceBuilderInitialization
private void maybeForceBuilderInitialization() -
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
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial0
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<HedgePolicy.Builder>
-
mergeFrom
-
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 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:
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
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
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
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, getInitialRequestsFieldBuilder()com.google.protobuf.UInt32ValueOrBuilder> 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
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
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
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
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
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
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
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, getAdditionalRequestChanceFieldBuilder()FractionalPercentOrBuilder> 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
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
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.
-