Package io.github.resilience4j.core
Interface Registry<E,C>
- All Known Implementing Classes:
AbstractRegistry
public interface Registry<E,C>
root resilience4j registry to be used by resilience types registries for common functionality
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn EventPublisher can be used to register event consumers. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConfiguration(String configName, C configuration) Adds a configuration to the registryFind a named entry in the RegistrygetConfiguration(String configName) Get a configuration by nameGet the default configurationReturns an EventPublisher which can be used to register event consumers.getTags()Remove an entry from the RegistryReplace an existing entry in the Registry by a new one.
-
Method Details
-
addConfiguration
Adds a configuration to the registry- Parameters:
configName- the configuration nameconfiguration- the added configuration
-
find
Find a named entry in the Registry- Parameters:
name- the name
-
remove
Remove an entry from the Registry- Parameters:
name- the name
-
replace
Replace an existing entry in the Registry by a new one.- Parameters:
name- the existing namenewEntry- a new entry
-
getConfiguration
Get a configuration by name- Parameters:
configName- the configuration name- Returns:
- the found configuration if any
-
getDefaultConfig
C getDefaultConfig()Get the default configuration- Returns:
- the default configuration
-
getTags
- Returns:
- global configured registry tags
-
getEventPublisher
Registry.EventPublisher<E> getEventPublisher()Returns an EventPublisher which can be used to register event consumers.- Returns:
- an EventPublisher
-