Package com.styra.opa.openapi.utils
Class Retries.Builder
- java.lang.Object
-
- com.styra.opa.openapi.utils.Retries.Builder
-
- Enclosing class:
- Retries
public static final class Retries.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Retries.Builder
action(java.util.concurrent.Callable<java.net.http.HttpResponse<java.io.InputStream>> action)
Sets the HTTP callback to be retried.Retries
build()
Retries.Builder
retryConfig(RetryConfig retryConfig)
Defines the retry configuration.Retries.Builder
statusCodes(java.util.List<java.lang.String> statusCodes)
Defines the status codes that should be considered as errors.
-
-
-
Method Detail
-
action
public Retries.Builder action(java.util.concurrent.Callable<java.net.http.HttpResponse<java.io.InputStream>> action)
Sets the HTTP callback to be retried.- Parameters:
action
- The function called on retry.- Returns:
- The builder instance.
-
retryConfig
public Retries.Builder retryConfig(RetryConfig retryConfig)
Defines the retry configuration.- Parameters:
retryConfig
- The retry configuration to use.- Returns:
- The builder instance.
-
statusCodes
public Retries.Builder statusCodes(java.util.List<java.lang.String> statusCodes)
Defines the status codes that should be considered as errors.- Parameters:
statusCodes
- The list of status codes to treat as errors.- Returns:
- The builder instance.
-
build
public Retries build()
-
-