Interface BulkheadRegistry

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  BulkheadRegistry.Builder  
      • Nested classes/interfaces inherited from interface io.github.resilience4j.core.Registry

        io.github.resilience4j.core.Registry.EventPublisher<E extends java.lang.Object>
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Bulkhead bulkhead​(java.lang.String name)
      Returns a managed Bulkhead or creates a new one with default configuration.
      Bulkhead bulkhead​(java.lang.String name, BulkheadConfig config)
      Returns a managed Bulkhead or creates a new one with a custom BulkheadConfig configuration.
      Bulkhead bulkhead​(java.lang.String name, BulkheadConfig config, io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      Returns a managed Bulkhead or creates a new one with a custom BulkheadConfig configuration.
      Bulkhead bulkhead​(java.lang.String name, io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      Returns a managed Bulkhead or creates a new one with default configuration.
      Bulkhead bulkhead​(java.lang.String name, java.lang.String configName)
      Returns a managed Bulkhead or creates a new one.
      Bulkhead bulkhead​(java.lang.String name, java.lang.String configName, io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      Returns a managed Bulkhead or creates a new one.
      Bulkhead bulkhead​(java.lang.String name, java.util.function.Supplier<BulkheadConfig> bulkheadConfigSupplier)
      Returns a managed Bulkhead or creates a new one with a custom Bulkhead configuration.
      Bulkhead bulkhead​(java.lang.String name, java.util.function.Supplier<BulkheadConfig> bulkheadConfigSupplier, io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      Returns a managed Bulkhead or creates a new one with a custom Bulkhead configuration.
      static BulkheadRegistry.Builder custom()
      Returns a builder to create a custom BulkheadRegistry.
      io.vavr.collection.Seq<Bulkhead> getAllBulkheads()
      Returns all managed Bulkhead instances.
      static BulkheadRegistry of​(BulkheadConfig bulkheadConfig)
      Creates a BulkheadRegistry with a custom Bulkhead configuration.
      static BulkheadRegistry of​(BulkheadConfig bulkheadConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer)
      Creates a BulkheadRegistry with a custom default Bulkhead configuration and a Bulkhead registry event consumer.
      static BulkheadRegistry of​(BulkheadConfig bulkheadConfig, io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      Creates a BulkheadRegistry with a custom Bulkhead configuration.
      static BulkheadRegistry of​(BulkheadConfig bulkheadConfig, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead>> registryEventConsumers)
      Creates a BulkheadRegistry with a custom default Bulkhead configuration and a list of Bulkhead registry event consumers.
      static BulkheadRegistry of​(java.util.Map<java.lang.String,​BulkheadConfig> configs)
      Creates a BulkheadRegistry with a Map of shared Bulkhead configurations.
      static BulkheadRegistry of​(java.util.Map<java.lang.String,​BulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer)
      Creates a BulkheadRegistry with a Map of shared Bulkhead configurations and a Bulkhead registry event consumer.
      static BulkheadRegistry of​(java.util.Map<java.lang.String,​BulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer, io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      Creates a BulkheadRegistry with a Map of shared Bulkhead configurations and a Bulkhead registry event consumer.
      static BulkheadRegistry of​(java.util.Map<java.lang.String,​BulkheadConfig> configs, io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      Creates a BulkheadRegistry with a Map of shared Bulkhead configurations.
      static BulkheadRegistry of​(java.util.Map<java.lang.String,​BulkheadConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead>> registryEventConsumers)
      Creates a BulkheadRegistry with a Map of shared Bulkhead configurations and a list of Bulkhead registry event consumers.
      static BulkheadRegistry ofDefaults()
      Creates a BulkheadRegistry with a default Bulkhead configuration
      • Methods inherited from interface io.github.resilience4j.core.Registry

        addConfiguration, find, getConfiguration, getDefaultConfig, getEventPublisher, getTags, remove, replace
    • Method Detail

      • of

        static BulkheadRegistry of​(BulkheadConfig bulkheadConfig)
        Creates a BulkheadRegistry with a custom Bulkhead configuration.
        Parameters:
        bulkheadConfig - a custom Bulkhead configuration
        Returns:
        a BulkheadRegistry instance backed by a custom Bulkhead configuration
      • of

        static BulkheadRegistry of​(BulkheadConfig bulkheadConfig,
                                   io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
        Creates a BulkheadRegistry with a custom Bulkhead configuration.

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

        Parameters:
        bulkheadConfig - a custom Bulkhead configuration
        tags - default tags to add to the registry
        Returns:
        a BulkheadRegistry instance backed by a custom Bulkhead configuration
      • of

        static BulkheadRegistry of​(BulkheadConfig bulkheadConfig,
                                   io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer)
        Creates a BulkheadRegistry with a custom default Bulkhead configuration and a Bulkhead registry event consumer.
        Parameters:
        bulkheadConfig - a custom default Bulkhead configuration.
        registryEventConsumer - a Bulkhead registry event consumer.
        Returns:
        a BulkheadRegistry with a custom Bulkhead configuration and a Bulkhead registry event consumer.
      • of

        static BulkheadRegistry of​(BulkheadConfig bulkheadConfig,
                                   java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead>> registryEventConsumers)
        Creates a BulkheadRegistry with a custom default Bulkhead configuration and a list of Bulkhead registry event consumers.
        Parameters:
        bulkheadConfig - a custom default Bulkhead configuration.
        registryEventConsumers - a list of Bulkhead registry event consumers.
        Returns:
        a BulkheadRegistry with a custom Bulkhead configuration and a list of Bulkhead registry event consumers.
      • of

        static BulkheadRegistry of​(java.util.Map<java.lang.String,​BulkheadConfig> configs)
        Creates a BulkheadRegistry with a Map of shared Bulkhead configurations.
        Parameters:
        configs - a Map of shared Bulkhead configurations
        Returns:
        a RetryRegistry with a Map of shared Bulkhead configurations.
      • of

        static BulkheadRegistry of​(java.util.Map<java.lang.String,​BulkheadConfig> configs,
                                   io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
        Creates a BulkheadRegistry with a Map of shared Bulkhead configurations.

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

        Parameters:
        configs - a Map of shared Bulkhead configurations
        tags - default tags to add to the registry
        Returns:
        a RetryRegistry with a Map of shared Bulkhead configurations.
      • of

        static BulkheadRegistry of​(java.util.Map<java.lang.String,​BulkheadConfig> configs,
                                   io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer)
        Creates a BulkheadRegistry with a Map of shared Bulkhead configurations and a Bulkhead registry event consumer.
        Parameters:
        configs - a Map of shared Bulkhead configurations.
        registryEventConsumer - a Bulkhead registry event consumer.
        Returns:
        a BulkheadRegistry with a Map of shared Bulkhead configurations and a Bulkhead registry event consumer.
      • of

        static BulkheadRegistry of​(java.util.Map<java.lang.String,​BulkheadConfig> configs,
                                   io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer,
                                   io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
        Creates a BulkheadRegistry with a Map of shared Bulkhead configurations and a Bulkhead registry event consumer.
        Parameters:
        configs - a Map of shared Bulkhead configurations.
        registryEventConsumer - a Bulkhead registry event consumer.
        tags - default tags to add to the registry
        Returns:
        a BulkheadRegistry with a Map of shared Bulkhead configurations and a Bulkhead registry event consumer.
      • of

        static BulkheadRegistry of​(java.util.Map<java.lang.String,​BulkheadConfig> configs,
                                   java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead>> registryEventConsumers)
        Creates a BulkheadRegistry with a Map of shared Bulkhead configurations and a list of Bulkhead registry event consumers.
        Parameters:
        configs - a Map of shared Bulkhead configurations.
        registryEventConsumers - a list of Bulkhead registry event consumers.
        Returns:
        a BulkheadRegistry with a Map of shared Bulkhead configurations and a list of Bulkhead registry event consumers.
      • ofDefaults

        static BulkheadRegistry ofDefaults()
        Creates a BulkheadRegistry with a default Bulkhead configuration
        Returns:
        a BulkheadRegistry instance backed by a default Bulkhead configuration
      • getAllBulkheads

        io.vavr.collection.Seq<Bulkhead> getAllBulkheads()
        Returns all managed Bulkhead instances.
        Returns:
        all managed Bulkhead instances.
      • bulkhead

        Bulkhead bulkhead​(java.lang.String name)
        Returns a managed Bulkhead or creates a new one with default configuration.
        Parameters:
        name - the name of the Bulkhead
        Returns:
        The Bulkhead
      • bulkhead

        Bulkhead bulkhead​(java.lang.String name,
                          io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
        Returns a managed Bulkhead or creates a new one with default configuration.

        The tags passed 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.

        Parameters:
        name - the name of the Bulkhead
        tags - tags to add to the bulkhead
        Returns:
        The Bulkhead
      • bulkhead

        Bulkhead bulkhead​(java.lang.String name,
                          BulkheadConfig config)
        Returns a managed Bulkhead or creates a new one with a custom BulkheadConfig configuration.
        Parameters:
        name - the name of the Bulkhead
        config - a custom Bulkhead configuration
        Returns:
        The Bulkhead
      • bulkhead

        Bulkhead bulkhead​(java.lang.String name,
                          BulkheadConfig config,
                          io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
        Returns a managed Bulkhead or creates a new one with a custom BulkheadConfig configuration.

        The tags passed 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.

        Parameters:
        name - the name of the Bulkhead
        config - a custom Bulkhead configuration
        tags - tags added to the bulkhead
        Returns:
        The Bulkhead
      • bulkhead

        Bulkhead bulkhead​(java.lang.String name,
                          java.util.function.Supplier<BulkheadConfig> bulkheadConfigSupplier)
        Returns a managed Bulkhead or creates a new one with a custom Bulkhead configuration.
        Parameters:
        name - the name of the Bulkhead
        bulkheadConfigSupplier - a custom Bulkhead configuration supplier
        Returns:
        The Bulkhead
      • bulkhead

        Bulkhead bulkhead​(java.lang.String name,
                          java.util.function.Supplier<BulkheadConfig> bulkheadConfigSupplier,
                          io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
        Returns a managed Bulkhead or creates a new one with a custom Bulkhead configuration.

        The tags passed 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.

        Parameters:
        name - the name of the Bulkhead
        bulkheadConfigSupplier - a custom Bulkhead configuration supplier
        tags - tags to add to the Bulkhead
        Returns:
        The Bulkhead
      • bulkhead

        Bulkhead bulkhead​(java.lang.String name,
                          java.lang.String configName)
        Returns a managed Bulkhead or creates a new one. The configuration must have been added upfront via Registry.addConfiguration(String, Object).
        Parameters:
        name - the name of the Bulkhead
        configName - the name of the shared configuration
        Returns:
        The Bulkhead
      • bulkhead

        Bulkhead bulkhead​(java.lang.String name,
                          java.lang.String configName,
                          io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
        Returns a managed Bulkhead or creates a new one. The configuration must have been added upfront via Registry.addConfiguration(String, Object).

        The tags passed 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.

        Parameters:
        name - the name of the Bulkhead
        configName - the name of the shared configuration
        tags - tags to add to the Bulkhead
        Returns:
        The Bulkhead