Class InMemoryThreadPoolBulkheadRegistry
java.lang.Object
io.github.resilience4j.core.registry.AbstractRegistry<ThreadPoolBulkhead,ThreadPoolBulkheadConfig>
io.github.resilience4j.bulkhead.internal.InMemoryThreadPoolBulkheadRegistry
- All Implemented Interfaces:
ThreadPoolBulkheadRegistry,io.github.resilience4j.core.Registry<ThreadPoolBulkhead,,ThreadPoolBulkheadConfig> AutoCloseable
public final class InMemoryThreadPoolBulkheadRegistry
extends io.github.resilience4j.core.registry.AbstractRegistry<ThreadPoolBulkhead,ThreadPoolBulkheadConfig>
implements ThreadPoolBulkheadRegistry
Thread pool Bulkhead instance manager; Constructs/returns thread pool bulkhead instances.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.resilience4j.core.Registry
io.github.resilience4j.core.Registry.EventPublisher<E extends Object>Nested classes/interfaces inherited from interface io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry
ThreadPoolBulkheadRegistry.Builder -
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 -
Constructor Summary
ConstructorsConstructorDescriptionThe constructor with default configuration.InMemoryThreadPoolBulkheadRegistry(ThreadPoolBulkheadConfig defaultConfig) The constructor with custom default config.InMemoryThreadPoolBulkheadRegistry(ThreadPoolBulkheadConfig defaultConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer) InMemoryThreadPoolBulkheadRegistry(ThreadPoolBulkheadConfig defaultConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer, Map<String, String> tags) InMemoryThreadPoolBulkheadRegistry(ThreadPoolBulkheadConfig defaultConfig, List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers) InMemoryThreadPoolBulkheadRegistry(ThreadPoolBulkheadConfig defaultConfig, List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers, Map<String, String> tags) InMemoryThreadPoolBulkheadRegistry(ThreadPoolBulkheadConfig defaultConfig, Map<String, String> tags) InMemoryThreadPoolBulkheadRegistry(Map<String, ThreadPoolBulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer) InMemoryThreadPoolBulkheadRegistry(Map<String, ThreadPoolBulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer, Map<String, String> tags) InMemoryThreadPoolBulkheadRegistry(Map<String, ThreadPoolBulkheadConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers) InMemoryThreadPoolBulkheadRegistry(Map<String, ThreadPoolBulkheadConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers, Map<String, String> tags) InMemoryThreadPoolBulkheadRegistry(Map<String, ThreadPoolBulkheadConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers, Map<String, String> tags, io.github.resilience4j.core.RegistryStore<ThreadPoolBulkhead> registryStore) InMemoryThreadPoolBulkheadRegistry(Map<String, ThreadPoolBulkheadConfig> configs, Map<String, String> tags) -
Method Summary
Modifier and TypeMethodDescriptionReturns a managedThreadPoolBulkheador creates a new one with default configuration.bulkhead(String name, ThreadPoolBulkheadConfig config) Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.Returns a managedThreadPoolBulkheador creates a new one.Returns a managedThreadPoolBulkheador creates a new one.bulkhead(String name, Supplier<ThreadPoolBulkheadConfig> bulkheadConfigSupplier) Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.bulkhead(String name, Supplier<ThreadPoolBulkheadConfig> bulkheadConfigSupplier, Map<String, String> tags) Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.Returns a managedThreadPoolBulkheador creates a new one with default configuration.voidclose()Returns all managedThreadPoolBulkheadinstances.Methods inherited from class io.github.resilience4j.core.registry.AbstractRegistry
addConfiguration, computeIfAbsent, find, getAllTags, getConfiguration, getDefaultConfig, getEventPublisher, getTags, remove, removeConfiguration, replaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.resilience4j.core.Registry
addConfiguration, find, getConfiguration, getDefaultConfig, getEventPublisher, getTags, remove, removeConfiguration, replace
-
Constructor Details
-
InMemoryThreadPoolBulkheadRegistry
public InMemoryThreadPoolBulkheadRegistry()The constructor with default configuration. -
InMemoryThreadPoolBulkheadRegistry
-
InMemoryThreadPoolBulkheadRegistry
-
InMemoryThreadPoolBulkheadRegistry
public InMemoryThreadPoolBulkheadRegistry(Map<String, ThreadPoolBulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer) -
InMemoryThreadPoolBulkheadRegistry
public InMemoryThreadPoolBulkheadRegistry(Map<String, ThreadPoolBulkheadConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer, Map<String, String> tags) -
InMemoryThreadPoolBulkheadRegistry
public InMemoryThreadPoolBulkheadRegistry(Map<String, ThreadPoolBulkheadConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers) -
InMemoryThreadPoolBulkheadRegistry
public InMemoryThreadPoolBulkheadRegistry(Map<String, ThreadPoolBulkheadConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers, Map<String, String> tags) -
InMemoryThreadPoolBulkheadRegistry
The constructor with custom default config.- Parameters:
defaultConfig- The default config.
-
InMemoryThreadPoolBulkheadRegistry
public InMemoryThreadPoolBulkheadRegistry(ThreadPoolBulkheadConfig defaultConfig, Map<String, String> tags) -
InMemoryThreadPoolBulkheadRegistry
public InMemoryThreadPoolBulkheadRegistry(ThreadPoolBulkheadConfig defaultConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer) -
InMemoryThreadPoolBulkheadRegistry
public InMemoryThreadPoolBulkheadRegistry(ThreadPoolBulkheadConfig defaultConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead> registryEventConsumer, Map<String, String> tags) -
InMemoryThreadPoolBulkheadRegistry
public InMemoryThreadPoolBulkheadRegistry(ThreadPoolBulkheadConfig defaultConfig, List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers) -
InMemoryThreadPoolBulkheadRegistry
public InMemoryThreadPoolBulkheadRegistry(ThreadPoolBulkheadConfig defaultConfig, List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers, Map<String, String> tags) -
InMemoryThreadPoolBulkheadRegistry
public InMemoryThreadPoolBulkheadRegistry(Map<String, ThreadPoolBulkheadConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<ThreadPoolBulkhead>> registryEventConsumers, Map<String, String> tags, io.github.resilience4j.core.RegistryStore<ThreadPoolBulkhead> registryStore)
-
-
Method Details
-
getAllBulkheads
Returns all managedThreadPoolBulkheadinstances.- Specified by:
getAllBulkheadsin interfaceThreadPoolBulkheadRegistry- Returns:
- all managed
ThreadPoolBulkheadinstances.
-
bulkhead
Returns a managedThreadPoolBulkheador creates a new one with default configuration.- Specified by:
bulkheadin interfaceThreadPoolBulkheadRegistry- Parameters:
name- the name of the ThreadPoolBulkhead- Returns:
- The
ThreadPoolBulkhead
-
bulkhead
Returns a managedThreadPoolBulkheador creates a new one with default configuration.- Specified by:
bulkheadin interfaceThreadPoolBulkheadRegistry- 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.- Specified by:
bulkheadin interfaceThreadPoolBulkheadRegistry- Parameters:
name- the name of the ThreadPoolBulkheadconfig- a custom ThreadPoolBulkheadConfig configuration- Returns:
- The
ThreadPoolBulkhead
-
bulkhead
public ThreadPoolBulkhead bulkhead(String name, ThreadPoolBulkheadConfig config, Map<String, 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.- Specified by:
bulkheadin interfaceThreadPoolBulkheadRegistry- Parameters:
name- the name of the ThreadPoolBulkheadconfig- a custom ThreadPoolBulkheadConfig configurationtags- tags to add to the ThreadPoolBulkhead- Returns:
- The
ThreadPoolBulkhead
-
bulkhead
public ThreadPoolBulkhead bulkhead(String name, Supplier<ThreadPoolBulkheadConfig> bulkheadConfigSupplier) Returns a managedThreadPoolBulkheador creates a new one with a custom ThreadPoolBulkhead configuration.- Specified by:
bulkheadin interfaceThreadPoolBulkheadRegistry- Parameters:
name- the name of the ThreadPoolBulkheadbulkheadConfigSupplier- a custom ThreadPoolBulkhead configuration supplier- Returns:
- The
ThreadPoolBulkhead
-
bulkhead
public ThreadPoolBulkhead bulkhead(String name, Supplier<ThreadPoolBulkheadConfig> bulkheadConfigSupplier, Map<String, 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.- Specified by:
bulkheadin interfaceThreadPoolBulkheadRegistry- 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).- Specified by:
bulkheadin interfaceThreadPoolBulkheadRegistry- Parameters:
name- the name of the ThreadPoolBulkheadconfigName- the name of the shared configuration- Returns:
- The
ThreadPoolBulkhead
-
bulkhead
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.- Specified by:
bulkheadin interfaceThreadPoolBulkheadRegistry- Parameters:
name- the name of the ThreadPoolBulkheadconfigName- the name of the shared configurationtags- tags to add to the ThreadPoolBulkhead- Returns:
- The
ThreadPoolBulkhead
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-