abstract class com.google.common.util.concurrent.SmoothRateLimiter extends com.google.common.util.concurrent.RateLimiter
minor version: 0
major version: 59
flags: flags: (0x0420) ACC_SUPER, ACC_ABSTRACT
this_class: com.google.common.util.concurrent.SmoothRateLimiter
super_class: com.google.common.util.concurrent.RateLimiter
{
double storedPermits;
descriptor: D
flags: (0x0000)
double maxPermits;
descriptor: D
flags: (0x0000)
double stableIntervalMicros;
descriptor: D
flags: (0x0000)
private long nextFreeTicketMicros;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private void <init>(com.google.common.util.concurrent.RateLimiter$SleepingStopwatch);
descriptor: (Lcom/google/common/util/concurrent/RateLimiter$SleepingStopwatch;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokespecial com.google.common.util.concurrent.RateLimiter.<init>:(Lcom/google/common/util/concurrent/RateLimiter$SleepingStopwatch;)V
1: aload 0
lconst_0
putfield com.google.common.util.concurrent.SmoothRateLimiter.nextFreeTicketMicros:J
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/google/common/util/concurrent/SmoothRateLimiter;
0 3 1 stopwatch Lcom/google/common/util/concurrent/RateLimiter$SleepingStopwatch;
MethodParameters:
Name Flags
stopwatch
final void doSetRate(double, long);
descriptor: (DJ)V
flags: (0x0010) ACC_FINAL
Code:
stack=5, locals=7, args_size=3
start local 0 start local 1 start local 3 0: aload 0
lload 3
invokevirtual com.google.common.util.concurrent.SmoothRateLimiter.resync:(J)V
1: getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
lconst_1
invokevirtual java.util.concurrent.TimeUnit.toMicros:(J)J
l2d
dload 1
ddiv
dstore 5
start local 5 2: aload 0
dload 5
putfield com.google.common.util.concurrent.SmoothRateLimiter.stableIntervalMicros:D
3: aload 0
dload 1
dload 5
invokevirtual com.google.common.util.concurrent.SmoothRateLimiter.doSetRate:(DD)V
4: return
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/google/common/util/concurrent/SmoothRateLimiter;
0 5 1 permitsPerSecond D
0 5 3 nowMicros J
2 5 5 stableIntervalMicros D
MethodParameters:
Name Flags
permitsPerSecond
nowMicros
abstract void doSetRate(double, double);
descriptor: (DD)V
flags: (0x0400) ACC_ABSTRACT
MethodParameters:
Name Flags
permitsPerSecond
stableIntervalMicros
final double doGetRate();
descriptor: ()D
flags: (0x0010) ACC_FINAL
Code:
stack=4, locals=1, args_size=1
start local 0 0: getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
lconst_1
invokevirtual java.util.concurrent.TimeUnit.toMicros:(J)J
l2d
aload 0
getfield com.google.common.util.concurrent.SmoothRateLimiter.stableIntervalMicros:D
ddiv
dreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/google/common/util/concurrent/SmoothRateLimiter;
final long queryEarliestAvailable(long);
descriptor: (J)J
flags: (0x0010) ACC_FINAL
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield com.google.common.util.concurrent.SmoothRateLimiter.nextFreeTicketMicros:J
lreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/google/common/util/concurrent/SmoothRateLimiter;
0 1 1 nowMicros J
MethodParameters:
Name Flags
nowMicros
final long reserveEarliestAvailable(int, long);
descriptor: (IJ)J
flags: (0x0010) ACC_FINAL
Code:
stack=6, locals=12, args_size=3
start local 0 start local 1 start local 2 0: aload 0
lload 2
invokevirtual com.google.common.util.concurrent.SmoothRateLimiter.resync:(J)V
1: aload 0
getfield com.google.common.util.concurrent.SmoothRateLimiter.nextFreeTicketMicros:J
lstore 4
start local 4 2: iload 1
i2d
aload 0
getfield com.google.common.util.concurrent.SmoothRateLimiter.storedPermits:D
invokestatic java.lang.Math.min:(DD)D
dstore 6
start local 6 3: iload 1
i2d
dload 6
dsub
dstore 8
start local 8 4: aload 0
aload 0
getfield com.google.common.util.concurrent.SmoothRateLimiter.storedPermits:D
dload 6
invokevirtual com.google.common.util.concurrent.SmoothRateLimiter.storedPermitsToWaitTime:(DD)J
5: dload 8
aload 0
getfield com.google.common.util.concurrent.SmoothRateLimiter.stableIntervalMicros:D
dmul
d2l
6: ladd
7: lstore 10
start local 10 8: aload 0
aload 0
getfield com.google.common.util.concurrent.SmoothRateLimiter.nextFreeTicketMicros:J
lload 10
invokestatic com.google.common.math.LongMath.saturatedAdd:(JJ)J
putfield com.google.common.util.concurrent.SmoothRateLimiter.nextFreeTicketMicros:J
9: aload 0
dup
getfield com.google.common.util.concurrent.SmoothRateLimiter.storedPermits:D
dload 6
dsub
putfield com.google.common.util.concurrent.SmoothRateLimiter.storedPermits:D
10: lload 4
lreturn
end local 10 end local 8 end local 6 end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/google/common/util/concurrent/SmoothRateLimiter;
0 11 1 requiredPermits I
0 11 2 nowMicros J
2 11 4 returnValue J
3 11 6 storedPermitsToSpend D
4 11 8 freshPermits D
8 11 10 waitMicros J
MethodParameters:
Name Flags
requiredPermits
nowMicros
abstract long storedPermitsToWaitTime(double, double);
descriptor: (DD)J
flags: (0x0400) ACC_ABSTRACT
MethodParameters:
Name Flags
storedPermits
permitsToTake
abstract double coolDownIntervalMicros();
descriptor: ()D
flags: (0x0400) ACC_ABSTRACT
void resync(long);
descriptor: (J)V
flags: (0x0000)
Code:
stack=7, locals=5, args_size=2
start local 0 start local 1 0: lload 1
aload 0
getfield com.google.common.util.concurrent.SmoothRateLimiter.nextFreeTicketMicros:J
lcmp
ifle 4
1: lload 1
aload 0
getfield com.google.common.util.concurrent.SmoothRateLimiter.nextFreeTicketMicros:J
lsub
l2d
aload 0
invokevirtual com.google.common.util.concurrent.SmoothRateLimiter.coolDownIntervalMicros:()D
ddiv
dstore 3
start local 3 2: aload 0
aload 0
getfield com.google.common.util.concurrent.SmoothRateLimiter.maxPermits:D
aload 0
getfield com.google.common.util.concurrent.SmoothRateLimiter.storedPermits:D
dload 3
dadd
invokestatic java.lang.Math.min:(DD)D
putfield com.google.common.util.concurrent.SmoothRateLimiter.storedPermits:D
3: aload 0
lload 1
putfield com.google.common.util.concurrent.SmoothRateLimiter.nextFreeTicketMicros:J
end local 3 4: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/google/common/util/concurrent/SmoothRateLimiter;
0 5 1 nowMicros J
2 4 3 newPermits D
MethodParameters:
Name Flags
nowMicros
}
SourceFile: "SmoothRateLimiter.java"
NestMembers:
com.google.common.util.concurrent.SmoothRateLimiter$SmoothBursty com.google.common.util.concurrent.SmoothRateLimiter$SmoothWarmingUp
InnerClasses:
abstract SleepingStopwatch = com.google.common.util.concurrent.RateLimiter$SleepingStopwatch of com.google.common.util.concurrent.RateLimiter
final SmoothBursty = com.google.common.util.concurrent.SmoothRateLimiter$SmoothBursty of com.google.common.util.concurrent.SmoothRateLimiter
final SmoothWarmingUp = com.google.common.util.concurrent.SmoothRateLimiter$SmoothWarmingUp of com.google.common.util.concurrent.SmoothRateLimiter
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtIncompatible()