Enum BackoffFunction

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

@Generated(value="jsii-pacmak/1.106.0 (build e852934)", date="2025-02-12T12:32:11.450Z") @Stability(Stable) public enum BackoffFunction extends Enum<BackoffFunction>
Algorithms which can be used by SNS to calculate the delays associated with all of the retry attempts between the first and last retries in the backoff phase.

Example:

 Topic myTopic = new Topic(this, "MyTopic");
 myTopic.addSubscription(
 UrlSubscription.Builder.create("https://foobar.com/")
         .deliveryPolicy(DeliveryPolicy.builder()
                 .healthyRetryPolicy(HealthyRetryPolicy.builder()
                         .minDelayTarget(Duration.seconds(5))
                         .maxDelayTarget(Duration.seconds(10))
                         .numRetries(6)
                         .backoffFunction(BackoffFunction.EXPONENTIAL)
                         .build())
                 .throttlePolicy(ThrottlePolicy.builder()
                         .maxReceivesPerSecond(10)
                         .build())
                 .requestPolicy(RequestPolicy.builder()
                         .headerContentType("application/json")
                         .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 Constants
    Enum Constant
    Description
    Arithmetic, see
    invalid @link
    {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png
    this image} for how this function compares to others.
    Exponential, see
    invalid @link
    {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png
    this image} for how this function compares to others.
    Geometric, see
    invalid @link
    {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png
    this image} for how this function compares to others.
    Linear, see
    invalid @link
    {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png
    this image} for how this function compares to others.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ARITHMETIC

      @Stability(Stable) public static final BackoffFunction ARITHMETIC
      Arithmetic, see
      invalid @link
      {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png
      this image} for how this function compares to others.
    • EXPONENTIAL

      @Stability(Stable) public static final BackoffFunction EXPONENTIAL
      Exponential, see
      invalid @link
      {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png
      this image} for how this function compares to others.
    • GEOMETRIC

      @Stability(Stable) public static final BackoffFunction GEOMETRIC
      Geometric, see
      invalid @link
      {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png
      this image} for how this function compares to others.
    • LINEAR

      @Stability(Stable) public static final BackoffFunction LINEAR
      Linear, see
      invalid @link
      {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png
      this image} for how this function compares to others.
  • Method Details

    • values

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