Interface RetryRegistry
- All Superinterfaces:
io.github.resilience4j.core.Registry<Retry,RetryConfig>
- All Known Implementing Classes:
InMemoryRetryRegistry
RetryRegistry is a factory to create Retry instances which stores all Retry instances
in a registry.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.github.resilience4j.core.Registry
io.github.resilience4j.core.Registry.EventPublisher<E extends Object> -
Method Summary
Modifier and TypeMethodDescriptionstatic RetryRegistry.Buildercustom()Returns a builder to create a custom RetryRegistry.Returns all managedRetryinstances.static RetryRegistryof(RetryConfig retryConfig) Creates a RetryRegistry with a custom default Retry configuration.static RetryRegistryof(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 RetryRegistryof(RetryConfig retryConfig, 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 RetryRegistryof(Map<String, RetryConfig> configs) Creates a RetryRegistry with a Map of shared Retry configurations.static RetryRegistryof(Map<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 RetryRegistryof(Map<String, RetryConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer, Map<String, String> tags) Creates a RetryRegistry with a Map of shared Retry configurations and a Retry registry event consumer.static RetryRegistryof(Map<String, RetryConfig> configs, 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 RetryRegistryCreates a RetryRegistry with a Map of shared Retry configurations.static RetryRegistryCreates a RetryRegistry with a default Retry configuration.Returns a managedRetryor creates a new one with the default Retry configuration.retry(String name, RetryConfig config) Returns a managedRetryor creates a new one with a custom Retry configuration.Returns a managedRetryor creates a new one with a custom Retry configuration.Returns a managedRetryor creates a new one.Returns a managedRetryor creates a new one.retry(String name, Supplier<RetryConfig> retryConfigSupplier) Returns a managedRetryor creates a new one with a custom Retry configuration.Returns a managedRetryor creates a new one with a custom Retry configuration.Returns a managedRetryor creates a new one with the default Retry configuration.Methods inherited from interface io.github.resilience4j.core.Registry
addConfiguration, find, getConfiguration, getDefaultConfig, getEventPublisher, getTags, remove, replace
-
Method Details
-
of
Creates a RetryRegistry with a custom default Retry configuration.- Parameters:
retryConfig- a custom Retry configuration- Returns:
- a RetryRegistry with a custom Retry configuration.
-
of
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.- Parameters:
retryConfig- a custom default Retry configuration.registryEventConsumer- a Retry registry event consumer.- Returns:
- a RetryRegistry with a custom Retry configuration and a Retry registry event consumer.
-
of
static RetryRegistry of(RetryConfig retryConfig, 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.- Parameters:
retryConfig- a custom default Retry configuration.registryEventConsumers- a list of Retry registry event consumers.- Returns:
- a RetryRegistry with a custom Retry configuration and list of Retry registry event consumers.
-
ofDefaults
Creates a RetryRegistry with a default Retry configuration.- Returns:
- a RetryRegistry with a default Retry configuration.
-
of
Creates a RetryRegistry with a Map of shared Retry configurations.- Parameters:
configs- a Map of shared Retry configurations- Returns:
- a RetryRegistry with a Map of shared Retry configurations.
-
of
Creates a RetryRegistry with a Map of shared Retry configurations.Tags added to the registry will be added to every instance created by this registry.
- Parameters:
configs- a Map of shared Retry configurationstags- default tags to add to the registry- Returns:
- a RetryRegistry with a Map of shared Retry configurations.
-
of
static RetryRegistry of(Map<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.- Parameters:
configs- a Map of shared Retry configurations.registryEventConsumer- a Retry registry event consumer.- Returns:
- a RetryRegistry with a Map of shared Retry configurations and a Retry registry event consumer.
-
of
static RetryRegistry of(Map<String, RetryConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer, Map<String, String> tags) Creates a RetryRegistry with a Map of shared Retry configurations and a Retry registry event consumer.- Parameters:
configs- a Map of shared Retry configurations.registryEventConsumer- a Retry registry event consumer.tags- default tags to add to the registry- Returns:
- a RetryRegistry with a Map of shared Retry configurations and a Retry registry event consumer.
-
of
static RetryRegistry of(Map<String, RetryConfig> configs, 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.- Parameters:
configs- a Map of shared Retry configurations.registryEventConsumers- a list of Retry registry event consumers.- Returns:
- a RetryRegistry with a Map of shared Retry configurations and a list of Retry registry event consumers.
-
getAllRetries
Returns all managedRetryinstances.- Returns:
- all managed
Retryinstances.
-
retry
Returns a managedRetryor creates a new one with the default Retry configuration.- Parameters:
name- the name of the Retry- Returns:
- The
Retry
-
retry
Returns a managedRetryor creates a new one with the default Retry configuration.The
tagspassed 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.- Parameters:
name- the name of the Retrytags- tags added to the Retry- Returns:
- The
Retry
-
retry
Returns a managedRetryor creates a new one with a custom Retry configuration.- Parameters:
name- the name of the Retryconfig- a custom Retry configuration- Returns:
- The
Retry
-
retry
Returns a managedRetryor creates a new one with a custom Retry configuration.The
tagspassed 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.- Parameters:
name- the name of the Retryconfig- a custom Retry configurationtags- tags added to the Retry- Returns:
- The
Retry
-
retry
Returns a managedRetryor creates a new one with a custom Retry configuration.- Parameters:
name- the name of the RetryretryConfigSupplier- a supplier of a custom Retry configuration- Returns:
- The
Retry
-
retry
Returns a managedRetryor creates a new one with a custom Retry configuration.The
tagspassed 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.- Parameters:
name- the name of the RetryretryConfigSupplier- a supplier of a custom Retry configurationtags- tags added to the Retry- Returns:
- The
Retry
-
retry
Returns a managedRetryor creates a new one. The configuration must have been added upfront viaRegistry.addConfiguration(String, Object).- Parameters:
name- the name of the RetryconfigName- the name of the shared configuration- Returns:
- The
Retry
-
retry
Returns a managedRetryor creates a new one. The configuration must have been added upfront viaRegistry.addConfiguration(String, Object).The
tagspassed 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.- Parameters:
name- the name of the RetryconfigName- the name of the shared configurationtags- tags added to the Retry- Returns:
- The
Retry
-
custom
Returns a builder to create a custom RetryRegistry.- Returns:
- a
RetryRegistry.Builder
-