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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-27T16:51:05.937Z") @Stability(Stable) public enum JitterType extends Enum<JitterType>
Values allowed in the retrier JitterStrategy field.

Example:

 Parallel parallel = new Parallel(this, "Do the work in parallel");
 // Add branches to be executed in parallel
 Pass shipItem = new Pass(this, "ShipItem");
 Pass sendInvoice = new Pass(this, "SendInvoice");
 Pass restock = new Pass(this, "Restock");
 parallel.branch(shipItem);
 parallel.branch(sendInvoice);
 parallel.branch(restock);
 // Retry the whole workflow if something goes wrong with exponential backoff
 parallel.addRetry(RetryProps.builder()
         .maxAttempts(1)
         .maxDelay(Duration.seconds(5))
         .jitterStrategy(JitterType.FULL)
         .build());
 // How to recover from errors
 Pass sendFailureNotification = new Pass(this, "SendFailureNotification");
 parallel.addCatch(sendFailureNotification);
 // What to do in case everything succeeded
 Pass closeOrder = new Pass(this, "CloseOrder");
 parallel.next(closeOrder);
 
  • Enum Constant Details

    • FULL

      @Stability(Stable) public static final JitterType FULL
      Calculates the delay to be a random number between 0 and the computed backoff for the given retry attempt count.
    • NONE

      @Stability(Stable) public static final JitterType NONE
      Calculates the delay to be the computed backoff for the given retry attempt count (equivalent to if Jitter was not declared - i.e. the default value).
  • Method Details

    • values

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