Package com.google_voltpatches.common.util.concurrent.SmoothRateLimiter

Examples of com.google_voltpatches.common.util.concurrent.SmoothRateLimiter.SmoothBursty


   * TODO(cpovirk): make SleepingStopwatch the last parameter throughout the class so that the
   * overloads follow the usual convention: Foo(int), Foo(int, SleepingStopwatch)
   */
  @VisibleForTesting
  static RateLimiter create(SleepingStopwatch stopwatch, double permitsPerSecond) {
    RateLimiter rateLimiter = new SmoothBursty(stopwatch, 1.0 /* maxBurstSeconds */);
    rateLimiter.setRate(permitsPerSecond);
    return rateLimiter;
  }
View Full Code Here

TOP

Related Classes of com.google_voltpatches.common.util.concurrent.SmoothRateLimiter.SmoothBursty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.