@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.575Z") @Stability(value=Stable) public enum TcpRetryEvent extends Enum<TcpRetryEvent>
Example:
// Example automatically generated from non-compiling source. May contain errors.
VirtualRouter router;
VirtualNode node;
router.addRoute("route-http2-retry", RouteBaseProps.builder()
.routeSpec(RouteSpec.http2(HttpRouteSpecOptions.builder()
.weightedTargets(List.of(WeightedTarget.builder().virtualNode(node).build()))
.retryPolicy(HttpRetryPolicy.builder()
// Retry if the connection failed
.tcpRetryEvents(List.of(TcpRetryEvent.CONNECTION_ERROR))
// Retry if HTTP responds with a gateway error (502, 503, 504)
.httpRetryEvents(List.of(HttpRetryEvent.GATEWAY_ERROR))
// Retry five times
.retryAttempts(5)
// Use a 1 second timeout per retry
.retryTimeout(Duration.seconds(1))
.build())
.build()))
.build());
| Enum Constant and Description |
|---|
CONNECTION_ERROR
A connection error.
|
| Modifier and Type | Method and Description |
|---|---|
static TcpRetryEvent |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TcpRetryEvent[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final TcpRetryEvent CONNECTION_ERROR
public static TcpRetryEvent[] values()
for (TcpRetryEvent c : TcpRetryEvent.values()) System.out.println(c);
public static TcpRetryEvent 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.