Enum TcpRetryEvent

java.lang.Object
java.lang.Enum<TcpRetryEvent>
software.amazon.awscdk.services.appmesh.TcpRetryEvent
All Implemented Interfaces:
Serializable, Comparable<TcpRetryEvent>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:10.173Z") @Stability(Stable) public enum TcpRetryEvent extends Enum<TcpRetryEvent>
TCP events on which you may retry.

Example:

 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 Details

    • CONNECTION_ERROR

      @Stability(Stable) public static final TcpRetryEvent CONNECTION_ERROR
      A connection error.
  • Method Details

    • values

      public static TcpRetryEvent[] 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

      public static TcpRetryEvent valueOf(String name)
      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 name
      NullPointerException - if the argument is null