public final class ComplexCancellable extends Object implements CancellableDependency
Cancellable
that has a dependency on another Cancellable
process or operation. Dependent process or operation will get cancelled
if this Cancellable
itself is cancelled.Constructor and Description |
---|
ComplexCancellable() |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Cancels the ongoing operation or process.
|
boolean |
isCancelled()
Determines whether the process or operation has been cancelled.
|
void |
setDependency(Cancellable dependency)
Sets
Cancellable dependency on another ongoing process or
operation represented by Cancellable . |
public boolean cancel()
Cancellable
cancel
in interface Cancellable
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.public boolean isCancelled()
CancellableDependency
isCancelled
in interface CancellableDependency
public void setDependency(Cancellable dependency)
CancellableDependency
Cancellable
dependency on another ongoing process or
operation represented by Cancellable
.setDependency
in interface CancellableDependency