Class DelayedCancellable
- java.lang.Object
-
- io.servicetalk.concurrent.internal.DelayedCancellable
-
- All Implemented Interfaces:
Cancellable
public class DelayedCancellable extends java.lang.Object implements Cancellable
ACancellable
which serves as a placeholder until the "real"Cancellable
is 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 void
cancel()
Sends a hint to the producer of the associated asynchronous execution that the consumer related to thisCancellable
is not interested in the outcome of the execution.void
delayedCancellable(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:Cancellable
Sends a hint to the producer of the associated asynchronous execution that the consumer related to thisCancellable
is not interested in the outcome of the execution.- Specified by:
cancel
in interfaceCancellable
-
-