public interface BackPressureValve
Modifier and Type | Method and Description |
---|---|
void |
blockAddress(Address address)
Requests to stop processing any further input for that address, as long as there is an
uncompleted async operation (registered by @address).
|
boolean |
isAddressBlocked(Address address)
Checks whether a given address was previously blocked with
blockAddress(Address) . |
void |
notifyAsyncOperationCompleted(Address owningAddress)
Notifies when a async operation, registered by @owningAddress was completed.
|
void |
notifyAsyncOperationRegistered()
Notifies the back pressure mechanism that a async operation was registered via
Context.registerAsyncOperation(Object, CompletableFuture) . |
boolean |
shouldBackPressure()
Indicates rather a back pressure is needed.
|
boolean shouldBackPressure()
void notifyAsyncOperationRegistered()
Context.registerAsyncOperation(Object, CompletableFuture)
.void notifyAsyncOperationCompleted(Address owningAddress)
owningAddress
- the owner of the completed async operation.void blockAddress(Address address)
NOTE: The address would unblocked as soon as some (one) async operation registered by that address completes.
address
- the addressboolean isAddressBlocked(Address address)
blockAddress(Address)
.address
- the address to checkCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.