class org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy extends org.apache.cassandra.utils.CoalescingStrategies$CoalescingStrategy
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy
super_class: org.apache.cassandra.utils.CoalescingStrategies$CoalescingStrategy
{
private final int[] samples;
descriptor: [I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private long lastSample;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private int index;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private long sum;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private final long maxCoalesceWindow;
descriptor: J
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>(int, org.apache.cassandra.utils.CoalescingStrategies$Parker, org.slf4j.Logger, java.lang.String);
descriptor: (ILorg/apache/cassandra/utils/CoalescingStrategies$Parker;Lorg/slf4j/Logger;Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
aload 2
aload 3
aload 4
invokespecial org.apache.cassandra.utils.CoalescingStrategies$CoalescingStrategy.<init>:(Lorg/apache/cassandra/utils/CoalescingStrategies$Parker;Lorg/slf4j/Logger;Ljava/lang/String;)V
1: aload 0
bipush 16
newarray 10
putfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.samples:[I
2: aload 0
lconst_0
putfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.lastSample:J
3: aload 0
iconst_0
putfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.index:I
4: aload 0
lconst_0
putfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.sum:J
5: aload 0
getstatic java.util.concurrent.TimeUnit.MICROSECONDS:Ljava/util/concurrent/TimeUnit;
iload 1
i2l
invokevirtual java.util.concurrent.TimeUnit.toNanos:(J)J
putfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.maxCoalesceWindow:J
6: iconst_0
istore 5
start local 5 7: goto 10
8: StackMap locals: org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy int org.apache.cassandra.utils.CoalescingStrategies$Parker org.slf4j.Logger java.lang.String int
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.samples:[I
iload 5
ldc 2147483647
iastore
9: iinc 5 1
StackMap locals:
StackMap stack:
10: iload 5
aload 0
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.samples:[I
arraylength
if_icmplt 8
end local 5 11: aload 0
ldc 2147483647
aload 0
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.samples:[I
arraylength
i2l
lmul
putfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.sum:J
12: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/apache/cassandra/utils/CoalescingStrategies$MovingAverageCoalescingStrategy;
0 13 1 maxCoalesceWindow I
0 13 2 parker Lorg/apache/cassandra/utils/CoalescingStrategies$Parker;
0 13 3 logger Lorg/slf4j/Logger;
0 13 4 displayName Ljava/lang/String;
7 11 5 ii I
MethodParameters:
Name Flags
maxCoalesceWindow
parker
logger
displayName
private long logSample(int);
descriptor: (I)J
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
dup
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.sum:J
aload 0
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.samples:[I
aload 0
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.index:I
iaload
i2l
lsub
putfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.sum:J
1: aload 0
dup
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.sum:J
iload 1
i2l
ladd
putfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.sum:J
2: aload 0
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.samples:[I
aload 0
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.index:I
iload 1
iastore
3: aload 0
dup
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.index:I
iconst_1
iadd
putfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.index:I
4: aload 0
dup
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.index:I
bipush 15
iand
putfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.index:I
5: aload 0
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.sum:J
ldc 16
ldiv
lreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/utils/CoalescingStrategies$MovingAverageCoalescingStrategy;
0 6 1 value I
MethodParameters:
Name Flags
value
private long notifyOfSample(long);
descriptor: (J)J
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=4, args_size=2
start local 0 start local 1 0: aload 0
lload 1
invokevirtual org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.debugTimestamp:(J)V
1: lload 1
aload 0
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.lastSample:J
lcmp
ifle 5
2: ldc 2147483647
lload 1
aload 0
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.lastSample:J
lsub
invokestatic java.lang.Math.min:(JJ)J
l2i
istore 3
start local 3 3: aload 0
lload 1
putfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.lastSample:J
4: aload 0
iload 3
invokevirtual org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.logSample:(I)J
lreturn
end local 3 5: StackMap locals:
StackMap stack:
aload 0
iconst_1
invokevirtual org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.logSample:(I)J
lreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/utils/CoalescingStrategies$MovingAverageCoalescingStrategy;
0 6 1 sample J
3 5 3 delta I
MethodParameters:
Name Flags
sample
protected <C extends org.apache.cassandra.utils.CoalescingStrategies$Coalescable> void coalesceInternal(java.util.concurrent.BlockingQueue<C>, java.util.List<C>, );
descriptor: (Ljava/util/concurrent/BlockingQueue;Ljava/util/List;I)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=6, locals=7, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
aload 2
iload 3
invokeinterface java.util.concurrent.BlockingQueue.drainTo:(Ljava/util/Collection;I)I
ifne 3
1: aload 2
aload 1
invokeinterface java.util.concurrent.BlockingQueue.take:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.CoalescingStrategies$Coalescable
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
2: aload 1
aload 2
iload 3
aload 2
invokeinterface java.util.List.size:()I
isub
invokeinterface java.util.concurrent.BlockingQueue.drainTo:(Ljava/util/Collection;I)I
pop
3: StackMap locals:
StackMap stack:
aload 0
aload 2
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast org.apache.cassandra.utils.CoalescingStrategies$Coalescable
invokeinterface org.apache.cassandra.utils.CoalescingStrategies$Coalescable.timestampNanos:()J
invokevirtual org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.notifyOfSample:(J)J
lstore 4
start local 4 4: aload 0
lload 4
invokevirtual org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.debugGap:(J)V
5: aload 2
invokeinterface java.util.List.size:()I
lload 4
aload 0
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.maxCoalesceWindow:J
aload 0
getfield org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.parker:Lorg/apache/cassandra/utils/CoalescingStrategies$Parker;
invokestatic org.apache.cassandra.utils.CoalescingStrategies.maybeSleep:(IJJLorg/apache/cassandra/utils/CoalescingStrategies$Parker;)Z
ifeq 7
6: aload 1
aload 2
iload 3
aload 2
invokeinterface java.util.List.size:()I
isub
invokeinterface java.util.concurrent.BlockingQueue.drainTo:(Ljava/util/Collection;I)I
pop
7: StackMap locals: long
StackMap stack:
iconst_1
istore 6
start local 6 8: goto 11
9: StackMap locals: int
StackMap stack:
aload 0
aload 2
iload 6
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast org.apache.cassandra.utils.CoalescingStrategies$Coalescable
invokeinterface org.apache.cassandra.utils.CoalescingStrategies$Coalescable.timestampNanos:()J
invokevirtual org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy.notifyOfSample:(J)J
pop2
10: iinc 6 1
StackMap locals:
StackMap stack:
11: iload 6
aload 2
invokeinterface java.util.List.size:()I
if_icmplt 9
end local 6 12: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/apache/cassandra/utils/CoalescingStrategies$MovingAverageCoalescingStrategy;
0 13 1 input Ljava/util/concurrent/BlockingQueue<TC;>;
0 13 2 out Ljava/util/List<TC;>;
0 13 3 maxItems I
4 13 4 average J
8 12 6 ii I
Exceptions:
throws java.lang.InterruptedException
Signature: <C::Lorg/apache/cassandra/utils/CoalescingStrategies$Coalescable;>(Ljava/util/concurrent/BlockingQueue<TC;>;Ljava/util/List<TC;>;I)V
MethodParameters:
Name Flags
input
out
maxItems
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: ldc "Moving average"
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/utils/CoalescingStrategies$MovingAverageCoalescingStrategy;
}
SourceFile: "CoalescingStrategies.java"
NestHost: org.apache.cassandra.utils.CoalescingStrategies
InnerClasses:
public abstract Coalescable = org.apache.cassandra.utils.CoalescingStrategies$Coalescable of org.apache.cassandra.utils.CoalescingStrategies
public abstract CoalescingStrategy = org.apache.cassandra.utils.CoalescingStrategies$CoalescingStrategy of org.apache.cassandra.utils.CoalescingStrategies
MovingAverageCoalescingStrategy = org.apache.cassandra.utils.CoalescingStrategies$MovingAverageCoalescingStrategy of org.apache.cassandra.utils.CoalescingStrategies
abstract Parker = org.apache.cassandra.utils.CoalescingStrategies$Parker of org.apache.cassandra.utils.CoalescingStrategies
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()