public interface RetryRegistry extends io.github.resilience4j.core.Registry<Retry,RetryConfig>
RetryRegistry is a factory to create Retry instances which stores all Retry instances
in a registry.| Modifier and Type | Interface and Description |
|---|---|
static class |
RetryRegistry.Builder |
| Modifier and Type | Method and Description |
|---|---|
static RetryRegistry.Builder |
custom()
Returns a builder to create a custom RetryRegistry.
|
io.vavr.collection.Seq<Retry> |
getAllRetries()
Returns all managed
Retry instances. |
static RetryRegistry |
of(java.util.Map<java.lang.String,RetryConfig> configs)
Creates a RetryRegistry with a Map of shared Retry configurations.
|
static RetryRegistry |
of(java.util.Map<java.lang.String,RetryConfig> configs,
java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers)
Creates a RetryRegistry with a Map of shared Retry configurations and a list of Retry
registry event consumers.
|
static RetryRegistry |
of(java.util.Map<java.lang.String,RetryConfig> configs,
io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Creates a RetryRegistry with a Map of shared Retry configurations.
|
static RetryRegistry |
of(java.util.Map<java.lang.String,RetryConfig> configs,
io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer)
Creates a RetryRegistry with a Map of shared Retry configurations and a Retry registry event
consumer.
|
static RetryRegistry |
of(java.util.Map<java.lang.String,RetryConfig> configs,
io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer,
io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Creates a RetryRegistry with a Map of shared Retry configurations and a Retry registry event
consumer.
|
static RetryRegistry |
of(RetryConfig retryConfig)
Creates a RetryRegistry with a custom default Retry configuration.
|
static RetryRegistry |
of(RetryConfig retryConfig,
java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers)
Creates a RetryRegistry with a custom default Retry configuration and a list of Retry
registry event consumers.
|
static RetryRegistry |
of(RetryConfig retryConfig,
io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer)
Creates a RetryRegistry with a custom default Retry configuration and a Retry registry event
consumer.
|
static RetryRegistry |
ofDefaults()
Creates a RetryRegistry with a default Retry configuration.
|
Retry |
retry(java.lang.String name)
Returns a managed
Retry or creates a new one with the default Retry configuration. |
Retry |
retry(java.lang.String name,
io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Returns a managed
Retry or creates a new one with the default Retry configuration. |
Retry |
retry(java.lang.String name,
RetryConfig config)
Returns a managed
Retry or creates a new one with a custom Retry configuration. |
Retry |
retry(java.lang.String name,
RetryConfig config,
io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Returns a managed
Retry or creates a new one with a custom Retry configuration. |
Retry |
retry(java.lang.String name,
java.lang.String configName)
Returns a managed
Retry or creates a new one. |
Retry |
retry(java.lang.String name,
java.lang.String configName,
io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Returns a managed
Retry or creates a new one. |
Retry |
retry(java.lang.String name,
java.util.function.Supplier<RetryConfig> retryConfigSupplier)
Returns a managed
Retry or creates a new one with a custom Retry configuration. |
Retry |
retry(java.lang.String name,
java.util.function.Supplier<RetryConfig> retryConfigSupplier,
io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Returns a managed
Retry or creates a new one with a custom Retry configuration. |
static RetryRegistry of(RetryConfig retryConfig)
retryConfig - a custom Retry configurationstatic RetryRegistry of(RetryConfig retryConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer)
retryConfig - a custom default Retry configuration.registryEventConsumer - a Retry registry event consumer.static RetryRegistry of(RetryConfig retryConfig, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers)
retryConfig - a custom default Retry configuration.registryEventConsumers - a list of Retry registry event consumers.static RetryRegistry ofDefaults()
static RetryRegistry of(java.util.Map<java.lang.String,RetryConfig> configs)
configs - a Map of shared Retry configurationsstatic RetryRegistry of(java.util.Map<java.lang.String,RetryConfig> configs, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Tags added to the registry will be added to every instance created by this registry.
configs - a Map of shared Retry configurationstags - default tags to add to the registrystatic RetryRegistry of(java.util.Map<java.lang.String,RetryConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer)
configs - a Map of shared Retry configurations.registryEventConsumer - a Retry registry event consumer.static RetryRegistry of(java.util.Map<java.lang.String,RetryConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
configs - a Map of shared Retry configurations.registryEventConsumer - a Retry registry event consumer.tags - default tags to add to the registrystatic RetryRegistry of(java.util.Map<java.lang.String,RetryConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers)
configs - a Map of shared Retry configurations.registryEventConsumers - a list of Retry registry event consumers.io.vavr.collection.Seq<Retry> getAllRetries()
Retry instances.Retry instances.Retry retry(java.lang.String name)
Retry or creates a new one with the default Retry configuration.name - the name of the RetryRetryRetry retry(java.lang.String name, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Retry or creates a new one with the default Retry configuration.
The tags passed will be appended to the tags already configured for the registry.
When tags (keys) of the two collide the tags passed with this method will override the tags
of the registry.
name - the name of the Retrytags - tags added to the RetryRetryRetry retry(java.lang.String name, RetryConfig config)
Retry or creates a new one with a custom Retry configuration.name - the name of the Retryconfig - a custom Retry configurationRetryRetry retry(java.lang.String name, RetryConfig config, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Retry or creates a new one with a custom Retry configuration.
The tags passed will be appended to the tags already configured for the registry.
When tags (keys) of the two collide the tags passed with this method will override the tags
of the registry.
name - the name of the Retryconfig - a custom Retry configurationtags - tags added to the RetryRetryRetry retry(java.lang.String name, java.util.function.Supplier<RetryConfig> retryConfigSupplier)
Retry or creates a new one with a custom Retry configuration.name - the name of the RetryretryConfigSupplier - a supplier of a custom Retry configurationRetryRetry retry(java.lang.String name, java.util.function.Supplier<RetryConfig> retryConfigSupplier, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Retry or creates a new one with a custom Retry configuration.
The tags passed will be appended to the tags already configured for the registry.
When tags (keys) of the two collide the tags passed with this method will override the tags
of the registry.
name - the name of the RetryretryConfigSupplier - a supplier of a custom Retry configurationtags - tags added to the RetryRetryRetry retry(java.lang.String name, java.lang.String configName)
Retry or creates a new one.
The configuration must have been added upfront via Registry.addConfiguration(String, Object).name - the name of the RetryconfigName - the name of the shared configurationRetryRetry retry(java.lang.String name, java.lang.String configName, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Retry or creates a new one.
The configuration must have been added upfront via Registry.addConfiguration(String, Object).
The tags passed will be appended to the tags already configured for the registry.
When tags (keys) of the two collide the tags passed with this method will override the tags
of the registry.
name - the name of the RetryconfigName - the name of the shared configurationtags - tags added to the RetryRetrystatic RetryRegistry.Builder custom()
RetryRegistry.Builder