Package pl.gsmservice.gateway.utils
Class RetryConfig.Builder
- java.lang.Object
-
- pl.gsmservice.gateway.utils.RetryConfig.Builder
-
- Enclosing class:
- RetryConfig
public static final class RetryConfig.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RetryConfig.Builderbackoff()Selects the default backoff retry strategy.RetryConfig.Builderbackoff(BackoffStrategy backoff)Selects and configures the backoff retry strategy.RetryConfigbuild()RetryConfig.Builderenable()Enables the selected strategy.RetryConfig.Builderenable(boolean enable)Enables or disables the selected strategy.RetryConfig.BuildernoRetries()Disables retries (sets strategy to "none").
-
-
-
Method Detail
-
noRetries
public RetryConfig.Builder noRetries()
Disables retries (sets strategy to "none").- Returns:
- The builder instance.
-
enable
public RetryConfig.Builder enable()
Enables the selected strategy.- Returns:
- The builder instance.
-
enable
public RetryConfig.Builder enable(boolean enable)
Enables or disables the selected strategy.- Parameters:
enable- Whether to enable the current strategy.- Returns:
- The builder instance.
-
backoff
public RetryConfig.Builder backoff(BackoffStrategy backoff)
Selects and configures the backoff retry strategy.- Parameters:
backoff- The backoff strategy to use.- Returns:
- The builder instance.
-
backoff
public RetryConfig.Builder backoff()
Selects the default backoff retry strategy.- Returns:
- The builder instance.
-
build
public RetryConfig build()
-
-