Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 228 for permits (0.19 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-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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  4. 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)
  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. 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)
  7. 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 May 07 11:14:38 GMT 2024
    - Last Modified: Fri Apr 12 20:57:18 GMT 2024
    - 205 bytes
    - Viewed (0)
  8. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/google/AbstractBiMapTester.java

          assertFalse(
              "Inverse should not contain value " + reversed.getValue(),
              inv.containsValue(reversed.getValue()));
          /*
           * TODO(cpovirk): This is a bit stronger than super.expectMissing(), which permits a <key,
           * someOtherValue> pair.
           */
          assertNull(
              "Inverse should not return a mapping for key " + reversed.getKey(),
              inv.get(reversed.getKey()));
        }
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/google/AbstractBiMapTester.java

          assertFalse(
              "Inverse should not contain value " + reversed.getValue(),
              inv.containsValue(reversed.getValue()));
          /*
           * TODO(cpovirk): This is a bit stronger than super.expectMissing(), which permits a <key,
           * someOtherValue> pair.
           */
          assertNull(
              "Inverse should not return a mapping for key " + reversed.getKey(),
              inv.get(reversed.getKey()));
        }
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.1K bytes
    - Viewed (0)
Back to top