Class RetryRegistry.Builder

  • Enclosing interface:
    RetryRegistry

    public static class RetryRegistry.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • withRegistryStore

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

        public RetryRegistry.Builder addRetryConfig​(java.lang.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:
        java.lang.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​(io.vavr.collection.Map<java.lang.String,​java.lang.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