Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 12 for transformAsync (0.1 seconds)

  1. android/guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static com.google.common.util.concurrent.Futures.transformAsync;
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    import static com.google.common.util.concurrent.Uninterruptibles.awaitUninterruptibly;
    import static org.junit.Assert.assertThrows;
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 6.5K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static com.google.common.util.concurrent.Futures.transformAsync;
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    import static com.google.common.util.concurrent.Uninterruptibles.awaitUninterruptibly;
    import static org.junit.Assert.assertThrows;
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 6.5K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

      }
    
      @SuppressWarnings("FutureTransformAsync") // We intentionally test transformAsync.
      public void testTransformAsync_genericsWildcard_asyncFunction() throws Exception {
        ListenableFuture<?> nullFuture = immediateVoidFuture();
        ListenableFuture<?> chainedFuture =
            transformAsync(nullFuture, x -> immediateFuture("hi"), directExecutor());
        assertThat(getDone(chainedFuture)).isEqualTo("hi");
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 134K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

      }
    
      @SuppressWarnings("FutureTransformAsync") // We intentionally test transformAsync.
      public void testTransformAsync_genericsWildcard_asyncFunction() throws Exception {
        ListenableFuture<?> nullFuture = immediateVoidFuture();
        ListenableFuture<?> chainedFuture =
            transformAsync(nullFuture, x -> immediateFuture("hi"), directExecutor());
        assertThat(getDone(chainedFuture)).isEqualTo("hi");
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 134K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

            };
        return derive(state.future.transformAsync(applyFunction, executor));
      }
    
      /**
       * Returns an {@link AsyncClosingFunction} that applies an {@link AsyncFunction} to an input,
       * ignoring the DeferredCloser and returning a {@code ClosingFuture} derived from the returned
       * {@link ListenableFuture}.
       *
       * <p>Use this method to pass a transformation to {@link #transformAsync(AsyncClosingFunction,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 101.7K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

        assertClosed(closeable1, closeable2);
      }
    
      public void testTransformAsync() throws Exception {
        ClosingFuture<String> closingFuture =
            ClosingFuture.from(immediateFuture("value"))
                .transformAsync(
                    (DeferredCloser closer, String v) -> {
                      closer.eventuallyClose(closeable1, closingExecutor);
                      closer.eventuallyClose(closeable2, closingExecutor);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 63K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

        assertClosed(closeable1, closeable2);
      }
    
      public void testTransformAsync() throws Exception {
        ClosingFuture<String> closingFuture =
            ClosingFuture.from(immediateFuture("value"))
                .transformAsync(
                    (DeferredCloser closer, String v) -> {
                      closer.eventuallyClose(closeable1, closingExecutor);
                      closer.eventuallyClose(closeable2, closingExecutor);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 63K bytes
    - Click Count (0)
  8. guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

        assertThat(f.get()).isEqualTo(2);
      }
    
      public void testTransformAsync() throws Exception {
        FluentFuture<Integer> f =
            FluentFuture.from(immediateFuture(1))
                .transformAsync(i -> immediateFuture(i + 1), directExecutor());
        assertThat(f.get()).isEqualTo(2);
      }
    
      @J2ktIncompatible
      @GwtIncompatible // withTimeout
      public void testWithTimeout() throws Exception {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 4.7K bytes
    - Click Count (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

        assertThat(f.get()).isEqualTo(2);
      }
    
      public void testTransformAsync() throws Exception {
        FluentFuture<Integer> f =
            FluentFuture.from(immediateFuture(1))
                .transformAsync(i -> immediateFuture(i + 1), directExecutor());
        assertThat(f.get()).isEqualTo(2);
      }
    
      @J2ktIncompatible
      @GwtIncompatible // withTimeout
      public void testWithTimeout() throws Exception {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 4.7K bytes
    - Click Count (0)
  10. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

       *     input's failure (if not)
       */
      public final <T extends @Nullable Object> FluentFuture<T> transformAsync(
          AsyncFunction<? super V, T> function, Executor executor) {
        return (FluentFuture<T>) Futures.transformAsync(this, function, executor);
      }
    
      /**
       * Returns a new {@code Future} whose result is derived from the result of this {@code Future}. If
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 19.8K bytes
    - Click Count (0)
Back to Top