Class CancellableExecution
- java.lang.Object
-
- org.apache.hc.core5.http2.impl.nio.bootstrap.CancellableExecution
-
- All Implemented Interfaces:
Cancellable,CancellableDependency
final class CancellableExecution extends java.lang.Object implements CancellableDependency
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicBooleancancelledprivate java.util.concurrent.atomic.AtomicReference<Cancellable>dependencyRef
-
Constructor Summary
Constructors Constructor Description CancellableExecution()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel()Cancels the ongoing operation or process.booleanisCancelled()Determines whether the process or operation has been cancelled.voidsetDependency(Cancellable cancellable)SetsCancellabledependency on another ongoing process or operation represented byCancellable.
-
-
-
Field Detail
-
cancelled
private final java.util.concurrent.atomic.AtomicBoolean cancelled
-
dependencyRef
private final java.util.concurrent.atomic.AtomicReference<Cancellable> dependencyRef
-
-
Method Detail
-
setDependency
public void setDependency(Cancellable cancellable)
Description copied from interface:CancellableDependencySetsCancellabledependency on another ongoing process or operation represented byCancellable.- Specified by:
setDependencyin interfaceCancellableDependency
-
isCancelled
public boolean isCancelled()
Description copied from interface:CancellableDependencyDetermines whether the process or operation has been cancelled.- Specified by:
isCancelledin interfaceCancellableDependency- Returns:
- cancelled flag.
-
cancel
public boolean cancel()
Description copied from interface:CancellableCancels the ongoing operation or process.- Specified by:
cancelin interfaceCancellable- Returns:
trueif the operation or process has been cancelled as a result of this method call orfalseif it has already been cancelled or not started.
-
-