Package com.styra.opa.openapi.utils
Class RetryConfig.Builder
- java.lang.Object
-
- com.styra.opa.openapi.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.Builder
backoff()
Selects the default backoff retry strategy.RetryConfig.Builder
backoff(BackoffStrategy backoff)
Selects and configures the backoff retry strategy.RetryConfig
build()
RetryConfig.Builder
enable()
Enables the selected strategy.RetryConfig.Builder
enable(boolean enable)
Enables or disables the selected strategy.RetryConfig.Builder
noRetries()
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()
-
-