Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 105 for ListenableFuture (0.2 sec)

  1. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

     * @author Nishant Thakkar
     * @since 10.0
     */
    @GwtIncompatible
    public class MockFutureListener implements Runnable {
      private final CountDownLatch countDownLatch;
      private final ListenableFuture<?> future;
    
      public MockFutureListener(ListenableFuture<?> future) {
        this.countDownLatch = new CountDownLatch(1);
        this.future = future;
    
        future.addListener(this, directExecutor());
      }
    
      @Override
      public void run() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 12 18:12:42 GMT 2023
    - 3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/ImmediateFuture.java

    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    // TODO(cpovirk): Make this final (but that may break Mockito spy calls).
    class ImmediateFuture<V extends @Nullable Object> implements ListenableFuture<V> {
      static final ListenableFuture<?> NULL = new ImmediateFuture<@Nullable Object>(null);
    
      private static final LazyLogger log = new LazyLogger(ImmediateFuture.class);
    
      @ParametricNullness private final V value;
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  3. guava/module.json

              "module": "failureaccess",
              "version": {
                "requires": "1.0.2"
              }
            },
            {
              "group": "com.google.guava",
              "module": "listenablefuture",
              "version": {
                "requires": "9999.0-empty-to-avoid-conflict-with-guava"
              }
            },
            {
              "group": "com.google.code.findbugs",
              "module": "jsr305",
    Json
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Oct 17 18:11:49 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

       *             incomplete and the {@code ListenableFuture} later completes normally, the
       *             listener runs in the thread that completes the {@code ListenableFuture}.
       *         <li>When a listener is attached to a {@code ListenableFuture} and the {@code
       *             ListenableFuture} gets cancelled, the listener runs immediately in the thread that
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/CacheLoaderTest.java

    import com.google.common.collect.ImmutableList;
    import com.google.common.collect.ImmutableMap;
    import com.google.common.collect.Queues;
    import com.google.common.util.concurrent.Futures;
    import com.google.common.util.concurrent.ListenableFuture;
    import java.util.Deque;
    import java.util.Map;
    import java.util.concurrent.Executor;
    import java.util.concurrent.Future;
    import java.util.concurrent.atomic.AtomicInteger;
    import junit.framework.TestCase;
    
    /**
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

        Error error = new AssertionError("ASSERT!");
        ListenableFuture<String> f = UncheckedThrowingFuture.throwingError(error);
        MockCallback callback = new MockCallback(error);
        addCallback(f, callback, directExecutor());
      }
    
      public void testRuntimeExceptionFromGet() {
        RuntimeException e = new IllegalArgumentException("foo not found");
        ListenableFuture<String> f = UncheckedThrowingFuture.throwingRuntimeException(e);
    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)
  7. android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java

       * {@link Callable#call()} will not be invoked.
       */
      public <T extends @Nullable Object> ListenableFuture<T> submit(
          Callable<T> callable, Executor executor) {
        checkNotNull(callable);
        checkNotNull(executor);
        return submitAsync(
            new AsyncCallable<T>() {
              @Override
              public ListenableFuture<T> call() throws Exception {
                return immediateFuture(callable.call());
              }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

     *
     * @author Sven Mawson
     */
    public class ListenableFutureTester {
    
      private final ExecutorService exec;
      private final ListenableFuture<?> future;
      private final CountDownLatch latch;
    
      public ListenableFutureTester(ListenableFuture<?> future) {
        this.exec = Executors.newCachedThreadPool();
        this.future = checkNotNull(future);
        this.latch = new CountDownLatch(1);
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

     *
     * @author Sven Mawson
     */
    public class ListenableFutureTester {
    
      private final ExecutorService exec;
      private final ListenableFuture<?> future;
      private final CountDownLatch latch;
    
      public ListenableFutureTester(ListenableFuture<?> future) {
        this.exec = Executors.newCachedThreadPool();
        this.future = checkNotNull(future);
        this.latch = new CountDownLatch(1);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/AsyncFunction.java

    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Transforms a value, possibly asynchronously. For an example usage and more information, see
     * {@link Futures#transformAsync(ListenableFuture, AsyncFunction, Executor)}.
     *
     * @author Chris Povirk
     * @since 11.0
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public interface AsyncFunction<I extends @Nullable Object, O extends @Nullable Object> {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sun Jun 20 10:45:35 GMT 2021
    - 1.5K bytes
    - Viewed (0)
Back to top