Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 88 for listener (0.2 sec)

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

        }
    
        @Override
        public final boolean isCancelled() {
          return super.isCancelled();
        }
    
        @Override
        public final void addListener(Runnable listener, Executor executor) {
          super.addListener(listener, executor);
        }
    
        @CanIgnoreReturnValue
        @Override
        public final boolean cancel(boolean mayInterruptIfRunning) {
          return super.cancel(mayInterruptIfRunning);
        }
    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)
  2. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

       *   <li>When a {@code ListenableFuture} listener is registered to run under {@code
       *       directExecutor}, the listener can execute in any of three possible threads:
       *       <ol>
       *         <li>When a thread attaches a listener to a {@code ListenableFuture} that's already
       *             complete, the listener runs immediately in that thread.
       *         <li>When a thread attaches a listener to a {@code ListenableFuture} that's
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        FakeTicker ticker = new FakeTicker();
        QueuingRemovalListener<Integer, Integer> listener =
            TestingRemovalListeners.queuingRemovalListener();
        Cache<Integer, Integer> cache =
            CacheBuilder.newBuilder()
                .expireAfterAccess(1, TimeUnit.MINUTES)
                .removalListener(listener)
                .ticker(ticker)
                .build();
        cache.put(1, 1);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/eventbus/SubscriberRegistry.java

      SubscriberRegistry(EventBus bus) {
        this.bus = checkNotNull(bus);
      }
    
      /** Registers all subscriber methods on the given listener object. */
      void register(Object listener) {
        Multimap<Class<?>, Subscriber> listenerMethods = findAllSubscribers(listener);
    
        for (Entry<Class<?>, Collection<Subscriber>> entry : listenerMethods.asMap().entrySet()) {
          Class<?> eventType = entry.getKey();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 22 13:05:46 GMT 2021
    - 10.5K bytes
    - Viewed (0)
  5. 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 Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        for (int k = 0; k < 50; k++) {
          // For each listener we add a task that submits it to the executor directly for the blocking
          // get use case and another task that adds it as a listener to the future to exercise both
          // racing addListener calls and addListener calls completing after the future completes.
          final Runnable listener =
              k % 2 == 0 ? collectResultsRunnable : collectResultsTimedGetRunnable;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/FuturesTransformTest.java

            return RESULT_DATA;
          } else {
            throw WRAPPED_EXCEPTION;
          }
        }
      }
    
      public void testFutureGetThrowsFunctionException() throws Exception {
        inputFuture.set(EXCEPTION_DATA);
        listener.assertException(WRAPPED_EXCEPTION);
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Jun 28 16:27:15 GMT 2018
    - 1.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        FakeTicker ticker = new FakeTicker();
        QueuingRemovalListener<Integer, Integer> listener =
            TestingRemovalListeners.queuingRemovalListener();
        Cache<Integer, Integer> cache =
            CacheBuilder.newBuilder()
                .expireAfterAccess(1, TimeUnit.MINUTES)
                .removalListener(listener)
                .ticker(ticker)
                .build();
        cache.put(1, 1);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java

              }
            };
        // Adding the listener to both futures guarantees that newFuture will always be set. Adding to
        // taskFuture guarantees completion if the callable is invoked, and adding to outputFuture
        // propagates cancellation if the callable has not yet been invoked.
        outputFuture.addListener(listener, directExecutor());
        taskFuture.addListener(listener, directExecutor());
    
        return outputFuture;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java

        super(callable);
      }
    
      ListenableFutureTask(Runnable runnable, @ParametricNullness V result) {
        super(runnable, result);
      }
    
      @Override
      public void addListener(Runnable listener, Executor exec) {
        executionList.add(listener, exec);
      }
    
      @CanIgnoreReturnValue
      @Override
      @ParametricNullness
      public V get(long timeout, TimeUnit unit)
          throws TimeoutException, InterruptedException, ExecutionException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 4.3K bytes
    - Viewed (0)
Back to top