com.koushikdutta.async.future
Class SimpleCancellable
java.lang.Object
com.koushikdutta.async.future.SimpleCancellable
- All Implemented Interfaces:
- Cancellable, DependentCancellable
- Direct Known Subclasses:
- Continuation, SimpleFuture
public class SimpleCancellable
- extends java.lang.Object
- implements DependentCancellable
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPLETED
public static final Cancellable COMPLETED
SimpleCancellable
public SimpleCancellable()
isDone
public boolean isDone()
- Description copied from interface:
Cancellable
- Check whether this asynchronous operation completed successfully.
- Specified by:
isDone in interface Cancellable
- Returns:
cancelCleanup
protected void cancelCleanup()
cleanup
protected void cleanup()
completeCleanup
protected void completeCleanup()
setComplete
public boolean setComplete()
cancel
public boolean cancel()
- Description copied from interface:
Cancellable
- Attempt to cancel this asynchronous operation.
- Specified by:
cancel in interface Cancellable
- Returns:
- The return value is whether the operation cancelled successfully.
setParent
public SimpleCancellable setParent(Cancellable parent)
- Specified by:
setParent in interface DependentCancellable
isCancelled
public boolean isCancelled()
- Description copied from interface:
Cancellable
- Check whether this asynchronous operation has been cancelled.
- Specified by:
isCancelled in interface Cancellable
- Returns: