- All Known Implementing Classes:
FutureResult
,TranslatingResult
public interface Result<T>
A handler for the result of an operation. May be used to populate an
IoFuture
.-
Method Summary
Modifier and TypeMethodDescriptionboolean
Acknowledge the cancellation of this operation.boolean
setException
(IOException exception) Set the exception for this operation.boolean
Set the result for this operation.
-
Method Details
-
setResult
Set the result for this operation. Any threads blocking on this instance will be unblocked.- Parameters:
result
- the result to set- Returns:
false
if the operation was already completed,true
otherwise
-
setException
Set the exception for this operation. Any threads blocking on this instance will be unblocked.- Parameters:
exception
- the exception to set- Returns:
false
if the operation was already completed,true
otherwise
-
setCancelled
boolean setCancelled()Acknowledge the cancellation of this operation.- Returns:
false
if the operation was already completed,true
otherwise
-