Bulkhead.EventPublisher, Bulkhead.Metrics
Constructor and Description |
---|
SemaphoreBulkhead(java.lang.String name)
Creates a bulkhead with a default config.
|
SemaphoreBulkhead(java.lang.String name,
BulkheadConfig bulkheadConfig)
Creates a bulkhead using a configuration supplied
|
SemaphoreBulkhead(java.lang.String name,
java.util.function.Supplier<BulkheadConfig> configSupplier)
Create a bulkhead using a configuration supplier
|
Modifier and Type | Method and Description |
---|---|
void |
changeConfig(BulkheadConfig newConfig)
Dynamic bulkhead configuration change.
|
BulkheadConfig |
getBulkheadConfig()
Returns the BulkheadConfig of this Bulkhead.
|
Bulkhead.EventPublisher |
getEventPublisher()
Returns an EventPublisher which subscribes to the reactive stream of BulkheadEvent and
can be used to register event consumers.
|
Bulkhead.Metrics |
getMetrics()
Get the Metrics of this Bulkhead.
|
java.lang.String |
getName()
Returns the name of this bulkhead.
|
boolean |
isCallPermitted()
Attempts to acquire a permit, which allows an call to be executed.
|
void |
onComplete()
Records a completed call.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
decorateCallable, decorateCheckedConsumer, decorateCheckedFunction, decorateCheckedRunnable, decorateCheckedSupplier, decorateCompletionStage, decorateConsumer, decorateFunction, decorateRunnable, decorateSupplier, executeCallable, executeCompletionStage, executeRunnable, executeSupplier, of, of, ofDefaults
public SemaphoreBulkhead(java.lang.String name, BulkheadConfig bulkheadConfig)
name
- the name of this bulkheadbulkheadConfig
- custom bulkhead configurationpublic SemaphoreBulkhead(java.lang.String name)
name
- the name of this bulkheadpublic SemaphoreBulkhead(java.lang.String name, java.util.function.Supplier<BulkheadConfig> configSupplier)
name
- the name of this bulkheadconfigSupplier
- BulkheadConfig supplierpublic void changeConfig(BulkheadConfig newConfig)
changeConfig
in interface Bulkhead
newConfig
- new BulkheadConfigpublic boolean isCallPermitted()
isCallPermitted
in interface Bulkhead
public void onComplete()
onComplete
in interface Bulkhead
public java.lang.String getName()
public BulkheadConfig getBulkheadConfig()
getBulkheadConfig
in interface Bulkhead
public Bulkhead.Metrics getMetrics()
getMetrics
in interface Bulkhead
public Bulkhead.EventPublisher getEventPublisher()
getEventPublisher
in interface Bulkhead
public java.lang.String toString()
toString
in class java.lang.Object