Interface BulkheadRegistry
- All Superinterfaces:
io.github.resilience4j.core.Registry<Bulkhead,BulkheadConfig>
- All Known Implementing Classes:
InMemoryBulkheadRegistry
BulkheadRegistry is a factory to create Bulkhead instances which stores all bulkhead
instances in a registry.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.github.resilience4j.core.Registry
io.github.resilience4j.core.Registry.EventPublisher<E extends Object> -
Method Summary
Modifier and TypeMethodDescriptionReturns a managedBulkheador creates a new one with default configuration.bulkhead(String name, BulkheadConfig config) Returns a managedBulkheador creates a new one with a custom BulkheadConfig configuration.Returns a managedBulkheador creates a new one with a custom BulkheadConfig configuration.Returns a managedBulkheador creates a new one.Returns a managedBulkheador creates a new one.bulkhead(String name, Supplier<BulkheadConfig> bulkheadConfigSupplier) Returns a managedBulkheador creates a new one with a custom Bulkhead configuration.Returns a managedBulkheador creates a new one with a custom Bulkhead configuration.Returns a managedBulkheador creates a new one with default configuration.static BulkheadRegistry.Buildercustom()Returns a builder to create a custom BulkheadRegistry.Returns all managedBulkheadinstances.static BulkheadRegistryof(BulkheadConfig bulkheadConfig) Creates a BulkheadRegistry with a custom Bulkhead configuration.static BulkheadRegistryof(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 BulkheadRegistryof(BulkheadConfig bulkheadConfig, 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 BulkheadRegistryof(BulkheadConfig bulkheadConfig, Map<String, String> tags) Creates a BulkheadRegistry with a custom Bulkhead configuration.static BulkheadRegistryof(Map<String, BulkheadConfig> configs) Creates a BulkheadRegistry with a Map of shared Bulkhead configurations.static BulkheadRegistryof(Map<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 BulkheadRegistryof(Map<String, BulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer, Map<String, String> tags) Creates a BulkheadRegistry with a Map of shared Bulkhead configurations and a Bulkhead registry event consumer.static BulkheadRegistryof(Map<String, BulkheadConfig> configs, 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 BulkheadRegistryCreates a BulkheadRegistry with a Map of shared Bulkhead configurations.static BulkheadRegistryCreates a BulkheadRegistry with a default Bulkhead configurationMethods inherited from interface io.github.resilience4j.core.Registry
addConfiguration, find, getConfiguration, getDefaultConfig, getEventPublisher, getTags, remove, removeConfiguration, replace
-
Method Details
-
of
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
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 configurationtags- 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, 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
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
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 configurationstags- default tags to add to the registry- Returns:
- a RetryRegistry with a Map of shared Bulkhead configurations.
-
of
static BulkheadRegistry of(Map<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(Map<String, BulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<Bulkhead> registryEventConsumer, Map<String, 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(Map<String, BulkheadConfig> configs, 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
Creates a BulkheadRegistry with a default Bulkhead configuration- Returns:
- a BulkheadRegistry instance backed by a default Bulkhead configuration
-
getAllBulkheads
Returns all managedBulkheadinstances.- Returns:
- all managed
Bulkheadinstances.
-
bulkhead
Returns a managedBulkheador creates a new one with default configuration.- Parameters:
name- the name of the Bulkhead- Returns:
- The
Bulkhead
-
bulkhead
Returns a managedBulkheador creates a new one with default 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 Bulkheadtags- tags to add to the bulkhead- Returns:
- The
Bulkhead
-
bulkhead
Returns a managedBulkheador creates a new one with a custom BulkheadConfig configuration.- Parameters:
name- the name of the Bulkheadconfig- a custom Bulkhead configuration- Returns:
- The
Bulkhead
-
bulkhead
Returns a managedBulkheador creates a new one with a custom BulkheadConfig 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 Bulkheadconfig- a custom Bulkhead configurationtags- tags added to the bulkhead- Returns:
- The
Bulkhead
-
bulkhead
Returns a managedBulkheador creates a new one with a custom Bulkhead configuration.- Parameters:
name- the name of the BulkheadbulkheadConfigSupplier- a custom Bulkhead configuration supplier- Returns:
- The
Bulkhead
-
bulkhead
Bulkhead bulkhead(String name, Supplier<BulkheadConfig> bulkheadConfigSupplier, Map<String, String> tags) Returns a managedBulkheador creates a new one with a custom Bulkhead 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 BulkheadbulkheadConfigSupplier- a custom Bulkhead configuration suppliertags- tags to add to the Bulkhead- Returns:
- The
Bulkhead
-
bulkhead
Returns a managedBulkheador creates a new one. The configuration must have been added upfront viaRegistry.addConfiguration(String, Object).- Parameters:
name- the name of the BulkheadconfigName- the name of the shared configuration- Returns:
- The
Bulkhead
-
bulkhead
Returns a managedBulkheador 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 BulkheadconfigName- the name of the shared configurationtags- tags to add to the Bulkhead- Returns:
- The
Bulkhead
-
custom
Returns a builder to create a custom BulkheadRegistry.- Returns:
- a
BulkheadRegistry.Builder
-