Class RetryPolicy.Builder (1.125.10)

public static final class RetryPolicy.Builder extends GeneratedMessageV3.Builder<RetryPolicy.Builder> implements RetryPolicyOrBuilder

A policy that specifies how Cloud Pub/Sub retries message delivery.

Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.

RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.

Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.

Protobuf type google.pubsub.v1.RetryPolicy

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public RetryPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
RetryPolicy.Builder
Overrides

build()

public RetryPolicy build()
Returns
TypeDescription
RetryPolicy

buildPartial()

public RetryPolicy buildPartial()
Returns
TypeDescription
RetryPolicy

clear()

public RetryPolicy.Builder clear()
Returns
TypeDescription
RetryPolicy.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public RetryPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
RetryPolicy.Builder
Overrides

clearMaximumBackoff()

public RetryPolicy.Builder clearMaximumBackoff()

The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.

.google.protobuf.Duration maximum_backoff = 2;

Returns
TypeDescription
RetryPolicy.Builder

clearMinimumBackoff()

public RetryPolicy.Builder clearMinimumBackoff()

The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.

.google.protobuf.Duration minimum_backoff = 1;

Returns
TypeDescription
RetryPolicy.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public RetryPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
RetryPolicy.Builder
Overrides

clone()

public RetryPolicy.Builder clone()
Returns
TypeDescription
RetryPolicy.Builder
Overrides

getDefaultInstanceForType()

public RetryPolicy getDefaultInstanceForType()
Returns
TypeDescription
RetryPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMaximumBackoff()

public Duration getMaximumBackoff()

The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.

.google.protobuf.Duration maximum_backoff = 2;

Returns
TypeDescription
Duration

The maximumBackoff.

getMaximumBackoffBuilder()

public Duration.Builder getMaximumBackoffBuilder()

The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.

.google.protobuf.Duration maximum_backoff = 2;

Returns
TypeDescription
Builder

getMaximumBackoffOrBuilder()

public DurationOrBuilder getMaximumBackoffOrBuilder()

The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.

.google.protobuf.Duration maximum_backoff = 2;

Returns
TypeDescription
DurationOrBuilder

getMinimumBackoff()

public Duration getMinimumBackoff()

The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.

.google.protobuf.Duration minimum_backoff = 1;

Returns
TypeDescription
Duration

The minimumBackoff.

getMinimumBackoffBuilder()

public Duration.Builder getMinimumBackoffBuilder()

The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.

.google.protobuf.Duration minimum_backoff = 1;

Returns
TypeDescription
Builder

getMinimumBackoffOrBuilder()

public DurationOrBuilder getMinimumBackoffOrBuilder()

The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.

.google.protobuf.Duration minimum_backoff = 1;

Returns
TypeDescription
DurationOrBuilder

hasMaximumBackoff()

public boolean hasMaximumBackoff()

The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.

.google.protobuf.Duration maximum_backoff = 2;

Returns
TypeDescription
boolean

Whether the maximumBackoff field is set.

hasMinimumBackoff()

public boolean hasMinimumBackoff()

The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.

.google.protobuf.Duration minimum_backoff = 1;

Returns
TypeDescription
boolean

Whether the minimumBackoff field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RetryPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RetryPolicy.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public RetryPolicy.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
RetryPolicy.Builder
Overrides

mergeFrom(RetryPolicy other)

public RetryPolicy.Builder mergeFrom(RetryPolicy other)
Parameter
NameDescription
otherRetryPolicy
Returns
TypeDescription
RetryPolicy.Builder

mergeMaximumBackoff(Duration value)

public RetryPolicy.Builder mergeMaximumBackoff(Duration value)

The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.

.google.protobuf.Duration maximum_backoff = 2;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
RetryPolicy.Builder

mergeMinimumBackoff(Duration value)

public RetryPolicy.Builder mergeMinimumBackoff(Duration value)

The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.

.google.protobuf.Duration minimum_backoff = 1;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
RetryPolicy.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RetryPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
RetryPolicy.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public RetryPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
RetryPolicy.Builder
Overrides

setMaximumBackoff(Duration value)

public RetryPolicy.Builder setMaximumBackoff(Duration value)

The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.

.google.protobuf.Duration maximum_backoff = 2;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
RetryPolicy.Builder

setMaximumBackoff(Duration.Builder builderForValue)

public RetryPolicy.Builder setMaximumBackoff(Duration.Builder builderForValue)

The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.

.google.protobuf.Duration maximum_backoff = 2;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
RetryPolicy.Builder

setMinimumBackoff(Duration value)

public RetryPolicy.Builder setMinimumBackoff(Duration value)

The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.

.google.protobuf.Duration minimum_backoff = 1;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
RetryPolicy.Builder

setMinimumBackoff(Duration.Builder builderForValue)

public RetryPolicy.Builder setMinimumBackoff(Duration.Builder builderForValue)

The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.

.google.protobuf.Duration minimum_backoff = 1;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
RetryPolicy.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public RetryPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
RetryPolicy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final RetryPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
RetryPolicy.Builder
Overrides