Interface GrpcRoute.RetryPolicyOrBuilder (0.5.0)

public static interface GrpcRoute.RetryPolicyOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getNumRetries()

public abstract 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 abstract 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 abstract 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 abstract 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 abstract List<String> 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
List<String>

A list containing the retryConditions.