Class RetryRegistry.Builder

java.lang.Object
io.github.resilience4j.retry.RetryRegistry.Builder
Enclosing interface:
RetryRegistry

public static class RetryRegistry.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • withRegistryStore

      public RetryRegistry.Builder withRegistryStore(io.github.resilience4j.core.RegistryStore<Retry> registryStore)
    • withRetryConfig

      public RetryRegistry.Builder withRetryConfig(RetryConfig retryConfig)
      Configures a RetryRegistry with a custom default Retry configuration.
      Parameters:
      retryConfig - a custom default Retry configuration
      Returns:
      a RetryRegistry.Builder
    • addRetryConfig

      public RetryRegistry.Builder addRetryConfig(String configName, RetryConfig configuration)
      Configures a RetryRegistry with a custom Retry configuration.
      Parameters:
      configName - configName for a custom shared Retry configuration
      configuration - a custom shared Retry configuration
      Returns:
      a RetryRegistry.Builder
      Throws:
      IllegalArgumentException - if configName.equals("default")
    • addRegistryEventConsumer

      public RetryRegistry.Builder addRegistryEventConsumer(io.github.resilience4j.core.registry.RegistryEventConsumer<Retry> registryEventConsumer)
      Configures a RetryRegistry with a Retry registry event consumer.
      Parameters:
      registryEventConsumer - a Retry registry event consumer.
      Returns:
      a RetryRegistry.Builder
    • withTags

      public RetryRegistry.Builder withTags(Map<String,String> tags)
      Configures a RetryRegistry with Tags.

      Tags added to the registry will be added to every instance created by this registry.

      Parameters:
      tags - default tags to add to the registry.
      Returns:
      a RetryRegistry.Builder
    • build

      public RetryRegistry build()
      Builds a RetryRegistry
      Returns:
      the RetryRegistry