- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for FutureCallback (0.39 sec)
-
android/guava/src/com/google/common/util/concurrent/FutureCallback.java
* * <p>To attach to a {@link ListenableFuture} use {@link Futures#addCallback}. * * @author Anthony Zana * @since 10.0 */ @GwtCompatible @ElementTypesAreNonnullByDefault 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); /**
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed May 05 22:27:35 GMT 2021 - 1.6K 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 boolean called = false; @Override public void onSuccess(String result) { fail("Was not expecting onSuccess() to be called.");
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Nov 15 16:33:21 GMT 2022 - 6.3K 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 boolean called = false; @Override public void onSuccess(String result) { fail("Was not expecting onSuccess() to be called.");
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Apr 06 12:56:11 GMT 2023 - 6.3K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientHttp2Test.kt
import org.apache.hc.client5.http.async.methods.SimpleHttpRequests import org.apache.hc.client5.http.async.methods.SimpleHttpResponse import org.apache.hc.client5.http.impl.async.HttpAsyncClients import org.apache.hc.core5.concurrent.FutureCallback import org.apache.hc.core5.http.ProtocolVersion import org.junit.Assert import org.junit.Test /** * Simplified from
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.6K 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
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Oct 24 18:27:19 GMT 2023 - 3.9K bytes - Viewed (1) -
guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java
} public void testAddCallback() { FluentFuture<String> f = FluentFuture.from(immediateFuture("a")); final 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) {} },
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 5.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java
} public void testAddCallback() { FluentFuture<String> f = FluentFuture.from(immediateFuture("a")); final 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) {} },
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 5.7K 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. */
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 59.6K 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: * * <pre>{@code * future.addCallback( * new FutureCallback<QueryResult>() { * public void onSuccess(QueryResult result) { * storeInCache(result); * } * public void onFailure(Throwable t) { * reportError(t); * }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Apr 11 19:08:44 GMT 2023 - 18.7K 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 Closeable>() { @Override public void onSuccess(@CheckForNull Closeable result) { closingFuture.closeables.closer.eventuallyClose(result, closingExecutor); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 98.5K bytes - Viewed (0)