Package io.temporal.api.common.v1
Class RetryPolicy.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- 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.Builder
addAllNonRetryableErrorTypes(java.lang.Iterable<java.lang.String> values)
Non-Retryable errors types.RetryPolicy.Builder
addNonRetryableErrorTypes(java.lang.String value)
Non-Retryable errors types.RetryPolicy.Builder
addNonRetryableErrorTypesBytes(com.google.protobuf.ByteString value)
Non-Retryable errors types.RetryPolicy.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
RetryPolicy
build()
RetryPolicy
buildPartial()
RetryPolicy.Builder
clear()
RetryPolicy.Builder
clearBackoffCoefficient()
Coefficient used to calculate the next retry interval.RetryPolicy.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
RetryPolicy.Builder
clearInitialInterval()
Interval of the first retry.RetryPolicy.Builder
clearMaximumAttempts()
Maximum number of attempts.RetryPolicy.Builder
clearMaximumInterval()
Maximum interval between retries.RetryPolicy.Builder
clearNonRetryableErrorTypes()
Non-Retryable errors types.RetryPolicy.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
RetryPolicy.Builder
clone()
double
getBackoffCoefficient()
Coefficient used to calculate the next retry interval.RetryPolicy
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
com.google.protobuf.Duration
getInitialInterval()
Interval of the first retry.com.google.protobuf.Duration.Builder
getInitialIntervalBuilder()
Interval of the first retry.com.google.protobuf.DurationOrBuilder
getInitialIntervalOrBuilder()
Interval of the first retry.int
getMaximumAttempts()
Maximum number of attempts.com.google.protobuf.Duration
getMaximumInterval()
Maximum interval between retries.com.google.protobuf.Duration.Builder
getMaximumIntervalBuilder()
Maximum interval between retries.com.google.protobuf.DurationOrBuilder
getMaximumIntervalOrBuilder()
Maximum interval between retries.java.lang.String
getNonRetryableErrorTypes(int index)
Non-Retryable errors types.com.google.protobuf.ByteString
getNonRetryableErrorTypesBytes(int index)
Non-Retryable errors types.int
getNonRetryableErrorTypesCount()
Non-Retryable errors types.com.google.protobuf.ProtocolStringList
getNonRetryableErrorTypesList()
Non-Retryable errors types.boolean
hasInitialInterval()
Interval of the first retry.boolean
hasMaximumInterval()
Maximum interval between retries.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
RetryPolicy.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
RetryPolicy.Builder
mergeFrom(com.google.protobuf.Message other)
RetryPolicy.Builder
mergeFrom(RetryPolicy other)
RetryPolicy.Builder
mergeInitialInterval(com.google.protobuf.Duration value)
Interval of the first retry.RetryPolicy.Builder
mergeMaximumInterval(com.google.protobuf.Duration value)
Maximum interval between retries.RetryPolicy.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
RetryPolicy.Builder
setBackoffCoefficient(double value)
Coefficient used to calculate the next retry interval.RetryPolicy.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
RetryPolicy.Builder
setInitialInterval(com.google.protobuf.Duration value)
Interval of the first retry.RetryPolicy.Builder
setInitialInterval(com.google.protobuf.Duration.Builder builderForValue)
Interval of the first retry.RetryPolicy.Builder
setMaximumAttempts(int value)
Maximum number of attempts.RetryPolicy.Builder
setMaximumInterval(com.google.protobuf.Duration value)
Maximum interval between retries.RetryPolicy.Builder
setMaximumInterval(com.google.protobuf.Duration.Builder builderForValue)
Maximum interval between retries.RetryPolicy.Builder
setNonRetryableErrorTypes(int index, java.lang.String value)
Non-Retryable errors types.RetryPolicy.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
RetryPolicy.Builder
setUnknownFields(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, internalGetMutableMapField, 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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
clear
public RetryPolicy.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
getDefaultInstanceForType
public RetryPolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public RetryPolicy build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public RetryPolicy buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public RetryPolicy.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
setField
public RetryPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
clearField
public RetryPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
clearOneof
public RetryPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in 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:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
addRepeatedField
public RetryPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
mergeFrom
public RetryPolicy.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<RetryPolicy.Builder>
-
mergeFrom
public RetryPolicy.Builder mergeFrom(RetryPolicy other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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 [(.gogoproto.stdduration) = true];
- Specified by:
hasInitialInterval
in 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 [(.gogoproto.stdduration) = true];
- Specified by:
getInitialInterval
in 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 [(.gogoproto.stdduration) = true];
-
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 [(.gogoproto.stdduration) = true];
-
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 [(.gogoproto.stdduration) = true];
-
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 [(.gogoproto.stdduration) = true];
-
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 [(.gogoproto.stdduration) = true];
-
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 [(.gogoproto.stdduration) = true];
- Specified by:
getInitialIntervalOrBuilder
in 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:
getBackoffCoefficient
in 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 [(.gogoproto.stdduration) = true];
- Specified by:
hasMaximumInterval
in 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 [(.gogoproto.stdduration) = true];
- Specified by:
getMaximumInterval
in 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 [(.gogoproto.stdduration) = true];
-
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 [(.gogoproto.stdduration) = true];
-
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 [(.gogoproto.stdduration) = true];
-
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 [(.gogoproto.stdduration) = true];
-
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 [(.gogoproto.stdduration) = true];
-
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 [(.gogoproto.stdduration) = true];
- Specified by:
getMaximumIntervalOrBuilder
in 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:
getMaximumAttempts
in 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:
getNonRetryableErrorTypesList
in 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:
getNonRetryableErrorTypesCount
in 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:
getNonRetryableErrorTypes
in 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:
getNonRetryableErrorTypesBytes
in 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:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
mergeUnknownFields
public final RetryPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<RetryPolicy.Builder>
-
-