Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 12 for AsyncFunction (0.07 seconds)

  1. android/guava/src/com/google/common/util/concurrent/AsyncFunction.java

    /**
     * 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> {
      /**
       * Returns an output {@code Future} to use in place of the given {@code input}. The output {@code
    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

              throw new RejectedExecutionException();
            }
          };
    
      private static <V> AsyncFunction<V, V> asyncIdentity() {
        return Futures::immediateFuture;
      }
    
      private static <I, O> AsyncFunction<I, O> tagged(String toString, AsyncFunction<I, O> function) {
        return new AsyncFunction<I, O>() {
          @Override
          public ListenableFuture<O> apply(I input) throws Exception {
    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

              throw new RejectedExecutionException();
            }
          };
    
      private static <V> AsyncFunction<V, V> asyncIdentity() {
        return Futures::immediateFuture;
      }
    
      private static <I, O> AsyncFunction<I, O> tagged(String toString, AsyncFunction<I, O> function) {
        return new AsyncFunction<I, O>() {
          @Override
          public ListenableFuture<O> apply(I input) throws Exception {
    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/AbstractCatchingFuture.java

            AsyncFunction<? super X, ? extends V> fallback) {
          super(input, exceptionType, fallback);
        }
    
        @Override
        ListenableFuture<? extends V> doFallback(
            AsyncFunction<? super X, ? extends V> fallback, X cause) throws Exception {
          ListenableFuture<? extends V> output = fallback.apply(cause);
          checkNotNull(
              output,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Sep 11 18:28:58 GMT 2025
    - 9K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java

          super(inputFuture, function);
        }
    
        @Override
        ListenableFuture<? extends O> doTransform(
            AsyncFunction<? super I, ? extends O> function, @ParametricNullness I input)
            throws Exception {
          ListenableFuture<? extends O> output = function.apply(input);
          checkNotNull(
              output,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Feb 20 18:03:37 GMT 2025
    - 10.8K bytes
    - Click Count (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.ExecutionException;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Unit tests for {@link Futures#transformAsync(ListenableFuture, AsyncFunction, Executor)}.
     *
     * @author Nishant Thakkar
     */
    @NullUnmarked
    @GwtIncompatible
    @J2ktIncompatible
    public class FuturesTransformAsyncTest extends AbstractChainedListenableFutureTest<String> {
    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)
  7. guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.ExecutionException;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Unit tests for {@link Futures#transformAsync(ListenableFuture, AsyncFunction, Executor)}.
     *
     * @author Nishant Thakkar
     */
    @NullUnmarked
    @GwtIncompatible
    @J2ktIncompatible
    public class FuturesTransformAsyncTest extends AbstractChainedListenableFutureTest<String> {
    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)
  8. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

          Class<X> exceptionType, AsyncClosingFunction<? super X, W> fallback, Executor executor) {
        checkNotNull(fallback);
        AsyncFunction<X, W> asyncFunction =
            new AsyncFunction<X, W>() {
              @Override
              public ListenableFuture<W> apply(X exception) throws Exception {
                return state.closeables.applyAsyncClosingFunction(fallback, exception);
    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)
  9. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

      /**
       * Returns a {@code Future} whose result is taken from this {@code Future} or, if this {@code
       * Future} fails with the given {@code exceptionType}, from the result provided by the {@code
       * fallback}. {@link AsyncFunction#apply} is not invoked until the primary input has failed, so if
       * the primary input succeeds, it is never invoked. If, during the invocation of {@code fallback},
    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)
  10. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/GwtFluentFutureCatchingSpecialization.java

          Executor executor) {
        return (FluentFuture<V>) Futures.catching(this, exceptionType, fallback, executor);
      }
    
      public final FluentFuture<V> catchingAsync(
          Class<Throwable> exceptionType,
          AsyncFunction<? super Throwable, ? extends V> fallback,
          Executor executor) {
        return (FluentFuture<V>) Futures.catchingAsync(this, exceptionType, fallback, executor);
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 1.9K bytes
    - Click Count (0)
Back to Top