@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.535Z") @Stability(value=Stable) public interface GrpcRetryPolicy extends software.amazon.jsii.JsiiSerializable, HttpRetryPolicy
Example:
// Example automatically generated from non-compiling source. May contain errors.
VirtualRouter router;
VirtualNode node;
router.addRoute("route-grpc-retry", RouteBaseProps.builder()
.routeSpec(RouteSpec.grpc(GrpcRouteSpecOptions.builder()
.weightedTargets(List.of(WeightedTarget.builder().virtualNode(node).build()))
.match(GrpcRouteMatch.builder().serviceName("servicename").build())
.retryPolicy(GrpcRetryPolicy.builder()
.tcpRetryEvents(List.of(TcpRetryEvent.CONNECTION_ERROR))
.httpRetryEvents(List.of(HttpRetryEvent.GATEWAY_ERROR))
// Retry if gRPC responds that the request was cancelled, a resource
// was exhausted, or if the service is unavailable
.grpcRetryEvents(List.of(GrpcRetryEvent.CANCELLED, GrpcRetryEvent.RESOURCE_EXHAUSTED, GrpcRetryEvent.UNAVAILABLE))
.retryAttempts(5)
.retryTimeout(Duration.seconds(1))
.build())
.build()))
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
GrpcRetryPolicy.Builder
A builder for
GrpcRetryPolicy |
static class |
GrpcRetryPolicy.Jsii$Proxy
An implementation for
GrpcRetryPolicy |
| Modifier and Type | Method and Description |
|---|---|
static GrpcRetryPolicy.Builder |
builder() |
default List<GrpcRetryEvent> |
getGrpcRetryEvents()
gRPC events on which to retry.
|
getHttpRetryEvents, getRetryAttempts, getRetryTimeout, getTcpRetryEvents@Stability(value=Stable) @Nullable default List<GrpcRetryEvent> getGrpcRetryEvents()
You must specify at least one value for at least one types of retry events.
Default: - no retries for gRPC events
@Stability(value=Stable) static GrpcRetryPolicy.Builder builder()
builder in interface HttpRetryPolicyGrpcRetryPolicy.Builder of GrpcRetryPolicyCopyright © 2022. All rights reserved.