Interface GrpcRetryPolicy
- All Superinterfaces:
HttpRetryPolicy,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
GrpcRetryPolicy.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:32.323Z")
@Stability(Stable)
public interface GrpcRetryPolicy
extends software.amazon.jsii.JsiiSerializable, HttpRetryPolicy
gRPC retry policy.
Example:
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());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forGrpcRetryPolicystatic final classAn implementation forGrpcRetryPolicy -
Method Summary
Modifier and TypeMethodDescriptionstatic GrpcRetryPolicy.Builderbuilder()default List<GrpcRetryEvent> gRPC events on which to retry.Methods inherited from interface software.amazon.awscdk.services.appmesh.HttpRetryPolicy
getHttpRetryEvents, getRetryAttempts, getRetryTimeout, getTcpRetryEventsMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getGrpcRetryEvents
gRPC events on which to retry.You must specify at least one value for at least one types of retry events.
Default: - no retries for gRPC events
-
builder
- Returns:
- a
GrpcRetryPolicy.BuilderofGrpcRetryPolicy
-