Class InMemoryBulkheadRegistry

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.github.resilience4j.core.Registry

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

      • Fields inherited from class io.github.resilience4j.core.registry.AbstractRegistry

        CONFIG_MUST_NOT_BE_NULL, configurations, CONSUMER_MUST_NOT_BE_NULL, DEFAULT_CONFIG, entryMap, registryTags, SUPPLIER_MUST_NOT_BE_NULL, TAGS_MUST_NOT_BE_NULL
    • Method Summary

      All Methods Instance Methods Concrete 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.
      io.vavr.collection.Seq<Bulkhead> getAllBulkheads()
      Returns all managed Bulkhead instances.
      • Methods inherited from class io.github.resilience4j.core.registry.AbstractRegistry

        addConfiguration, computeIfAbsent, find, getAllTags, getConfiguration, getDefaultConfig, getEventPublisher, getTags, remove, replace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.github.resilience4j.core.Registry

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

      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry()
        The constructor with default default.
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(java.util.Map<java.lang.String,​BulkheadConfig> configs)
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(java.util.Map<java.lang.String,​BulkheadConfig> configs,
                                        io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(java.util.Map<java.lang.String,​BulkheadConfig> configs,
                                        io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer)
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(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)
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(java.util.Map<java.lang.String,​BulkheadConfig> configs,
                                        java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead>> registryEventConsumers)
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(java.util.Map<java.lang.String,​BulkheadConfig> configs,
                                        java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead>> registryEventConsumers,
                                        io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(BulkheadConfig defaultConfig)
        The constructor with custom default config.
        Parameters:
        defaultConfig - The default config.
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(BulkheadConfig defaultConfig,
                                        io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(BulkheadConfig defaultConfig,
                                        java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead>> registryEventConsumers)
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(BulkheadConfig defaultConfig,
                                        java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead>> registryEventConsumers,
                                        io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(BulkheadConfig defaultConfig,
                                        io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer)
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(BulkheadConfig defaultConfig,
                                        io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer,
                                        io.vavr.collection.Map<java.lang.String,​java.lang.String> tags)
      • InMemoryBulkheadRegistry

        public InMemoryBulkheadRegistry​(java.util.Map<java.lang.String,​BulkheadConfig> configs,
                                        java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead>> registryEventConsumers,
                                        io.vavr.collection.Map<java.lang.String,​java.lang.String> tags,
                                        io.github.resilience4j.core.RegistryStore<Bulkhead> registryStore)
    • Method Detail

      • bulkhead

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

        public 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.

        Specified by:
        bulkhead in interface BulkheadRegistry
        Parameters:
        name - the name of the Bulkhead
        tags - tags to add to the bulkhead
        Returns:
        The Bulkhead
      • bulkhead

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

        public 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.

        Specified by:
        bulkhead in interface BulkheadRegistry
        Parameters:
        name - the name of the Bulkhead
        config - a custom Bulkhead configuration
        tags - tags added to the bulkhead
        Returns:
        The Bulkhead
      • bulkhead

        public 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.
        Specified by:
        bulkhead in interface BulkheadRegistry
        Parameters:
        name - the name of the Bulkhead
        bulkheadConfigSupplier - a custom Bulkhead configuration supplier
        Returns:
        The Bulkhead
      • bulkhead

        public 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.

        Specified by:
        bulkhead in interface BulkheadRegistry
        Parameters:
        name - the name of the Bulkhead
        bulkheadConfigSupplier - a custom Bulkhead configuration supplier
        tags - tags to add to the Bulkhead
        Returns:
        The Bulkhead
      • bulkhead

        public 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).
        Specified by:
        bulkhead in interface BulkheadRegistry
        Parameters:
        name - the name of the Bulkhead
        configName - the name of the shared configuration
        Returns:
        The Bulkhead
      • bulkhead

        public 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.

        Specified by:
        bulkhead in interface BulkheadRegistry
        Parameters:
        name - the name of the Bulkhead
        configName - the name of the shared configuration
        tags - tags to add to the Bulkhead
        Returns:
        The Bulkhead