Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 11 for catchingAsync (0.1 seconds)

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

        extends AbstractFuture<V> {
      /*
       * This server copy of the class is empty. The corresponding GWT copy contains alternative
       * versions of catching() and catchingAsync() with slightly different signatures from the ones
       * found in FluentFuture.java.
       */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 1.4K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        };
      }
    
      // catchingAsync tests cloned from the old withFallback tests:
    
      public void testCatchingAsync_inputDoesNotRaiseException() throws Exception {
        AsyncFunction<Throwable, Integer> fallback = unexpectedAsyncFunction();
        ListenableFuture<Integer> originalFuture = immediateFuture(7);
        ListenableFuture<Integer> faultTolerantFuture =
    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

        };
      }
    
      // catchingAsync tests cloned from the old withFallback tests:
    
      public void testCatchingAsync_inputDoesNotRaiseException() throws Exception {
        AsyncFunction<Throwable, Integer> fallback = unexpectedAsyncFunction();
        ListenableFuture<Integer> originalFuture = immediateFuture(7);
        ListenableFuture<Integer> faultTolerantFuture =
    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/GwtFuturesCatchingSpecialization.java

    @GwtCompatible
    @J2ktIncompatible // Super-sourced
    abstract class GwtFuturesCatchingSpecialization {
      /*
       * This server copy of the class is empty. The corresponding GWT copy contains alternative
       * versions of catching() and catchingAsync() with slightly different signatures from the ones
       * found in Futures.java.
       */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 1.4K bytes
    - Click Count (0)
  5. guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

      }
    
      public void testCatchingAsync() throws Exception {
        FluentFuture<?> f =
            FluentFuture.from(immediateFailedFuture(new CustomRuntimeException()))
                .catchingAsync(Throwable.class, t -> immediateFuture(t.getClass()), directExecutor());
        assertThat(f.get()).isEqualTo(CustomRuntimeException.class);
      }
    
      public void testTransform() throws Exception {
        FluentFuture<Integer> f =
    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)
  6. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

      @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class")
      public final <X extends Throwable> FluentFuture<V> catchingAsync(
          Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) {
        return (FluentFuture<V>) Futures.catchingAsync(this, exceptionType, fallback, executor);
      }
    
      /**
       * Returns a future that delegates to this future but will finish early (via a {@link
    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)
  7. android/guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

      }
    
      public void testCatchingAsync() throws Exception {
        FluentFuture<?> f =
            FluentFuture.from(immediateFailedFuture(new CustomRuntimeException()))
                .catchingAsync(Throwable.class, t -> immediateFuture(t.getClass()), directExecutor());
        assertThat(f.get()).isEqualTo(CustomRuntimeException.class);
      }
    
      public void testTransform() throws Exception {
        FluentFuture<Integer> f =
    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)
  8. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

              @Override
              public String toString() {
                return fallback.toString();
              }
            };
        // TODO(dpb): Switch to future.catchingSync when that exists (passing a throwing function).
        return derive(state.future.catchingAsync(exceptionType, applyFallback, executor));
      }
    
      /**
       * Returns a new {@code ClosingFuture} pipeline step derived from this one by applying a function
    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/Futures.java

       *
       * // Falling back to a zero counter in case an exception happens when
       * // processing the RPC to fetch counters.
       * ListenableFuture<Integer> faultTolerantFuture = Futures.catchingAsync(
       *     fetchCounterFuture, FetchException.class, x -> immediateFuture(0), directExecutor());
       * }
       *
       * <p>The fallback can also choose to propagate the original exception when desired:
       *
    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)
  10. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

      }
    
      public void testCatchingAsync_preventsFurtherOperations() {
        ClosingFuture<String> closingFuture = ClosingFuture.from(immediateFuture("value1"));
        ClosingFuture<String> unused =
            closingFuture.catchingAsync(
                Exception.class, withoutCloser(x -> immediateFuture("value2")), executor);
        assertDerivingThrowsIllegalStateException(closingFuture);
        assertFinalStepThrowsIllegalStateException(closingFuture);
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 63K bytes
    - Click Count (0)
Back to Top