T
- type of the value being completedpublic interface Completable<T> extends Stage<T>
Stage
, but extends to to allow for the
completion of the underlying computation.Stage
Modifier and Type | Method and Description |
---|---|
boolean |
complete(T result)
Complete the current stage.
|
boolean |
fail(Throwable cause)
Fail the current stage.
|
cancel, cause, handle, isCancelled, isCompleted, isDone, isFailed, join, join, joinNow, thenApply, thenApplyFailed, thenCancel, thenComplete, thenCompose, thenComposeCaught, thenFail, whenCancelled, whenComplete, whenDone, whenFailed, withCloser, withComplete, withNotComplete
boolean complete(T result)
This takes the stage out of the pending state and into the completed state.
result
- result of the computationtrue
if the completable was completed by this callboolean fail(Throwable cause)
This takes the stage out of the pending state and into the cancelled state.
cause
- the cause of the failuretrue
if the completable was completed by this callCopyright © 2017. All rights reserved.