Enum GrpcRetryEvent
- All Implemented Interfaces:
Serializable
,Comparable<GrpcRetryEvent>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-25T14:21:10.121Z")
@Stability(Stable)
public enum GrpcRetryEvent
extends Enum<GrpcRetryEvent>
gRPC events.
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 classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionRequest was cancelled.The deadline was exceeded.Internal error.A resource was exhausted.The service is unavailable. -
Method Summary
Modifier and TypeMethodDescriptionstatic GrpcRetryEvent
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.
-
Enum Constant Details
-
CANCELLED
Request was cancelled.- See Also:
-
DEADLINE_EXCEEDED
The deadline was exceeded.- See Also:
-
INTERNAL_ERROR
Internal error.- See Also:
-
RESOURCE_EXHAUSTED
A resource was exhausted.- See Also:
-
UNAVAILABLE
The service is unavailable.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-