Interface ThreadPoolBulkheadRegistry
- All Superinterfaces:
java.lang.AutoCloseable,io.github.resilience4j.core.Registry<ThreadPoolBulkhead,ThreadPoolBulkheadConfig>
- All Known Implementing Classes:
InMemoryThreadPoolBulkheadRegistry
public interface ThreadPoolBulkheadRegistry extends io.github.resilience4j.core.Registry<ThreadPoolBulkhead,ThreadPoolBulkheadConfig>, java.lang.AutoCloseable
ThreadPoolBulkheadRegistry is a factory to create ThreadPoolBulkhead instances which
stores all bulkhead instances in a registry.-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classThreadPoolBulkheadRegistry.Builder -
Method Summary
Modifier and Type Method Description ThreadPoolBulkheadbulkhead(java.lang.String name)Returns a managedThreadPoolBulkheador creates a new one with default configuration.ThreadPoolBulkheadbulkhead(java.lang.String name, ThreadPoolBulkheadConfig config)Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.ThreadPoolBulkheadbulkhead(java.lang.String name, ThreadPoolBulkheadConfig config, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.ThreadPoolBulkheadbulkhead(java.lang.String name, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Returns a managedThreadPoolBulkheador creates a new one with default configuration.ThreadPoolBulkheadbulkhead(java.lang.String name, java.lang.String configName)Returns a managedThreadPoolBulkheador creates a new one.ThreadPoolBulkheadbulkhead(java.lang.String name, java.lang.String configName, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Returns a managedThreadPoolBulkheador creates a new one.ThreadPoolBulkheadbulkhead(java.lang.String name, java.util.function.Supplier<ThreadPoolBulkheadConfig> bulkheadConfigSupplier)Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.ThreadPoolBulkheadbulkhead(java.lang.String name, java.util.function.Supplier<ThreadPoolBulkheadConfig> bulkheadConfigSupplier, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.static ThreadPoolBulkheadRegistry.Buildercustom()Returns a builder to create a custom ThreadPoolBulkheadRegistry.io.vavr.collection.Seq<ThreadPoolBulkhead>getAllBulkheads()Returns all managedThreadPoolBulkheadinstances.static ThreadPoolBulkheadRegistryof(ThreadPoolBulkheadConfig bulkheadConfig)Creates a BulkheadRegistry with a custom Bulkhead configuration.static ThreadPoolBulkheadRegistryof(ThreadPoolBulkheadConfig bulkheadConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer)Creates a ThreadPoolBulkheadRegistry with a custom default ThreadPoolBulkhead configuration and a ThreadPoolBulkhead registry event consumer.static ThreadPoolBulkheadRegistryof(ThreadPoolBulkheadConfig bulkheadConfig, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers)Creates a ThreadPoolBulkheadRegistry with a custom default ThreadPoolBulkhead configuration and a list of ThreadPoolBulkhead registry event consumers.static ThreadPoolBulkheadRegistryof(java.util.Map<java.lang.String,ThreadPoolBulkheadConfig> configs)Creates a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations.static ThreadPoolBulkheadRegistryof(java.util.Map<java.lang.String,ThreadPoolBulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer)Creates a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations and a ThreadPoolBulkhead registry event consumer.static ThreadPoolBulkheadRegistryof(java.util.Map<java.lang.String,ThreadPoolBulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Creates a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations and a ThreadPoolBulkhead registry event consumer.static ThreadPoolBulkheadRegistryof(java.util.Map<java.lang.String,ThreadPoolBulkheadConfig> configs, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Creates a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations.static ThreadPoolBulkheadRegistryof(java.util.Map<java.lang.String,ThreadPoolBulkheadConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers)Creates a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations and a list of ThreadPoolBulkhead registry event consumers.static ThreadPoolBulkheadRegistryof(java.util.Map<java.lang.String,ThreadPoolBulkheadConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Creates a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations and a list of ThreadPoolBulkhead registry event consumers.static ThreadPoolBulkheadRegistryofDefaults()Creates a ThreadPoolBulkheadRegistry with a default ThreadPoolBulkhead configurationstatic ThreadPoolBulkheadRegistryofDefaults(io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Creates a ThreadPoolBulkheadRegistry with a default ThreadPoolBulkhead configuration
-
Method Details
-
of
Creates a BulkheadRegistry with a custom Bulkhead configuration.- Parameters:
bulkheadConfig- a custom ThreadPoolBulkhead configuration- Returns:
- a ThreadPoolBulkheadRegistry instance backed by a custom ThreadPoolBulkhead configuration
-
of
static ThreadPoolBulkheadRegistry of(ThreadPoolBulkheadConfig bulkheadConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer)Creates a ThreadPoolBulkheadRegistry with a custom default ThreadPoolBulkhead configuration and a ThreadPoolBulkhead registry event consumer.- Parameters:
bulkheadConfig- a custom default ThreadPoolBulkhead configuration.registryEventConsumer- a ThreadPoolBulkhead registry event consumer.- Returns:
- a ThreadPoolBulkheadRegistry with a custom ThreadPoolBulkhead configuration and a ThreadPoolBulkhead registry event consumer.
-
of
static ThreadPoolBulkheadRegistry of(ThreadPoolBulkheadConfig bulkheadConfig, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers)Creates a ThreadPoolBulkheadRegistry with a custom default ThreadPoolBulkhead configuration and a list of ThreadPoolBulkhead registry event consumers.- Parameters:
bulkheadConfig- a custom default ThreadPoolBulkhead configuration.registryEventConsumers- a list of ThreadPoolBulkhead registry event consumers.- Returns:
- a ThreadPoolBulkheadRegistry with a custom ThreadPoolBulkhead configuration and a list of ThreadPoolBulkhead registry event consumers.
-
ofDefaults
Creates a ThreadPoolBulkheadRegistry with a default ThreadPoolBulkhead configuration- Returns:
- a ThreadPoolBulkheadRegistry instance backed by a default ThreadPoolBulkhead configuration
-
ofDefaults
static ThreadPoolBulkheadRegistry ofDefaults(io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Creates a ThreadPoolBulkheadRegistry with a default ThreadPoolBulkhead configurationTags 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 ThreadPoolBulkheadRegistry instance backed by a default ThreadPoolBulkhead configuration
-
of
static ThreadPoolBulkheadRegistry of(java.util.Map<java.lang.String,ThreadPoolBulkheadConfig> configs)Creates a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations.- Parameters:
configs- a Map of shared Bulkhead configurations- Returns:
- a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations.
-
of
static ThreadPoolBulkheadRegistry of(java.util.Map<java.lang.String,ThreadPoolBulkheadConfig> configs, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Creates a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations.Tags added to the registry will be added to every instance created by this registry.
- Parameters:
configs- a Map of shared Bulkhead configurationstags- default tags to add to the registry- Returns:
- a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations.
-
of
static ThreadPoolBulkheadRegistry of(java.util.Map<java.lang.String,ThreadPoolBulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer)Creates a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations and a ThreadPoolBulkhead registry event consumer.- Parameters:
configs- a Map of shared ThreadPoolBulkhead configurations.registryEventConsumer- a ThreadPoolBulkhead registry event consumer.- Returns:
- a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations and a ThreadPoolBulkhead registry event consumer.
-
of
static ThreadPoolBulkheadRegistry of(java.util.Map<java.lang.String,ThreadPoolBulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Creates a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations and a ThreadPoolBulkhead registry event consumer.Tags added to the registry will be added to every instance created by this registry.
- Parameters:
configs- a Map of shared ThreadPoolBulkhead configurations.registryEventConsumer- a ThreadPoolBulkhead registry event consumer.tags- default tags to add to the registry- Returns:
- a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations and a ThreadPoolBulkhead registry event consumer.
-
of
static ThreadPoolBulkheadRegistry of(java.util.Map<java.lang.String,ThreadPoolBulkheadConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers)Creates a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations and a list of ThreadPoolBulkhead registry event consumers.- Parameters:
configs- a Map of shared ThreadPoolBulkhead configurations.registryEventConsumers- a list of ThreadPoolBulkhead registry event consumers.- Returns:
- a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations and a list of ThreadPoolBulkhead registry event consumers.
-
of
static ThreadPoolBulkheadRegistry of(java.util.Map<java.lang.String,ThreadPoolBulkheadConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Creates a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations and a list of ThreadPoolBulkhead registry event consumers.Tags added to the registry will be added to every instance created by this registry.
- Parameters:
configs- a Map of shared ThreadPoolBulkhead configurations.registryEventConsumers- a list of ThreadPoolBulkhead registry event consumers.tags- Tags to add to the ThreadPoolBulkhead- Returns:
- a ThreadPoolBulkheadRegistry with a Map of shared ThreadPoolBulkhead configurations and a list of ThreadPoolBulkhead registry event consumers.
-
getAllBulkheads
io.vavr.collection.Seq<ThreadPoolBulkhead> getAllBulkheads()Returns all managedThreadPoolBulkheadinstances.- Returns:
- all managed
ThreadPoolBulkheadinstances.
-
bulkhead
Returns a managedThreadPoolBulkheador creates a new one with default configuration.- Parameters:
name- the name of the ThreadPoolBulkhead- Returns:
- The
ThreadPoolBulkhead
-
bulkhead
ThreadPoolBulkhead bulkhead(java.lang.String name, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Returns a managedThreadPoolBulkheador creates a new one with default configuration.- Parameters:
name- the name of the ThreadPoolBulkheadtags- Tags to add to the ThreadPoolBulkhead- Returns:
- The
ThreadPoolBulkhead
-
bulkhead
Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.- Parameters:
name- the name of the ThreadPoolBulkheadconfig- a custom ThreadPoolBulkheadConfig configuration- Returns:
- The
ThreadPoolBulkhead
-
bulkhead
ThreadPoolBulkhead bulkhead(java.lang.String name, ThreadPoolBulkheadConfig config, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.The
tagspassed 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 ThreadPoolBulkheadconfig- a custom ThreadPoolBulkheadConfig configurationtags- tags to add to the ThreadPoolBulkhead- Returns:
- The
ThreadPoolBulkhead
-
bulkhead
ThreadPoolBulkhead bulkhead(java.lang.String name, java.util.function.Supplier<ThreadPoolBulkheadConfig> bulkheadConfigSupplier)Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.- Parameters:
name- the name of the ThreadPoolBulkheadbulkheadConfigSupplier- a custom ThreadPoolBulkhead configuration supplier- Returns:
- The
ThreadPoolBulkhead
-
bulkhead
ThreadPoolBulkhead bulkhead(java.lang.String name, java.util.function.Supplier<ThreadPoolBulkheadConfig> bulkheadConfigSupplier, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.The
tagspassed 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 ThreadPoolBulkheadbulkheadConfigSupplier- a custom ThreadPoolBulkhead configuration suppliertags- tags to add to the ThreadPoolBulkhead- Returns:
- The
ThreadPoolBulkhead
-
bulkhead
Returns a managedThreadPoolBulkheador creates a new one. The configuration must have been added upfront viaRegistry.addConfiguration(String, Object).- Parameters:
name- the name of the ThreadPoolBulkheadconfigName- the name of the shared configuration- Returns:
- The
ThreadPoolBulkhead
-
bulkhead
ThreadPoolBulkhead bulkhead(java.lang.String name, java.lang.String configName, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)Returns a managedThreadPoolBulkheador creates a new one. The configuration must have been added upfront viaRegistry.addConfiguration(String, Object).The
tagspassed 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 ThreadPoolBulkheadconfigName- the name of the shared configurationtags- tags to add to the ThreadPoolBulkhead- Returns:
- The
ThreadPoolBulkhead
-
custom
Returns a builder to create a custom ThreadPoolBulkheadRegistry.- Returns:
- a
ThreadPoolBulkheadRegistry.Builder
-