public class org.apache.cassandra.utils.TopKSampler<T>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.utils.TopKSampler
super_class: java.lang.Object
{
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private volatile boolean enabled;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
static final java.util.concurrent.ThreadPoolExecutor samplerExecutor;
descriptor: Ljava/util/concurrent/ThreadPoolExecutor;
flags: (0x0018) ACC_STATIC, ACC_FINAL
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
private com.clearspring.analytics.stream.StreamSummary<T> summary;
descriptor: Lcom/clearspring/analytics/stream/StreamSummary;
flags: (0x0002) ACC_PRIVATE
Signature: Lcom/clearspring/analytics/stream/StreamSummary<TT;>;
com.clearspring.analytics.stream.cardinality.HyperLogLogPlus hll;
descriptor: Lcom/clearspring/analytics/stream/cardinality/HyperLogLogPlus;
flags: (0x0000)
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=10, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/utils/TopKSampler;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.utils.TopKSampler.logger:Lorg/slf4j/Logger;
1: new org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor
dup
iconst_1
lconst_1
2: getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
3: new java.util.concurrent.LinkedBlockingQueue
dup
invokespecial java.util.concurrent.LinkedBlockingQueue.<init>:()V
4: new org.apache.cassandra.concurrent.NamedThreadFactory
dup
ldc "Sampler"
invokespecial org.apache.cassandra.concurrent.NamedThreadFactory.<init>:(Ljava/lang/String;)V
5: ldc "internal"
6: invokespecial org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor.<init>:(IJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Lorg/apache/cassandra/concurrent/NamedThreadFactory;Ljava/lang/String;)V
putstatic org.apache.cassandra.utils.TopKSampler.samplerExecutor:Ljava/util/concurrent/ThreadPoolExecutor;
7: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_0
putfield org.apache.cassandra.utils.TopKSampler.enabled:Z
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/utils/TopKSampler<TT;>;
public synchronized void beginSampling(int);
descriptor: (I)V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.utils.TopKSampler.enabled:Z
ifne 4
1: aload 0
new com.clearspring.analytics.stream.StreamSummary
dup
iload 1
invokespecial com.clearspring.analytics.stream.StreamSummary.<init>:(I)V
putfield org.apache.cassandra.utils.TopKSampler.summary:Lcom/clearspring/analytics/stream/StreamSummary;
2: aload 0
new com.clearspring.analytics.stream.cardinality.HyperLogLogPlus
dup
bipush 14
invokespecial com.clearspring.analytics.stream.cardinality.HyperLogLogPlus.<init>:(I)V
putfield org.apache.cassandra.utils.TopKSampler.hll:Lcom/clearspring/analytics/stream/cardinality/HyperLogLogPlus;
3: aload 0
iconst_1
putfield org.apache.cassandra.utils.TopKSampler.enabled:Z
4: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/utils/TopKSampler<TT;>;
0 5 1 capacity I
MethodParameters:
Name Flags
capacity
public synchronized org.apache.cassandra.utils.TopKSampler$SamplerResult<T> finishSampling(int);
descriptor: (I)Lorg/apache/cassandra/utils/TopKSampler$SamplerResult;
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: getstatic java.util.Collections.EMPTY_LIST:Ljava/util/List;
astore 2
start local 2 1: lconst_0
lstore 3
start local 3 2: aload 0
getfield org.apache.cassandra.utils.TopKSampler.enabled:Z
ifeq 6
3: aload 0
iconst_0
putfield org.apache.cassandra.utils.TopKSampler.enabled:Z
4: aload 0
getfield org.apache.cassandra.utils.TopKSampler.summary:Lcom/clearspring/analytics/stream/StreamSummary;
iload 1
invokevirtual com.clearspring.analytics.stream.StreamSummary.topK:(I)Ljava/util/List;
astore 2
5: aload 0
getfield org.apache.cassandra.utils.TopKSampler.hll:Lcom/clearspring/analytics/stream/cardinality/HyperLogLogPlus;
invokevirtual com.clearspring.analytics.stream.cardinality.HyperLogLogPlus.cardinality:()J
lstore 3
6: StackMap locals: java.util.List long
StackMap stack:
new org.apache.cassandra.utils.TopKSampler$SamplerResult
dup
aload 2
lload 3
invokespecial org.apache.cassandra.utils.TopKSampler$SamplerResult.<init>:(Ljava/util/List;J)V
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/cassandra/utils/TopKSampler<TT;>;
0 7 1 count I
1 7 2 results Ljava/util/List<Lcom/clearspring/analytics/stream/Counter<TT;>;>;
2 7 3 cardinality J
Signature: (I)Lorg/apache/cassandra/utils/TopKSampler$SamplerResult<TT;>;
MethodParameters:
Name Flags
count
public void addSample();
descriptor: (Ljava/lang/Object;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
aload 1
invokevirtual java.lang.Object.hashCode:()I
i2l
iconst_1
invokevirtual org.apache.cassandra.utils.TopKSampler.addSample:(Ljava/lang/Object;JI)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/utils/TopKSampler<TT;>;
0 2 1 item TT;
Signature: (TT;)V
MethodParameters:
Name Flags
item
public void addSample(T, long, );
descriptor: (Ljava/lang/Object;JI)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=9, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 4 0: aload 0
getfield org.apache.cassandra.utils.TopKSampler.enabled:Z
ifeq 3
1: aload 0
astore 5
start local 5 2: getstatic org.apache.cassandra.utils.TopKSampler.samplerExecutor:Ljava/util/concurrent/ThreadPoolExecutor;
new org.apache.cassandra.utils.TopKSampler$1
dup
aload 0
aload 5
aload 1
iload 4
lload 2
invokespecial org.apache.cassandra.utils.TopKSampler$1.<init>:(Lorg/apache/cassandra/utils/TopKSampler;Ljava/lang/Object;Ljava/lang/Object;IJ)V
invokevirtual java.util.concurrent.ThreadPoolExecutor.execute:(Ljava/lang/Runnable;)V
end local 5 3: StackMap locals:
StackMap stack:
return
end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/utils/TopKSampler<TT;>;
0 4 1 item TT;
0 4 2 hash J
0 4 4 value I
2 3 5 lock Ljava/lang/Object;
Signature: (TT;JI)V
MethodParameters:
Name Flags
item final
hash final
value final
}
Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;
SourceFile: "TopKSampler.java"
NestMembers:
org.apache.cassandra.utils.TopKSampler$1 org.apache.cassandra.utils.TopKSampler$SamplerResult
InnerClasses:
org.apache.cassandra.utils.TopKSampler$1
public SamplerResult = org.apache.cassandra.utils.TopKSampler$SamplerResult of org.apache.cassandra.utils.TopKSampler