public static final class GrpcRoute.RetryPolicy.Builder extends GeneratedMessage.Builder<GrpcRoute.RetryPolicy.Builder> implements GrpcRoute.RetryPolicyOrBuilderThe specifications for retries. Specifies one or more conditions for which this retry rule applies. Valid values are:
Protobuf type google.cloud.networkservices.v1.GrpcRoute.RetryPolicy
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > GrpcRoute.RetryPolicy.BuilderImplements
GrpcRoute.RetryPolicyOrBuilderStatic 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. |
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 |
StringThe 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 |
ByteStringThe 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 |
|
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. |
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. |
getDefaultInstanceForType()
public GrpcRoute.RetryPolicy getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
GrpcRoute.RetryPolicy |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
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 |
intThe 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 |
intThe 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 GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
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 |
|
| 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 |
|
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 |
intThe numRetries to set. |
| Returns | |
|---|---|
| Type | Description |
GrpcRoute.RetryPolicy.Builder |
This builder for chaining. |
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 |
intThe index to set the value at. |
value |
StringThe retryConditions to set. |
| Returns | |
|---|---|
| Type | Description |
GrpcRoute.RetryPolicy.Builder |
This builder for chaining. |