Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ValueAndCloser (0.24 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToValueAndCloserTest.java

        assertThatFutureFailsWithException(closingFuture.statusFuture());
        ValueAndCloser<?> valueAndCloser = finishToValueAndCloser(closingFuture);
        try {
          valueAndCloser.get();
          fail();
        } catch (ExecutionException expected) {
          assertThat(expected).hasCauseThat().isSameInstanceAs(exception);
        }
        valueAndCloser.closeAsync();
      }
    
      @Override
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToValueAndCloserTest.java

        assertThatFutureFailsWithException(closingFuture.statusFuture());
        ValueAndCloser<?> valueAndCloser = finishToValueAndCloser(closingFuture);
        try {
          valueAndCloser.get();
          fail();
        } catch (ExecutionException expected) {
          assertThat(expected).hasCauseThat().isSameInstanceAs(exception);
        }
        valueAndCloser.closeAsync();
      }
    
      @Override
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/ClosingFuture.java

      @FunctionalInterface
      public interface ValueAndCloserConsumer<V extends @Nullable Object> {
    
        /** Accepts a {@link ValueAndCloser} for the last step in a {@link ClosingFuture} pipeline. */
        void accept(ValueAndCloser<V> valueAndCloser);
      }
    
      /**
       * Starts a {@link ClosingFuture} pipeline by submitting a callable block to an executor.
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 98.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

     *     .transform((closer, result) -> result.get("userName"), directExecutor())
     *     .catching(DBException.class, e -> "no user", directExecutor())
     *     .finishToValueAndCloser(
     *         valueAndCloser -> this.userNameValueAndCloser = valueAndCloser, executor);
     *
     * // later
     * try { // get() will throw if the operation failed or was cancelled.
     *   UserName userName = userNameValueAndCloser.get();
     *   // do something with userName
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 12:37:15 UTC 2024
    - 98.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

        }
      }
    
      static final class NoOpValueAndCloserConsumer<V> implements ValueAndCloserConsumer<V> {
        @Override
        public void accept(ValueAndCloser<V> valueAndCloser) {}
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 12:37:15 UTC 2024
    - 75.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

        }
      }
    
      static final class NoOpValueAndCloserConsumer<V> implements ValueAndCloserConsumer<V> {
        @Override
        public void accept(ValueAndCloser<V> valueAndCloser) {}
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 12:37:15 UTC 2024
    - 75.3K bytes
    - Viewed (0)
Back to top