Enum BackoffFunction
- All Implemented Interfaces:
Serializable,Comparable<BackoffFunction>,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:47.497Z")
@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 ConstantsEnum ConstantDescriptionArithmetic, seethis image} for how this function compares to others.invalid @link
{@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.pngExponential, seethis image} for how this function compares to others.invalid @link
{@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.pngGeometric, seethis image} for how this function compares to others.invalid @link
{@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.pngLinear, seethis image} for how this function compares to others.invalid @link
{@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png -
Method Summary
Modifier and TypeMethodDescriptionstatic BackoffFunctionReturns the enum constant of this type with the specified name.static BackoffFunction[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ARITHMETIC
Arithmetic, seethis image} for how this function compares to others.invalid @link
{@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png -
EXPONENTIAL
Exponential, seethis image} for how this function compares to others.invalid @link
{@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png -
GEOMETRIC
Geometric, seethis image} for how this function compares to others.invalid @link
{@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png -
LINEAR
Linear, seethis image} for how this function compares to others.invalid @link
{@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png
-
-
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
-