- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for FutureCallback (0.41 sec)
-
guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java
addCallback(f, callback, directExecutor()); f.setException(e); } public void testCancel() { SettableFuture<String> f = SettableFuture.create(); FutureCallback<String> callback = new FutureCallback<String>() { private final Object monitor = new Object(); private boolean called = false; @Override public void onSuccess(String result) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 6.6K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Futures.java
final ListenableFuture<V> future, final 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 13:13:32 UTC 2024 - 64.7K bytes - Viewed (0) -
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: * * <pre>{@code * future.addCallback( * new FutureCallback<QueryResult>() { * public void onSuccess(QueryResult result) { * storeInCache(result); * } * public void onFailure(Throwable t) { * reportError(t); * }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 19.6K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Futures.java
final ListenableFuture<V> future, final 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 13:13:32 UTC 2024 - 64.4K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ClosingFuture.java
checkNotNull(closingExecutor); final ClosingFuture<C> closingFuture = new ClosingFuture<>(nonCancellationPropagating(future)); Futures.addCallback( future, new FutureCallback<@Nullable AutoCloseable>() { @Override public void onSuccess(@CheckForNull AutoCloseable result) { closingFuture.closeables.closer.eventuallyClose(result, closingExecutor); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 08 19:36:35 UTC 2024 - 98.5K bytes - Viewed (0)