- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for FutureCallback (0.49 sec)
-
guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java
} public void testAddCallback() { FluentFuture<String> f = FluentFuture.from(immediateFuture("a")); boolean[] called = new boolean[1]; f.addCallback( new FutureCallback<String>() { @Override public void onSuccess(String result) { called[0] = true; } @Override public void onFailure(Throwable t) {} },
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 5.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Futures.java
public static <V extends @Nullable Object> void addCallback( ListenableFuture<V> future, FutureCallback<? super V> callback, Executor executor) { Preconditions.checkNotNull(callback); future.addListener(new CallbackListener<V>(future, callback), executor); } /** See {@link #addCallback(ListenableFuture, FutureCallback, Executor)} for behavioral notes. */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 64.3K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/FluentFuture.java
* callbacks, but any callback added through this method is guaranteed to be called once the * computation is complete. * * <p>Example: * * {@snippet : * future.addCallback( * new FutureCallback<QueryResult>() { * public void onSuccess(QueryResult result) { * storeInCache(result); * } * public void onFailure(Throwable t) { * reportError(t); * }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 19.7K bytes - Viewed (0)