-
- All Known Implementing Classes:
FutureResult,TranslatingResult
public interface Result<T>A handler for the result of an operation. May be used to populate anIoFuture.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleansetCancelled()Acknowledge the cancellation of this operation.booleansetException(java.io.IOException exception)Set the exception for this operation.booleansetResult(T result)Set the result for this operation.
-
-
-
Method Detail
-
setResult
boolean setResult(T result)
Set the result for this operation. Any threads blocking on this instance will be unblocked.- Parameters:
result- the result to set- Returns:
falseif the operation was already completed,trueotherwise
-
setException
boolean setException(java.io.IOException exception)
Set the exception for this operation. Any threads blocking on this instance will be unblocked.- Parameters:
exception- the exception to set- Returns:
falseif the operation was already completed,trueotherwise
-
setCancelled
boolean setCancelled()
Acknowledge the cancellation of this operation.- Returns:
falseif the operation was already completed,trueotherwise
-
-