Reputation: 71
In play 2.1 I can execute a block of code asynchronously with Akka like this:
Promise<Integer> promiseOfInt = Akka.future(
new Callable<Integer>() {
public Integer call() {
return intensiveComputation();
}
}
);
How I can get status of this operation? For example: started, performed, completed, etc?
Upvotes: 1
Views: 267
Reputation:
There are three callbacks you could use onSuccess
, onFailure
and onComplete
.
See the "Callbacks" section here: http://doc.akka.io/docs/akka/2.1.0/scala/futures.html
Upvotes: 1