
com.google.common.util.concurrent.RateLimiter.class Maven / Gradle / Ivy
???? 2 ?
y
/ z |
~
/ ? ?
? ?
? ?@
/ ? ?
? / ?
?
? ? ? / ?
? ? ?
? ?
/ ?
?
/ ?
/ ?
/ ?
/ ?
? ? ?
? ?
/ ?
/ ?
/ ? ? ?
? ?
/ ?
/ ?
/ ? ? ? ?
/ ?
? ?
? ? ?
? ? ? SleepingStopwatch InnerClasses stopwatch ALcom/google/common/util/concurrent/RateLimiter$SleepingStopwatch; mutexDoNotUseDirectly Ljava/lang/Object; create 2(D)Lcom/google/common/util/concurrent/RateLimiter; Code LineNumberTable LocalVariableTable permitsPerSecond D s(Lcom/google/common/util/concurrent/RateLimiter$SleepingStopwatch;D)Lcom/google/common/util/concurrent/RateLimiter; rateLimiter /Lcom/google/common/util/concurrent/RateLimiter; RuntimeInvisibleAnnotations 1Lcom/google/common/annotations/VisibleForTesting; R(DJLjava/util/concurrent/TimeUnit;)Lcom/google/common/util/concurrent/RateLimiter; warmupPeriod J unit Ljava/util/concurrent/TimeUnit;
StackMapTable ?(Lcom/google/common/util/concurrent/RateLimiter$SleepingStopwatch;DJLjava/util/concurrent/TimeUnit;D)Lcom/google/common/util/concurrent/RateLimiter;
coldFactor mutex ()Ljava/lang/Object; this ? ? D(Lcom/google/common/util/concurrent/RateLimiter$SleepingStopwatch;)V setRate (D)V ? doSetRate (DJ)V getRate ()D doGetRate acquire (I)D permits I microsToWait reserve (I)J
tryAcquire #(JLjava/util/concurrent/TimeUnit;)Z timeout (I)Z ()Z $(IJLjava/util/concurrent/TimeUnit;)Z nowMicros
timeoutMicros ?
canAcquire (JJ)Z reserveAndGetWaitLength (IJ)J momentAvailable queryEarliestAvailable (J)J reserveEarliestAvailable toString ()Ljava/lang/String; checkPermits (I)I
SourceFile RateLimiter.java (Ljavax/annotation/concurrent/ThreadSafe; $Lcom/google/common/annotations/Beta; ? ? 6 = ? @com/google/common/util/concurrent/SmoothRateLimiter$SmoothBursty SmoothBursty O ? Q R %warmupPeriod must not be negative: %s java/lang/Object ? ? ? ? ? ? 6 H Ccom/google/common/util/concurrent/SmoothRateLimiter$SmoothWarmingUp SmoothWarmingUp O ? 4 5 O ? ? ? ?com/google/common/util/concurrent/RateLimiter$SleepingStopwatch 2 3 ? ? ? rate must be positive ? ? J K ? ? T U X W Y Z ^ _ ? ? ? ? F ? o s t k l ` e ? F ? ? ? i j n o p l ? ? ? RateLimiter[stableRate=%3.1fqps] V W ? ? ? ? ? 'Requested permits (%s) must be positive ? ? ? -com/google/common/util/concurrent/RateLimiter java/lang/Throwable java/util/concurrent/TimeUnit createFromSystemTimer C()Lcom/google/common/util/concurrent/RateLimiter$SleepingStopwatch; 3com/google/common/util/concurrent/SmoothRateLimiter E(Lcom/google/common/util/concurrent/RateLimiter$SleepingStopwatch;D)V java/lang/Long valueOf (J)Ljava/lang/Long; $com/google/common/base/Preconditions
checkArgument )(ZLjava/lang/String;[Ljava/lang/Object;)V e(Lcom/google/common/util/concurrent/RateLimiter$SleepingStopwatch;JLjava/util/concurrent/TimeUnit;D)V ()V checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object; java/lang/Double isNaN (D)Z (ZLjava/lang/Object;)V
readMicros ()J sleepMicrosUninterruptibly (J)V SECONDS toMicros MICROSECONDS java/lang/Math max (JJ)J java/util/Locale ROOT Ljava/util/Locale; (D)Ljava/lang/Double; java/lang/String format K(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; java/lang/Integer (I)Ljava/lang/Integer;! / 2 3 B 4 5 6 7 8 2 ? &? ? 9 ? : ; <