public interface BulkheadRegistry extends io.github.resilience4j.core.Registry<Bulkhead,BulkheadConfig>
BulkheadRegistry is a factory to create Bulkhead instances which stores all bulkhead
instances in a registry.| Modifier and Type | Interface and Description |
|---|---|
static class |
BulkheadRegistry.Builder |
| Modifier and Type | Method and 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,
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(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,
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(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,
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 |
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,
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 |
ofDefaults()
Creates a BulkheadRegistry with a default Bulkhead configuration
|
static BulkheadRegistry of(BulkheadConfig bulkheadConfig)
bulkheadConfig - a custom Bulkhead configurationstatic BulkheadRegistry of(BulkheadConfig bulkheadConfig, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Tags added to the registry will be added to every instance created by this registry.
bulkheadConfig - a custom Bulkhead configurationtags - default tags to add to the registrystatic BulkheadRegistry of(BulkheadConfig bulkheadConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer)
bulkheadConfig - a custom default Bulkhead configuration.registryEventConsumer - a Bulkhead registry event consumer.static BulkheadRegistry of(BulkheadConfig bulkheadConfig, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead>> registryEventConsumers)
bulkheadConfig - a custom default Bulkhead configuration.registryEventConsumers - a list of Bulkhead registry event consumers.static BulkheadRegistry of(java.util.Map<java.lang.String,BulkheadConfig> configs)
configs - a Map of shared Bulkhead configurationsstatic BulkheadRegistry of(java.util.Map<java.lang.String,BulkheadConfig> configs, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Tags added to the registry will be added to every instance created by this registry.
configs - a Map of shared Bulkhead configurationstags - default tags to add to the registrystatic BulkheadRegistry of(java.util.Map<java.lang.String,BulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer)
configs - a Map of shared Bulkhead configurations.registryEventConsumer - 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)
configs - a Map of shared Bulkhead configurations.registryEventConsumer - a Bulkhead registry event consumer.tags - default tags to add to the registrystatic BulkheadRegistry of(java.util.Map<java.lang.String,BulkheadConfig> configs, java.util.List<io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead>> registryEventConsumers)
configs - a Map of shared Bulkhead configurations.registryEventConsumers - a list of Bulkhead registry event consumers.static BulkheadRegistry ofDefaults()
io.vavr.collection.Seq<Bulkhead> getAllBulkheads()
Bulkhead instances.Bulkhead instances.Bulkhead bulkhead(java.lang.String name)
Bulkhead or creates a new one with default configuration.name - the name of the BulkheadBulkheadBulkhead bulkhead(java.lang.String name, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
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.
name - the name of the Bulkheadtags - tags to add to the bulkheadBulkheadBulkhead bulkhead(java.lang.String name, BulkheadConfig config)
Bulkhead or creates a new one with a custom BulkheadConfig
configuration.name - the name of the Bulkheadconfig - a custom Bulkhead configurationBulkheadBulkhead bulkhead(java.lang.String name, BulkheadConfig config, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
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.
name - the name of the Bulkheadconfig - a custom Bulkhead configurationtags - tags added to the bulkheadBulkheadBulkhead bulkhead(java.lang.String name, java.util.function.Supplier<BulkheadConfig> bulkheadConfigSupplier)
Bulkhead or creates a new one with a custom Bulkhead
configuration.name - the name of the BulkheadbulkheadConfigSupplier - a custom Bulkhead configuration supplierBulkheadBulkhead bulkhead(java.lang.String name, java.util.function.Supplier<BulkheadConfig> bulkheadConfigSupplier, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
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.
name - the name of the BulkheadbulkheadConfigSupplier - a custom Bulkhead configuration suppliertags - tags to add to the BulkheadBulkheadBulkhead bulkhead(java.lang.String name, java.lang.String configName)
Bulkhead or creates a new one.
The configuration must have been added upfront via Registry.addConfiguration(String, Object).name - the name of the BulkheadconfigName - the name of the shared configurationBulkheadBulkhead bulkhead(java.lang.String name, java.lang.String configName, io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
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.
name - the name of the BulkheadconfigName - the name of the shared configurationtags - tags to add to the BulkheadBulkheadstatic BulkheadRegistry.Builder custom()
BulkheadRegistry.Builder