Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 372 for permits (0.2 sec)

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

     * Law</a>).
     *
     * <p>A {@code RateLimiter} is defined primarily by the rate at which permits are issued. Absent
     * additional configuration, permits will be distributed at a fixed rate, defined in terms of
     * permits per second. Permits will be distributed smoothly, with the delay between individual
     * permits being adjusted to ensure that the configured rate is maintained.
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 18.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java

       * "permits / time", thus "1 / rate = time / permits". Thus, "1/rate" (time / permits) times
       * "permits" gives time, i.e., integrals on this function (which is what storedPermitsToWaitTime()
       * computes) correspond to minimum intervals between subsequent requests, for the specified number
       * of requested permits.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 19.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/Striped.java

       * with the specified number of permits.
       *
       * @param stripes the minimum number of stripes (semaphores) required
       * @param permits the number of permits in each semaphore
       * @return a new {@code Striped<Semaphore>}
       */
      public static Striped<Semaphore> semaphore(int stripes, int permits) {
        return custom(stripes, () -> new PaddedSemaphore(permits));
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 10 20:55:18 GMT 2023
    - 20.3K bytes
    - Viewed (1)
  4. android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

        assertTrue("Should acquire initial permit", rateLimiter.tryAcquire());
        assertFalse("Should not acquire additional permit", rateLimiter.tryAcquire());
        stopwatch.sleepMillis(5000);
        assertFalse(
            "Should not acquire additional permit even after sleeping", rateLimiter.tryAcquire());
      }
    
      private long measureTotalTimeMillis(RateLimiter rateLimiter, int permits, Random random) {
    Java
    - Registered: Fri Apr 26 12:43:10 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/RateLimiterTest.java

        assertTrue("Should acquire initial permit", rateLimiter.tryAcquire());
        assertFalse("Should not acquire additional permit", rateLimiter.tryAcquire());
        stopwatch.sleepMillis(5000);
        assertFalse(
            "Should not acquire additional permit even after sleeping", rateLimiter.tryAcquire());
      }
    
      private long measureTotalTimeMillis(RateLimiter rateLimiter, int permits, Random random) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        }
    
        private void tryAcquireUnsuccessfully(int permits, long timeoutMillis) {
          assertFalse(tryAcquireUninterruptibly(semaphore, permits, timeoutMillis, MILLISECONDS));
          completed.assertCompletionNotExpected(timeoutMillis);
        }
    
        private void scheduleRelease(long countdownInMillis) {
          DelayedActionRunnable toRun = new Release(semaphore, countdownInMillis);
    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)
  7. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        }
    
        private void tryAcquireUnsuccessfully(int permits, long timeoutMillis) {
          assertFalse(tryAcquireUninterruptibly(semaphore, permits, timeoutMillis, MILLISECONDS));
          completed.assertCompletionNotExpected(timeoutMillis);
        }
    
        private void scheduleRelease(long countdownInMillis) {
          DelayedActionRunnable toRun = new Release(semaphore, countdownInMillis);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 30.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

       * timeout, unit)} uninterruptibly.
       *
       * @since 18.0
       */
      @J2ktIncompatible
      @GwtIncompatible // concurrency
      @SuppressWarnings("GoodTime") // should accept a java.time.Duration
      public static boolean tryAcquireUninterruptibly(
          Semaphore semaphore, int permits, long timeout, TimeUnit unit) {
        boolean interrupted = false;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 14.4K bytes
    - Viewed (0)
  9. doc/next/6-stdlib/99-minor/net/62254.md

    The new type [KeepAliveConfig] permits fine-tuning the keep-alive
    options for TCP connections, via a new [TCPConn.SetKeepAliveConfig]
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 12 20:57:18 GMT 2024
    - 205 bytes
    - Viewed (0)
  10. mockwebserver/src/main/kotlin/mockwebserver3/internal/ThrottledSink.kt

     *
     */
    package mockwebserver3.internal
    
    import okio.Buffer
    import okio.Sink
    
    /**
     * A sink that sleeps [periodDelayNanos] every [bytesPerPeriod] bytes. Unlike [okio.Throttler],
     * this permits any interval to be used.
     */
    internal class ThrottledSink(
      private val delegate: Sink,
      private val bytesPerPeriod: Long,
      private val periodDelayNanos: Long,
    ) : Sink by delegate {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
Back to top