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
  • Method Details

    • addConfiguration

      void addConfiguration(String configName, C configuration)
      Adds a configuration to the registry
      Parameters:
      configName - the configuration name
      configuration - the added configuration
    • find

      Optional<E> find(String name)
      Find a named entry in the Registry
      Parameters:
      name - the name
    • remove

      Optional<E> remove(String name)
      Remove an entry from the Registry
      Parameters:
      name - the name
    • replace

      Optional<E> replace(String name, E newEntry)
      Replace an existing entry in the Registry by a new one.
      Parameters:
      name - the existing name
      newEntry - a new entry
    • getConfiguration

      Optional<C> getConfiguration(String configName)
      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

      Map<String,String> 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