R - result typepublic class BulkheadBuilder<R> extends PolicyBuilder<BulkheadBuilder<R>,BulkheadConfig<R>,R>
Bulkhead instances.
This class is not threadsafe.
BulkheadConfig,
BulkheadFullExceptionconfig| Modifier and Type | Method and Description |
|---|---|
Bulkhead<R> |
build()
Builds a new
Bulkhead using the builder's configuration. |
BulkheadBuilder<R> |
withMaxWaitTime(Duration maxWaitTime)
Configures the
maxWaitTime to wait for permits to be available. |
onFailure, onSuccesspublic BulkheadBuilder<R> withMaxWaitTime(Duration maxWaitTime)
maxWaitTime to wait for permits to be available. If permits cannot be acquired before the
maxWaitTime is exceeded, then the bulkhead will throw BulkheadFullException.
This setting only applies when the resulting Bulkhead is used with the Failsafe class. It does not apply
when the Bulkhead is used in a standalone way.
NullPointerException - if maxWaitTime is nullCopyright © 2022. All rights reserved.