All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.envoyproxy.envoy.config.route.v3.HedgePolicy Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: envoy/config/route/v3/route_components.proto

package io.envoyproxy.envoy.config.route.v3;

/**
 * 
 * HTTP request hedging :ref:`architecture overview <arch_overview_http_routing_hedging>`.
 * 
* * Protobuf type {@code envoy.config.route.v3.HedgePolicy} */ public final class HedgePolicy extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.config.route.v3.HedgePolicy) HedgePolicyOrBuilder { private static final long serialVersionUID = 0L; // Use HedgePolicy.newBuilder() to construct. private HedgePolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private HedgePolicy() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new HedgePolicy(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private HedgePolicy( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { com.google.protobuf.UInt32Value.Builder subBuilder = null; if (initialRequests_ != null) { subBuilder = initialRequests_.toBuilder(); } initialRequests_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(initialRequests_); initialRequests_ = subBuilder.buildPartial(); } break; } case 18: { io.envoyproxy.envoy.type.v3.FractionalPercent.Builder subBuilder = null; if (additionalRequestChance_ != null) { subBuilder = additionalRequestChance_.toBuilder(); } additionalRequestChance_ = input.readMessage(io.envoyproxy.envoy.type.v3.FractionalPercent.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(additionalRequestChance_); additionalRequestChance_ = subBuilder.buildPartial(); } break; } case 24: { hedgeOnPerTryTimeout_ = input.readBool(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_HedgePolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_HedgePolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.route.v3.HedgePolicy.class, io.envoyproxy.envoy.config.route.v3.HedgePolicy.Builder.class); } public static final int INITIAL_REQUESTS_FIELD_NUMBER = 1; private com.google.protobuf.UInt32Value initialRequests_; /** *
   * 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) = { ... } * @return Whether the initialRequests field is set. */ @java.lang.Override public boolean hasInitialRequests() { return initialRequests_ != null; } /** *
   * 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) = { ... } * @return The initialRequests. */ @java.lang.Override public com.google.protobuf.UInt32Value getInitialRequests() { return initialRequests_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : initialRequests_; } /** *
   * 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) = { ... } */ @java.lang.Override public com.google.protobuf.UInt32ValueOrBuilder getInitialRequestsOrBuilder() { return getInitialRequests(); } public static final int ADDITIONAL_REQUEST_CHANCE_FIELD_NUMBER = 2; private io.envoyproxy.envoy.type.v3.FractionalPercent additionalRequestChance_; /** *
   * 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; * @return Whether the additionalRequestChance field is set. */ @java.lang.Override public boolean hasAdditionalRequestChance() { return additionalRequestChance_ != null; } /** *
   * 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; * @return The additionalRequestChance. */ @java.lang.Override public io.envoyproxy.envoy.type.v3.FractionalPercent getAdditionalRequestChance() { return additionalRequestChance_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : additionalRequestChance_; } /** *
   * 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; */ @java.lang.Override public io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder getAdditionalRequestChanceOrBuilder() { return getAdditionalRequestChance(); } public static final int HEDGE_ON_PER_TRY_TIMEOUT_FIELD_NUMBER = 3; private boolean hedgeOnPerTryTimeout_; /** *
   * 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; * @return The hedgeOnPerTryTimeout. */ @java.lang.Override public boolean getHedgeOnPerTryTimeout() { return hedgeOnPerTryTimeout_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (initialRequests_ != null) { output.writeMessage(1, getInitialRequests()); } if (additionalRequestChance_ != null) { output.writeMessage(2, getAdditionalRequestChance()); } if (hedgeOnPerTryTimeout_ != false) { output.writeBool(3, hedgeOnPerTryTimeout_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (initialRequests_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getInitialRequests()); } if (additionalRequestChance_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getAdditionalRequestChance()); } if (hedgeOnPerTryTimeout_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, hedgeOnPerTryTimeout_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.envoyproxy.envoy.config.route.v3.HedgePolicy)) { return super.equals(obj); } io.envoyproxy.envoy.config.route.v3.HedgePolicy other = (io.envoyproxy.envoy.config.route.v3.HedgePolicy) obj; if (hasInitialRequests() != other.hasInitialRequests()) return false; if (hasInitialRequests()) { if (!getInitialRequests() .equals(other.getInitialRequests())) return false; } if (hasAdditionalRequestChance() != other.hasAdditionalRequestChance()) return false; if (hasAdditionalRequestChance()) { if (!getAdditionalRequestChance() .equals(other.getAdditionalRequestChance())) return false; } if (getHedgeOnPerTryTimeout() != other.getHedgeOnPerTryTimeout()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasInitialRequests()) { hash = (37 * hash) + INITIAL_REQUESTS_FIELD_NUMBER; hash = (53 * hash) + getInitialRequests().hashCode(); } if (hasAdditionalRequestChance()) { hash = (37 * hash) + ADDITIONAL_REQUEST_CHANCE_FIELD_NUMBER; hash = (53 * hash) + getAdditionalRequestChance().hashCode(); } hash = (37 * hash) + HEDGE_ON_PER_TRY_TIMEOUT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getHedgeOnPerTryTimeout()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.HedgePolicy prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * HTTP request hedging :ref:`architecture overview <arch_overview_http_routing_hedging>`.
   * 
* * Protobuf type {@code envoy.config.route.v3.HedgePolicy} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.config.route.v3.HedgePolicy) io.envoyproxy.envoy.config.route.v3.HedgePolicyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_HedgePolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_HedgePolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.route.v3.HedgePolicy.class, io.envoyproxy.envoy.config.route.v3.HedgePolicy.Builder.class); } // Construct using io.envoyproxy.envoy.config.route.v3.HedgePolicy.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); if (initialRequestsBuilder_ == null) { initialRequests_ = null; } else { initialRequests_ = null; initialRequestsBuilder_ = null; } if (additionalRequestChanceBuilder_ == null) { additionalRequestChance_ = null; } else { additionalRequestChance_ = null; additionalRequestChanceBuilder_ = null; } hedgeOnPerTryTimeout_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_HedgePolicy_descriptor; } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.HedgePolicy getDefaultInstanceForType() { return io.envoyproxy.envoy.config.route.v3.HedgePolicy.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.HedgePolicy build() { io.envoyproxy.envoy.config.route.v3.HedgePolicy result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.HedgePolicy buildPartial() { io.envoyproxy.envoy.config.route.v3.HedgePolicy result = new io.envoyproxy.envoy.config.route.v3.HedgePolicy(this); if (initialRequestsBuilder_ == null) { result.initialRequests_ = initialRequests_; } else { result.initialRequests_ = initialRequestsBuilder_.build(); } if (additionalRequestChanceBuilder_ == null) { result.additionalRequestChance_ = additionalRequestChance_; } else { result.additionalRequestChance_ = additionalRequestChanceBuilder_.build(); } result.hedgeOnPerTryTimeout_ = hedgeOnPerTryTimeout_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.config.route.v3.HedgePolicy) { return mergeFrom((io.envoyproxy.envoy.config.route.v3.HedgePolicy)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.HedgePolicy other) { if (other == io.envoyproxy.envoy.config.route.v3.HedgePolicy.getDefaultInstance()) return this; if (other.hasInitialRequests()) { mergeInitialRequests(other.getInitialRequests()); } if (other.hasAdditionalRequestChance()) { mergeAdditionalRequestChance(other.getAdditionalRequestChance()); } if (other.getHedgeOnPerTryTimeout() != false) { setHedgeOnPerTryTimeout(other.getHedgeOnPerTryTimeout()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.envoyproxy.envoy.config.route.v3.HedgePolicy parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.config.route.v3.HedgePolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.UInt32Value initialRequests_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> initialRequestsBuilder_; /** *
     * 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) = { ... } * @return Whether the initialRequests field is set. */ public boolean hasInitialRequests() { return initialRequestsBuilder_ != null || initialRequests_ != null; } /** *
     * 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) = { ... } * @return The initialRequests. */ public com.google.protobuf.UInt32Value getInitialRequests() { if (initialRequestsBuilder_ == null) { return initialRequests_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : initialRequests_; } else { return initialRequestsBuilder_.getMessage(); } } /** *
     * 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) = { ... } */ public Builder setInitialRequests(com.google.protobuf.UInt32Value value) { if (initialRequestsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } initialRequests_ = value; onChanged(); } else { initialRequestsBuilder_.setMessage(value); } return this; } /** *
     * 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) = { ... } */ public Builder setInitialRequests( com.google.protobuf.UInt32Value.Builder builderForValue) { if (initialRequestsBuilder_ == null) { initialRequests_ = builderForValue.build(); onChanged(); } else { initialRequestsBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * 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) = { ... } */ public Builder mergeInitialRequests(com.google.protobuf.UInt32Value value) { if (initialRequestsBuilder_ == null) { if (initialRequests_ != null) { initialRequests_ = com.google.protobuf.UInt32Value.newBuilder(initialRequests_).mergeFrom(value).buildPartial(); } else { initialRequests_ = value; } onChanged(); } else { initialRequestsBuilder_.mergeFrom(value); } return this; } /** *
     * 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) = { ... } */ public Builder clearInitialRequests() { if (initialRequestsBuilder_ == null) { initialRequests_ = null; onChanged(); } else { initialRequests_ = null; initialRequestsBuilder_ = null; } return this; } /** *
     * 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) = { ... } */ public com.google.protobuf.UInt32Value.Builder getInitialRequestsBuilder() { onChanged(); return getInitialRequestsFieldBuilder().getBuilder(); } /** *
     * 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) = { ... } */ public com.google.protobuf.UInt32ValueOrBuilder getInitialRequestsOrBuilder() { if (initialRequestsBuilder_ != null) { return initialRequestsBuilder_.getMessageOrBuilder(); } else { return initialRequests_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : initialRequests_; } } /** *
     * 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) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> getInitialRequestsFieldBuilder() { if (initialRequestsBuilder_ == null) { initialRequestsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( getInitialRequests(), getParentForChildren(), isClean()); initialRequests_ = null; } return initialRequestsBuilder_; } private io.envoyproxy.envoy.type.v3.FractionalPercent additionalRequestChance_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.type.v3.FractionalPercent, io.envoyproxy.envoy.type.v3.FractionalPercent.Builder, io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder> additionalRequestChanceBuilder_; /** *
     * 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; * @return Whether the additionalRequestChance field is set. */ public boolean hasAdditionalRequestChance() { return additionalRequestChanceBuilder_ != null || additionalRequestChance_ != null; } /** *
     * 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; * @return The additionalRequestChance. */ public io.envoyproxy.envoy.type.v3.FractionalPercent getAdditionalRequestChance() { if (additionalRequestChanceBuilder_ == null) { return additionalRequestChance_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : additionalRequestChance_; } else { return additionalRequestChanceBuilder_.getMessage(); } } /** *
     * 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; */ public Builder setAdditionalRequestChance(io.envoyproxy.envoy.type.v3.FractionalPercent value) { if (additionalRequestChanceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } additionalRequestChance_ = value; onChanged(); } else { additionalRequestChanceBuilder_.setMessage(value); } return this; } /** *
     * 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; */ public Builder setAdditionalRequestChance( io.envoyproxy.envoy.type.v3.FractionalPercent.Builder builderForValue) { if (additionalRequestChanceBuilder_ == null) { additionalRequestChance_ = builderForValue.build(); onChanged(); } else { additionalRequestChanceBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * 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; */ public Builder mergeAdditionalRequestChance(io.envoyproxy.envoy.type.v3.FractionalPercent value) { if (additionalRequestChanceBuilder_ == null) { if (additionalRequestChance_ != null) { additionalRequestChance_ = io.envoyproxy.envoy.type.v3.FractionalPercent.newBuilder(additionalRequestChance_).mergeFrom(value).buildPartial(); } else { additionalRequestChance_ = value; } onChanged(); } else { additionalRequestChanceBuilder_.mergeFrom(value); } return this; } /** *
     * 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; */ public Builder clearAdditionalRequestChance() { if (additionalRequestChanceBuilder_ == null) { additionalRequestChance_ = null; onChanged(); } else { additionalRequestChance_ = null; additionalRequestChanceBuilder_ = null; } return this; } /** *
     * 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; */ public io.envoyproxy.envoy.type.v3.FractionalPercent.Builder getAdditionalRequestChanceBuilder() { onChanged(); return getAdditionalRequestChanceFieldBuilder().getBuilder(); } /** *
     * 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; */ public io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder getAdditionalRequestChanceOrBuilder() { if (additionalRequestChanceBuilder_ != null) { return additionalRequestChanceBuilder_.getMessageOrBuilder(); } else { return additionalRequestChance_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : additionalRequestChance_; } } /** *
     * 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; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.type.v3.FractionalPercent, io.envoyproxy.envoy.type.v3.FractionalPercent.Builder, io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder> getAdditionalRequestChanceFieldBuilder() { if (additionalRequestChanceBuilder_ == null) { additionalRequestChanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.type.v3.FractionalPercent, io.envoyproxy.envoy.type.v3.FractionalPercent.Builder, io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder>( getAdditionalRequestChance(), getParentForChildren(), isClean()); additionalRequestChance_ = null; } return additionalRequestChanceBuilder_; } private boolean hedgeOnPerTryTimeout_ ; /** *
     * 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; * @return The hedgeOnPerTryTimeout. */ @java.lang.Override public boolean getHedgeOnPerTryTimeout() { return hedgeOnPerTryTimeout_; } /** *
     * 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; * @param value The hedgeOnPerTryTimeout to set. * @return This builder for chaining. */ public Builder setHedgeOnPerTryTimeout(boolean value) { hedgeOnPerTryTimeout_ = value; onChanged(); return this; } /** *
     * 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; * @return This builder for chaining. */ public Builder clearHedgeOnPerTryTimeout() { hedgeOnPerTryTimeout_ = false; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:envoy.config.route.v3.HedgePolicy) } // @@protoc_insertion_point(class_scope:envoy.config.route.v3.HedgePolicy) private static final io.envoyproxy.envoy.config.route.v3.HedgePolicy DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.HedgePolicy(); } public static io.envoyproxy.envoy.config.route.v3.HedgePolicy getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public HedgePolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new HedgePolicy(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.HedgePolicy getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy