com.google.common.util.concurrent.RateLimiter.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk Show documentation
Show all versions of java-sdk Show documentation
Java SDK for connecting to the Relayr Cloud
???? 2 ?
/ ? 3 ?
/ ? ?
?
/ ?
/ ? ?
?
? ?A??e
?
? ? / ? / ? / ?
3 ? / ?
? ? ?
? ?
/ ?
/ ? ? ?
? ? / ?
/ ?
/ ?
/ ?
/ ?
3 ?
/ ? ? ? ? / ?
? ?
/ ? / ? ? ? ?A.??
? ?
? ? ? ? InnerClasses ? SleepingTicker Bursty WarmingUp ticker >Lcom/google/common/util/concurrent/RateLimiter$SleepingTicker; offsetNanos J
storedPermits D
maxPermits stableIntervalMicros mutex Ljava/lang/Object; nextFreeTicketMicros create 2(D)Lcom/google/common/util/concurrent/RateLimiter; Code LineNumberTable LocalVariableTable permitsPerSecond p(Lcom/google/common/util/concurrent/RateLimiter$SleepingTicker;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 unit Ljava/util/concurrent/TimeUnit; ?(Lcom/google/common/util/concurrent/RateLimiter$SleepingTicker;DJLjava/util/concurrent/TimeUnit;)Lcom/google/common/util/concurrent/RateLimiter; createWithCapacity maxBurstBuildup maxBurstSeconds 6Lcom/google/common/util/concurrent/RateLimiter$Bursty; A(Lcom/google/common/util/concurrent/RateLimiter$SleepingTicker;)V this setRate (D)V
StackMapTable ? ? ? doSetRate (DD)V getRate ()D acquire ()V (I)V permits I microsToWait
tryAcquire #(JLjava/util/concurrent/TimeUnit;)Z timeout (I)Z ()Z $(IJLjava/util/concurrent/TimeUnit;)Z nowMicros
timeoutMicros ? checkPermits reserveNextTicket (DJ)J requiredPermits microsToNextFreeTicket storedPermitsToSpend freshPermits
waitMicros storedPermitsToWaitTime (DD)J resync (J)V readSafeMicros ()J toString ()Ljava/lang/String; r(Lcom/google/common/util/concurrent/RateLimiter$SleepingTicker;Lcom/google/common/util/concurrent/RateLimiter$1;)V x0 x1 1Lcom/google/common/util/concurrent/RateLimiter$1;
SourceFile RateLimiter.java (Ljavax/annotation/concurrent/ThreadSafe; $Lcom/google/common/annotations/Beta; V W ? 8 B H 4com/google/common/util/concurrent/RateLimiter$Bursty V ? Y Z B Q 7com/google/common/util/concurrent/RateLimiter$WarmingUp V ? ? ? ? V d java/lang/Object ? @ A : 7 8 ? 9 : ? ? ? rate must be positive ? ? ? ~ | } ? P ? ? > < _ ` c e r e s t ? } i n ? P "Requested permits must be positive ; < ? ? ? z { = < ? P RateLimiter[stableRate=%3.1fqps] ? ? ? ? ? -com/google/common/util/concurrent/RateLimiter /com/google/common/util/concurrent/RateLimiter$1