@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:02.695Z") @Stability(value=Experimental) public enum GrpcRetryEvent extends Enum<GrpcRetryEvent>
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());
| Enum Constant and Description |
|---|
CANCELLED
(experimental) Request was cancelled.
|
DEADLINE_EXCEEDED
(experimental) The deadline was exceeded.
|
INTERNAL_ERROR
(experimental) Internal error.
|
RESOURCE_EXHAUSTED
(experimental) A resource was exhausted.
|
UNAVAILABLE
(experimental) The service is unavailable.
|
| Modifier and Type | Method and Description |
|---|---|
static GrpcRetryEvent |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GrpcRetryEvent[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Experimental) public static final GrpcRetryEvent CANCELLED
https://grpc.github.io/grpc/core/md_doc_statuscodes.html@Stability(value=Experimental) public static final GrpcRetryEvent DEADLINE_EXCEEDED
https://grpc.github.io/grpc/core/md_doc_statuscodes.html@Stability(value=Experimental) public static final GrpcRetryEvent INTERNAL_ERROR
https://grpc.github.io/grpc/core/md_doc_statuscodes.html@Stability(value=Experimental) public static final GrpcRetryEvent RESOURCE_EXHAUSTED
https://grpc.github.io/grpc/core/md_doc_statuscodes.html@Stability(value=Experimental) public static final GrpcRetryEvent UNAVAILABLE
https://grpc.github.io/grpc/core/md_doc_statuscodes.htmlpublic static GrpcRetryEvent[] values()
for (GrpcRetryEvent c : GrpcRetryEvent.values()) System.out.println(c);
public static GrpcRetryEvent valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.