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
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
The bytes of the retryConditions at the given index.
getRetryConditionsCount()
publicabstractintgetRetryConditionsCount()
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
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
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-16 UTC."],[],[],null,["# Interface GrpcRoute.RetryPolicyOrBuilder (0.28.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.28.0 (latest)](/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.26.0](/java/docs/reference/google-cloud-networkservices/0.26.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.24.0](/java/docs/reference/google-cloud-networkservices/0.24.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.23.0](/java/docs/reference/google-cloud-networkservices/0.23.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.20.0](/java/docs/reference/google-cloud-networkservices/0.20.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.19.0](/java/docs/reference/google-cloud-networkservices/0.19.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.18.0](/java/docs/reference/google-cloud-networkservices/0.18.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.16.0](/java/docs/reference/google-cloud-networkservices/0.16.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloud-networkservices/0.15.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.14.0](/java/docs/reference/google-cloud-networkservices/0.14.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.13.0](/java/docs/reference/google-cloud-networkservices/0.13.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.12.0](/java/docs/reference/google-cloud-networkservices/0.12.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.11.0](/java/docs/reference/google-cloud-networkservices/0.11.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.10.0](/java/docs/reference/google-cloud-networkservices/0.10.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.9.0](/java/docs/reference/google-cloud-networkservices/0.9.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.8.0](/java/docs/reference/google-cloud-networkservices/0.8.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.7.0](/java/docs/reference/google-cloud-networkservices/0.7.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.5.0](/java/docs/reference/google-cloud-networkservices/0.5.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.4.0](/java/docs/reference/google-cloud-networkservices/0.4.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.3.0](/java/docs/reference/google-cloud-networkservices/0.3.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.2.0](/java/docs/reference/google-cloud-networkservices/0.2.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder)\n- [0.1.0](/java/docs/reference/google-cloud-networkservices/0.1.0/com.google.cloud.networkservices.v1.GrpcRoute.RetryPolicyOrBuilder) \n\n public static interface GrpcRoute.RetryPolicyOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getNumRetries()\n\n public abstract int getNumRetries()\n\nSpecifies the allowed number of retries. This number must be \\\u003e 0. If not\nspecified, default to 1.\n\n`uint32 num_retries = 2;`\n\n### getRetryConditions(int index)\n\n public abstract String getRetryConditions(int index)\n\n- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.\n- 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.\n- cancelled: Router will retry if the gRPC status code in the response header is set to cancelled\n- deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded\n- resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted\n- unavailable: Router will retry if the gRPC status code in the response header is set to unavailable\n\n`repeated string retry_conditions = 1;`\n\n### getRetryConditionsBytes(int index)\n\n public abstract ByteString getRetryConditionsBytes(int index)\n\n- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.\n- 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.\n- cancelled: Router will retry if the gRPC status code in the response header is set to cancelled\n- deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded\n- resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted\n- unavailable: Router will retry if the gRPC status code in the response header is set to unavailable\n\n`repeated string retry_conditions = 1;`\n\n### getRetryConditionsCount()\n\n public abstract int getRetryConditionsCount()\n\n- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.\n- 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.\n- cancelled: Router will retry if the gRPC status code in the response header is set to cancelled\n- deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded\n- resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted\n- unavailable: Router will retry if the gRPC status code in the response header is set to unavailable\n\n`repeated string retry_conditions = 1;`\n\n### getRetryConditionsList()\n\n public abstract List\u003cString\u003e getRetryConditionsList()\n\n- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts.\n- 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.\n- cancelled: Router will retry if the gRPC status code in the response header is set to cancelled\n- deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded\n- resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted\n- unavailable: Router will retry if the gRPC status code in the response header is set to unavailable\n\n`repeated string retry_conditions = 1;`"]]