- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for FutureCallback (0.25 sec)
-
android/guava/src/com/google/common/util/concurrent/FutureCallback.java
* asynchronously. * * <p>To attach to a {@link ListenableFuture} use {@link Futures#addCallback}. * * @author Anthony Zana * @since 10.0 */ @GwtCompatible public interface FutureCallback<V extends @Nullable Object> { /** Invoked with the result of the {@code Future} computation when it is successful. */ void onSuccess(@ParametricNullness V result); /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 1.5K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/FutureCallback.java
* asynchronously. * * <p>To attach to a {@link ListenableFuture} use {@link Futures#addCallback}. * * @author Anthony Zana * @since 10.0 */ @GwtCompatible public interface FutureCallback<V extends @Nullable Object> { /** Invoked with the result of the {@code Future} computation when it is successful. */ void onSuccess(@ParametricNullness V result); /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 1.5K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 6.7K bytes - Viewed (0) -
android/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 Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 6.7K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java
return new Promise<V>( (resolve, reject) -> { Futures.addCallback( this, new FutureCallback<V>() { @Override public void onSuccess(V value) { resolve.onInvoke(value); } @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 3.8K bytes - Viewed (0) -
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) -
android/guava/src/com/google/common/util/concurrent/ClosingFuture.java
checkNotNull(closingExecutor); ClosingFuture<C> closingFuture = new ClosingFuture<>(nonCancellationPropagating(future)); Futures.addCallback( future, new FutureCallback<@Nullable AutoCloseable>() { @Override public void onSuccess(@Nullable AutoCloseable result) { closingFuture.closeables.closer.eventuallyClose(result, closingExecutor); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 23 15:26:56 UTC 2025 - 97.8K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/ClosingFuture.java
checkNotNull(closingExecutor); ClosingFuture<C> closingFuture = new ClosingFuture<>(nonCancellationPropagating(future)); Futures.addCallback( future, new FutureCallback<@Nullable AutoCloseable>() { @Override public void onSuccess(@Nullable AutoCloseable result) { closingFuture.closeables.closer.eventuallyClose(result, closingExecutor); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 23 15:26:56 UTC 2025 - 98.1K bytes - Viewed (0)