@FunctionalInterface
public interface Cancellable
Cancellations are a hint from a consumer of any asynchronous result to the producer that it is no more interested in
the result. ServiceTalk does not provide any guarantees that at a certain time, whether the asynchronous execution is
cancellable or not. It is up to the producer of data to take any action on cancellation or ignore the same.
Thus, a consumer of the result must not assume that it will not receive any callback post cancellation i.e.
after cancel()
returns.
Modifier and Type | Field and Description |
---|---|
static Cancellable |
IGNORE_CANCEL
A
no-op instance of Cancellable . |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Sends a hint to the producer of the associated asynchronous execution that the consumer related to this
Cancellable is not interested in the outcome of the execution. |
static final Cancellable IGNORE_CANCEL
no-op
instance of Cancellable
.