Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 88 for listener (0.19 sec)

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

        private boolean expectCall = false;
        private final CountDownLatch calledCountDown = new CountDownLatch(1);
    
        @Override
        public void run() {
          assertTrue("Listener called before it was expected", expectCall);
          assertFalse("Listener called more than once", wasCalled());
          calledCountDown.countDown();
        }
    
        public void expectCall() {
          assertFalse("expectCall is already true", expectCall);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

        exec.shutdown();
        exec.awaitTermination(100, MILLISECONDS);
      }
    
      /**
       * Tests that all listeners complete, even if they were added before or after the future was
       * finishing. Also acts as a concurrency test to make sure the locking is done correctly when a
       * future is finishing so that no listeners can be lost.
       */
      public void testAllListenersCompleteSuccessfully()
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  3. guava/src/com/google/common/cache/CacheBuilder.java

          return ticker;
        }
        return recordsTime ? Ticker.systemTicker() : NULL_TICKER;
      }
    
      /**
       * Specifies a listener instance that caches should notify each time an entry is removed for any
       * {@linkplain RemovalCause reason}. Each cache created by this builder will invoke this listener
       * as part of the routine maintenance described in the class documentation above.
       *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 51.3K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java

     */
    @ElementTypesAreNonnullByDefault
    public interface ListenableFuture<V extends @Nullable Object> extends Future<V>, IThenable<V> {
      void addListener(Runnable listener, Executor executor);
    
      /** Note that this method is not expected to be overridden. */
      @JsMethod
      @Override
      default <R extends @Nullable Object> IThenable<R> then(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Oct 24 18:27:19 GMT 2023
    - 3.9K bytes
    - Viewed (1)
  5. android/guava-tests/test/com/google/common/util/concurrent/FuturesTransformAsyncTest.java

              throw EXCEPTION;
          }
          return outputFuture;
        }
      }
    
      public void testFutureGetThrowsFunctionException() throws Exception {
        inputFuture.set(EXCEPTION_DATA);
        listener.assertException(EXCEPTION);
      }
    
      public void testFutureGetThrowsCancellationIfInputCancelled() throws Exception {
        inputFuture.cancel(true); // argument is ignored
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/ListenerCallQueue.java

       */
      public void addListener(L listener, Executor executor) {
        checkNotNull(listener, "listener");
        checkNotNull(executor, "executor");
        listeners.add(new PerListenerQueue<>(listener, executor));
      }
    
      /**
       * Enqueues an event to be run on currently known listeners.
       *
       * <p>The {@code toString} method of the Event itself will be used to describe the event in the
       * case of an error.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 8.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java

         *
         * - OutOfMemoryError from allocations in setFuture(): The calculus here is similar to
         * StackOverflowError: We can't reliably call setException(error).
         *
         * - Any kind of Error from a listener. Even if we could distinguish that case (by exposing some
         * extra state from AbstractFuture), our options are limited: A call to setException() would be
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/cache/CacheBuilder.java

          return ticker;
        }
        return recordsTime ? Ticker.systemTicker() : NULL_TICKER;
      }
    
      /**
       * Specifies a listener instance that caches should notify each time an entry is removed for any
       * {@linkplain RemovalCause reason}. Each cache created by this builder will invoke this listener
       * as part of the routine maintenance described in the class documentation above.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

         */
        @Override
        public void addListener(Runnable listener, Executor exec) {
          executionList.add(listener, exec);
        }
    
        /**
         * Subclasses should invoke this method to set the result of the computation to {@code value}.
         * This will set the state of the future to {@link OldAbstractFuture.Sync#COMPLETED} and invoke
         * the listeners if the state was successfully changed.
         *
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed May 09 15:17:25 GMT 2018
    - 13.6K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

         */
        @Override
        public void addListener(Runnable listener, Executor exec) {
          executionList.add(listener, exec);
        }
    
        /**
         * Subclasses should invoke this method to set the result of the computation to {@code value}.
         * This will set the state of the future to {@link OldAbstractFuture.Sync#COMPLETED} and invoke
         * the listeners if the state was successfully changed.
         *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 13.6K bytes
    - Viewed (0)
Back to top