Class RetryPolicy.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<RetryPolicy.Builder>
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,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 activitiesProtobuf type
temporal.api.common.v1.RetryPolicy-
Method Summary
Modifier and TypeMethodDescriptionaddAllNonRetryableErrorTypes(Iterable<String> values) Non-Retryable errors types.addNonRetryableErrorTypes(String value) Non-Retryable errors types.addNonRetryableErrorTypesBytes(com.google.protobuf.ByteString value) Non-Retryable errors types.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()Coefficient used to calculate the next retry interval.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) Interval of the first retry.Maximum number of attempts.Maximum interval between retries.Non-Retryable errors types.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) clone()doubleCoefficient used to calculate the next retry interval.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.Descriptorcom.google.protobuf.DurationInterval of the first retry.com.google.protobuf.Duration.BuilderInterval of the first retry.com.google.protobuf.DurationOrBuilderInterval of the first retry.intMaximum number of attempts.com.google.protobuf.DurationMaximum interval between retries.com.google.protobuf.Duration.BuilderMaximum interval between retries.com.google.protobuf.DurationOrBuilderMaximum interval between retries.getNonRetryableErrorTypes(int index) Non-Retryable errors types.com.google.protobuf.ByteStringgetNonRetryableErrorTypesBytes(int index) Non-Retryable errors types.intNon-Retryable errors types.com.google.protobuf.ProtocolStringListNon-Retryable errors types.booleanInterval of the first retry.booleanMaximum interval between retries.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(RetryPolicy other) mergeInitialInterval(com.google.protobuf.Duration value) Interval of the first retry.mergeMaximumInterval(com.google.protobuf.Duration value) Maximum interval between retries.final RetryPolicy.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setBackoffCoefficient(double value) Coefficient used to calculate the next retry interval.setInitialInterval(com.google.protobuf.Duration value) Interval of the first retry.setInitialInterval(com.google.protobuf.Duration.Builder builderForValue) Interval of the first retry.setMaximumAttempts(int value) Maximum number of attempts.setMaximumInterval(com.google.protobuf.Duration value) Maximum interval between retries.setMaximumInterval(com.google.protobuf.Duration.Builder builderForValue) Maximum interval between retries.setNonRetryableErrorTypes(int index, String value) Non-Retryable errors types.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) final 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, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
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
- 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
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
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, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
clearOneof
- 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, 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, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RetryPolicy.Builder>
-
mergeFrom
-
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 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:
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
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
.google.protobuf.Duration initial_interval = 1; -
setInitialInterval
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
.google.protobuf.Duration initial_interval = 1; -
mergeInitialInterval
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
.google.protobuf.Duration initial_interval = 1; -
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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>
-