Class InMemoryRetryRegistry
- All Implemented Interfaces:
io.github.resilience4j.core.Registry<Retry,
,RetryConfig> RetryRegistry
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.resilience4j.core.Registry
io.github.resilience4j.core.Registry.EventPublisher<E extends Object>
Nested classes/interfaces inherited from interface io.github.resilience4j.retry.RetryRegistry
RetryRegistry.Builder
-
Field Summary
Fields inherited from class io.github.resilience4j.core.registry.AbstractRegistry
CONFIG_MUST_NOT_BE_NULL, configurations, CONSUMER_MUST_NOT_BE_NULL, DEFAULT_CONFIG, entryMap, registryTags, SUPPLIER_MUST_NOT_BE_NULL, TAGS_MUST_NOT_BE_NULL
-
Constructor Summary
ConstructorsConstructorDescriptionThe constructor with default default.InMemoryRetryRegistry
(RetryConfig defaultConfig) The constructor with custom default config.InMemoryRetryRegistry
(RetryConfig defaultConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer) InMemoryRetryRegistry
(RetryConfig defaultConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer, Map<String, String> tags) InMemoryRetryRegistry
(RetryConfig defaultConfig, List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers) InMemoryRetryRegistry
(RetryConfig defaultConfig, List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers, Map<String, String> tags) InMemoryRetryRegistry
(RetryConfig defaultConfig, Map<String, String> tags) InMemoryRetryRegistry
(Map<String, RetryConfig> configs) InMemoryRetryRegistry
(Map<String, RetryConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer) InMemoryRetryRegistry
(Map<String, RetryConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer, Map<String, String> tags) InMemoryRetryRegistry
(Map<String, RetryConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers) InMemoryRetryRegistry
(Map<String, RetryConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers, Map<String, String> tags) InMemoryRetryRegistry
(Map<String, RetryConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers, Map<String, String> tags, io.github.resilience4j.core.RegistryStore<Retry> registryStore) InMemoryRetryRegistry
(Map<String, RetryConfig> configs, Map<String, String> tags) -
Method Summary
Modifier and TypeMethodDescriptionReturns all managedRetry
instances.Returns a managedRetry
or creates a new one with the default Retry configuration.retry
(String name, RetryConfig config) Returns a managedRetry
or creates a new one with a custom Retry configuration.Returns a managedRetry
or creates a new one with a custom Retry configuration.Returns a managedRetry
or creates a new one.Returns a managedRetry
or creates a new one.retry
(String name, Supplier<RetryConfig> retryConfigSupplier) Returns a managedRetry
or creates a new one with a custom Retry configuration.Returns a managedRetry
or creates a new one with a custom Retry configuration.Returns a managedRetry
or creates a new one with the default Retry configuration.Methods inherited from class io.github.resilience4j.core.registry.AbstractRegistry
addConfiguration, computeIfAbsent, find, getAllTags, getConfiguration, getDefaultConfig, getEventPublisher, getTags, remove, replace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.resilience4j.core.Registry
addConfiguration, find, getConfiguration, getDefaultConfig, getEventPublisher, getTags, remove, replace
-
Constructor Details
-
InMemoryRetryRegistry
public InMemoryRetryRegistry()The constructor with default default. -
InMemoryRetryRegistry
-
InMemoryRetryRegistry
-
InMemoryRetryRegistry
public InMemoryRetryRegistry(Map<String, RetryConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer) -
InMemoryRetryRegistry
-
InMemoryRetryRegistry
public InMemoryRetryRegistry(Map<String, RetryConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers) -
InMemoryRetryRegistry
-
InMemoryRetryRegistry
-
InMemoryRetryRegistry
The constructor with custom default config.- Parameters:
defaultConfig
- The default config.
-
InMemoryRetryRegistry
-
InMemoryRetryRegistry
public InMemoryRetryRegistry(RetryConfig defaultConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer) -
InMemoryRetryRegistry
public InMemoryRetryRegistry(RetryConfig defaultConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer, Map<String, String> tags) -
InMemoryRetryRegistry
public InMemoryRetryRegistry(RetryConfig defaultConfig, List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers) -
InMemoryRetryRegistry
-
-
Method Details
-
getAllRetries
Returns all managedRetry
instances.- Specified by:
getAllRetries
in interfaceRetryRegistry
- Returns:
- all managed
Retry
instances.
-
retry
Returns a managedRetry
or creates a new one with the default Retry configuration.- Specified by:
retry
in interfaceRetryRegistry
- Parameters:
name
- the name of the Retry- Returns:
- The
Retry
-
retry
Returns a managedRetry
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.- Specified by:
retry
in interfaceRetryRegistry
- Parameters:
name
- the name of the Retrytags
- tags added to the Retry- Returns:
- The
Retry
-
retry
Returns a managedRetry
or creates a new one with a custom Retry configuration.- Specified by:
retry
in interfaceRetryRegistry
- Parameters:
name
- the name of the Retryconfig
- a custom Retry configuration- Returns:
- The
Retry
-
retry
Description copied from interface:RetryRegistry
Returns a managedRetry
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.- Specified by:
retry
in interfaceRetryRegistry
- Parameters:
name
- the name of the Retryconfig
- a custom Retry configurationtags
- tags added to the Retry- Returns:
- The
Retry
-
retry
Returns a managedRetry
or creates a new one with a custom Retry configuration.- Specified by:
retry
in interfaceRetryRegistry
- Parameters:
name
- the name of the RetryretryConfigSupplier
- a supplier of a custom Retry configuration- Returns:
- The
Retry
-
retry
Description copied from interface:RetryRegistry
Returns a managedRetry
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.- Specified by:
retry
in interfaceRetryRegistry
- 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 managedRetry
or creates a new one. The configuration must have been added upfront viaRegistry.addConfiguration(String, Object)
.- Specified by:
retry
in interfaceRetryRegistry
- Parameters:
name
- the name of the RetryconfigName
- the name of the shared configuration- Returns:
- The
Retry
-
retry
Description copied from interface:RetryRegistry
Returns a managedRetry
or creates a new one. The configuration must have been added upfront viaRegistry.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.- Specified by:
retry
in interfaceRetryRegistry
- Parameters:
name
- the name of the RetryconfigName
- the name of the shared configurationtags
- tags added to the Retry- Returns:
- The
Retry
-