public class org.apache.cassandra.utils.memory.BufferPool
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.utils.memory.BufferPool
super_class: java.lang.Object
{
public static final int CHUNK_SIZE;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 65536
public static long MEMORY_USAGE_THRESHOLD;
descriptor: J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
public static boolean ALLOCATE_ON_HEAP_WHEN_EXAHUSTED;
descriptor: Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
public static boolean DISABLED;
descriptor: Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
public static boolean DEBUG;
descriptor: Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
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 noSpamLogger;
descriptor: Lorg/apache/cassandra/utils/NoSpamLogger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.nio.ByteBuffer EMPTY_BUFFER;
descriptor: Ljava/nio/ByteBuffer;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final org.apache.cassandra.utils.memory.BufferPool$GlobalPool globalPool;
descriptor: Lorg/apache/cassandra/utils/memory/BufferPool$GlobalPool;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final io.netty.util.concurrent.FastThreadLocal<org.apache.cassandra.utils.memory.BufferPool$LocalPool> localPool;
descriptor: Lio/netty/util/concurrent/FastThreadLocal;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Lio/netty/util/concurrent/FastThreadLocal<Lorg/apache/cassandra/utils/memory/BufferPool$LocalPool;>;
private static final java.util.concurrent.ConcurrentLinkedQueue<org.apache.cassandra.utils.memory.BufferPool$LocalPoolRef> localPoolReferences;
descriptor: Ljava/util/concurrent/ConcurrentLinkedQueue;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/concurrent/ConcurrentLinkedQueue<Lorg/apache/cassandra/utils/memory/BufferPool$LocalPoolRef;>;
private static final java.lang.ref.ReferenceQueue<java.lang.Object> localPoolRefQueue;
descriptor: Ljava/lang/ref/ReferenceQueue;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/lang/ref/ReferenceQueue<Ljava/lang/Object;>;
private static final org.apache.cassandra.concurrent.InfiniteLoopExecutor EXEC;
descriptor: Lorg/apache/cassandra/concurrent/InfiniteLoopExecutor;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getFileCacheSizeInMB:()I
i2l
ldc 1024
lmul
ldc 1024
lmul
putstatic org.apache.cassandra.utils.memory.BufferPool.MEMORY_USAGE_THRESHOLD:J
1: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getBufferPoolUseHeapIfExhausted:()Z
putstatic org.apache.cassandra.utils.memory.BufferPool.ALLOCATE_ON_HEAP_WHEN_EXAHUSTED:Z
2: ldc "cassandra.test.disable_buffer_pool"
ldc "false"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
invokestatic java.lang.Boolean.parseBoolean:(Ljava/lang/String;)Z
putstatic org.apache.cassandra.utils.memory.BufferPool.DISABLED:Z
3: iconst_0
putstatic org.apache.cassandra.utils.memory.BufferPool.DEBUG:Z
4: ldc Lorg/apache/cassandra/utils/memory/BufferPool;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.utils.memory.BufferPool.logger:Lorg/slf4j/Logger;
5: getstatic org.apache.cassandra.utils.memory.BufferPool.logger:Lorg/slf4j/Logger;
ldc 15
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.utils.memory.BufferPool.noSpamLogger:Lorg/apache/cassandra/utils/NoSpamLogger;
6: iconst_0
invokestatic java.nio.ByteBuffer.allocateDirect:(I)Ljava/nio/ByteBuffer;
putstatic org.apache.cassandra.utils.memory.BufferPool.EMPTY_BUFFER:Ljava/nio/ByteBuffer;
7: new org.apache.cassandra.utils.memory.BufferPool$GlobalPool
dup
invokespecial org.apache.cassandra.utils.memory.BufferPool$GlobalPool.<init>:()V
putstatic org.apache.cassandra.utils.memory.BufferPool.globalPool:Lorg/apache/cassandra/utils/memory/BufferPool$GlobalPool;
8: new org.apache.cassandra.utils.memory.BufferPool$1
dup
invokespecial org.apache.cassandra.utils.memory.BufferPool$1.<init>:()V
putstatic org.apache.cassandra.utils.memory.BufferPool.localPool:Lio/netty/util/concurrent/FastThreadLocal;
9: new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putstatic org.apache.cassandra.utils.memory.BufferPool.localPoolReferences:Ljava/util/concurrent/ConcurrentLinkedQueue;
10: new java.lang.ref.ReferenceQueue
dup
invokespecial java.lang.ref.ReferenceQueue.<init>:()V
putstatic org.apache.cassandra.utils.memory.BufferPool.localPoolRefQueue:Ljava/lang/ref/ReferenceQueue;
11: new org.apache.cassandra.concurrent.InfiniteLoopExecutor
dup
ldc "LocalPool-Cleaner"
invokedynamic run()Lorg/apache/cassandra/concurrent/InfiniteLoopExecutor$InterruptibleRunnable;
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:
()V
org/apache/cassandra/utils/memory/BufferPool.cleanupOneReference()V (6)
()V
invokespecial org.apache.cassandra.concurrent.InfiniteLoopExecutor.<init>:(Ljava/lang/String;Lorg/apache/cassandra/concurrent/InfiniteLoopExecutor$InterruptibleRunnable;)V
invokevirtual org.apache.cassandra.concurrent.InfiniteLoopExecutor.start:()Lorg/apache/cassandra/concurrent/InfiniteLoopExecutor;
putstatic org.apache.cassandra.utils.memory.BufferPool.EXEC:Lorg/apache/cassandra/concurrent/InfiniteLoopExecutor;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/utils/memory/BufferPool;
public static java.nio.ByteBuffer get(int);
descriptor: (I)Ljava/nio/ByteBuffer;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: getstatic org.apache.cassandra.utils.memory.BufferPool.DISABLED:Z
ifeq 2
1: iload 0
getstatic org.apache.cassandra.utils.memory.BufferPool.ALLOCATE_ON_HEAP_WHEN_EXAHUSTED:Z
invokestatic org.apache.cassandra.utils.memory.BufferPool.allocate:(IZ)Ljava/nio/ByteBuffer;
areturn
2: StackMap locals:
StackMap stack:
iload 0
getstatic org.apache.cassandra.utils.memory.BufferPool.ALLOCATE_ON_HEAP_WHEN_EXAHUSTED:Z
invokestatic org.apache.cassandra.utils.memory.BufferPool.takeFromPool:(IZ)Ljava/nio/ByteBuffer;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 size I
MethodParameters:
Name Flags
size
public static java.nio.ByteBuffer get(int, org.apache.cassandra.io.compress.BufferType);
descriptor: (ILorg/apache/cassandra/io/compress/BufferType;)Ljava/nio/ByteBuffer;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 1
getstatic org.apache.cassandra.io.compress.BufferType.OFF_HEAP:Lorg/apache/cassandra/io/compress/BufferType;
if_acmpne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: istore 2
start local 2 3: getstatic org.apache.cassandra.utils.memory.BufferPool.DISABLED:Z
ifne 4
iload 2
ifne 7
4: StackMap locals: int
StackMap stack:
iload 0
iload 2
ifeq 5
iconst_0
goto 6
StackMap locals:
StackMap stack: int
5: iconst_1
StackMap locals: int org.apache.cassandra.io.compress.BufferType int
StackMap stack: int int
6: invokestatic org.apache.cassandra.utils.memory.BufferPool.allocate:(IZ)Ljava/nio/ByteBuffer;
areturn
7: StackMap locals:
StackMap stack:
iload 0
iload 2
ifeq 8
iconst_0
goto 9
StackMap locals:
StackMap stack: int
8: iconst_1
StackMap locals: int org.apache.cassandra.io.compress.BufferType int
StackMap stack: int int
9: invokestatic org.apache.cassandra.utils.memory.BufferPool.takeFromPool:(IZ)Ljava/nio/ByteBuffer;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 size I
0 10 1 bufferType Lorg/apache/cassandra/io/compress/BufferType;
3 10 2 direct Z
MethodParameters:
Name Flags
size
bufferType
public static java.nio.ByteBuffer tryGet(int);
descriptor: (I)Ljava/nio/ByteBuffer;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: getstatic org.apache.cassandra.utils.memory.BufferPool.DISABLED:Z
ifeq 2
1: iload 0
getstatic org.apache.cassandra.utils.memory.BufferPool.ALLOCATE_ON_HEAP_WHEN_EXAHUSTED:Z
invokestatic org.apache.cassandra.utils.memory.BufferPool.allocate:(IZ)Ljava/nio/ByteBuffer;
areturn
2: StackMap locals:
StackMap stack:
iload 0
getstatic org.apache.cassandra.utils.memory.BufferPool.ALLOCATE_ON_HEAP_WHEN_EXAHUSTED:Z
invokestatic org.apache.cassandra.utils.memory.BufferPool.maybeTakeFromPool:(IZ)Ljava/nio/ByteBuffer;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 size I
MethodParameters:
Name Flags
size
private static java.nio.ByteBuffer allocate(int, boolean);
descriptor: (IZ)Ljava/nio/ByteBuffer;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: iload 1
ifeq 2
1: iload 0
invokestatic java.nio.ByteBuffer.allocate:(I)Ljava/nio/ByteBuffer;
goto 3
2: StackMap locals:
StackMap stack:
iload 0
invokestatic java.nio.ByteBuffer.allocateDirect:(I)Ljava/nio/ByteBuffer;
3: StackMap locals:
StackMap stack: java.nio.ByteBuffer
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 size I
0 4 1 onHeap Z
MethodParameters:
Name Flags
size
onHeap
private static java.nio.ByteBuffer takeFromPool(int, boolean);
descriptor: (IZ)Ljava/nio/ByteBuffer;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: iload 0
iload 1
invokestatic org.apache.cassandra.utils.memory.BufferPool.maybeTakeFromPool:(IZ)Ljava/nio/ByteBuffer;
astore 2
start local 2 1: aload 2
ifnull 3
2: aload 2
areturn
3: StackMap locals: java.nio.ByteBuffer
StackMap stack:
getstatic org.apache.cassandra.utils.memory.BufferPool.logger:Lorg/slf4j/Logger;
invokeinterface org.slf4j.Logger.isTraceEnabled:()Z
ifeq 5
4: getstatic org.apache.cassandra.utils.memory.BufferPool.logger:Lorg/slf4j/Logger;
ldc "Requested buffer size {} has been allocated directly due to lack of capacity"
iload 0
i2l
invokestatic org.apache.cassandra.utils.FBUtilities.prettyPrintMemory:(J)Ljava/lang/String;
invokeinterface org.slf4j.Logger.trace:(Ljava/lang/String;Ljava/lang/Object;)V
5: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.memory.BufferPool.localPool:Lio/netty/util/concurrent/FastThreadLocal;
invokevirtual io.netty.util.concurrent.FastThreadLocal.get:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.BufferPool$LocalPool
iload 0
iload 1
invokevirtual org.apache.cassandra.utils.memory.BufferPool$LocalPool.allocate:(IZ)Ljava/nio/ByteBuffer;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 size I
0 6 1 allocateOnHeapWhenExhausted Z
1 6 2 ret Ljava/nio/ByteBuffer;
MethodParameters:
Name Flags
size
allocateOnHeapWhenExhausted
private static java.nio.ByteBuffer maybeTakeFromPool(int, boolean);
descriptor: (IZ)Ljava/nio/ByteBuffer;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: iload 0
ifge 2
1: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Size must be positive ("
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 0
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc ")"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
iload 0
ifne 4
3: getstatic org.apache.cassandra.utils.memory.BufferPool.EMPTY_BUFFER:Ljava/nio/ByteBuffer;
areturn
4: StackMap locals:
StackMap stack:
iload 0
ldc 65536
if_icmple 11
5: getstatic org.apache.cassandra.utils.memory.BufferPool.logger:Lorg/slf4j/Logger;
invokeinterface org.slf4j.Logger.isTraceEnabled:()Z
ifeq 10
6: getstatic org.apache.cassandra.utils.memory.BufferPool.logger:Lorg/slf4j/Logger;
ldc "Requested buffer size {} is bigger than {}, allocating directly"
7: iload 0
i2l
invokestatic org.apache.cassandra.utils.FBUtilities.prettyPrintMemory:(J)Ljava/lang/String;
8: ldc 65536
invokestatic org.apache.cassandra.utils.FBUtilities.prettyPrintMemory:(J)Ljava/lang/String;
9: invokeinterface org.slf4j.Logger.trace:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
10: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.memory.BufferPool.localPool:Lio/netty/util/concurrent/FastThreadLocal;
invokevirtual io.netty.util.concurrent.FastThreadLocal.get:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.BufferPool$LocalPool
iload 0
iload 1
invokevirtual org.apache.cassandra.utils.memory.BufferPool$LocalPool.allocate:(IZ)Ljava/nio/ByteBuffer;
areturn
11: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.memory.BufferPool.localPool:Lio/netty/util/concurrent/FastThreadLocal;
invokevirtual io.netty.util.concurrent.FastThreadLocal.get:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.BufferPool$LocalPool
iload 0
invokevirtual org.apache.cassandra.utils.memory.BufferPool$LocalPool.get:(I)Ljava/nio/ByteBuffer;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 size I
0 12 1 allocateOnHeapWhenExhausted Z
MethodParameters:
Name Flags
size
allocateOnHeapWhenExhausted
public static void put(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: getstatic org.apache.cassandra.utils.memory.BufferPool.DISABLED:Z
ifne 2
aload 0
invokevirtual java.nio.ByteBuffer.hasArray:()Z
ifne 2
1: getstatic org.apache.cassandra.utils.memory.BufferPool.localPool:Lio/netty/util/concurrent/FastThreadLocal;
invokevirtual io.netty.util.concurrent.FastThreadLocal.get:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.BufferPool$LocalPool
aload 0
invokevirtual org.apache.cassandra.utils.memory.BufferPool$LocalPool.put:(Ljava/nio/ByteBuffer;)V
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 buffer Ljava/nio/ByteBuffer;
MethodParameters:
Name Flags
buffer
static void reset();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic org.apache.cassandra.utils.memory.BufferPool.localPool:Lio/netty/util/concurrent/FastThreadLocal;
invokevirtual io.netty.util.concurrent.FastThreadLocal.get:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.BufferPool$LocalPool
invokevirtual org.apache.cassandra.utils.memory.BufferPool$LocalPool.reset:()V
1: getstatic org.apache.cassandra.utils.memory.BufferPool.globalPool:Lorg/apache/cassandra/utils/memory/BufferPool$GlobalPool;
invokevirtual org.apache.cassandra.utils.memory.BufferPool$GlobalPool.reset:()V
2: return
LocalVariableTable:
Start End Slot Name Signature
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
static org.apache.cassandra.utils.memory.BufferPool$Chunk currentChunk();
descriptor: ()Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: getstatic org.apache.cassandra.utils.memory.BufferPool.localPool:Lio/netty/util/concurrent/FastThreadLocal;
invokevirtual io.netty.util.concurrent.FastThreadLocal.get:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.BufferPool$LocalPool
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
iconst_0
aaload
areturn
LocalVariableTable:
Start End Slot Name Signature
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
RuntimeInvisibleTypeAnnotations:
METHOD_RETURN
com.google.common.annotations.VisibleForTesting()
static int numChunks();
descriptor: ()I
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=5, args_size=0
0: iconst_0
istore 0
start local 0 1: getstatic org.apache.cassandra.utils.memory.BufferPool.localPool:Lio/netty/util/concurrent/FastThreadLocal;
invokevirtual io.netty.util.concurrent.FastThreadLocal.get:()Ljava/lang/Object;
checkcast org.apache.cassandra.utils.memory.BufferPool$LocalPool
getfield org.apache.cassandra.utils.memory.BufferPool$LocalPool.chunks:[Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
dup
astore 4
arraylength
istore 3
iconst_0
istore 2
goto 6
StackMap locals: int top int int org.apache.cassandra.utils.memory.BufferPool$Chunk[]
StackMap stack:
2: aload 4
iload 2
aaload
astore 1
start local 1 3: aload 1
ifnull 5
4: iinc 0 1
end local 1 5: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
6: iload 2
iload 3
if_icmplt 2
7: iload 0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 8 0 ret I
3 5 1 chunk Lorg/apache/cassandra/utils/memory/BufferPool$Chunk;
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
RuntimeInvisibleTypeAnnotations:
METHOD_RETURN
com.google.common.annotations.VisibleForTesting()
static void assertAllRecycled();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic org.apache.cassandra.utils.memory.BufferPool.globalPool:Lorg/apache/cassandra/utils/memory/BufferPool$GlobalPool;
getfield org.apache.cassandra.utils.memory.BufferPool$GlobalPool.debug:Lorg/apache/cassandra/utils/memory/BufferPool$Debug;
invokevirtual org.apache.cassandra.utils.memory.BufferPool$Debug.check:()V
1: return
LocalVariableTable:
Start End Slot Name Signature
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
public static long sizeInBytes();
descriptor: ()J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=0, args_size=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.sizeInBytes:()J
lreturn
LocalVariableTable:
Start End Slot Name Signature
private static void cleanupOneReference();
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=0
0: getstatic org.apache.cassandra.utils.memory.BufferPool.localPoolRefQueue:Ljava/lang/ref/ReferenceQueue;
ldc 100
invokevirtual java.lang.ref.ReferenceQueue.remove:(J)Ljava/lang/ref/Reference;
astore 0
start local 0 1: aload 0
instanceof org.apache.cassandra.utils.memory.BufferPool$LocalPoolRef
ifeq 4
2: aload 0
checkcast org.apache.cassandra.utils.memory.BufferPool$LocalPoolRef
invokevirtual org.apache.cassandra.utils.memory.BufferPool$LocalPoolRef.release:()V
3: getstatic org.apache.cassandra.utils.memory.BufferPool.localPoolReferences:Ljava/util/concurrent/ConcurrentLinkedQueue;
aload 0
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.remove:(Ljava/lang/Object;)Z
pop
4: StackMap locals: java.lang.Object
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 5 0 obj Ljava/lang/Object;
Exceptions:
throws java.lang.InterruptedException
private static java.nio.ByteBuffer allocateDirectAligned(int);
descriptor: (I)Ljava/nio/ByteBuffer;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=8, args_size=1
start local 0 0: invokestatic org.apache.cassandra.utils.memory.MemoryUtil.pageSize:()I
istore 1
start local 1 1: iload 1
invokestatic java.lang.Integer.bitCount:(I)I
iconst_1
if_icmpeq 3
2: new java.lang.IllegalArgumentException
dup
ldc "Alignment must be a power of 2"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: int
StackMap stack:
iload 0
iload 1
iadd
invokestatic java.nio.ByteBuffer.allocateDirect:(I)Ljava/nio/ByteBuffer;
astore 2
start local 2 4: aload 2
invokestatic org.apache.cassandra.utils.memory.MemoryUtil.getAddress:(Ljava/nio/ByteBuffer;)J
lstore 3
start local 3 5: lload 3
iload 1
iconst_1
isub
i2l
land
lstore 5
start local 5 6: lload 5
lconst_0
lcmp
ifne 9
7: aload 2
iload 0
invokevirtual java.nio.ByteBuffer.limit:(I)Ljava/nio/Buffer;
pop
8: goto 12
9: StackMap locals: java.nio.ByteBuffer long long
StackMap stack:
iload 1
i2l
lload 5
lsub
l2i
istore 7
start local 7 10: aload 2
iload 7
invokevirtual java.nio.ByteBuffer.position:(I)Ljava/nio/Buffer;
pop
11: aload 2
iload 7
iload 0
iadd
invokevirtual java.nio.ByteBuffer.limit:(I)Ljava/nio/Buffer;
pop
end local 7 12: StackMap locals:
StackMap stack:
aload 2
invokevirtual java.nio.ByteBuffer.slice:()Ljava/nio/ByteBuffer;
areturn
end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 capacity I
1 13 1 align I
4 13 2 buffer Ljava/nio/ByteBuffer;
5 13 3 address J
6 13 5 offset J
10 12 7 pos I
MethodParameters:
Name Flags
capacity
public static int roundUpNormal(int);
descriptor: (I)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: iload 0
sipush 1024
invokestatic org.apache.cassandra.utils.memory.BufferPool.roundUp:(II)I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 size I
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
RuntimeInvisibleTypeAnnotations:
METHOD_RETURN
com.google.common.annotations.VisibleForTesting()
MethodParameters:
Name Flags
size
private static int roundUp(int, int);
descriptor: (II)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: iload 1
iconst_1
isub
istore 2
start local 2 1: iload 0
iload 2
iadd
iload 2
iconst_m1
ixor
iand
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 size I
0 2 1 unit I
1 2 2 mask I
MethodParameters:
Name Flags
size
unit
public static void shutdownLocalCleaner(long, java.util.concurrent.TimeUnit);
descriptor: (JLjava/util/concurrent/TimeUnit;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=3, args_size=2
start local 0 start local 2 0: iconst_1
anewarray org.apache.cassandra.concurrent.InfiniteLoopExecutor
dup
iconst_0
1: getstatic org.apache.cassandra.utils.memory.BufferPool.EXEC:Lorg/apache/cassandra/concurrent/InfiniteLoopExecutor;
aastore
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
invokestatic org.apache.cassandra.utils.ExecutorUtils.shutdownNow:(Ljava/lang/Iterable;)V
2: lload 0
aload 2
iconst_1
anewarray org.apache.cassandra.concurrent.InfiniteLoopExecutor
dup
iconst_0
getstatic org.apache.cassandra.utils.memory.BufferPool.EXEC:Lorg/apache/cassandra/concurrent/InfiniteLoopExecutor;
aastore
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
invokestatic org.apache.cassandra.utils.ExecutorUtils.awaitTermination:(JLjava/util/concurrent/TimeUnit;Ljava/util/Collection;)V
return
end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 timeout J
0 3 2 unit Ljava/util/concurrent/TimeUnit;
Exceptions:
throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
MethodParameters:
Name Flags
timeout
unit
}
SourceFile: "BufferPool.java"
NestMembers:
org.apache.cassandra.utils.memory.BufferPool$1 org.apache.cassandra.utils.memory.BufferPool$Chunk org.apache.cassandra.utils.memory.BufferPool$Debug org.apache.cassandra.utils.memory.BufferPool$GlobalPool org.apache.cassandra.utils.memory.BufferPool$LocalPool org.apache.cassandra.utils.memory.BufferPool$LocalPoolRef
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract InterruptibleRunnable = org.apache.cassandra.concurrent.InfiniteLoopExecutor$InterruptibleRunnable of org.apache.cassandra.concurrent.InfiniteLoopExecutor
org.apache.cassandra.utils.memory.BufferPool$1
final Chunk = org.apache.cassandra.utils.memory.BufferPool$Chunk of org.apache.cassandra.utils.memory.BufferPool
final Debug = org.apache.cassandra.utils.memory.BufferPool$Debug 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