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,
java.util.function.Supplier<ThreadPoolBulkheadConfig> configSupplier)
Create a bulkhead using a configuration supplier
|
FixedThreadPoolBulkhead(java.lang.String name,
ThreadPoolBulkheadConfig bulkheadConfig)
Creates a bulkhead using a configuration supplied
|
Modifier and Type | Method and Description |
---|---|
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.
|
<T> java.util.concurrent.CompletableFuture<T> |
submit(java.util.concurrent.Callable<T> callable)
Submits a value-returning task for execution and returns a
Future representing the pending results of the task.
|
void |
submit(java.lang.Runnable runnable)
Submits a task for execution.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
decorateCallable, decorateRunnable, decorateSupplier, executeCallable, executeRunnable, executeSupplier, of, of, ofDefaults
public FixedThreadPoolBulkhead(java.lang.String name, @Nullable ThreadPoolBulkheadConfig bulkheadConfig)
name
- the name of this bulkheadbulkheadConfig
- custom bulkhead configurationpublic FixedThreadPoolBulkhead(java.lang.String name)
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 <T> java.util.concurrent.CompletableFuture<T> submit(java.util.concurrent.Callable<T> callable)
ThreadPoolBulkhead
submit
in interface ThreadPoolBulkhead
T
- the result typecallable
- the callable to execute through bulk head thread poolpublic void submit(java.lang.Runnable runnable)
ThreadPoolBulkhead
submit
in interface ThreadPoolBulkhead
runnable
- the runnable to execute through bulk head thread poolpublic java.lang.String getName()
getName
in interface ThreadPoolBulkhead
public ThreadPoolBulkheadConfig getBulkheadConfig()
getBulkheadConfig
in interface ThreadPoolBulkhead
public ThreadPoolBulkhead.Metrics getMetrics()
getMetrics
in interface ThreadPoolBulkhead
public ThreadPoolBulkhead.ThreadPoolBulkheadEventPublisher getEventPublisher()
getEventPublisher
in interface ThreadPoolBulkhead
public java.lang.String toString()
toString
in class java.lang.Object