Class InMemoryRetryRegistry
- All Implemented Interfaces:
io.github.resilience4j.core.Registry<Retry,RetryConfig>,RetryRegistry
public final class InMemoryRetryRegistry extends io.github.resilience4j.core.registry.AbstractRegistry<Retry,RetryConfig> implements RetryRegistry
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.resilience4j.core.Registry
io.github.resilience4j.core.Registry.EventPublisher<E extends java.lang.Object>Nested classes/interfaces inherited from interface io.github.resilience4j.retry.RetryRegistry
RetryRegistry.Builder -
Field Summary
-
Constructor Summary
Constructors Constructor Description InMemoryRetryRegistry()The 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, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)InMemoryRetryRegistry(RetryConfig defaultConfig, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)InMemoryRetryRegistry(RetryConfig defaultConfig, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers)InMemoryRetryRegistry(RetryConfig defaultConfig, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)InMemoryRetryRegistry(io.vavr.collection.Map<java.lang.String,java.lang.String> tags)InMemoryRetryRegistry(java.util.Map<java.lang.String,RetryConfig> configs)InMemoryRetryRegistry(java.util.Map<java.lang.String,RetryConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer)InMemoryRetryRegistry(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)InMemoryRetryRegistry(java.util.Map<java.lang.String,RetryConfig> configs, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)InMemoryRetryRegistry(java.util.Map<java.lang.String,RetryConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers)InMemoryRetryRegistry(java.util.Map<java.lang.String,RetryConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)InMemoryRetryRegistry(java.util.Map<java.lang.String,RetryConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers, io.vavr.collection.Map<java.lang.String,java.lang.String> tags, io.github.resilience4j.core.RegistryStore<Retry> registryStore) -
Method Summary
Modifier and Type Method Description io.vavr.collection.Seq<Retry>getAllRetries()Returns all managedRetryinstances.Retryretry(java.lang.String name)Returns a managedRetryor creates a new one with the default Retry configuration.Retryretry(java.lang.String name, RetryConfig config)Returns a managedRetryor creates a new one with a custom Retry configuration.Retryretry(java.lang.String name, RetryConfig config, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Returns a managedRetryor creates a new one with a custom Retry configuration.Retryretry(java.lang.String name, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Returns a managedRetryor creates a new one with the default Retry configuration.Retryretry(java.lang.String name, java.lang.String configName)Returns a managedRetryor creates a new one.Retryretry(java.lang.String name, java.lang.String configName, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Returns a managedRetryor creates a new one.Retryretry(java.lang.String name, java.util.function.Supplier<RetryConfig> retryConfigSupplier)Returns a managedRetryor creates a new one with a custom Retry configuration.Retryretry(java.lang.String name, java.util.function.Supplier<RetryConfig> retryConfigSupplier, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Returns a managedRetryor creates a new one with a custom Retry configuration.Methods inherited from class io.github.resilience4j.core.registry.AbstractRegistry
addConfiguration, computeIfAbsent, find, getAllTags, getConfiguration, getDefaultConfig, getEventPublisher, getTags, remove, replace
-
Constructor Details
-
InMemoryRetryRegistry
public InMemoryRetryRegistry()The constructor with default default. -
InMemoryRetryRegistry
public InMemoryRetryRegistry(io.vavr.collection.Map<java.lang.String,java.lang.String> tags) -
InMemoryRetryRegistry
-
InMemoryRetryRegistry
public InMemoryRetryRegistry(java.util.Map<java.lang.String,RetryConfig> configs, io.vavr.collection.Map<java.lang.String,java.lang.String> tags) -
InMemoryRetryRegistry
public InMemoryRetryRegistry(java.util.Map<java.lang.String,RetryConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer) -
InMemoryRetryRegistry
public InMemoryRetryRegistry(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) -
InMemoryRetryRegistry
public InMemoryRetryRegistry(java.util.Map<java.lang.String,RetryConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers) -
InMemoryRetryRegistry
public InMemoryRetryRegistry(java.util.Map<java.lang.String,RetryConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers, io.vavr.collection.Map<java.lang.String,java.lang.String> tags) -
InMemoryRetryRegistry
public InMemoryRetryRegistry(java.util.Map<java.lang.String,RetryConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers, io.vavr.collection.Map<java.lang.String,java.lang.String> tags, io.github.resilience4j.core.RegistryStore<Retry> registryStore) -
InMemoryRetryRegistry
The constructor with custom default config.- Parameters:
defaultConfig- The default config.
-
InMemoryRetryRegistry
public InMemoryRetryRegistry(RetryConfig defaultConfig, io.vavr.collection.Map<java.lang.String,java.lang.String> tags) -
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, io.vavr.collection.Map<java.lang.String,java.lang.String> tags) -
InMemoryRetryRegistry
public InMemoryRetryRegistry(RetryConfig defaultConfig, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers) -
InMemoryRetryRegistry
public InMemoryRetryRegistry(RetryConfig defaultConfig, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Retry>> registryEventConsumers, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
-
-
Method Details
-
getAllRetries
Returns all managedRetryinstances.- Specified by:
getAllRetriesin interfaceRetryRegistry- Returns:
- all managed
Retryinstances.
-
retry
Returns a managedRetryor creates a new one with the default Retry configuration.- Specified by:
retryin interfaceRetryRegistry- Parameters:
name- the name of the Retry- Returns:
- The
Retry
-
retry
public Retry retry(java.lang.String name, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)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.- Specified by:
retryin interfaceRetryRegistry- 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.- Specified by:
retryin interfaceRetryRegistry- Parameters:
name- the name of the Retryconfig- a custom Retry configuration- Returns:
- The
Retry
-
retry
public Retry retry(java.lang.String name, RetryConfig config, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Description copied from interface:RetryRegistryReturns 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.- Specified by:
retryin interfaceRetryRegistry- Parameters:
name- the name of the Retryconfig- a custom Retry configurationtags- tags added to the Retry- Returns:
- The
Retry
-
retry
public Retry retry(java.lang.String name, java.util.function.Supplier<RetryConfig> retryConfigSupplier)Returns a managedRetryor creates a new one with a custom Retry configuration.- Specified by:
retryin interfaceRetryRegistry- Parameters:
name- the name of the RetryretryConfigSupplier- a supplier of a custom Retry configuration- Returns:
- The
Retry
-
retry
public Retry retry(java.lang.String name, java.util.function.Supplier<RetryConfig> retryConfigSupplier, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Description copied from interface:RetryRegistryReturns 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.- Specified by:
retryin 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 managedRetryor creates a new one. The configuration must have been added upfront viaRegistry.addConfiguration(String, Object).- Specified by:
retryin interfaceRetryRegistry- Parameters:
name- the name of the RetryconfigName- the name of the shared configuration- Returns:
- The
Retry
-
retry
public Retry retry(java.lang.String name, java.lang.String configName, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Description copied from interface:RetryRegistryReturns 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.- Specified by:
retryin interfaceRetryRegistry- Parameters:
name- the name of the RetryconfigName- the name of the shared configurationtags- tags added to the Retry- Returns:
- The
Retry
-