public class FixedThreadPoolBulkhead extends java.lang.Object implements ThreadPoolBulkhead
ThreadPoolBulkhead.Metrics, ThreadPoolBulkhead.ThreadPoolBulkheadEventPublisher| Constructor and Description |
|---|
FixedThreadPoolBulkhead(java.lang.String name)
Creates a bulkhead with a default config.
|
FixedThreadPoolBulkhead(java.lang.String name,
io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Creates a bulkhead with a default config.
|
FixedThreadPoolBulkhead(java.lang.String name,
java.util.function.Supplier<ThreadPoolBulkheadConfig> configSupplier)
Create a bulkhead using a configuration supplier
|
FixedThreadPoolBulkhead(java.lang.String name,
java.util.function.Supplier<ThreadPoolBulkheadConfig> configSupplier,
io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Create a bulkhead using a configuration supplier
|
FixedThreadPoolBulkhead(java.lang.String name,
ThreadPoolBulkheadConfig bulkheadConfig)
Creates a bulkhead using a configuration supplied
|
FixedThreadPoolBulkhead(java.lang.String name,
ThreadPoolBulkheadConfig bulkheadConfig,
io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
Creates a bulkhead using a configuration supplied
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ThreadPoolBulkheadConfig |
getBulkheadConfig()
Returns the ThreadPoolBulkheadConfig of this Bulkhead.
|
ThreadPoolBulkhead.ThreadPoolBulkheadEventPublisher |
getEventPublisher()
Returns an EventPublisher which subscribes to the reactive stream of BulkheadEvent and can be
used to register event consumers.
|
ThreadPoolBulkhead.Metrics |
getMetrics()
Get the Metrics of this Bulkhead.
|
java.lang.String |
getName()
Returns the name of this bulkhead.
|
io.vavr.collection.Map<java.lang.String,java.lang.String> |
getTags()
Returns an unmodifiable map with tags assigned to this Retry.
|
<T> java.util.concurrent.CompletableFuture<T> |
submit(java.util.concurrent.Callable<T> callable)
Submits a value-returning task for execution and returns a
CompletionStage representing the
asynchronous computation of the task. |
java.util.concurrent.CompletableFuture<java.lang.Void> |
submit(java.lang.Runnable runnable)
Submits a task for execution to the ThreadPoolBulkhead and returns a
CompletionStage representing the
asynchronous computation of the task. |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdecorateCallable, decorateCallable, decorateRunnable, decorateRunnable, decorateSupplier, decorateSupplier, executeCallable, executeRunnable, executeSupplier, of, of, of, ofDefaultspublic FixedThreadPoolBulkhead(java.lang.String name,
@Nullable
ThreadPoolBulkheadConfig bulkheadConfig)
name - the name of this bulkheadbulkheadConfig - custom bulkhead configurationpublic FixedThreadPoolBulkhead(java.lang.String name,
@Nullable
ThreadPoolBulkheadConfig bulkheadConfig,
io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
name - the name of this bulkheadbulkheadConfig - custom bulkhead configurationtags - tags to add to the Bulkheadpublic FixedThreadPoolBulkhead(java.lang.String name)
name - the name of this bulkheadpublic FixedThreadPoolBulkhead(java.lang.String name,
io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
name - the name of this bulkheadpublic FixedThreadPoolBulkhead(java.lang.String name,
java.util.function.Supplier<ThreadPoolBulkheadConfig> configSupplier)
name - the name of this bulkheadconfigSupplier - BulkheadConfig supplierpublic FixedThreadPoolBulkhead(java.lang.String name,
java.util.function.Supplier<ThreadPoolBulkheadConfig> configSupplier,
io.vavr.collection.Map<java.lang.String,java.lang.String> tags)
name - the name of this bulkheadconfigSupplier - BulkheadConfig supplierpublic <T> java.util.concurrent.CompletableFuture<T> submit(java.util.concurrent.Callable<T> callable)
CompletionStage representing the
asynchronous computation of the task.submit in interface ThreadPoolBulkheadT - the type of the task's resultcallable - the value-returning task to submitBulkheadFullException
when the task could not be submitted, because the Bulkhead was fullpublic java.util.concurrent.CompletableFuture<java.lang.Void> submit(java.lang.Runnable runnable)
CompletionStage representing the
asynchronous computation of the task.submit in interface ThreadPoolBulkheadrunnable - the task to submitpublic java.lang.String getName()
getName in interface ThreadPoolBulkheadpublic ThreadPoolBulkheadConfig getBulkheadConfig()
getBulkheadConfig in interface ThreadPoolBulkheadpublic ThreadPoolBulkhead.Metrics getMetrics()
getMetrics in interface ThreadPoolBulkheadpublic io.vavr.collection.Map<java.lang.String,java.lang.String> getTags()
getTags in interface ThreadPoolBulkheadpublic ThreadPoolBulkhead.ThreadPoolBulkheadEventPublisher getEventPublisher()
getEventPublisher in interface ThreadPoolBulkheadpublic java.lang.String toString()
toString in class java.lang.Objectpublic void close()
close in interface java.lang.AutoCloseable