@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:27.810Z") public enum GrpcRetryEvent extends java.lang.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
Request was cancelled.
|
DEADLINE_EXCEEDED
The deadline was exceeded.
|
INTERNAL_ERROR
Internal error.
|
RESOURCE_EXHAUSTED
A resource was exhausted.
|
UNAVAILABLE
The service is unavailable.
|
Modifier and Type | Method and Description |
---|---|
static GrpcRetryEvent |
valueOf(java.lang.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.
|
public static final GrpcRetryEvent CANCELLED
public static final GrpcRetryEvent DEADLINE_EXCEEDED
public static final GrpcRetryEvent INTERNAL_ERROR
public static final GrpcRetryEvent RESOURCE_EXHAUSTED
public static final GrpcRetryEvent UNAVAILABLE
public static GrpcRetryEvent[] values()
for (GrpcRetryEvent c : GrpcRetryEvent.values()) System.out.println(c);
public static GrpcRetryEvent valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null