Top Description Fields Constructors Methods
org.apache.hc.core5.concurrent

public final Class ComplexCancellable

extends Object
implements CancellableDependency
Class Inheritance
All Implemented Interfaces
org.apache.hc.core5.concurrent.CancellableDependency, org.apache.hc.core5.concurrent.Cancellable
Imports
java.util.concurrent.atomic.AtomicMarkableReference, org.apache.hc.core5.util.Args

Cancellable that has a dependency on another Cancellable process or operation. Dependent process or operation will get cancelled if this Cancellable itself is cancelled.
Since
5.0

Field Summary

Modifier and TypeField and Description
private final AtomicMarkableReference<Cancellable>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
cancel()

Implements org.apache.hc.core5.concurrent.Cancellable.cancel.

Cancels the ongoing operation or process.
public boolean
isCancelled()

Implements org.apache.hc.core5.concurrent.CancellableDependency.isCancelled.

Determines whether the process or operation has been cancelled.
public void
setDependency(final Cancellable dependency)

Implements org.apache.hc.core5.concurrent.CancellableDependency.setDependency.

Sets Cancellable dependency on another ongoing process or operation represented by Cancellable.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dependencyRefback to summary
private final AtomicMarkableReference<Cancellable> dependencyRef

Constructor Detail

ComplexCancellableback to summary
public ComplexCancellable()

Method Detail

cancelback to summary
public boolean cancel()

Implements org.apache.hc.core5.concurrent.Cancellable.cancel.

Doc from org.apache.hc.core5.concurrent.Cancellable.cancel.

Cancels the ongoing operation or process.

Returns:boolean

true if the operation or process has been cancelled as a result of this method call or false if it has already been cancelled or not started.

Annotations
@Override
isCancelledback to summary
public boolean isCancelled()

Implements org.apache.hc.core5.concurrent.CancellableDependency.isCancelled.

Doc from org.apache.hc.core5.concurrent.CancellableDependency.isCancelled.

Determines whether the process or operation has been cancelled.

Returns:boolean

cancelled flag.

Annotations
@Override
setDependencyback to summary
public void setDependency(final Cancellable dependency)

Implements org.apache.hc.core5.concurrent.CancellableDependency.setDependency.

Doc from org.apache.hc.core5.concurrent.CancellableDependency.setDependency.

Sets Cancellable dependency on another ongoing process or operation represented by Cancellable.

Annotations
@Override