final class org.apache.cassandra.utils.memory.BufferPool$LocalPool
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: org.apache.cassandra.utils.memory.BufferPool$LocalPool
super_class: java.lang.Object
{
private static final org.apache.cassandra.metrics.BufferPoolMetrics metrics;
descriptor: Lorg/apache/cassandra/metrics/BufferPoolMetrics;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final org.apache.cassandra.utils.memory.BufferPool$Chunk[] chunks;
descriptor: [Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private byte chunkCount;
descriptor: B
flags: (0x0002) ACC_PRIVATE
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/utils/memory/BufferPool;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.apache.cassandra.utils.memory.BufferPool$LocalPool.$assertionsDisabled:Z
3: new org.apache.cassandra.metrics.BufferPoolMetrics
dup
invokespecial org.apache.cassandra.metrics.BufferPoolMetrics.<init>:()V
putstatic org.apache.cassandra.utils.memory.BufferPool$LocalPool.metrics:Lorg/apache/cassandra/metrics/BufferPoolMetrics;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_3
anewarray org.apache.cassandra.utils.memory.BufferPool$Chunk
putfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
2: aload 0
iconst_0
putfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunkCount:B
3: getstatic org.apache.cassandra.utils.memory.BufferPool.localPoolReferences:Ljava/util/concurrent/ConcurrentLinkedQueue;
new org.apache.cassandra.utils.memory.BufferPool$LocalPoolRef
dup
aload 0
getstatic org.apache.cassandra.utils.memory.BufferPool.localPoolRefQueue:Ljava/lang/ref/ReferenceQueue;
invokespecial org.apache.cassandra.utils.memory.BufferPool$LocalPoolRef.<init>:(Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;Ljava/lang/ref/ReferenceQueue;)V
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.add:(Ljava/lang/Object;)Z
pop
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;
private org.apache.cassandra.utils.memory.BufferPool$Chunk addChunkFromGlobalPool();
descriptor: ()Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
start local 0 0: getstatic org.apache.cassandra.utils.memory.BufferPool.globalPool:Lorg/apache/cassandra/utils/memory/BufferPool$GlobalPool;
invokevirtual org.apache.cassandra.utils.memory.BufferPool$GlobalPool.get:()Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
astore 1
start local 1 1: aload 1
ifnonnull 3
2: aconst_null
areturn
3: StackMap locals: org.apache.cassandra.utils.memory.BufferPool$Chunk
StackMap stack:
aload 0
aload 1
invokevirtual org.apache.cassandra.utils.memory.BufferPool$LocalPool.addChunk:(Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;)V
4: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;
1 5 1 chunk Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
private void addChunk(org.apache.cassandra.utils.memory.BufferPool$Chunk);
descriptor: (Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 1
aload 0
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.acquire:(Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;)V
1: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunkCount:B
iconst_3
if_icmpge 4
2: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
aload 0
dup
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunkCount:B
dup_x1
iconst_1
iadd
i2b
putfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunkCount:B
aload 1
aastore
3: return
4: StackMap locals:
StackMap stack:
iconst_0
istore 2
start local 2 5: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_1
aaload
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.free:()I
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_0
aaload
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.free:()I
if_icmpge 7
6: iconst_1
istore 2
7: StackMap locals: int
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_2
aaload
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.free:()I
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iload 2
aaload
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.free:()I
if_icmpge 9
8: iconst_2
istore 2
9: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iload 2
aaload
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.release:()V
10: iload 2
iconst_2
if_icmpeq 12
11: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iload 2
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_2
aaload
aastore
12: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_2
aload 1
aastore
13: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;
0 14 1 chunk Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
5 14 2 smallestChunkIdx I
MethodParameters:
Name Flags
chunk
public java.nio.ByteBuffer get(int);
descriptor: (I)Ljava/nio/ByteBuffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=7, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
dup
astore 5
arraylength
istore 4
iconst_0
istore 3
goto 8
StackMap locals: org.apache.cassandra.utils.memory.BufferPool$LocalPool int top int int org.apache.cassandra.utils.memory.BufferPool$Chunk[]
StackMap stack:
1: aload 5
iload 3
aaload
astore 2
start local 2 2: aload 2
ifnonnull 4
3: goto 9
4: StackMap locals: org.apache.cassandra.utils.memory.BufferPool$LocalPool int org.apache.cassandra.utils.memory.BufferPool$Chunk int int org.apache.cassandra.utils.memory.BufferPool$Chunk[]
StackMap stack:
aload 2
iload 1
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.get:(I)Ljava/nio/ByteBuffer;
astore 6
start local 6 5: aload 6
ifnull 7
6: aload 6
areturn
end local 6 end local 2 7: StackMap locals: org.apache.cassandra.utils.memory.BufferPool$LocalPool int top int int org.apache.cassandra.utils.memory.BufferPool$Chunk[]
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
8: iload 3
iload 4
if_icmplt 1
9: StackMap locals: org.apache.cassandra.utils.memory.BufferPool$LocalPool int
StackMap stack:
aload 0
invokevirtual org.apache.cassandra.utils.memory.BufferPool$LocalPool.addChunkFromGlobalPool:()Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
astore 2
start local 2 10: aload 2
ifnull 12
11: aload 2
iload 1
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.get:(I)Ljava/nio/ByteBuffer;
areturn
12: StackMap locals: org.apache.cassandra.utils.memory.BufferPool$Chunk
StackMap stack:
aconst_null
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;
0 13 1 size I
2 7 2 chunk Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
5 7 6 buffer Ljava/nio/ByteBuffer;
10 13 2 chunk Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
MethodParameters:
Name Flags
size
private java.nio.ByteBuffer allocate(int, boolean);
descriptor: (IZ)Ljava/nio/ByteBuffer;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: getstatic org.apache.cassandra.utils.memory.BufferPool$LocalPool.metrics:Lorg/apache/cassandra/metrics/BufferPoolMetrics;
getfield org.apache.cassandra.metrics.BufferPoolMetrics.misses:Lcom/codahale/metrics/Meter;
invokevirtual com.codahale.metrics.Meter.mark:()V
1: iload 1
iload 2
invokestatic org.apache.cassandra.utils.memory.BufferPool.allocate:(IZ)Ljava/nio/ByteBuffer;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;
0 2 1 size I
0 2 2 onHeap Z
MethodParameters:
Name Flags
size
onHeap
public void put(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=2
start local 0 start local 1 0: aload 1
invokestatic org.apache.cassandra.utils.memory.BufferPool$Chunk.getParentChunk:(Ljava/nio/ByteBuffer;)Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
astore 2
start local 2 1: aload 2
ifnonnull 4
2: aload 1
invokestatic org.apache.cassandra.io.util.FileUtils.clean:(Ljava/nio/ByteBuffer;)V
3: return
4: StackMap locals: org.apache.cassandra.utils.memory.BufferPool$Chunk
StackMap stack:
aload 2
getfield org.apache.cassandra.utils.memory.BufferPool$Chunk.owner:Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;
astore 3
start local 3 5: aload 2
aload 1
aload 3
ifnonnull 6
iconst_1
goto 7
StackMap locals: org.apache.cassandra.utils.memory.BufferPool$LocalPool java.nio.ByteBuffer org.apache.cassandra.utils.memory.BufferPool$Chunk org.apache.cassandra.utils.memory.BufferPool$LocalPool
StackMap stack: org.apache.cassandra.utils.memory.BufferPool$Chunk java.nio.ByteBuffer
6: iconst_0
StackMap locals: org.apache.cassandra.utils.memory.BufferPool$LocalPool java.nio.ByteBuffer org.apache.cassandra.utils.memory.BufferPool$Chunk org.apache.cassandra.utils.memory.BufferPool$LocalPool
StackMap stack: org.apache.cassandra.utils.memory.BufferPool$Chunk java.nio.ByteBuffer int
7: aload 3
aload 0
if_acmpne 8
iconst_1
goto 9
StackMap locals: org.apache.cassandra.utils.memory.BufferPool$LocalPool java.nio.ByteBuffer org.apache.cassandra.utils.memory.BufferPool$Chunk org.apache.cassandra.utils.memory.BufferPool$LocalPool
StackMap stack: org.apache.cassandra.utils.memory.BufferPool$Chunk java.nio.ByteBuffer int
8: iconst_0
StackMap locals: org.apache.cassandra.utils.memory.BufferPool$LocalPool java.nio.ByteBuffer org.apache.cassandra.utils.memory.BufferPool$Chunk org.apache.cassandra.utils.memory.BufferPool$LocalPool
StackMap stack: org.apache.cassandra.utils.memory.BufferPool$Chunk java.nio.ByteBuffer int int
9: ior
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.free:(Ljava/nio/ByteBuffer;Z)J
lstore 4
start local 4 10: lload 4
lconst_0
lcmp
ifne 15
11: aload 2
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.recycle:()V
12: aload 3
aload 0
if_acmpne 17
13: aload 0
aload 2
invokevirtual org.apache.cassandra.utils.memory.BufferPool$LocalPool.removeFromLocalQueue:(Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;)V
14: goto 17
15: StackMap locals: long
StackMap stack:
lload 4
ldc -1
lcmp
ifne 17
aload 3
aload 0
if_acmpeq 17
aload 2
getfield org.apache.cassandra.utils.memory.BufferPool$Chunk.owner:Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;
ifnonnull 17
16: aload 2
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.tryRecycle:()V
17: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;
0 18 1 buffer Ljava/nio/ByteBuffer;
1 18 2 chunk Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
5 18 3 owner Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;
10 18 4 free J
MethodParameters:
Name Flags
buffer
private void removeFromLocalQueue(org.apache.cassandra.utils.memory.BufferPool$Chunk);
descriptor: (Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_0
aaload
aload 1
if_acmpne 4
1: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_0
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_1
aaload
aastore
2: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_1
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_2
aaload
aastore
3: goto 8
4: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_1
aaload
aload 1
if_acmpne 7
5: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_1
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_2
aaload
aastore
6: goto 8
7: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.memory.BufferPool$LocalPool.$assertionsDisabled:Z
ifne 8
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_2
aaload
aload 1
if_acmpeq 8
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
8: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_2
aconst_null
aastore
9: aload 0
dup
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunkCount:B
iconst_1
isub
i2b
putfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunkCount:B
10: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;
0 11 1 chunk Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
MethodParameters:
Name Flags
chunk
void reset();
descriptor: ()V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
iconst_0
putfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunkCount:B
1: iconst_0
istore 1
start local 1 2: goto 9
3: StackMap locals: int
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iload 1
aaload
ifnull 8
4: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iload 1
aaload
aconst_null
putfield org.apache.cassandra.utils.memory.BufferPool$Chunk.owner:Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;
5: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iload 1
aaload
lconst_0
putfield org.apache.cassandra.utils.memory.BufferPool$Chunk.freeSlots:J
6: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iload 1
aaload
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Chunk.recycle:()V
7: aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iload 1
aconst_null
aastore
8: StackMap locals:
StackMap stack:
iinc 1 1
StackMap locals:
StackMap stack:
9: iload 1
aload 0
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
arraylength
if_icmplt 3
end local 1 10: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;
2 10 1 i I
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
}
SourceFile: "BufferPool.java"
NestHost: org.apache.cassandra.utils.memory.BufferPool
InnerClasses:
final Chunk = org.apache.cassandra.utils.memory.BufferPool$Chunk of org.apache.cassandra.utils.memory.BufferPool
final GlobalPool = org.apache.cassandra.utils.memory.BufferPool$GlobalPool of org.apache.cassandra.utils.memory.BufferPool
final LocalPool = org.apache.cassandra.utils.memory.BufferPool$LocalPool of org.apache.cassandra.utils.memory.BufferPool
private final LocalPoolRef = org.apache.cassandra.utils.memory.BufferPool$LocalPoolRef of org.apache.cassandra.utils.memory.BufferPool