Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 63 for callback (0.16 sec)

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

        MockCallback callback = new MockCallback("foo");
        addCallback(f, callback, directExecutor());
        f.set("foo");
      }
    
      public void testExecutorSuccess() {
        CountingSameThreadExecutor ex = new CountingSameThreadExecutor();
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
        Futures.addCallback(f, callback, ex);
        f.set("foo");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 6.3K bytes
    - Viewed (0)
  2. guava-testlib/test/com/google/common/testing/TearDownStackTest.java

        boolean ran = false;
        @Nullable Callback callback = null;
    
        public SimpleTearDown() {}
    
        public SimpleTearDown(Callback callback) {
          this.callback = callback;
        }
    
        @Override
        public void tearDown() throws Exception {
          if (callback != null) {
            callback.run();
          }
          ran = true;
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 15:19:38 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

       * java.util.concurrent.CompletableFuture#thenAcceptAsync}.
       *
       * @param callback The callback to invoke when this {@code Future} is completed.
       * @param executor The executor to run {@code callback} when the future completes.
       */
      public final void addCallback(FutureCallback<? super V> callback, Executor executor) {
        Futures.addCallback(this, callback, executor);
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 11 19:08:44 GMT 2023
    - 18.7K bytes
    - Viewed (0)
  4. android/guava-testlib/test/com/google/common/testing/TearDownStackTest.java

        boolean ran = false;
        @Nullable Callback callback = null;
    
        public SimpleTearDown() {}
    
        public SimpleTearDown(Callback callback) {
          this.callback = callback;
        }
    
        @Override
        public void tearDown() throws Exception {
          if (callback != null) {
            callback.run();
          }
          ran = true;
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 15:19:38 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/Futures.java

       *
       * @param future The future attach the callback to.
       * @param callback The callback to invoke when {@code future} is completed.
       * @param executor The executor to run {@code callback} when the future completes.
       * @since 10.0
       */
      public static <V extends @Nullable Object> void addCallback(
          final ListenableFuture<V> future,
          final FutureCallback<? super V> callback,
          Executor executor) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 59.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/Resources.java

      }
    
      /**
       * Streams lines from a URL, stopping when our callback returns false, or we have read all of the
       * lines.
       *
       * @param url the URL to read from
       * @param charset the charset used to decode the input stream; see {@link Charsets} for helpful
       *     predefined constants
       * @param callback the LineProcessor to use to handle the lines
       * @return the output of processing the lines
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/AggregateFuture.java

         * handleAllCompleted(), they will already have been nulled out. But in the case of
         * whenAll*().call*(), this future may be pending until the callback runs -- or even longer in
         * the case of callAsync(), which waits for the callback's returned future to complete.
         */
        releaseResources(ALL_INPUT_FUTURES_PROCESSED);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/AbstractChainedListenableFutureTest.java

        listener = new MockFutureListener(resultFuture);
      }
    
      public void testFutureGetBeforeCallback() throws Exception {
        // Verify that get throws a timeout exception before the callback is called.
        assertThrows(TimeoutException.class, () -> resultFuture.get(1L, TimeUnit.MILLISECONDS));
      }
    
      public void testFutureGetThrowsWrappedException() throws Exception {
        inputFuture.setException(EXCEPTION);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/eventbus/EventBusTest.java

       * for bridge methods.
       */
      public void testRegistrationWithBridgeMethod() {
        final AtomicInteger calls = new AtomicInteger();
        bus.register(
            new Callback<String>() {
              @Subscribe
              @Override
              public void call(String s) {
                calls.incrementAndGet();
              }
            });
    
        bus.post("hello");
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/eventbus/EventBusTest.java

       * for bridge methods.
       */
      public void testRegistrationWithBridgeMethod() {
        final AtomicInteger calls = new AtomicInteger();
        bus.register(
            new Callback<String>() {
              @Subscribe
              @Override
              public void call(String s) {
                calls.incrementAndGet();
              }
            });
    
        bus.post("hello");
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.3K bytes
    - Viewed (0)
Back to top