Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 9 of 9 for transformAsync (0.08 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. 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)
  2. 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)
  3. 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. 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)
  5. 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)
  6. 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)
  7. 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)
  8. android/guava/src/com/google/common/util/concurrent/Futures.java

       * Example usage:
       *
       * {@snippet :
       * ListenableFuture<RowKey> rowKeyFuture = indexService.lookUp(query);
       * ListenableFuture<QueryResult> queryFuture =
       *     transformAsync(rowKeyFuture, dataService::readFuture, executor);
       * }
       *
       * <p>When selecting an executor, note that {@code directExecutor} is dangerous in some cases. See
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 19:26:39 GMT 2026
    - 64.2K bytes
    - Click Count (0)
  9. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

              // setFuture, so a user couldn't break the chain by doing this themselves.  It is also
              // potentially common if someone writes a recursive Futures.transformAsync transformer.
              future = setFuture.owner;
              if (future.value() == setFuture) {
                Object valueToSet = getFutureValue(setFuture.future);
                if (casValue(future, setFuture, valueToSet)) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 14:39:00 GMT 2026
    - 43.6K bytes
    - Click Count (0)
Back to Top