public class org.apache.cassandra.db.commitlog.SimpleCachedBufferPool
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.db.commitlog.SimpleCachedBufferPool
super_class: java.lang.Object
{
protected static final io.netty.util.concurrent.FastThreadLocal<java.nio.ByteBuffer> reusableBufferHolder;
descriptor: Lio/netty/util/concurrent/FastThreadLocal;
flags: (0x001c) ACC_PROTECTED, ACC_STATIC, ACC_FINAL
Signature: Lio/netty/util/concurrent/FastThreadLocal<Ljava/nio/ByteBuffer;>;
private java.util.Queue<java.nio.ByteBuffer> bufferPool;
descriptor: Ljava/util/Queue;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Queue<Ljava/nio/ByteBuffer;>;
private java.util.concurrent.atomic.AtomicInteger usedBuffers;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0002) ACC_PRIVATE
private final int maxBufferPoolSize;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int bufferSize;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private org.apache.cassandra.io.compress.BufferType preferredReusableBufferType;
descriptor: Lorg/apache/cassandra/io/compress/BufferType;
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new org.apache.cassandra.db.commitlog.SimpleCachedBufferPool$1
dup
invokespecial org.apache.cassandra.db.commitlog.SimpleCachedBufferPool$1.<init>:()V
putstatic org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.reusableBufferHolder:Lio/netty/util/concurrent/FastThreadLocal;
1: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(int, int);
descriptor: (II)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.bufferPool:Ljava/util/Queue;
2: aload 0
new java.util.concurrent.atomic.AtomicInteger
dup
iconst_0
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:(I)V
putfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.usedBuffers:Ljava/util/concurrent/atomic/AtomicInteger;
3: aload 0
getstatic org.apache.cassandra.io.compress.BufferType.ON_HEAP:Lorg/apache/cassandra/io/compress/BufferType;
putfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.preferredReusableBufferType:Lorg/apache/cassandra/io/compress/BufferType;
4: aload 0
iload 1
putfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.maxBufferPoolSize:I
5: aload 0
iload 2
putfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.bufferSize:I
6: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/cassandra/db/commitlog/SimpleCachedBufferPool;
0 7 1 maxBufferPoolSize I
0 7 2 bufferSize I
MethodParameters:
Name Flags
maxBufferPoolSize
bufferSize
public java.nio.ByteBuffer createBuffer(org.apache.cassandra.io.compress.BufferType);
descriptor: (Lorg/apache/cassandra/io/compress/BufferType;)Ljava/nio/ByteBuffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.usedBuffers:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.incrementAndGet:()I
pop
1: aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.bufferPool:Ljava/util/Queue;
invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
checkcast java.nio.ByteBuffer
astore 2
start local 2 2: aload 2
ifnull 5
3: aload 2
invokevirtual java.nio.ByteBuffer.clear:()Ljava/nio/Buffer;
pop
4: aload 2
areturn
5: StackMap locals: java.nio.ByteBuffer
StackMap stack:
aload 1
aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.bufferSize:I
invokevirtual org.apache.cassandra.io.compress.BufferType.allocate:(I)Ljava/nio/ByteBuffer;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/db/commitlog/SimpleCachedBufferPool;
0 6 1 bufferType Lorg/apache/cassandra/io/compress/BufferType;
2 6 2 buf Ljava/nio/ByteBuffer;
MethodParameters:
Name Flags
bufferType
public java.nio.ByteBuffer getThreadLocalReusableBuffer(int);
descriptor: (I)Ljava/nio/ByteBuffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: getstatic org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.reusableBufferHolder:Lio/netty/util/concurrent/FastThreadLocal;
invokevirtual io.netty.util.concurrent.FastThreadLocal.get:()Ljava/lang/Object;
checkcast java.nio.ByteBuffer
astore 2
start local 2 1: aload 2
invokevirtual java.nio.ByteBuffer.capacity:()I
iload 1
if_icmplt 2
aload 2
invokestatic org.apache.cassandra.io.compress.BufferType.typeOf:(Ljava/nio/ByteBuffer;)Lorg/apache/cassandra/io/compress/BufferType;
aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.preferredReusableBufferType:Lorg/apache/cassandra/io/compress/BufferType;
if_acmpeq 5
2: StackMap locals: java.nio.ByteBuffer
StackMap stack:
aload 2
invokestatic org.apache.cassandra.io.util.FileUtils.clean:(Ljava/nio/ByteBuffer;)V
3: aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.preferredReusableBufferType:Lorg/apache/cassandra/io/compress/BufferType;
iload 1
invokevirtual org.apache.cassandra.io.compress.BufferType.allocate:(I)Ljava/nio/ByteBuffer;
astore 2
4: getstatic org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.reusableBufferHolder:Lio/netty/util/concurrent/FastThreadLocal;
aload 2
invokevirtual io.netty.util.concurrent.FastThreadLocal.set:(Ljava/lang/Object;)V
5: StackMap locals:
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/db/commitlog/SimpleCachedBufferPool;
0 6 1 size I
1 6 2 result Ljava/nio/ByteBuffer;
MethodParameters:
Name Flags
size
public void setPreferredReusableBufferType(org.apache.cassandra.io.compress.BufferType);
descriptor: (Lorg/apache/cassandra/io/compress/BufferType;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.preferredReusableBufferType:Lorg/apache/cassandra/io/compress/BufferType;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/db/commitlog/SimpleCachedBufferPool;
0 2 1 type Lorg/apache/cassandra/io/compress/BufferType;
MethodParameters:
Name Flags
type
public void releaseBuffer(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.usedBuffers:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.decrementAndGet:()I
pop
1: aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.bufferPool:Ljava/util/Queue;
invokeinterface java.util.Queue.size:()I
aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.maxBufferPoolSize:I
if_icmpge 3
2: aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.bufferPool:Ljava/util/Queue;
aload 1
invokeinterface java.util.Queue.add:(Ljava/lang/Object;)Z
pop
goto 4
3: StackMap locals:
StackMap stack:
aload 1
invokestatic org.apache.cassandra.io.util.FileUtils.clean:(Ljava/nio/ByteBuffer;)V
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/db/commitlog/SimpleCachedBufferPool;
0 5 1 buffer Ljava/nio/ByteBuffer;
MethodParameters:
Name Flags
buffer
public void shutdown();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.bufferPool:Ljava/util/Queue;
invokeinterface java.util.Queue.clear:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/db/commitlog/SimpleCachedBufferPool;
public boolean atLimit();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.usedBuffers:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.maxBufferPoolSize:I
if_icmplt 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/db/commitlog/SimpleCachedBufferPool;
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
1: ldc "SimpleBufferPool:"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
2: ldc " bufferCount:"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.usedBuffers:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
3: ldc ", bufferSize:"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.maxBufferPoolSize:I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
4: ldc ", buffer size:"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield org.apache.cassandra.db.commitlog.SimpleCachedBufferPool.bufferSize:I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
5: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
6: areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/cassandra/db/commitlog/SimpleCachedBufferPool;
}
SourceFile: "SimpleCachedBufferPool.java"
NestMembers:
org.apache.cassandra.db.commitlog.SimpleCachedBufferPool$1
InnerClasses:
org.apache.cassandra.db.commitlog.SimpleCachedBufferPool$1