Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for rateLimiters (0.07 sec)

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

      }
    
      @VisibleForTesting
      static RateLimiter create(double permitsPerSecond, SleepingStopwatch stopwatch) {
        RateLimiter rateLimiter = new SmoothBursty(stopwatch, 1.0 /* maxBurstSeconds */);
        rateLimiter.setRate(permitsPerSecond);
        return rateLimiter;
      }
    
      /**
       * Creates a {@code RateLimiter} with the specified stable throughput, given as "permits per
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/RateLimiter.java

      }
    
      @VisibleForTesting
      static RateLimiter create(double permitsPerSecond, SleepingStopwatch stopwatch) {
        RateLimiter rateLimiter = new SmoothBursty(stopwatch, 1.0 /* maxBurstSeconds */);
        rateLimiter.setRate(permitsPerSecond);
        return rateLimiter;
      }
    
      /**
       * Creates a {@code RateLimiter} with the specified stable throughput, given as "permits per
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

      }
    
      public void testSimpleWeights() {
        RateLimiter rateLimiter = RateLimiter.create(1.0, stopwatch);
        rateLimiter.acquire(1); // no wait
        rateLimiter.acquire(1); // R1.00, to repay previous
        rateLimiter.acquire(2); // R1.00, to repay previous
        rateLimiter.acquire(4); // R2.00, to repay previous
        rateLimiter.acquire(8); // R4.00, to repay previous
        rateLimiter.acquire(1); // R8.00, to repay previous
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

      }
    
      public void testSimpleWeights() {
        RateLimiter rateLimiter = RateLimiter.create(1.0, stopwatch);
        rateLimiter.acquire(1); // no wait
        rateLimiter.acquire(1); // R1.00, to repay previous
        rateLimiter.acquire(2); // R1.00, to repay previous
        rateLimiter.acquire(4); // R2.00, to repay previous
        rateLimiter.acquire(8); // R4.00, to repay previous
        rateLimiter.acquire(1); // R8.00, to repay previous
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

              }
            });
        assertEquals(oldName, Thread.currentThread().getName());
      }
    
      public void testExecutors_nullCheck() throws Exception {
        new ClassSanityTester()
            .setDefault(RateLimiter.class, RateLimiter.create(1.0))
            .forAllPublicStaticMethods(MoreExecutors.class)
            .thatReturn(Executor.class)
            .testNulls();
      }
    
      private static class TestApplication extends Application {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

              }
            });
        assertEquals(oldName, Thread.currentThread().getName());
      }
    
      public void testExecutors_nullCheck() throws Exception {
        new ClassSanityTester()
            .setDefault(RateLimiter.class, RateLimiter.create(1.0))
            .forAllPublicStaticMethods(MoreExecutors.class)
            .thatReturn(Executor.class)
            .testNulls();
      }
    
      private static class TestApplication extends Application {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
Back to top