final EntityTransaction ftx = tx; F.Promise<T> committedResult = (ftx == null) ? result : result.map(t -> { if (ftx.getRollbackOnly()) { ftx.rollback();
play.libs.Akka.asPromise(ask(actorRef,msg, timeout)).map( new play.libs.F.Function<java.lang.Object, play.mvc.Result>() { public play.mvc.Result apply(java.lang.Object response){
/** * Zips the values of this promise with <code>another</code>, and creates a new promise holding the tuple of their results * @param another */ public <B> Promise<Tuple<A, B>> zip(Promise<B> another) { return wrap(wrapped().zip(another.wrapped())).map( new Function<scala.Tuple2<A, B>, Tuple<A, B>>() { public Tuple<A, B> apply(scala.Tuple2<A, B> scalaTuple) { return new Tuple(scalaTuple._1, scalaTuple._2); } } ); }