- All Superinterfaces:
FtHandler
Bulkhead protects a resource that cannot serve unlimited parallel
requests.
When the limit of parallel execution is reached, requests are enqueued
until the queue length is reached. Once both the limit and queue are full,
additional attempts to invoke will end with a failed response with
BulkheadException.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forBulkhead.static interfaceA Bulkhead listener for queueing operations.static interfaceProvides statistics during the lifetime of a bulkhead, such as concurrent executions, accepted/rejected calls and queue size. -
Method Summary
Modifier and TypeMethodDescriptionstatic Bulkhead.Builderbuilder()A new builder forBulkhead.booleancancelSupplier(Supplier<?> supplier) Can be used to cancel a supplier while queued.stats()Provides access to internal stats for this bulkhead.
-
Method Details
-
builder
A new builder forBulkhead.- Returns:
- a new builder
-
stats
Bulkhead.Stats stats()Provides access to internal stats for this bulkhead.- Returns:
- internal stats.
-
cancelSupplier
Can be used to cancel a supplier while queued.- Parameters:
supplier- the supplier- Returns:
- outcome of cancellation
-