public class SequentialCancellable extends java.lang.Object implements Cancellable
Cancellable that can hold at most one Cancellable that will be cancelled when this is cancelled.IGNORE_CANCEL| Constructor and Description |
|---|
SequentialCancellable()
Create a new instance with no current
Cancellable. |
SequentialCancellable(Cancellable cancellable)
Create a new instance with the current
Cancellable set to 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. |
boolean |
isCancelled()
Returns
true if this Cancellable is cancelled. |
void |
nextCancellable(Cancellable next)
Sets the current
Cancellable. |
public SequentialCancellable()
Cancellable.public SequentialCancellable(Cancellable cancellable)
Cancellable set to cancellable.cancellable - the initial Cancellable.public final void nextCancellable(Cancellable next)
Cancellable.next - to set.public final void cancel()
CancellableCancellable is not interested in the outcome of the execution.cancel in interface Cancellablepublic boolean isCancelled()
true if this Cancellable is cancelled.true if this Cancellable is cancelled.