Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 68 for requests (0.36 sec)

  1. android/guava/src/com/google/common/cache/Cache.java

       * with a differently behaving {@code loader}. For example, a call that requests a short timeout
       * for an RPC may wait for a similar call that requests a long timeout, or a call by an
       * unprivileged user may return a resource accessible only to a privileged user making a similar
       * call. To prevent this problem, create a key object that includes all values that affect the
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sun Aug 07 02:38:22 GMT 2022
    - 8.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/cache/TestingCacheLoaders.java

        public V load(K key) {
          return constant;
        }
      }
    
      /**
       * Returns a {@code new Object()} for every request, and increments a counter for every request.
       * An {@code Integer} loader that returns the key for {@code load} requests, and increments the
       * old value on {@code reload} requests. The load counts are accessible via {@link #getLoadCount}
       * and {@link #getReloadCount}.
       */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed May 09 15:17:25 GMT 2018
    - 4.9K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java

        // value seen so far
        while (cache.getUnchecked(nextRandomKey()) < maximumSize) {}
    
        requests.set(0);
        misses.set(0);
      }
    
      @Benchmark
      int time(int reps) {
        int dummy = 0;
        for (int i = 0; i < reps; i++) {
          dummy += cache.getUnchecked(nextRandomKey());
        }
        requests.addAndGet(reps);
        return dummy;
      }
    
      private int nextRandomKey() {
        int a = random.nextInt(max);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

            "R0.00", "R0.00", // Now comes the free request.
            "R0.50", // Now it's 0.5 seconds per request.
            "R0.50");
    
        limiter.setRate(Double.POSITIVE_INFINITY);
        limiter.acquire();
        limiter.acquire();
        limiter.acquire();
        assertEvents("R0.50", "R0.00", "R0.00"); // we repay the last request (.5sec), then back to +oo
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

          this.semaphore = new Semaphore(0);
          this.completed = new Completion(countdownInMillis);
          scheduleRelease(countdownInMillis);
        }
    
        /**
         * Requests a permit from the semaphore with a timeout and asserts that operation completed in
         * the expected timeframe.
         */
        void tryAcquireSuccessfully(long timeoutMillis) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 31.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/MultisetsCollectionTest.java

            }
            if (elements.length > 0) {
              multiset1.add(elements[0]);
            }
            if (elements.length > 1) {
              /*
               * When a test requests a multiset with duplicates, our plan of
               * "add an extra item 0 to A and an extra item 1 to B" really means
               * "add an extra item 0 to A and B," which isn't what we want.
               */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 9.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/MultisetsCollectionTest.java

            }
            if (elements.length > 0) {
              multiset1.add(elements[0]);
            }
            if (elements.length > 1) {
              /*
               * When a test requests a multiset with duplicates, our plan of
               * "add an extra item 0 to A and an extra item 1 to B" really means
               * "add an extra item 0 to A and B," which isn't what we want.
               */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 9.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

          this.semaphore = new Semaphore(0);
          this.completed = new Completion(countdownInMillis);
          scheduleRelease(countdownInMillis);
        }
    
        /**
         * Requests a permit from the semaphore with a timeout and asserts that operation completed in
         * the expected timeframe.
         */
        void tryAcquireSuccessfully(long timeoutMillis) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 30.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/AbstractService.java

    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.TimeoutException;
    import javax.annotation.CheckForNull;
    
    /**
     * Base class for implementing services that can handle {@link #doStart} and {@link #doStop}
     * requests, responding to them with {@link #notifyStarted()} and {@link #notifyStopped()}
     * callbacks. Its subclasses must manage threads manually; consider {@link
     * AbstractExecutionThreadService} if you need only a single execution thread.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 18:32:03 GMT 2023
    - 20.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/ServiceManager.java

     *     manager.addListener(new Listener() {
     *         public void stopped() {}
     *         public void healthy() {
     *           // Services have been initialized and are healthy, start accepting requests...
     *         }
     *         public void failure(Service service) {
     *           // Something failed, at this point we could log it, notify a load balancer, or take
     *           // some other action.  For now we will just exit.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 30.5K bytes
    - Viewed (0)
Back to top