V - type of the Future resultpublic class ThreadPoolBulkhead<V> extends BulkheadBase<Future<V>>
BulkheadBase.MetricsRecorder| Constructor and Description |
|---|
ThreadPoolBulkhead(FaultToleranceStrategy<Future<V>> delegate,
String description,
ExecutorService executor,
int size,
int queueSize,
BulkheadBase.MetricsRecorder recorder) |
| Modifier and Type | Method and Description |
|---|---|
Future<V> |
apply(InvocationContext<Future<V>> ctx)
Apply the fault tolerance strategy around the target
Callable. |
public ThreadPoolBulkhead(FaultToleranceStrategy<Future<V>> delegate, String description, ExecutorService executor, int size, int queueSize, BulkheadBase.MetricsRecorder recorder)
public Future<V> apply(InvocationContext<Future<V>> ctx) throws Exception
FaultToleranceStrategyCallable.
The Callable is wrapped in an InvocationContext.ctx - the InvocationContext wrapping the Callable guarded by this fault tolerance strategyCallableException - if result couldn't be computedCopyright © 2018–2020. All rights reserved.