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

io.temporal.api.common.v1.RetryPolicy Maven / Gradle / Ivy

There is a newer version: 1.27.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: temporal/api/common/v1/message.proto

package io.temporal.api.common.v1;

/**
 * 
 * How retries ought to be handled, usable by both workflows and activities
 * 
* * Protobuf type {@code temporal.api.common.v1.RetryPolicy} */ @javax.annotation.Generated(value="protoc", comments="annotations:RetryPolicy.java.pb.meta") public final class RetryPolicy extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:temporal.api.common.v1.RetryPolicy) RetryPolicyOrBuilder { private static final long serialVersionUID = 0L; // Use RetryPolicy.newBuilder() to construct. private RetryPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private RetryPolicy() { nonRetryableErrorTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RetryPolicy(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private RetryPolicy( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; 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.Duration.Builder subBuilder = null; if (initialInterval_ != null) { subBuilder = initialInterval_.toBuilder(); } initialInterval_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(initialInterval_); initialInterval_ = subBuilder.buildPartial(); } break; } case 17: { backoffCoefficient_ = input.readDouble(); break; } case 26: { com.google.protobuf.Duration.Builder subBuilder = null; if (maximumInterval_ != null) { subBuilder = maximumInterval_.toBuilder(); } maximumInterval_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(maximumInterval_); maximumInterval_ = subBuilder.buildPartial(); } break; } case 32: { maximumAttempts_ = input.readInt32(); break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { nonRetryableErrorTypes_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000001; } nonRetryableErrorTypes_.add(s); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { nonRetryableErrorTypes_ = nonRetryableErrorTypes_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_RetryPolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_RetryPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( io.temporal.api.common.v1.RetryPolicy.class, io.temporal.api.common.v1.RetryPolicy.Builder.class); } public static final int INITIAL_INTERVAL_FIELD_NUMBER = 1; private com.google.protobuf.Duration initialInterval_; /** *
   * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
   * 
* * .google.protobuf.Duration initial_interval = 1 [(.gogoproto.stdduration) = true]; * @return Whether the initialInterval field is set. */ public boolean hasInitialInterval() { return initialInterval_ != null; } /** *
   * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
   * 
* * .google.protobuf.Duration initial_interval = 1 [(.gogoproto.stdduration) = true]; * @return The initialInterval. */ public com.google.protobuf.Duration getInitialInterval() { return initialInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : initialInterval_; } /** *
   * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
   * 
* * .google.protobuf.Duration initial_interval = 1 [(.gogoproto.stdduration) = true]; */ public com.google.protobuf.DurationOrBuilder getInitialIntervalOrBuilder() { return getInitialInterval(); } public static final int BACKOFF_COEFFICIENT_FIELD_NUMBER = 2; private double backoffCoefficient_; /** *
   * Coefficient used to calculate the next retry interval.
   * The next retry interval is previous interval multiplied by the coefficient.
   * Must be 1 or larger.
   * 
* * double backoff_coefficient = 2; * @return The backoffCoefficient. */ public double getBackoffCoefficient() { return backoffCoefficient_; } public static final int MAXIMUM_INTERVAL_FIELD_NUMBER = 3; private com.google.protobuf.Duration maximumInterval_; /** *
   * Maximum interval between retries. Exponential backoff leads to interval increase.
   * This value is the cap of the increase. Default is 100x of the initial interval.
   * 
* * .google.protobuf.Duration maximum_interval = 3 [(.gogoproto.stdduration) = true]; * @return Whether the maximumInterval field is set. */ public boolean hasMaximumInterval() { return maximumInterval_ != null; } /** *
   * Maximum interval between retries. Exponential backoff leads to interval increase.
   * This value is the cap of the increase. Default is 100x of the initial interval.
   * 
* * .google.protobuf.Duration maximum_interval = 3 [(.gogoproto.stdduration) = true]; * @return The maximumInterval. */ public com.google.protobuf.Duration getMaximumInterval() { return maximumInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maximumInterval_; } /** *
   * Maximum interval between retries. Exponential backoff leads to interval increase.
   * This value is the cap of the increase. Default is 100x of the initial interval.
   * 
* * .google.protobuf.Duration maximum_interval = 3 [(.gogoproto.stdduration) = true]; */ public com.google.protobuf.DurationOrBuilder getMaximumIntervalOrBuilder() { return getMaximumInterval(); } public static final int MAXIMUM_ATTEMPTS_FIELD_NUMBER = 4; private int maximumAttempts_; /** *
   * Maximum number of attempts. When exceeded the retries stop even if not expired yet.
   * 1 disables retries. 0 means unlimited (up to the timeouts)
   * 
* * int32 maximum_attempts = 4; * @return The maximumAttempts. */ public int getMaximumAttempts() { return maximumAttempts_; } public static final int NON_RETRYABLE_ERROR_TYPES_FIELD_NUMBER = 5; private com.google.protobuf.LazyStringList nonRetryableErrorTypes_; /** *
   * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
   * this is not a substring match, the error *type* (not message) must match exactly.
   * 
* * repeated string non_retryable_error_types = 5; * @return A list containing the nonRetryableErrorTypes. */ public com.google.protobuf.ProtocolStringList getNonRetryableErrorTypesList() { return nonRetryableErrorTypes_; } /** *
   * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
   * this is not a substring match, the error *type* (not message) must match exactly.
   * 
* * repeated string non_retryable_error_types = 5; * @return The count of nonRetryableErrorTypes. */ public int getNonRetryableErrorTypesCount() { return nonRetryableErrorTypes_.size(); } /** *
   * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
   * this is not a substring match, the error *type* (not message) must match exactly.
   * 
* * repeated string non_retryable_error_types = 5; * @param index The index of the element to return. * @return The nonRetryableErrorTypes at the given index. */ public java.lang.String getNonRetryableErrorTypes(int index) { return nonRetryableErrorTypes_.get(index); } /** *
   * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
   * this is not a substring match, the error *type* (not message) must match exactly.
   * 
* * repeated string non_retryable_error_types = 5; * @param index The index of the value to return. * @return The bytes of the nonRetryableErrorTypes at the given index. */ public com.google.protobuf.ByteString getNonRetryableErrorTypesBytes(int index) { return nonRetryableErrorTypes_.getByteString(index); } 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 (initialInterval_ != null) { output.writeMessage(1, getInitialInterval()); } if (backoffCoefficient_ != 0D) { output.writeDouble(2, backoffCoefficient_); } if (maximumInterval_ != null) { output.writeMessage(3, getMaximumInterval()); } if (maximumAttempts_ != 0) { output.writeInt32(4, maximumAttempts_); } for (int i = 0; i < nonRetryableErrorTypes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, nonRetryableErrorTypes_.getRaw(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (initialInterval_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getInitialInterval()); } if (backoffCoefficient_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(2, backoffCoefficient_); } if (maximumInterval_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getMaximumInterval()); } if (maximumAttempts_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, maximumAttempts_); } { int dataSize = 0; for (int i = 0; i < nonRetryableErrorTypes_.size(); i++) { dataSize += computeStringSizeNoTag(nonRetryableErrorTypes_.getRaw(i)); } size += dataSize; size += 1 * getNonRetryableErrorTypesList().size(); } 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.temporal.api.common.v1.RetryPolicy)) { return super.equals(obj); } io.temporal.api.common.v1.RetryPolicy other = (io.temporal.api.common.v1.RetryPolicy) obj; if (hasInitialInterval() != other.hasInitialInterval()) return false; if (hasInitialInterval()) { if (!getInitialInterval() .equals(other.getInitialInterval())) return false; } if (java.lang.Double.doubleToLongBits(getBackoffCoefficient()) != java.lang.Double.doubleToLongBits( other.getBackoffCoefficient())) return false; if (hasMaximumInterval() != other.hasMaximumInterval()) return false; if (hasMaximumInterval()) { if (!getMaximumInterval() .equals(other.getMaximumInterval())) return false; } if (getMaximumAttempts() != other.getMaximumAttempts()) return false; if (!getNonRetryableErrorTypesList() .equals(other.getNonRetryableErrorTypesList())) 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 (hasInitialInterval()) { hash = (37 * hash) + INITIAL_INTERVAL_FIELD_NUMBER; hash = (53 * hash) + getInitialInterval().hashCode(); } hash = (37 * hash) + BACKOFF_COEFFICIENT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getBackoffCoefficient())); if (hasMaximumInterval()) { hash = (37 * hash) + MAXIMUM_INTERVAL_FIELD_NUMBER; hash = (53 * hash) + getMaximumInterval().hashCode(); } hash = (37 * hash) + MAXIMUM_ATTEMPTS_FIELD_NUMBER; hash = (53 * hash) + getMaximumAttempts(); if (getNonRetryableErrorTypesCount() > 0) { hash = (37 * hash) + NON_RETRYABLE_ERROR_TYPES_FIELD_NUMBER; hash = (53 * hash) + getNonRetryableErrorTypesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.temporal.api.common.v1.RetryPolicy parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.temporal.api.common.v1.RetryPolicy parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.temporal.api.common.v1.RetryPolicy parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.temporal.api.common.v1.RetryPolicy parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.temporal.api.common.v1.RetryPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.temporal.api.common.v1.RetryPolicy parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.temporal.api.common.v1.RetryPolicy parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.temporal.api.common.v1.RetryPolicy 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.temporal.api.common.v1.RetryPolicy parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.temporal.api.common.v1.RetryPolicy 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.temporal.api.common.v1.RetryPolicy parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.temporal.api.common.v1.RetryPolicy 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.temporal.api.common.v1.RetryPolicy 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; } /** *
   * How retries ought to be handled, usable by both workflows and activities
   * 
* * Protobuf type {@code temporal.api.common.v1.RetryPolicy} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:temporal.api.common.v1.RetryPolicy) io.temporal.api.common.v1.RetryPolicyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_RetryPolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_RetryPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( io.temporal.api.common.v1.RetryPolicy.class, io.temporal.api.common.v1.RetryPolicy.Builder.class); } // Construct using io.temporal.api.common.v1.RetryPolicy.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 (initialIntervalBuilder_ == null) { initialInterval_ = null; } else { initialInterval_ = null; initialIntervalBuilder_ = null; } backoffCoefficient_ = 0D; if (maximumIntervalBuilder_ == null) { maximumInterval_ = null; } else { maximumInterval_ = null; maximumIntervalBuilder_ = null; } maximumAttempts_ = 0; nonRetryableErrorTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.temporal.api.common.v1.MessageProto.internal_static_temporal_api_common_v1_RetryPolicy_descriptor; } @java.lang.Override public io.temporal.api.common.v1.RetryPolicy getDefaultInstanceForType() { return io.temporal.api.common.v1.RetryPolicy.getDefaultInstance(); } @java.lang.Override public io.temporal.api.common.v1.RetryPolicy build() { io.temporal.api.common.v1.RetryPolicy result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.temporal.api.common.v1.RetryPolicy buildPartial() { io.temporal.api.common.v1.RetryPolicy result = new io.temporal.api.common.v1.RetryPolicy(this); int from_bitField0_ = bitField0_; if (initialIntervalBuilder_ == null) { result.initialInterval_ = initialInterval_; } else { result.initialInterval_ = initialIntervalBuilder_.build(); } result.backoffCoefficient_ = backoffCoefficient_; if (maximumIntervalBuilder_ == null) { result.maximumInterval_ = maximumInterval_; } else { result.maximumInterval_ = maximumIntervalBuilder_.build(); } result.maximumAttempts_ = maximumAttempts_; if (((bitField0_ & 0x00000001) != 0)) { nonRetryableErrorTypes_ = nonRetryableErrorTypes_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.nonRetryableErrorTypes_ = nonRetryableErrorTypes_; 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.temporal.api.common.v1.RetryPolicy) { return mergeFrom((io.temporal.api.common.v1.RetryPolicy)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.temporal.api.common.v1.RetryPolicy other) { if (other == io.temporal.api.common.v1.RetryPolicy.getDefaultInstance()) return this; if (other.hasInitialInterval()) { mergeInitialInterval(other.getInitialInterval()); } if (other.getBackoffCoefficient() != 0D) { setBackoffCoefficient(other.getBackoffCoefficient()); } if (other.hasMaximumInterval()) { mergeMaximumInterval(other.getMaximumInterval()); } if (other.getMaximumAttempts() != 0) { setMaximumAttempts(other.getMaximumAttempts()); } if (!other.nonRetryableErrorTypes_.isEmpty()) { if (nonRetryableErrorTypes_.isEmpty()) { nonRetryableErrorTypes_ = other.nonRetryableErrorTypes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureNonRetryableErrorTypesIsMutable(); nonRetryableErrorTypes_.addAll(other.nonRetryableErrorTypes_); } onChanged(); } 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.temporal.api.common.v1.RetryPolicy parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.temporal.api.common.v1.RetryPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.Duration initialInterval_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> initialIntervalBuilder_; /** *
     * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
     * 
* * .google.protobuf.Duration initial_interval = 1 [(.gogoproto.stdduration) = true]; * @return Whether the initialInterval field is set. */ public boolean hasInitialInterval() { return initialIntervalBuilder_ != null || initialInterval_ != null; } /** *
     * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
     * 
* * .google.protobuf.Duration initial_interval = 1 [(.gogoproto.stdduration) = true]; * @return The initialInterval. */ public com.google.protobuf.Duration getInitialInterval() { if (initialIntervalBuilder_ == null) { return initialInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : initialInterval_; } else { return initialIntervalBuilder_.getMessage(); } } /** *
     * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
     * 
* * .google.protobuf.Duration initial_interval = 1 [(.gogoproto.stdduration) = true]; */ public Builder setInitialInterval(com.google.protobuf.Duration value) { if (initialIntervalBuilder_ == null) { if (value == null) { throw new NullPointerException(); } initialInterval_ = value; onChanged(); } else { initialIntervalBuilder_.setMessage(value); } return this; } /** *
     * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
     * 
* * .google.protobuf.Duration initial_interval = 1 [(.gogoproto.stdduration) = true]; */ public Builder setInitialInterval( com.google.protobuf.Duration.Builder builderForValue) { if (initialIntervalBuilder_ == null) { initialInterval_ = builderForValue.build(); onChanged(); } else { initialIntervalBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
     * 
* * .google.protobuf.Duration initial_interval = 1 [(.gogoproto.stdduration) = true]; */ public Builder mergeInitialInterval(com.google.protobuf.Duration value) { if (initialIntervalBuilder_ == null) { if (initialInterval_ != null) { initialInterval_ = com.google.protobuf.Duration.newBuilder(initialInterval_).mergeFrom(value).buildPartial(); } else { initialInterval_ = value; } onChanged(); } else { initialIntervalBuilder_.mergeFrom(value); } return this; } /** *
     * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
     * 
* * .google.protobuf.Duration initial_interval = 1 [(.gogoproto.stdduration) = true]; */ public Builder clearInitialInterval() { if (initialIntervalBuilder_ == null) { initialInterval_ = null; onChanged(); } else { initialInterval_ = null; initialIntervalBuilder_ = null; } return this; } /** *
     * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
     * 
* * .google.protobuf.Duration initial_interval = 1 [(.gogoproto.stdduration) = true]; */ public com.google.protobuf.Duration.Builder getInitialIntervalBuilder() { onChanged(); return getInitialIntervalFieldBuilder().getBuilder(); } /** *
     * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
     * 
* * .google.protobuf.Duration initial_interval = 1 [(.gogoproto.stdduration) = true]; */ public com.google.protobuf.DurationOrBuilder getInitialIntervalOrBuilder() { if (initialIntervalBuilder_ != null) { return initialIntervalBuilder_.getMessageOrBuilder(); } else { return initialInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : initialInterval_; } } /** *
     * Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
     * 
* * .google.protobuf.Duration initial_interval = 1 [(.gogoproto.stdduration) = true]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getInitialIntervalFieldBuilder() { if (initialIntervalBuilder_ == null) { initialIntervalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getInitialInterval(), getParentForChildren(), isClean()); initialInterval_ = null; } return initialIntervalBuilder_; } private double backoffCoefficient_ ; /** *
     * Coefficient used to calculate the next retry interval.
     * The next retry interval is previous interval multiplied by the coefficient.
     * Must be 1 or larger.
     * 
* * double backoff_coefficient = 2; * @return The backoffCoefficient. */ public double getBackoffCoefficient() { return backoffCoefficient_; } /** *
     * Coefficient used to calculate the next retry interval.
     * The next retry interval is previous interval multiplied by the coefficient.
     * Must be 1 or larger.
     * 
* * double backoff_coefficient = 2; * @param value The backoffCoefficient to set. * @return This builder for chaining. */ public Builder setBackoffCoefficient(double value) { backoffCoefficient_ = value; onChanged(); return this; } /** *
     * Coefficient used to calculate the next retry interval.
     * The next retry interval is previous interval multiplied by the coefficient.
     * Must be 1 or larger.
     * 
* * double backoff_coefficient = 2; * @return This builder for chaining. */ public Builder clearBackoffCoefficient() { backoffCoefficient_ = 0D; onChanged(); return this; } private com.google.protobuf.Duration maximumInterval_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> maximumIntervalBuilder_; /** *
     * Maximum interval between retries. Exponential backoff leads to interval increase.
     * This value is the cap of the increase. Default is 100x of the initial interval.
     * 
* * .google.protobuf.Duration maximum_interval = 3 [(.gogoproto.stdduration) = true]; * @return Whether the maximumInterval field is set. */ public boolean hasMaximumInterval() { return maximumIntervalBuilder_ != null || maximumInterval_ != null; } /** *
     * Maximum interval between retries. Exponential backoff leads to interval increase.
     * This value is the cap of the increase. Default is 100x of the initial interval.
     * 
* * .google.protobuf.Duration maximum_interval = 3 [(.gogoproto.stdduration) = true]; * @return The maximumInterval. */ public com.google.protobuf.Duration getMaximumInterval() { if (maximumIntervalBuilder_ == null) { return maximumInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maximumInterval_; } else { return maximumIntervalBuilder_.getMessage(); } } /** *
     * Maximum interval between retries. Exponential backoff leads to interval increase.
     * This value is the cap of the increase. Default is 100x of the initial interval.
     * 
* * .google.protobuf.Duration maximum_interval = 3 [(.gogoproto.stdduration) = true]; */ public Builder setMaximumInterval(com.google.protobuf.Duration value) { if (maximumIntervalBuilder_ == null) { if (value == null) { throw new NullPointerException(); } maximumInterval_ = value; onChanged(); } else { maximumIntervalBuilder_.setMessage(value); } return this; } /** *
     * Maximum interval between retries. Exponential backoff leads to interval increase.
     * This value is the cap of the increase. Default is 100x of the initial interval.
     * 
* * .google.protobuf.Duration maximum_interval = 3 [(.gogoproto.stdduration) = true]; */ public Builder setMaximumInterval( com.google.protobuf.Duration.Builder builderForValue) { if (maximumIntervalBuilder_ == null) { maximumInterval_ = builderForValue.build(); onChanged(); } else { maximumIntervalBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Maximum interval between retries. Exponential backoff leads to interval increase.
     * This value is the cap of the increase. Default is 100x of the initial interval.
     * 
* * .google.protobuf.Duration maximum_interval = 3 [(.gogoproto.stdduration) = true]; */ public Builder mergeMaximumInterval(com.google.protobuf.Duration value) { if (maximumIntervalBuilder_ == null) { if (maximumInterval_ != null) { maximumInterval_ = com.google.protobuf.Duration.newBuilder(maximumInterval_).mergeFrom(value).buildPartial(); } else { maximumInterval_ = value; } onChanged(); } else { maximumIntervalBuilder_.mergeFrom(value); } return this; } /** *
     * Maximum interval between retries. Exponential backoff leads to interval increase.
     * This value is the cap of the increase. Default is 100x of the initial interval.
     * 
* * .google.protobuf.Duration maximum_interval = 3 [(.gogoproto.stdduration) = true]; */ public Builder clearMaximumInterval() { if (maximumIntervalBuilder_ == null) { maximumInterval_ = null; onChanged(); } else { maximumInterval_ = null; maximumIntervalBuilder_ = null; } return this; } /** *
     * Maximum interval between retries. Exponential backoff leads to interval increase.
     * This value is the cap of the increase. Default is 100x of the initial interval.
     * 
* * .google.protobuf.Duration maximum_interval = 3 [(.gogoproto.stdduration) = true]; */ public com.google.protobuf.Duration.Builder getMaximumIntervalBuilder() { onChanged(); return getMaximumIntervalFieldBuilder().getBuilder(); } /** *
     * Maximum interval between retries. Exponential backoff leads to interval increase.
     * This value is the cap of the increase. Default is 100x of the initial interval.
     * 
* * .google.protobuf.Duration maximum_interval = 3 [(.gogoproto.stdduration) = true]; */ public com.google.protobuf.DurationOrBuilder getMaximumIntervalOrBuilder() { if (maximumIntervalBuilder_ != null) { return maximumIntervalBuilder_.getMessageOrBuilder(); } else { return maximumInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maximumInterval_; } } /** *
     * Maximum interval between retries. Exponential backoff leads to interval increase.
     * This value is the cap of the increase. Default is 100x of the initial interval.
     * 
* * .google.protobuf.Duration maximum_interval = 3 [(.gogoproto.stdduration) = true]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getMaximumIntervalFieldBuilder() { if (maximumIntervalBuilder_ == null) { maximumIntervalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getMaximumInterval(), getParentForChildren(), isClean()); maximumInterval_ = null; } return maximumIntervalBuilder_; } private int maximumAttempts_ ; /** *
     * Maximum number of attempts. When exceeded the retries stop even if not expired yet.
     * 1 disables retries. 0 means unlimited (up to the timeouts)
     * 
* * int32 maximum_attempts = 4; * @return The maximumAttempts. */ public int getMaximumAttempts() { return maximumAttempts_; } /** *
     * Maximum number of attempts. When exceeded the retries stop even if not expired yet.
     * 1 disables retries. 0 means unlimited (up to the timeouts)
     * 
* * int32 maximum_attempts = 4; * @param value The maximumAttempts to set. * @return This builder for chaining. */ public Builder setMaximumAttempts(int value) { maximumAttempts_ = value; onChanged(); return this; } /** *
     * Maximum number of attempts. When exceeded the retries stop even if not expired yet.
     * 1 disables retries. 0 means unlimited (up to the timeouts)
     * 
* * int32 maximum_attempts = 4; * @return This builder for chaining. */ public Builder clearMaximumAttempts() { maximumAttempts_ = 0; onChanged(); return this; } private com.google.protobuf.LazyStringList nonRetryableErrorTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureNonRetryableErrorTypesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { nonRetryableErrorTypes_ = new com.google.protobuf.LazyStringArrayList(nonRetryableErrorTypes_); bitField0_ |= 0x00000001; } } /** *
     * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
     * this is not a substring match, the error *type* (not message) must match exactly.
     * 
* * repeated string non_retryable_error_types = 5; * @return A list containing the nonRetryableErrorTypes. */ public com.google.protobuf.ProtocolStringList getNonRetryableErrorTypesList() { return nonRetryableErrorTypes_.getUnmodifiableView(); } /** *
     * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
     * this is not a substring match, the error *type* (not message) must match exactly.
     * 
* * repeated string non_retryable_error_types = 5; * @return The count of nonRetryableErrorTypes. */ public int getNonRetryableErrorTypesCount() { return nonRetryableErrorTypes_.size(); } /** *
     * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
     * this is not a substring match, the error *type* (not message) must match exactly.
     * 
* * repeated string non_retryable_error_types = 5; * @param index The index of the element to return. * @return The nonRetryableErrorTypes at the given index. */ public java.lang.String getNonRetryableErrorTypes(int index) { return nonRetryableErrorTypes_.get(index); } /** *
     * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
     * this is not a substring match, the error *type* (not message) must match exactly.
     * 
* * repeated string non_retryable_error_types = 5; * @param index The index of the value to return. * @return The bytes of the nonRetryableErrorTypes at the given index. */ public com.google.protobuf.ByteString getNonRetryableErrorTypesBytes(int index) { return nonRetryableErrorTypes_.getByteString(index); } /** *
     * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
     * this is not a substring match, the error *type* (not message) must match exactly.
     * 
* * repeated string non_retryable_error_types = 5; * @param index The index to set the value at. * @param value The nonRetryableErrorTypes to set. * @return This builder for chaining. */ public Builder setNonRetryableErrorTypes( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureNonRetryableErrorTypesIsMutable(); nonRetryableErrorTypes_.set(index, value); onChanged(); return this; } /** *
     * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
     * this is not a substring match, the error *type* (not message) must match exactly.
     * 
* * repeated string non_retryable_error_types = 5; * @param value The nonRetryableErrorTypes to add. * @return This builder for chaining. */ public Builder addNonRetryableErrorTypes( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureNonRetryableErrorTypesIsMutable(); nonRetryableErrorTypes_.add(value); onChanged(); return this; } /** *
     * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
     * this is not a substring match, the error *type* (not message) must match exactly.
     * 
* * repeated string non_retryable_error_types = 5; * @param values The nonRetryableErrorTypes to add. * @return This builder for chaining. */ public Builder addAllNonRetryableErrorTypes( java.lang.Iterable values) { ensureNonRetryableErrorTypesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, nonRetryableErrorTypes_); onChanged(); return this; } /** *
     * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
     * this is not a substring match, the error *type* (not message) must match exactly.
     * 
* * repeated string non_retryable_error_types = 5; * @return This builder for chaining. */ public Builder clearNonRetryableErrorTypes() { nonRetryableErrorTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
     * this is not a substring match, the error *type* (not message) must match exactly.
     * 
* * repeated string non_retryable_error_types = 5; * @param value The bytes of the nonRetryableErrorTypes to add. * @return This builder for chaining. */ public Builder addNonRetryableErrorTypesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureNonRetryableErrorTypesIsMutable(); nonRetryableErrorTypes_.add(value); 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:temporal.api.common.v1.RetryPolicy) } // @@protoc_insertion_point(class_scope:temporal.api.common.v1.RetryPolicy) private static final io.temporal.api.common.v1.RetryPolicy DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.temporal.api.common.v1.RetryPolicy(); } public static io.temporal.api.common.v1.RetryPolicy getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RetryPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new RetryPolicy(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.temporal.api.common.v1.RetryPolicy getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy