Class DelayedCancellable
- java.lang.Object
-
- io.servicetalk.concurrent.internal.DelayedCancellable
-
- All Implemented Interfaces:
Cancellable
public class DelayedCancellable extends java.lang.Object implements Cancellable
ACancellablewhich serves as a placeholder until the "real"Cancellableis available.
-
-
Field Summary
-
Fields inherited from interface io.servicetalk.concurrent.Cancellable
IGNORE_CANCEL
-
-
Constructor Summary
Constructors Constructor Description DelayedCancellable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Sends a hint to the producer of the associated asynchronous execution that the consumer related to thisCancellableis not interested in the outcome of the execution.voiddelayedCancellable(Cancellable delayedCancellable)Set the delayedCancellable.
-
-
-
Method Detail
-
delayedCancellable
public final void delayedCancellable(Cancellable delayedCancellable)
Set the delayedCancellable. This method can only be called a single time and subsequent calls will result incancel()being call ondelayedCancellable.- Parameters:
delayedCancellable- The delayedCancellable.
-
cancel
public void cancel()
Description copied from interface:CancellableSends a hint to the producer of the associated asynchronous execution that the consumer related to thisCancellableis not interested in the outcome of the execution.- Specified by:
cancelin interfaceCancellable
-
-