public interface FutureAction<T>
extends scala.concurrent.Future<T>
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the execution of this action.
|
T |
get()
Blocks and returns the result of this job.
|
boolean |
isCompleted()
Returns whether the action has already been completed with a value or an exception.
|
<U> void |
onComplete(scala.Function1<scala.util.Try<T>,U> func,
scala.concurrent.ExecutionContext executor)
When this action is completed, either through an exception, or a value, applies the provided
function.
|
FutureAction<T> |
ready(scala.concurrent.duration.Duration atMost,
scala.concurrent.CanAwait permit)
Blocks until this action completes.
|
T |
result(scala.concurrent.duration.Duration atMost,
scala.concurrent.CanAwait permit)
Awaits and returns the result (of type T) of this action.
|
scala.Option<scala.util.Try<T>> |
value()
The value of this Future.
|
void cancel()
FutureAction<T> ready(scala.concurrent.duration.Duration atMost, scala.concurrent.CanAwait permit)
ready
in interface scala.concurrent.Awaitable<T>
atMost
- maximum wait time, which may be negative (no waiting is done), Duration.Inf
for unbounded waiting, or a finite positive durationT result(scala.concurrent.duration.Duration atMost, scala.concurrent.CanAwait permit)
result
in interface scala.concurrent.Awaitable<T>
atMost
- maximum wait time, which may be negative (no waiting is done), Duration.Inf
for unbounded waiting, or a finite positive durationException
- exception during action execution<U> void onComplete(scala.Function1<scala.util.Try<T>,U> func, scala.concurrent.ExecutionContext executor)
onComplete
in interface scala.concurrent.Future<T>
boolean isCompleted()
isCompleted
in interface scala.concurrent.Future<T>
scala.Option<scala.util.Try<T>> value()
If the future is not completed the returned value will be None. If the future is completed the value will be Some(Success(t)) if it contains a valid result, or Some(Failure(error)) if it contains an exception.
value
in interface scala.concurrent.Future<T>
T get()