public class org.apache.cassandra.net.RateBasedBackPressure implements org.apache.cassandra.net.BackPressureStrategy<org.apache.cassandra.net.RateBasedBackPressureState>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.net.RateBasedBackPressure
super_class: java.lang.Object
{
static final java.lang.String HIGH_RATIO;
descriptor: Ljava/lang/String;
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: "high_ratio"
static final java.lang.String FACTOR;
descriptor: Ljava/lang/String;
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: "factor"
static final java.lang.String FLOW;
descriptor: Ljava/lang/String;
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: "flow"
private static final java.lang.String BACK_PRESSURE_HIGH_RATIO;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "0.90"
private static final java.lang.String BACK_PRESSURE_FACTOR;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "5"
private static final java.lang.String BACK_PRESSURE_FLOW;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "FAST"
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final org.apache.cassandra.utils.NoSpamLogger tenSecsNoSpamLogger;
descriptor: Lorg/apache/cassandra/utils/NoSpamLogger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final org.apache.cassandra.utils.NoSpamLogger oneMinNoSpamLogger;
descriptor: Lorg/apache/cassandra/utils/NoSpamLogger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
protected final org.apache.cassandra.utils.TimeSource timeSource;
descriptor: Lorg/apache/cassandra/utils/TimeSource;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
protected final double highRatio;
descriptor: D
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
protected final int factor;
descriptor: I
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
protected final org.apache.cassandra.net.RateBasedBackPressure$Flow flow;
descriptor: Lorg/apache/cassandra/net/RateBasedBackPressure$Flow;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
protected final long windowSize;
descriptor: J
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
private final com.google.common.cache.Cache<java.util.Set<org.apache.cassandra.net.RateBasedBackPressureState>, org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter> rateLimiters;
descriptor: Lcom/google/common/cache/Cache;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lcom/google/common/cache/Cache<Ljava/util/Set<Lorg/apache/cassandra/net/RateBasedBackPressureState;>;Lorg/apache/cassandra/net/RateBasedBackPressure$IntervalRateLimiter;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/net/RateBasedBackPressure;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.net.RateBasedBackPressure.logger:Lorg/slf4j/Logger;
1: getstatic org.apache.cassandra.net.RateBasedBackPressure.logger:Lorg/slf4j/Logger;
ldc 10
getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
invokestatic org.apache.cassandra.utils.NoSpamLogger.getLogger:(Lorg/slf4j/Logger;JLjava/util/concurrent/TimeUnit;)Lorg/apache/cassandra/utils/NoSpamLogger;
putstatic org.apache.cassandra.net.RateBasedBackPressure.tenSecsNoSpamLogger:Lorg/apache/cassandra/utils/NoSpamLogger;
2: getstatic org.apache.cassandra.net.RateBasedBackPressure.logger:Lorg/slf4j/Logger;
lconst_1
getstatic java.util.concurrent.TimeUnit.MINUTES:Ljava/util/concurrent/TimeUnit;
invokestatic org.apache.cassandra.utils.NoSpamLogger.getLogger:(Lorg/slf4j/Logger;JLjava/util/concurrent/TimeUnit;)Lorg/apache/cassandra/utils/NoSpamLogger;
putstatic org.apache.cassandra.net.RateBasedBackPressure.oneMinNoSpamLogger:Lorg/apache/cassandra/utils/NoSpamLogger;
return
LocalVariableTable:
Start End Slot Name Signature
public static org.apache.cassandra.config.ParameterizedClass withDefaultParams();
descriptor: ()Lorg/apache/cassandra/config/ParameterizedClass;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=9, locals=0, args_size=0
0: new org.apache.cassandra.config.ParameterizedClass
dup
ldc Lorg/apache/cassandra/net/RateBasedBackPressure;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
1: ldc "high_ratio"
ldc "0.90"
2: ldc "factor"
ldc "5"
3: ldc "flow"
ldc "FAST"
4: invokestatic com.google.common.collect.ImmutableMap.of:(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap;
5: invokespecial org.apache.cassandra.config.ParameterizedClass.<init>:(Ljava/lang/String;Ljava/util/Map;)V
areturn
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.util.Map<java.lang.String, java.lang.Object>);
descriptor: (Ljava/util/Map;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
new org.apache.cassandra.utils.SystemTimeSource
dup
invokespecial org.apache.cassandra.utils.SystemTimeSource.<init>:()V
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getWriteRpcTimeout:()J
invokespecial org.apache.cassandra.net.RateBasedBackPressure.<init>:(Ljava/util/Map;Lorg/apache/cassandra/utils/TimeSource;J)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/net/RateBasedBackPressure;
0 2 1 args Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;
Signature: (Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;)V
MethodParameters:
Name Flags
args
public void <init>(java.util.Map<java.lang.String, java.lang.Object>, org.apache.cassandra.utils.TimeSource, );
descriptor: (Ljava/util/Map;Lorg/apache/cassandra/utils/TimeSource;J)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
2: invokestatic com.google.common.cache.CacheBuilder.newBuilder:()Lcom/google/common/cache/CacheBuilder;
lconst_1
getstatic java.util.concurrent.TimeUnit.HOURS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.google.common.cache.CacheBuilder.expireAfterAccess:(JLjava/util/concurrent/TimeUnit;)Lcom/google/common/cache/CacheBuilder;
invokevirtual com.google.common.cache.CacheBuilder.build:()Lcom/google/common/cache/Cache;
putfield org.apache.cassandra.net.RateBasedBackPressure.rateLimiters:Lcom/google/common/cache/Cache;
3: aload 1
invokeinterface java.util.Map.size:()I
iconst_3
if_icmpeq 7
4: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc Lorg/apache/cassandra/net/RateBasedBackPressure;
invokevirtual java.lang.Class.getCanonicalName:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
5: ldc " requires 3 arguments: high ratio, back-pressure factor and flow type."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
6: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals: org.apache.cassandra.net.RateBasedBackPressure java.util.Map org.apache.cassandra.utils.TimeSource long
StackMap stack:
aload 0
aload 1
ldc "high_ratio"
ldc ""
invokeinterface java.util.Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
invokevirtual java.lang.Object.toString:()Ljava/lang/String;
invokevirtual java.lang.String.trim:()Ljava/lang/String;
invokestatic java.lang.Double.parseDouble:(Ljava/lang/String;)D
putfield org.apache.cassandra.net.RateBasedBackPressure.highRatio:D
8: aload 0
aload 1
ldc "factor"
ldc ""
invokeinterface java.util.Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
invokevirtual java.lang.Object.toString:()Ljava/lang/String;
invokevirtual java.lang.String.trim:()Ljava/lang/String;
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
putfield org.apache.cassandra.net.RateBasedBackPressure.factor:I
9: aload 0
aload 1
ldc "flow"
ldc ""
invokeinterface java.util.Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
invokevirtual java.lang.Object.toString:()Ljava/lang/String;
invokevirtual java.lang.String.trim:()Ljava/lang/String;
invokevirtual java.lang.String.toUpperCase:()Ljava/lang/String;
invokestatic org.apache.cassandra.net.RateBasedBackPressure$Flow.valueOf:(Ljava/lang/String;)Lorg/apache/cassandra/net/RateBasedBackPressure$Flow;
putfield org.apache.cassandra.net.RateBasedBackPressure.flow:Lorg/apache/cassandra/net/RateBasedBackPressure$Flow;
10: goto 13
11: StackMap locals:
StackMap stack: java.lang.Exception
astore 5
start local 5 12: new java.lang.IllegalArgumentException
dup
aload 5
invokevirtual java.lang.Exception.getMessage:()Ljava/lang/String;
aload 5
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 5 13: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.highRatio:D
dconst_0
dcmpg
ifle 14
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.highRatio:D
dconst_1
dcmpl
ifle 15
14: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
ldc "Back-pressure high ratio must be > 0 and <= 1"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
15: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.factor:I
iconst_1
if_icmpge 17
16: new java.lang.IllegalArgumentException
dup
ldc "Back-pressure factor must be >= 1"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
17: StackMap locals:
StackMap stack:
lload 3
ldc 10
lcmp
ifge 19
18: new java.lang.IllegalArgumentException
dup
ldc "Back-pressure window size must be >= 10"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
19: StackMap locals:
StackMap stack:
aload 0
aload 2
putfield org.apache.cassandra.net.RateBasedBackPressure.timeSource:Lorg/apache/cassandra/utils/TimeSource;
20: aload 0
lload 3
putfield org.apache.cassandra.net.RateBasedBackPressure.windowSize:J
21: getstatic org.apache.cassandra.net.RateBasedBackPressure.logger:Lorg/slf4j/Logger;
ldc "Initialized back-pressure with high ratio: {}, factor: {}, flow: {}, window size: {}."
iconst_4
anewarray java.lang.Object
dup
iconst_0
22: aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.highRatio:D
invokestatic java.lang.Double.valueOf:(D)Ljava/lang/Double;
aastore
dup
iconst_1
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.factor:I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_2
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.flow:Lorg/apache/cassandra/net/RateBasedBackPressure$Flow;
aastore
dup
iconst_3
lload 3
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aastore
23: invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;[Ljava/lang/Object;)V
24: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Lorg/apache/cassandra/net/RateBasedBackPressure;
0 25 1 args Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;
0 25 2 timeSource Lorg/apache/cassandra/utils/TimeSource;
0 25 3 windowSize J
12 13 5 ex Ljava/lang/Exception;
Exception table:
from to target type
7 10 11 Class java.lang.Exception
Signature: (Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;Lorg/apache/cassandra/utils/TimeSource;J)V
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
RuntimeInvisibleTypeAnnotations:
METHOD_RETURN
com.google.common.annotations.VisibleForTesting()
MethodParameters:
Name Flags
args
timeSource
windowSize
public void apply(java.util.Set<org.apache.cassandra.net.RateBasedBackPressureState>, long, java.util.concurrent.TimeUnit);
descriptor: (Ljava/util/Set;JLjava/util/concurrent/TimeUnit;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=8, locals=28, args_size=4
start local 0 start local 1 start local 2 start local 4 0: iconst_0
istore 5
start local 5 1: ldc Infinity
dstore 6
start local 6 2: ldc -Infinity
dstore 8
start local 8 3: ldc Infinity
dstore 10
start local 10 4: aconst_null
astore 12
start local 12 5: aconst_null
astore 13
start local 13 6: aload 1
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 15
goto 46
StackMap locals: org.apache.cassandra.net.RateBasedBackPressure java.util.Set long java.util.concurrent.TimeUnit int double double double com.google.common.util.concurrent.RateLimiter com.google.common.util.concurrent.RateLimiter top java.util.Iterator
StackMap stack:
7: aload 15
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.net.RateBasedBackPressureState
astore 14
start local 14 8: aload 14
getfield org.apache.cassandra.net.RateBasedBackPressureState.incomingRate:Lorg/apache/cassandra/utils/SlidingTimeRate;
getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual org.apache.cassandra.utils.SlidingTimeRate.get:(Ljava/util/concurrent/TimeUnit;)D
dstore 16
start local 16 9: aload 14
getfield org.apache.cassandra.net.RateBasedBackPressureState.outgoingRate:Lorg/apache/cassandra/utils/SlidingTimeRate;
getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual org.apache.cassandra.utils.SlidingTimeRate.get:(Ljava/util/concurrent/TimeUnit;)D
dstore 18
start local 18 10: dload 16
dload 10
dcmpg
ifge 12
11: dload 16
dstore 10
12: StackMap locals: org.apache.cassandra.net.RateBasedBackPressure java.util.Set long java.util.concurrent.TimeUnit int double double double com.google.common.util.concurrent.RateLimiter com.google.common.util.concurrent.RateLimiter org.apache.cassandra.net.RateBasedBackPressureState java.util.Iterator double double
StackMap stack:
aload 14
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.windowSize:J
invokevirtual org.apache.cassandra.net.RateBasedBackPressureState.tryIntervalLock:(J)Z
ifeq 40
13: iconst_1
istore 5
14: aload 14
getfield org.apache.cassandra.net.RateBasedBackPressureState.rateLimiter:Lcom/google/common/util/concurrent/RateLimiter;
astore 20
start local 20 15: dload 18
dconst_0
dcmpl
ifle 32
16: dload 16
dload 18
ddiv
dstore 21
start local 21 17: aload 20
invokevirtual com.google.common.util.concurrent.RateLimiter.getRate:()D
dstore 23
start local 23 18: dload 21
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.highRatio:D
dcmpl
iflt 24
19: dload 23
dload 18
dcmpg
ifgt 27
20: dload 23
dload 23
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.factor:I
i2d
dmul
ldc 100.0
ddiv
dadd
dstore 25
start local 25 21: dload 25
dconst_0
dcmpl
ifle 27
dload 25
ldc Infinity
dcmpl
ifeq 27
22: aload 20
dload 25
invokevirtual com.google.common.util.concurrent.RateLimiter.setRate:(D)V
end local 25 23: goto 27
24: StackMap locals: com.google.common.util.concurrent.RateLimiter double double
StackMap stack:
dload 16
dload 16
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.factor:I
i2d
dmul
ldc 100.0
ddiv
dsub
dstore 25
start local 25 25: dload 25
dconst_0
dcmpl
ifle 27
dload 25
dload 23
dcmpg
ifge 27
26: aload 20
dload 25
invokevirtual com.google.common.util.concurrent.RateLimiter.setRate:(D)V
end local 25 27: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.net.RateBasedBackPressure.logger:Lorg/slf4j/Logger;
invokeinterface org.slf4j.Logger.isTraceEnabled:()Z
ifeq 33
28: getstatic org.apache.cassandra.net.RateBasedBackPressure.logger:Lorg/slf4j/Logger;
ldc "Back-pressure state for {}: incoming rate {}, outgoing rate {}, ratio {}, rate limiting {}"
iconst_5
anewarray java.lang.Object
dup
iconst_0
29: aload 14
invokevirtual org.apache.cassandra.net.RateBasedBackPressureState.getHost:()Ljava/net/InetAddress;
aastore
dup
iconst_1
dload 16
invokestatic java.lang.Double.valueOf:(D)Ljava/lang/Double;
aastore
dup
iconst_2
dload 18
invokestatic java.lang.Double.valueOf:(D)Ljava/lang/Double;
aastore
dup
iconst_3
dload 21
invokestatic java.lang.Double.valueOf:(D)Ljava/lang/Double;
aastore
dup
iconst_4
aload 20
invokevirtual com.google.common.util.concurrent.RateLimiter.getRate:()D
invokestatic java.lang.Double.valueOf:(D)Ljava/lang/Double;
aastore
30: invokeinterface org.slf4j.Logger.trace:(Ljava/lang/String;[Ljava/lang/Object;)V
end local 23 end local 21 31: goto 33
32: StackMap locals:
StackMap stack:
aload 20
ldc Infinity
invokevirtual com.google.common.util.concurrent.RateLimiter.setRate:(D)V
33: StackMap locals:
StackMap stack:
aload 14
getfield org.apache.cassandra.net.RateBasedBackPressureState.incomingRate:Lorg/apache/cassandra/utils/SlidingTimeRate;
invokevirtual org.apache.cassandra.utils.SlidingTimeRate.prune:()V
34: aload 14
getfield org.apache.cassandra.net.RateBasedBackPressureState.outgoingRate:Lorg/apache/cassandra/utils/SlidingTimeRate;
invokevirtual org.apache.cassandra.utils.SlidingTimeRate.prune:()V
end local 20 35: goto 39
36: StackMap locals: org.apache.cassandra.net.RateBasedBackPressure java.util.Set long java.util.concurrent.TimeUnit int double double double com.google.common.util.concurrent.RateLimiter com.google.common.util.concurrent.RateLimiter org.apache.cassandra.net.RateBasedBackPressureState java.util.Iterator double double
StackMap stack: java.lang.Throwable
astore 27
37: aload 14
invokevirtual org.apache.cassandra.net.RateBasedBackPressureState.releaseIntervalLock:()V
38: aload 27
athrow
39: StackMap locals:
StackMap stack:
aload 14
invokevirtual org.apache.cassandra.net.RateBasedBackPressureState.releaseIntervalLock:()V
40: StackMap locals:
StackMap stack:
aload 14
getfield org.apache.cassandra.net.RateBasedBackPressureState.rateLimiter:Lcom/google/common/util/concurrent/RateLimiter;
invokevirtual com.google.common.util.concurrent.RateLimiter.getRate:()D
dload 6
dcmpg
ifgt 43
41: aload 14
getfield org.apache.cassandra.net.RateBasedBackPressureState.rateLimiter:Lcom/google/common/util/concurrent/RateLimiter;
invokevirtual com.google.common.util.concurrent.RateLimiter.getRate:()D
dstore 6
42: aload 14
getfield org.apache.cassandra.net.RateBasedBackPressureState.rateLimiter:Lcom/google/common/util/concurrent/RateLimiter;
astore 12
43: StackMap locals:
StackMap stack:
aload 14
getfield org.apache.cassandra.net.RateBasedBackPressureState.rateLimiter:Lcom/google/common/util/concurrent/RateLimiter;
invokevirtual com.google.common.util.concurrent.RateLimiter.getRate:()D
dload 8
dcmpl
iflt 46
44: aload 14
getfield org.apache.cassandra.net.RateBasedBackPressureState.rateLimiter:Lcom/google/common/util/concurrent/RateLimiter;
invokevirtual com.google.common.util.concurrent.RateLimiter.getRate:()D
dstore 8
45: aload 14
getfield org.apache.cassandra.net.RateBasedBackPressureState.rateLimiter:Lcom/google/common/util/concurrent/RateLimiter;
astore 13
end local 18 end local 16 end local 14 46: StackMap locals: org.apache.cassandra.net.RateBasedBackPressure java.util.Set long java.util.concurrent.TimeUnit int double double double com.google.common.util.concurrent.RateLimiter com.google.common.util.concurrent.RateLimiter top java.util.Iterator
StackMap stack:
aload 15
invokeinterface java.util.Iterator.hasNext:()Z
ifne 7
47: aload 1
invokeinterface java.util.Set.isEmpty:()Z
ifne 64
48: aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.rateLimiters:Lcom/google/common/cache/Cache;
aload 1
aload 0
invokedynamic call(Lorg/apache/cassandra/net/RateBasedBackPressure;)Ljava/util/concurrent/Callable;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()Ljava/lang/Object;
org/apache/cassandra/net/RateBasedBackPressure.lambda$0()Lorg/apache/cassandra/net/RateBasedBackPressure$IntervalRateLimiter; (7)
()Lorg/apache/cassandra/net/RateBasedBackPressure$IntervalRateLimiter;
invokeinterface com.google.common.cache.Cache.get:(Ljava/lang/Object;Ljava/util/concurrent/Callable;)Ljava/lang/Object;
checkcast org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter
astore 14
start local 14 49: iload 5
ifeq 59
aload 14
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.windowSize:J
invokevirtual org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter.tryIntervalLock:(J)Z
ifeq 59
50: aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.flow:Lorg/apache/cassandra/net/RateBasedBackPressure$Flow;
getstatic org.apache.cassandra.net.RateBasedBackPressure$Flow.FAST:Lorg/apache/cassandra/net/RateBasedBackPressure$Flow;
invokevirtual org.apache.cassandra.net.RateBasedBackPressure$Flow.equals:(Ljava/lang/Object;)Z
ifeq 52
51: aload 14
aload 13
putfield org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter.limiter:Lcom/google/common/util/concurrent/RateLimiter;
goto 53
52: StackMap locals: org.apache.cassandra.net.RateBasedBackPressure java.util.Set long java.util.concurrent.TimeUnit int double double double com.google.common.util.concurrent.RateLimiter com.google.common.util.concurrent.RateLimiter org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter
StackMap stack:
aload 14
aload 12
putfield org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter.limiter:Lcom/google/common/util/concurrent/RateLimiter;
53: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.net.RateBasedBackPressure.tenSecsNoSpamLogger:Lorg/apache/cassandra/utils/NoSpamLogger;
ldc "{} currently applied for remote replicas: {}"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 14
getfield org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter.limiter:Lcom/google/common/util/concurrent/RateLimiter;
aastore
dup
iconst_1
aload 1
aastore
invokevirtual org.apache.cassandra.utils.NoSpamLogger.info:(Ljava/lang/String;[Ljava/lang/Object;)Z
pop
54: goto 58
55: StackMap locals:
StackMap stack: java.lang.Throwable
astore 15
56: aload 14
invokevirtual org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter.releaseIntervalLock:()V
57: aload 15
athrow
58: StackMap locals:
StackMap stack:
aload 14
invokevirtual org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter.releaseIntervalLock:()V
59: StackMap locals:
StackMap stack:
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
lconst_1
getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
l2d
dload 10
ddiv
d2l
lstore 15
start local 15 60: aload 0
aload 14
getfield org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter.limiter:Lcom/google/common/util/concurrent/RateLimiter;
lconst_0
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
lload 2
aload 4
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
lload 15
lsub
invokestatic java.lang.Math.max:(JJ)J
invokevirtual org.apache.cassandra.net.RateBasedBackPressure.doRateLimit:(Lcom/google/common/util/concurrent/RateLimiter;J)Z
pop
end local 15 end local 14 61: goto 64
62: StackMap locals: org.apache.cassandra.net.RateBasedBackPressure java.util.Set long java.util.concurrent.TimeUnit int double double double com.google.common.util.concurrent.RateLimiter com.google.common.util.concurrent.RateLimiter
StackMap stack: java.util.concurrent.ExecutionException
astore 14
start local 14 63: new java.lang.IllegalStateException
dup
aload 14
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 14 64: StackMap locals:
StackMap stack:
return
end local 13 end local 12 end local 10 end local 8 end local 6 end local 5 end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 65 0 this Lorg/apache/cassandra/net/RateBasedBackPressure;
0 65 1 states Ljava/util/Set<Lorg/apache/cassandra/net/RateBasedBackPressureState;>;
0 65 2 timeout J
0 65 4 unit Ljava/util/concurrent/TimeUnit;
1 65 5 isUpdated Z
2 65 6 minRateLimit D
3 65 8 maxRateLimit D
4 65 10 minIncomingRate D
5 65 12 currentMin Lcom/google/common/util/concurrent/RateLimiter;
6 65 13 currentMax Lcom/google/common/util/concurrent/RateLimiter;
8 46 14 backPressure Lorg/apache/cassandra/net/RateBasedBackPressureState;
9 46 16 incomingRate D
10 46 18 outgoingRate D
15 35 20 limiter Lcom/google/common/util/concurrent/RateLimiter;
17 31 21 actualRatio D
18 31 23 limiterRate D
21 23 25 newRate D
25 27 25 newRate D
49 61 14 rateLimiter Lorg/apache/cassandra/net/RateBasedBackPressure$IntervalRateLimiter;
60 61 15 responseTimeInNanos J
63 64 14 ex Ljava/util/concurrent/ExecutionException;
Exception table:
from to target type
14 36 36 any
50 55 55 any
48 61 62 Class java.util.concurrent.ExecutionException
Signature: (Ljava/util/Set<Lorg/apache/cassandra/net/RateBasedBackPressureState;>;JLjava/util/concurrent/TimeUnit;)V
MethodParameters:
Name Flags
states
timeout
unit
public org.apache.cassandra.net.RateBasedBackPressureState newState(java.net.InetAddress);
descriptor: (Ljava/net/InetAddress;)Lorg/apache/cassandra/net/RateBasedBackPressureState;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: new org.apache.cassandra.net.RateBasedBackPressureState
dup
aload 1
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.timeSource:Lorg/apache/cassandra/utils/TimeSource;
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.windowSize:J
invokespecial org.apache.cassandra.net.RateBasedBackPressureState.<init>:(Ljava/net/InetAddress;Lorg/apache/cassandra/utils/TimeSource;J)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/net/RateBasedBackPressure;
0 1 1 host Ljava/net/InetAddress;
MethodParameters:
Name Flags
host
com.google.common.util.concurrent.RateLimiter getRateLimiterForReplicaGroup(java.util.Set<org.apache.cassandra.net.RateBasedBackPressureState>);
descriptor: (Ljava/util/Set;)Lcom/google/common/util/concurrent/RateLimiter;
flags: (0x0000)
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.rateLimiters:Lcom/google/common/cache/Cache;
aload 1
invokeinterface com.google.common.cache.Cache.getIfPresent:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter
astore 2
start local 2 1: aload 2
ifnull 2
aload 2
getfield org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter.limiter:Lcom/google/common/util/concurrent/RateLimiter;
goto 3
StackMap locals: org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter
StackMap stack:
2: ldc Infinity
invokestatic com.google.common.util.concurrent.RateLimiter.create:(D)Lcom/google/common/util/concurrent/RateLimiter;
StackMap locals:
StackMap stack: com.google.common.util.concurrent.RateLimiter
3: areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/net/RateBasedBackPressure;
0 4 1 states Ljava/util/Set<Lorg/apache/cassandra/net/RateBasedBackPressureState;>;
1 4 2 rateLimiter Lorg/apache/cassandra/net/RateBasedBackPressure$IntervalRateLimiter;
Signature: (Ljava/util/Set<Lorg/apache/cassandra/net/RateBasedBackPressureState;>;)Lcom/google/common/util/concurrent/RateLimiter;
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
RuntimeInvisibleTypeAnnotations:
METHOD_RETURN
com.google.common.annotations.VisibleForTesting()
MethodParameters:
Name Flags
states
boolean doRateLimit(com.google.common.util.concurrent.RateLimiter, long);
descriptor: (Lcom/google/common/util/concurrent/RateLimiter;J)Z
flags: (0x0000)
Code:
stack=7, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
iconst_1
lload 2
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.google.common.util.concurrent.RateLimiter.tryAcquire:(IJLjava/util/concurrent/TimeUnit;)Z
ifne 6
1: aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.timeSource:Lorg/apache/cassandra/utils/TimeSource;
lload 2
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokeinterface org.apache.cassandra.utils.TimeSource.sleepUninterruptibly:(JLjava/util/concurrent/TimeUnit;)Lorg/apache/cassandra/utils/TimeSource;
pop
2: getstatic org.apache.cassandra.net.RateBasedBackPressure.oneMinNoSpamLogger:Lorg/apache/cassandra/utils/NoSpamLogger;
ldc "Cannot apply {} due to exceeding write timeout, pausing {} nanoseconds instead."
iconst_2
anewarray java.lang.Object
dup
iconst_0
3: aload 1
aastore
dup
iconst_1
lload 2
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aastore
4: invokevirtual org.apache.cassandra.utils.NoSpamLogger.info:(Ljava/lang/String;[Ljava/lang/Object;)Z
pop
5: iconst_0
ireturn
6: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/cassandra/net/RateBasedBackPressure;
0 7 1 rateLimiter Lcom/google/common/util/concurrent/RateLimiter;
0 7 2 timeoutInNanos J
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
RuntimeInvisibleTypeAnnotations:
METHOD_RETURN
com.google.common.annotations.VisibleForTesting()
MethodParameters:
Name Flags
rateLimiter
timeoutInNanos
public org.apache.cassandra.net.BackPressureState newState(java.net.InetAddress);
descriptor: (Ljava/net/InetAddress;)Lorg/apache/cassandra/net/BackPressureState;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload 0
aload 1
invokevirtual org.apache.cassandra.net.RateBasedBackPressure.newState:(Ljava/net/InetAddress;)Lorg/apache/cassandra/net/RateBasedBackPressureState;
areturn
LocalVariableTable:
Start End Slot Name Signature
private org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter lambda$0();
descriptor: ()Lorg/apache/cassandra/net/RateBasedBackPressure$IntervalRateLimiter;
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter
dup
aload 0
getfield org.apache.cassandra.net.RateBasedBackPressure.timeSource:Lorg/apache/cassandra/utils/TimeSource;
invokespecial org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter.<init>:(Lorg/apache/cassandra/utils/TimeSource;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/net/RateBasedBackPressure;
Exceptions:
throws java.lang.Exception
}
Signature: Ljava/lang/Object;Lorg/apache/cassandra/net/BackPressureStrategy<Lorg/apache/cassandra/net/RateBasedBackPressureState;>;
SourceFile: "RateBasedBackPressure.java"
NestMembers:
org.apache.cassandra.net.RateBasedBackPressure$Flow org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
final Flow = org.apache.cassandra.net.RateBasedBackPressure$Flow of org.apache.cassandra.net.RateBasedBackPressure
private IntervalRateLimiter = org.apache.cassandra.net.RateBasedBackPressure$IntervalRateLimiter of org.apache.cassandra.net.RateBasedBackPressure