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 FractionalPercentprivate com.google.protobuf.SingleFieldBuilder<FractionalPercent, FractionalPercent.Builder, FractionalPercentOrBuilder> private intprivate booleanprivate com.google.protobuf.UInt32Valueprivate 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 voidbuildPartial0(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.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanIndicates that a hedged request should be sent when the per-try timeout is hit.com.google.protobuf.UInt32ValueSpecifies the number of initial requests that should be sent upstream.com.google.protobuf.UInt32Value.BuilderSpecifies 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.UInt32ValueOrBuilderSpecifies the number of initial requests that should be sent upstream.booleanSpecifies a probability that an additional upstream request should be sent on top of what is specified by initial_requests.booleanSpecifies the number of initial requests that should be sent upstream.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanprivate voidSpecifies 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, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods 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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<HedgePolicy.Builder>
-
maybeForceBuilderInitialization
private void maybeForceBuilderInitialization() -
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<HedgePolicy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<HedgePolicy.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial0
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<HedgePolicy.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin 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:
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.
-
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:
getInitialRequestsOrBuilderin 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:
hasAdditionalRequestChancein 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:
getAdditionalRequestChancein 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:
getAdditionalRequestChanceOrBuilderin 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:
getHedgeOnPerTryTimeoutin 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.
-