Home | History | Annotate | Download | only in async

Lines Matching refs:futures

21 import com.google.common.util.concurrent.Futures;
29 * TODO Replace with Guava's com.google.common.util.concurrent.Futures once we
81 * Create a new joined future from two existing futures and a joining function
83 * result. The resulting future will fail if any of the dependent futures also
90 ListenableFuture<?>[] futures = new ListenableFuture<?>[2];
92 futures[0] = f1;
93 futures[1] = f2;
95 // Futures.allAsList is used instead of Futures.successfulAsList because
98 ListenableFuture<List<Object>> result = Futures.allAsList(futures);
99 return Futures.transform(result, new AsyncFunction<List<Object>, TResult>() {
111 * Create a new joined future from two existing futures and an async function
113 * result. The resulting future will fail if any of the dependent futures also
124 * Create a new joined future from three existing futures and a joining function
126 * result. The resulting future will fail if any of the dependent futures also
134 ListenableFuture<?>[] futures = new ListenableFuture<?>[3];
136 futures[0] = f1;
137 futures[1] = f2;
138 futures[2] = f3;
140 // Futures.allAsList is used instead of Futures.successfulAsList because
143 ListenableFuture<List<Object>> result = Futures.allAsList(futures);
144 return Futures.transform(result, new AsyncFunction<List<Object>, TResult>() {
157 * Create a new joined future from three existing futures and an async function
159 * result. The resulting future will fail if any of the dependent futures also
184 return Futures.immediateFuture(mFn.apply(value1, value2));
202 return Futures.immediateFuture(mFn.apply(value1, value2, value3));