Class GrpcRoute.RetryPolicy.Builder (0.7.0)

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

The specifications for retries.

Protobuf type google.cloud.networkservices.v1.GrpcRoute.RetryPolicy

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllRetryConditions(Iterable<String> values)

public GrpcRoute.RetryPolicy.Builder addAllRetryConditions(Iterable<String> values)
  • connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.
  • refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelled: Router will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Router will retry if the gRPC status code in the response header is set to unavailable

repeated string retry_conditions = 1;

Parameter
Name Description
values Iterable<String>

The retryConditions to add.

Returns
Type Description
GrpcRoute.RetryPolicy.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public GrpcRoute.RetryPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GrpcRoute.RetryPolicy.Builder
Overrides

addRetryConditions(String value)

public GrpcRoute.RetryPolicy.Builder addRetryConditions(String value)
  • connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.
  • refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelled: Router will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Router will retry if the gRPC status code in the response header is set to unavailable

repeated string retry_conditions = 1;

Parameter
Name Description
value String

The retryConditions to add.

Returns
Type Description
GrpcRoute.RetryPolicy.Builder

This builder for chaining.

addRetryConditionsBytes(ByteString value)

public GrpcRoute.RetryPolicy.Builder addRetryConditionsBytes(ByteString value)
  • connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.
  • refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelled: Router will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Router will retry if the gRPC status code in the response header is set to unavailable

repeated string retry_conditions = 1;

Parameter
Name Description
value ByteString

The bytes of the retryConditions to add.

Returns
Type Description
GrpcRoute.RetryPolicy.Builder

This builder for chaining.

build()

public GrpcRoute.RetryPolicy build()
Returns
Type Description
GrpcRoute.RetryPolicy

buildPartial()

public GrpcRoute.RetryPolicy buildPartial()
Returns
Type Description
GrpcRoute.RetryPolicy

clear()

public GrpcRoute.RetryPolicy.Builder clear()
Returns
Type Description
GrpcRoute.RetryPolicy.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public GrpcRoute.RetryPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
GrpcRoute.RetryPolicy.Builder
Overrides

clearNumRetries()

public GrpcRoute.RetryPolicy.Builder clearNumRetries()

Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.

uint32 num_retries = 2;

Returns
Type Description
GrpcRoute.RetryPolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public GrpcRoute.RetryPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
GrpcRoute.RetryPolicy.Builder
Overrides

clearRetryConditions()

public GrpcRoute.RetryPolicy.Builder clearRetryConditions()
  • connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.
  • refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelled: Router will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Router will retry if the gRPC status code in the response header is set to unavailable

repeated string retry_conditions = 1;

Returns
Type Description
GrpcRoute.RetryPolicy.Builder

This builder for chaining.

clone()

public GrpcRoute.RetryPolicy.Builder clone()
Returns
Type Description
GrpcRoute.RetryPolicy.Builder
Overrides

getDefaultInstanceForType()

public GrpcRoute.RetryPolicy getDefaultInstanceForType()
Returns
Type Description
GrpcRoute.RetryPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getNumRetries()

public int getNumRetries()

Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.

uint32 num_retries = 2;

Returns
Type Description
int

The numRetries.

getRetryConditions(int index)

public String getRetryConditions(int index)
  • connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.
  • refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelled: Router will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Router will retry if the gRPC status code in the response header is set to unavailable

repeated string retry_conditions = 1;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The retryConditions at the given index.

getRetryConditionsBytes(int index)

public ByteString getRetryConditionsBytes(int index)
  • connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.
  • refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelled: Router will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Router will retry if the gRPC status code in the response header is set to unavailable

repeated string retry_conditions = 1;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the retryConditions at the given index.

getRetryConditionsCount()

public int getRetryConditionsCount()
  • connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.
  • refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelled: Router will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Router will retry if the gRPC status code in the response header is set to unavailable

repeated string retry_conditions = 1;

Returns
Type Description
int

The count of retryConditions.

getRetryConditionsList()

public ProtocolStringList getRetryConditionsList()
  • connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.
  • refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelled: Router will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Router will retry if the gRPC status code in the response header is set to unavailable

repeated string retry_conditions = 1;

Returns
Type Description
ProtocolStringList

A list containing the retryConditions.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GrpcRoute.RetryPolicy other)

public GrpcRoute.RetryPolicy.Builder mergeFrom(GrpcRoute.RetryPolicy other)
Parameter
Name Description
other GrpcRoute.RetryPolicy
Returns
Type Description
GrpcRoute.RetryPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public GrpcRoute.RetryPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GrpcRoute.RetryPolicy.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public GrpcRoute.RetryPolicy.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
GrpcRoute.RetryPolicy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GrpcRoute.RetryPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GrpcRoute.RetryPolicy.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public GrpcRoute.RetryPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GrpcRoute.RetryPolicy.Builder
Overrides

setNumRetries(int value)

public GrpcRoute.RetryPolicy.Builder setNumRetries(int value)

Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.

uint32 num_retries = 2;

Parameter
Name Description
value int

The numRetries to set.

Returns
Type Description
GrpcRoute.RetryPolicy.Builder

This builder for chaining.

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

public GrpcRoute.RetryPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
GrpcRoute.RetryPolicy.Builder
Overrides

setRetryConditions(int index, String value)

public GrpcRoute.RetryPolicy.Builder setRetryConditions(int index, String value)
  • connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.
  • refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
  • cancelled: Router will retry if the gRPC status code in the response header is set to cancelled
  • deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded
  • resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted
  • unavailable: Router will retry if the gRPC status code in the response header is set to unavailable

repeated string retry_conditions = 1;

Parameters
Name Description
index int

The index to set the value at.

value String

The retryConditions to set.

Returns
Type Description
GrpcRoute.RetryPolicy.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final GrpcRoute.RetryPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GrpcRoute.RetryPolicy.Builder
Overrides