final class org.apache.cassandra.hints.HintsBufferPool implements java.io.Closeable
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: org.apache.cassandra.hints.HintsBufferPool
super_class: java.lang.Object
{
static final int MAX_ALLOCATED_BUFFERS;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
private volatile org.apache.cassandra.hints.HintsBuffer currentBuffer;
descriptor: Lorg/apache/cassandra/hints/HintsBuffer;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private final java.util.concurrent.BlockingQueue<org.apache.cassandra.hints.HintsBuffer> reserveBuffers;
descriptor: Ljava/util/concurrent/BlockingQueue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/BlockingQueue<Lorg/apache/cassandra/hints/HintsBuffer;>;
private final int bufferSize;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.apache.cassandra.hints.HintsBufferPool$FlushCallback flushCallback;
descriptor: Lorg/apache/cassandra/hints/HintsBufferPool$FlushCallback;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private int allocatedBuffers;
descriptor: I
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: ldc "cassandra.MAX_HINT_BUFFERS"
iconst_3
invokestatic java.lang.Integer.getInteger:(Ljava/lang/String;I)Ljava/lang/Integer;
invokevirtual java.lang.Integer.intValue:()I
putstatic org.apache.cassandra.hints.HintsBufferPool.MAX_ALLOCATED_BUFFERS:I
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(int, org.apache.cassandra.hints.HintsBufferPool$FlushCallback);
descriptor: (ILorg/apache/cassandra/hints/HintsBufferPool$FlushCallback;)V
flags: (0x0000)
Code:
stack=3, 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
iconst_0
putfield org.apache.cassandra.hints.HintsBufferPool.allocatedBuffers:I
2: aload 0
new java.util.concurrent.LinkedBlockingQueue
dup
invokespecial java.util.concurrent.LinkedBlockingQueue.<init>:()V
putfield org.apache.cassandra.hints.HintsBufferPool.reserveBuffers:Ljava/util/concurrent/BlockingQueue;
3: aload 0
iload 1
putfield org.apache.cassandra.hints.HintsBufferPool.bufferSize:I
4: aload 0
aload 2
putfield org.apache.cassandra.hints.HintsBufferPool.flushCallback:Lorg/apache/cassandra/hints/HintsBufferPool$FlushCallback;
5: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/hints/HintsBufferPool;
0 6 1 bufferSize I
0 6 2 flushCallback Lorg/apache/cassandra/hints/HintsBufferPool$FlushCallback;
MethodParameters:
Name Flags
bufferSize
flushCallback
void write(java.lang.Iterable<java.util.UUID>, org.apache.cassandra.hints.Hint);
descriptor: (Ljava/lang/Iterable;Lorg/apache/cassandra/hints/Hint;)V
flags: (0x0000)
Code:
stack=3, locals=7, args_size=3
start local 0 start local 1 start local 2 0: getstatic org.apache.cassandra.hints.Hint.serializer:Lorg/apache/cassandra/hints/Hint$Serializer;
aload 2
getstatic org.apache.cassandra.net.MessagingService.current_version:I
invokevirtual org.apache.cassandra.hints.Hint$Serializer.serializedSize:(Lorg/apache/cassandra/hints/Hint;I)J
l2i
istore 3
start local 3 1: aconst_null
astore 4
aconst_null
astore 5
2: aload 0
iload 3
invokevirtual org.apache.cassandra.hints.HintsBufferPool.allocate:(I)Lorg/apache/cassandra/hints/HintsBuffer$Allocation;
astore 6
start local 6 3: aload 6
aload 1
aload 2
invokevirtual org.apache.cassandra.hints.HintsBuffer$Allocation.write:(Ljava/lang/Iterable;Lorg/apache/cassandra/hints/Hint;)V
4: aload 6
ifnull 10
aload 6
invokevirtual org.apache.cassandra.hints.HintsBuffer$Allocation.close:()V
goto 10
StackMap locals: org.apache.cassandra.hints.HintsBufferPool java.lang.Iterable org.apache.cassandra.hints.Hint int java.lang.Throwable java.lang.Throwable org.apache.cassandra.hints.HintsBuffer$Allocation
StackMap stack: java.lang.Throwable
5: astore 4
aload 6
ifnull 6
aload 6
invokevirtual org.apache.cassandra.hints.HintsBuffer$Allocation.close:()V
end local 6 StackMap locals:
StackMap stack:
6: aload 4
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
7: astore 5
aload 4
ifnonnull 8
aload 5
astore 4
goto 9
StackMap locals:
StackMap stack:
8: aload 4
aload 5
if_acmpeq 9
aload 4
aload 5
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
9: aload 4
athrow
10: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/apache/cassandra/hints/HintsBufferPool;
0 11 1 hostIds Ljava/lang/Iterable<Ljava/util/UUID;>;
0 11 2 hint Lorg/apache/cassandra/hints/Hint;
1 11 3 hintSize I
3 6 6 allocation Lorg/apache/cassandra/hints/HintsBuffer$Allocation;
Exception table:
from to target type
3 4 5 any
2 7 7 any
Signature: (Ljava/lang/Iterable<Ljava/util/UUID;>;Lorg/apache/cassandra/hints/Hint;)V
MethodParameters:
Name Flags
hostIds
hint
private org.apache.cassandra.hints.HintsBuffer$Allocation allocate(int);
descriptor: (I)Lorg/apache/cassandra/hints/HintsBuffer$Allocation;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.apache.cassandra.hints.HintsBufferPool.currentBuffer:()Lorg/apache/cassandra/hints/HintsBuffer;
astore 2
start local 2 1: StackMap locals: org.apache.cassandra.hints.HintsBuffer
StackMap stack:
aload 2
iload 1
invokevirtual org.apache.cassandra.hints.HintsBuffer.allocate:(I)Lorg/apache/cassandra/hints/HintsBuffer$Allocation;
astore 3
start local 3 2: aload 3
ifnull 4
3: aload 3
areturn
4: StackMap locals: org.apache.cassandra.hints.HintsBuffer$Allocation
StackMap stack:
aload 0
aload 2
invokevirtual org.apache.cassandra.hints.HintsBufferPool.switchCurrentBuffer:(Lorg/apache/cassandra/hints/HintsBuffer;)Z
ifeq 6
5: aload 0
getfield org.apache.cassandra.hints.HintsBufferPool.flushCallback:Lorg/apache/cassandra/hints/HintsBufferPool$FlushCallback;
aload 2
aload 0
invokeinterface org.apache.cassandra.hints.HintsBufferPool$FlushCallback.flush:(Lorg/apache/cassandra/hints/HintsBuffer;Lorg/apache/cassandra/hints/HintsBufferPool;)V
6: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.hints.HintsBufferPool.currentBuffer:Lorg/apache/cassandra/hints/HintsBuffer;
astore 2
end local 3 7: goto 1
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/apache/cassandra/hints/HintsBufferPool;
0 8 1 hintSize I
1 8 2 current Lorg/apache/cassandra/hints/HintsBuffer;
2 7 3 allocation Lorg/apache/cassandra/hints/HintsBuffer$Allocation;
MethodParameters:
Name Flags
hintSize
void offer(org.apache.cassandra.hints.HintsBuffer);
descriptor: (Lorg/apache/cassandra/hints/HintsBuffer;)V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.hints.HintsBufferPool.reserveBuffers:Ljava/util/concurrent/BlockingQueue;
aload 1
invokeinterface java.util.concurrent.BlockingQueue.offer:(Ljava/lang/Object;)Z
ifne 2
1: new java.lang.RuntimeException
dup
ldc "Failed to store buffer"
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/hints/HintsBufferPool;
0 3 1 buffer Lorg/apache/cassandra/hints/HintsBuffer;
MethodParameters:
Name Flags
buffer
org.apache.cassandra.hints.HintsBuffer currentBuffer();
descriptor: ()Lorg/apache/cassandra/hints/HintsBuffer;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.hints.HintsBufferPool.currentBuffer:Lorg/apache/cassandra/hints/HintsBuffer;
ifnonnull 2
1: aload 0
invokevirtual org.apache.cassandra.hints.HintsBufferPool.initializeCurrentBuffer:()V
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.hints.HintsBufferPool.currentBuffer:Lorg/apache/cassandra/hints/HintsBuffer;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/hints/HintsBufferPool;
private synchronized void initializeCurrentBuffer();
descriptor: ()V
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.hints.HintsBufferPool.currentBuffer:Lorg/apache/cassandra/hints/HintsBuffer;
ifnonnull 2
1: aload 0
aload 0
invokevirtual org.apache.cassandra.hints.HintsBufferPool.createBuffer:()Lorg/apache/cassandra/hints/HintsBuffer;
putfield org.apache.cassandra.hints.HintsBufferPool.currentBuffer:Lorg/apache/cassandra/hints/HintsBuffer;
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/hints/HintsBufferPool;
private synchronized boolean switchCurrentBuffer(org.apache.cassandra.hints.HintsBuffer);
descriptor: (Lorg/apache/cassandra/hints/HintsBuffer;)Z
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.hints.HintsBufferPool.currentBuffer:Lorg/apache/cassandra/hints/HintsBuffer;
aload 1
if_acmpeq 2
1: iconst_0
ireturn
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.hints.HintsBufferPool.reserveBuffers:Ljava/util/concurrent/BlockingQueue;
invokeinterface java.util.concurrent.BlockingQueue.poll:()Ljava/lang/Object;
checkcast org.apache.cassandra.hints.HintsBuffer
astore 2
start local 2 3: aload 2
ifnonnull 8
aload 0
getfield org.apache.cassandra.hints.HintsBufferPool.allocatedBuffers:I
getstatic org.apache.cassandra.hints.HintsBufferPool.MAX_ALLOCATED_BUFFERS:I
if_icmplt 8
4: aload 0
getfield org.apache.cassandra.hints.HintsBufferPool.reserveBuffers:Ljava/util/concurrent/BlockingQueue;
invokeinterface java.util.concurrent.BlockingQueue.take:()Ljava/lang/Object;
checkcast org.apache.cassandra.hints.HintsBuffer
astore 2
5: goto 8
6: StackMap locals: org.apache.cassandra.hints.HintsBufferPool org.apache.cassandra.hints.HintsBuffer org.apache.cassandra.hints.HintsBuffer
StackMap stack: java.lang.InterruptedException
astore 3
start local 3 7: new java.lang.RuntimeException
dup
aload 3
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 3 8: StackMap locals:
StackMap stack:
aload 0
aload 2
ifnonnull 9
aload 0
invokevirtual org.apache.cassandra.hints.HintsBufferPool.createBuffer:()Lorg/apache/cassandra/hints/HintsBuffer;
goto 10
StackMap locals:
StackMap stack: org.apache.cassandra.hints.HintsBufferPool
9: aload 2
StackMap locals: org.apache.cassandra.hints.HintsBufferPool org.apache.cassandra.hints.HintsBuffer org.apache.cassandra.hints.HintsBuffer
StackMap stack: org.apache.cassandra.hints.HintsBufferPool org.apache.cassandra.hints.HintsBuffer
10: putfield org.apache.cassandra.hints.HintsBufferPool.currentBuffer:Lorg/apache/cassandra/hints/HintsBuffer;
11: iconst_1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/apache/cassandra/hints/HintsBufferPool;
0 12 1 previous Lorg/apache/cassandra/hints/HintsBuffer;
3 12 2 buffer Lorg/apache/cassandra/hints/HintsBuffer;
7 8 3 e Ljava/lang/InterruptedException;
Exception table:
from to target type
4 5 6 Class java.lang.InterruptedException
MethodParameters:
Name Flags
previous
private org.apache.cassandra.hints.HintsBuffer createBuffer();
descriptor: ()Lorg/apache/cassandra/hints/HintsBuffer;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
dup
getfield org.apache.cassandra.hints.HintsBufferPool.allocatedBuffers:I
iconst_1
iadd
putfield org.apache.cassandra.hints.HintsBufferPool.allocatedBuffers:I
1: aload 0
getfield org.apache.cassandra.hints.HintsBufferPool.bufferSize:I
invokestatic org.apache.cassandra.hints.HintsBuffer.create:(I)Lorg/apache/cassandra/hints/HintsBuffer;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/hints/HintsBufferPool;
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.hints.HintsBufferPool.currentBuffer:Lorg/apache/cassandra/hints/HintsBuffer;
invokevirtual org.apache.cassandra.hints.HintsBuffer.free:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/hints/HintsBufferPool;
}
SourceFile: "HintsBufferPool.java"
NestMembers:
org.apache.cassandra.hints.HintsBufferPool$FlushCallback
InnerClasses:
final Serializer = org.apache.cassandra.hints.Hint$Serializer of org.apache.cassandra.hints.Hint
final Allocation = org.apache.cassandra.hints.HintsBuffer$Allocation of org.apache.cassandra.hints.HintsBuffer
abstract FlushCallback = org.apache.cassandra.hints.HintsBufferPool$FlushCallback of org.apache.cassandra.hints.HintsBufferPool