@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.535Z") @Stability(value=Stable) public enum GrpcRetryEvent extends Enum<GrpcRetryEvent>
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());
| 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(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=Stable) public static final GrpcRetryEvent CANCELLED
@Stability(value=Stable) public static final GrpcRetryEvent DEADLINE_EXCEEDED
@Stability(value=Stable) public static final GrpcRetryEvent INTERNAL_ERROR
@Stability(value=Stable) public static final GrpcRetryEvent RESOURCE_EXHAUSTED
@Stability(value=Stable) public static final GrpcRetryEvent UNAVAILABLE
public 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.