Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for AsyncFunction (0.16 sec)

  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
    @ElementTypesAreNonnullByDefault
    public interface AsyncFunction<I extends @Nullable Object, O extends @Nullable Object> {
      /**
    Registered: 2024-06-12 16:38
    - Last Modified: 2021-06-20 10:45
    - 1.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/util/concurrent/AsyncFunction.java

     * {@link Futures#transformAsync(ListenableFuture, AsyncFunction, Executor)}.
     *
     * @author Chris Povirk
     * @since 11.0
     */
    @GwtCompatible
    @FunctionalInterface
    @ElementTypesAreNonnullByDefault
    public interface AsyncFunction<I extends @Nullable Object, O extends @Nullable Object> {
      /**
    Registered: 2024-06-12 16:38
    - Last Modified: 2021-06-20 10:45
    - 1.6K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/AbstractCatchingFuture.java

      }
    
      /**
       * An {@link AbstractCatchingFuture} that delegates to an {@link AsyncFunction} and {@link
       * #setFuture(ListenableFuture)}.
       */
      private static final class AsyncCatchingFuture<V extends @Nullable Object, X extends Throwable>
          extends AbstractCatchingFuture<
              V, X, AsyncFunction<? super X, ? extends V>, ListenableFuture<? extends V>> {
        AsyncCatchingFuture(
    Registered: 2024-06-12 16:38
    - Last Modified: 2024-02-01 21:46
    - 8.7K bytes
    - Viewed (0)
  4. 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> outputFuture = function.apply(input);
          checkNotNull(
              outputFuture,
    Registered: 2024-06-12 16:38
    - Last Modified: 2024-02-01 21:46
    - 10.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

            }
          };
    
      private static <V> AsyncFunction<V, V> asyncIdentity() {
        return new AsyncFunction<V, V>() {
          @Override
          public ListenableFuture<V> apply(V input) {
            return immediateFuture(input);
          }
        };
      }
    
      private static <I, O> AsyncFunction<I, O> tagged(
          final String toString, final AsyncFunction<I, O> function) {
        return new AsyncFunction<I, O>() {
    Registered: 2024-06-12 16:38
    - Last Modified: 2024-05-29 16:29
    - 144.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

            }
          };
    
      private static <V> AsyncFunction<V, V> asyncIdentity() {
        return new AsyncFunction<V, V>() {
          @Override
          public ListenableFuture<V> apply(V input) {
            return immediateFuture(input);
          }
        };
      }
    
      private static <I, O> AsyncFunction<I, O> tagged(
          final String toString, final AsyncFunction<I, O> function) {
        return new AsyncFunction<I, O>() {
    Registered: 2024-06-12 16:38
    - Last Modified: 2024-05-29 16:29
    - 144.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/AbstractCatchingFuture.java

      }
    
      /**
       * An {@link AbstractCatchingFuture} that delegates to an {@link AsyncFunction} and {@link
       * #setFuture(ListenableFuture)}.
       */
      private static final class AsyncCatchingFuture<V extends @Nullable Object, X extends Throwable>
          extends AbstractCatchingFuture<
              V, X, AsyncFunction<? super X, ? extends V>, ListenableFuture<? extends V>> {
        AsyncCatchingFuture(
    Registered: 2024-06-12 16:38
    - Last Modified: 2024-02-01 21:46
    - 8.7K bytes
    - Viewed (0)
  8. 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> outputFuture = function.apply(input);
          checkNotNull(
              outputFuture,
    Registered: 2024-06-12 16:38
    - Last Modified: 2024-02-01 21:46
    - 10.6K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

        FluentFuture<?> f =
            FluentFuture.from(immediateFailedFuture(new CustomRuntimeException()))
                .catchingAsync(
                    Throwable.class,
                    new AsyncFunction<Throwable, Class<?>>() {
                      @Override
                      public ListenableFuture<Class<?>> apply(Throwable input) {
                        return Futures.<Class<?>>immediateFuture(input.getClass());
    Registered: 2024-06-12 16:38
    - Last Modified: 2024-02-13 14:28
    - 5.7K bytes
    - Viewed (0)
  10. 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},
    Registered: 2024-06-12 16:38
    - Last Modified: 2023-04-11 19:08
    - 18.7K bytes
    - Viewed (0)
Back to top