public final class InMemoryBulkheadRegistry extends java.lang.Object implements BulkheadRegistry
Constructor and Description |
---|
InMemoryBulkheadRegistry(BulkheadConfig bulkheadConfig)
The constructor with custom default bulkhead config
|
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 bulkheadConfig)
Returns a managed
Bulkhead or creates a new one with a custom BulkheadConfig configuration. |
Bulkhead |
bulkhead(java.lang.String name,
java.util.function.Supplier<BulkheadConfig> bulkheadConfigSupplier)
Returns a managed
Bulkhead or creates a new one with a custom BulkheadConfig configuration. |
io.vavr.collection.Seq<Bulkhead> |
getAllBulkheads()
Returns all managed
Bulkhead instances. |
BulkheadConfig |
getDefaultBulkheadConfig()
Returns a default BulkheadConfig instance this registry is using.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
of, ofDefaults
public InMemoryBulkheadRegistry(BulkheadConfig bulkheadConfig)
bulkheadConfig
- custom bulkhead config to usepublic io.vavr.collection.Seq<Bulkhead> getAllBulkheads()
BulkheadRegistry
Bulkhead
instances.getAllBulkheads
in interface BulkheadRegistry
Bulkhead
instances.public Bulkhead bulkhead(java.lang.String name)
BulkheadRegistry
Bulkhead
or creates a new one with default configuration.bulkhead
in interface BulkheadRegistry
name
- the name of the BulkheadBulkhead
public Bulkhead bulkhead(java.lang.String name, BulkheadConfig bulkheadConfig)
BulkheadRegistry
Bulkhead
or creates a new one with a custom BulkheadConfig configuration.bulkhead
in interface BulkheadRegistry
name
- the name of the BulkheadbulkheadConfig
- a custom Bulkhead configurationBulkhead
public Bulkhead bulkhead(java.lang.String name, java.util.function.Supplier<BulkheadConfig> bulkheadConfigSupplier)
BulkheadRegistry
Bulkhead
or creates a new one with a custom BulkheadConfig configuration.bulkhead
in interface BulkheadRegistry
name
- the name of the BulkheadbulkheadConfigSupplier
- a custom Bulkhead configuration supplierBulkhead
public BulkheadConfig getDefaultBulkheadConfig()
BulkheadRegistry
getDefaultBulkheadConfig
in interface BulkheadRegistry