Package io.temporal.api.common.v1
Class RetryPolicy.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
- io.temporal.api.common.v1.RetryPolicy.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,RetryPolicyOrBuilder,java.lang.Cloneable
- Enclosing class:
- RetryPolicy
public static final class RetryPolicy.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder> implements RetryPolicyOrBuilder
How retries ought to be handled, usable by both workflows and activities
Protobuf typetemporal.api.common.v1.RetryPolicy
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RetryPolicy.BuilderaddAllNonRetryableErrorTypes(java.lang.Iterable<java.lang.String> values)Non-Retryable errors types.RetryPolicy.BuilderaddNonRetryableErrorTypes(java.lang.String value)Non-Retryable errors types.RetryPolicy.BuilderaddNonRetryableErrorTypesBytes(com.google.protobuf.ByteString value)Non-Retryable errors types.RetryPolicy.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)RetryPolicybuild()RetryPolicybuildPartial()RetryPolicy.Builderclear()RetryPolicy.BuilderclearBackoffCoefficient()Coefficient used to calculate the next retry interval.RetryPolicy.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)RetryPolicy.BuilderclearInitialInterval()Interval of the first retry.RetryPolicy.BuilderclearMaximumAttempts()Maximum number of attempts.RetryPolicy.BuilderclearMaximumInterval()Maximum interval between retries.RetryPolicy.BuilderclearNonRetryableErrorTypes()Non-Retryable errors types.RetryPolicy.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)RetryPolicy.Builderclone()doublegetBackoffCoefficient()Coefficient used to calculate the next retry interval.RetryPolicygetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()com.google.protobuf.DurationgetInitialInterval()Interval of the first retry.com.google.protobuf.Duration.BuildergetInitialIntervalBuilder()Interval of the first retry.com.google.protobuf.DurationOrBuildergetInitialIntervalOrBuilder()Interval of the first retry.intgetMaximumAttempts()Maximum number of attempts.com.google.protobuf.DurationgetMaximumInterval()Maximum interval between retries.com.google.protobuf.Duration.BuildergetMaximumIntervalBuilder()Maximum interval between retries.com.google.protobuf.DurationOrBuildergetMaximumIntervalOrBuilder()Maximum interval between retries.java.lang.StringgetNonRetryableErrorTypes(int index)Non-Retryable errors types.com.google.protobuf.ByteStringgetNonRetryableErrorTypesBytes(int index)Non-Retryable errors types.intgetNonRetryableErrorTypesCount()Non-Retryable errors types.com.google.protobuf.ProtocolStringListgetNonRetryableErrorTypesList()Non-Retryable errors types.booleanhasInitialInterval()Interval of the first retry.booleanhasMaximumInterval()Maximum interval between retries.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()RetryPolicy.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)RetryPolicy.BuildermergeFrom(com.google.protobuf.Message other)RetryPolicy.BuildermergeFrom(RetryPolicy other)RetryPolicy.BuildermergeInitialInterval(com.google.protobuf.Duration value)Interval of the first retry.RetryPolicy.BuildermergeMaximumInterval(com.google.protobuf.Duration value)Maximum interval between retries.RetryPolicy.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)RetryPolicy.BuildersetBackoffCoefficient(double value)Coefficient used to calculate the next retry interval.RetryPolicy.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)RetryPolicy.BuildersetInitialInterval(com.google.protobuf.Duration value)Interval of the first retry.RetryPolicy.BuildersetInitialInterval(com.google.protobuf.Duration.Builder builderForValue)Interval of the first retry.RetryPolicy.BuildersetMaximumAttempts(int value)Maximum number of attempts.RetryPolicy.BuildersetMaximumInterval(com.google.protobuf.Duration value)Maximum interval between retries.RetryPolicy.BuildersetMaximumInterval(com.google.protobuf.Duration.Builder builderForValue)Maximum interval between retries.RetryPolicy.BuildersetNonRetryableErrorTypes(int index, java.lang.String value)Non-Retryable errors types.RetryPolicy.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)RetryPolicy.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
clear
public RetryPolicy.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.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.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
getDefaultInstanceForType
public RetryPolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public RetryPolicy build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public RetryPolicy buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public RetryPolicy.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
setField
public RetryPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
clearField
public RetryPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
clearOneof
public RetryPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
setRepeatedField
public RetryPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
addRepeatedField
public RetryPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
mergeFrom
public RetryPolicy.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RetryPolicy.Builder>
-
mergeFrom
public RetryPolicy.Builder mergeFrom(RetryPolicy other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
mergeFrom
public RetryPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RetryPolicy.Builder>- Throws:
java.io.IOException
-
hasInitialInterval
public boolean hasInitialInterval()
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
.google.protobuf.Duration initial_interval = 1;- Specified by:
hasInitialIntervalin interfaceRetryPolicyOrBuilder- Returns:
- Whether the initialInterval field is set.
-
getInitialInterval
public com.google.protobuf.Duration getInitialInterval()
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
.google.protobuf.Duration initial_interval = 1;- Specified by:
getInitialIntervalin interfaceRetryPolicyOrBuilder- Returns:
- The initialInterval.
-
setInitialInterval
public RetryPolicy.Builder setInitialInterval(com.google.protobuf.Duration value)
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
.google.protobuf.Duration initial_interval = 1;
-
setInitialInterval
public RetryPolicy.Builder setInitialInterval(com.google.protobuf.Duration.Builder builderForValue)
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
.google.protobuf.Duration initial_interval = 1;
-
mergeInitialInterval
public RetryPolicy.Builder mergeInitialInterval(com.google.protobuf.Duration value)
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
.google.protobuf.Duration initial_interval = 1;
-
clearInitialInterval
public RetryPolicy.Builder clearInitialInterval()
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
.google.protobuf.Duration initial_interval = 1;
-
getInitialIntervalBuilder
public com.google.protobuf.Duration.Builder getInitialIntervalBuilder()
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
.google.protobuf.Duration initial_interval = 1;
-
getInitialIntervalOrBuilder
public com.google.protobuf.DurationOrBuilder getInitialIntervalOrBuilder()
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
.google.protobuf.Duration initial_interval = 1;- Specified by:
getInitialIntervalOrBuilderin interfaceRetryPolicyOrBuilder
-
getBackoffCoefficient
public double getBackoffCoefficient()
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;- Specified by:
getBackoffCoefficientin interfaceRetryPolicyOrBuilder- Returns:
- The backoffCoefficient.
-
setBackoffCoefficient
public RetryPolicy.Builder setBackoffCoefficient(double value)
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;- Parameters:
value- The backoffCoefficient to set.- Returns:
- This builder for chaining.
-
clearBackoffCoefficient
public RetryPolicy.Builder clearBackoffCoefficient()
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;- Returns:
- This builder for chaining.
-
hasMaximumInterval
public boolean hasMaximumInterval()
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;- Specified by:
hasMaximumIntervalin interfaceRetryPolicyOrBuilder- Returns:
- Whether the maximumInterval field is set.
-
getMaximumInterval
public com.google.protobuf.Duration getMaximumInterval()
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;- Specified by:
getMaximumIntervalin interfaceRetryPolicyOrBuilder- Returns:
- The maximumInterval.
-
setMaximumInterval
public RetryPolicy.Builder setMaximumInterval(com.google.protobuf.Duration value)
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;
-
setMaximumInterval
public RetryPolicy.Builder setMaximumInterval(com.google.protobuf.Duration.Builder builderForValue)
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;
-
mergeMaximumInterval
public RetryPolicy.Builder mergeMaximumInterval(com.google.protobuf.Duration value)
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;
-
clearMaximumInterval
public RetryPolicy.Builder clearMaximumInterval()
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;
-
getMaximumIntervalBuilder
public com.google.protobuf.Duration.Builder getMaximumIntervalBuilder()
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;
-
getMaximumIntervalOrBuilder
public com.google.protobuf.DurationOrBuilder getMaximumIntervalOrBuilder()
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;- Specified by:
getMaximumIntervalOrBuilderin interfaceRetryPolicyOrBuilder
-
getMaximumAttempts
public int getMaximumAttempts()
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;- Specified by:
getMaximumAttemptsin interfaceRetryPolicyOrBuilder- Returns:
- The maximumAttempts.
-
setMaximumAttempts
public RetryPolicy.Builder setMaximumAttempts(int value)
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;- Parameters:
value- The maximumAttempts to set.- Returns:
- This builder for chaining.
-
clearMaximumAttempts
public RetryPolicy.Builder clearMaximumAttempts()
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;- Returns:
- This builder for chaining.
-
getNonRetryableErrorTypesList
public com.google.protobuf.ProtocolStringList getNonRetryableErrorTypesList()
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;- Specified by:
getNonRetryableErrorTypesListin interfaceRetryPolicyOrBuilder- Returns:
- A list containing the nonRetryableErrorTypes.
-
getNonRetryableErrorTypesCount
public int getNonRetryableErrorTypesCount()
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;- Specified by:
getNonRetryableErrorTypesCountin interfaceRetryPolicyOrBuilder- Returns:
- The count of nonRetryableErrorTypes.
-
getNonRetryableErrorTypes
public java.lang.String getNonRetryableErrorTypes(int 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;- Specified by:
getNonRetryableErrorTypesin interfaceRetryPolicyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The nonRetryableErrorTypes at the given index.
-
getNonRetryableErrorTypesBytes
public com.google.protobuf.ByteString getNonRetryableErrorTypesBytes(int 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;- Specified by:
getNonRetryableErrorTypesBytesin interfaceRetryPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the nonRetryableErrorTypes at the given index.
-
setNonRetryableErrorTypes
public RetryPolicy.Builder setNonRetryableErrorTypes(int index, java.lang.String value)
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;- Parameters:
index- The index to set the value at.value- The nonRetryableErrorTypes to set.- Returns:
- This builder for chaining.
-
addNonRetryableErrorTypes
public RetryPolicy.Builder addNonRetryableErrorTypes(java.lang.String value)
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;- Parameters:
value- The nonRetryableErrorTypes to add.- Returns:
- This builder for chaining.
-
addAllNonRetryableErrorTypes
public RetryPolicy.Builder addAllNonRetryableErrorTypes(java.lang.Iterable<java.lang.String> values)
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;- Parameters:
values- The nonRetryableErrorTypes to add.- Returns:
- This builder for chaining.
-
clearNonRetryableErrorTypes
public RetryPolicy.Builder clearNonRetryableErrorTypes()
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;- Returns:
- This builder for chaining.
-
addNonRetryableErrorTypesBytes
public RetryPolicy.Builder addNonRetryableErrorTypesBytes(com.google.protobuf.ByteString value)
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;- Parameters:
value- The bytes of the nonRetryableErrorTypes to add.- Returns:
- This builder for chaining.
-
setUnknownFields
public final RetryPolicy.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
mergeUnknownFields
public final RetryPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
-