Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 13 for transformAsync (0.31 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/src/com/google/common/util/concurrent/AsyncFunction.java

    import java.util.concurrent.Future;
    import org.jspecify.annotations.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
    public interface AsyncFunction<I extends @Nullable Object, O extends @Nullable Object> {
      /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 1.5K bytes
    - Click Count (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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. 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)
  9. 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-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)
Back to Top