public final class org.xnio.ByteBufferSlicePool implements org.xnio.Pool<java.nio.ByteBuffer>
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.xnio.ByteBufferSlicePool
super_class: java.lang.Object
{
private static final int LOCAL_LENGTH;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.util.Set<org.xnio.ByteBufferSlicePool$Ref> refSet;
descriptor: Ljava/util/Set;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Set<Lorg/xnio/ByteBufferSlicePool$Ref;>;
private final java.util.Queue<org.xnio.ByteBufferSlicePool$Slice> sliceQueue;
descriptor: Ljava/util/Queue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Queue<Lorg/xnio/ByteBufferSlicePool$Slice;>;
private final org.xnio.BufferAllocator<java.nio.ByteBuffer> allocator;
descriptor: Lorg/xnio/BufferAllocator;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lorg/xnio/BufferAllocator<Ljava/nio/ByteBuffer;>;
private final int bufferSize;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int buffersPerRegion;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int threadLocalQueueSize;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.ThreadLocal<org.xnio.ByteBufferSlicePool$ThreadLocalCache> localQueueHolder;
descriptor: Ljava/lang/ThreadLocal;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/ThreadLocal<Lorg/xnio/ByteBufferSlicePool$ThreadLocalCache;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=2, args_size=0
0: new org.xnio.ReadPropertyAction
dup
ldc "xnio.bufferpool.threadlocal.size"
ldc "12"
invokespecial org.xnio.ReadPropertyAction.<init>:(Ljava/lang/String;Ljava/lang/String;)V
invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedAction;)Ljava/lang/Object;
checkcast java.lang.String
astore 0
start local 0 1: aload 0
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
istore 1
start local 1 2: goto 5
end local 1 StackMap locals: java.lang.String
StackMap stack: java.lang.NumberFormatException
3: pop
4: bipush 12
istore 1
start local 1 5: StackMap locals: int
StackMap stack:
iload 1
putstatic org.xnio.ByteBufferSlicePool.LOCAL_LENGTH:I
end local 1 end local 0 6: return
LocalVariableTable:
Start End Slot Name Signature
1 6 0 value Ljava/lang/String;
2 3 1 val I
5 6 1 val I
Exception table:
from to target type
1 2 3 Class java.lang.NumberFormatException
public void <init>(org.xnio.BufferAllocator<java.nio.ByteBuffer>, int, int, );
descriptor: (Lorg/xnio/BufferAllocator;III)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
invokestatic java.util.Collections.synchronizedSet:(Ljava/util/Set;)Ljava/util/Set;
putfield org.xnio.ByteBufferSlicePool.refSet:Ljava/util/Set;
2: aload 0
new org.xnio.ByteBufferSlicePool$1
dup
aload 0
invokespecial org.xnio.ByteBufferSlicePool$1.<init>:(Lorg/xnio/ByteBufferSlicePool;)V
putfield org.xnio.ByteBufferSlicePool.localQueueHolder:Ljava/lang/ThreadLocal;
3: iload 2
ifgt 5
4: getstatic org.xnio._private.Messages.msg:Lorg/xnio/_private/Messages;
ldc "bufferSize"
invokeinterface org.xnio._private.Messages.parameterOutOfRange:(Ljava/lang/String;)Ljava/lang/IllegalArgumentException;
athrow
5: StackMap locals: org.xnio.ByteBufferSlicePool org.xnio.BufferAllocator int int int
StackMap stack:
iload 3
iload 2
if_icmpge 7
6: getstatic org.xnio._private.Messages.msg:Lorg/xnio/_private/Messages;
ldc "bufferSize"
invokeinterface org.xnio._private.Messages.parameterOutOfRange:(Ljava/lang/String;)Ljava/lang/IllegalArgumentException;
athrow
7: StackMap locals:
StackMap stack:
aload 0
iload 3
iload 2
idiv
putfield org.xnio.ByteBufferSlicePool.buffersPerRegion:I
8: aload 0
iload 2
putfield org.xnio.ByteBufferSlicePool.bufferSize:I
9: aload 0
aload 1
putfield org.xnio.ByteBufferSlicePool.allocator:Lorg/xnio/BufferAllocator;
10: aload 0
new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putfield org.xnio.ByteBufferSlicePool.sliceQueue:Ljava/util/Queue;
11: aload 0
iload 4
putfield org.xnio.ByteBufferSlicePool.threadLocalQueueSize:I
12: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/xnio/ByteBufferSlicePool;
0 13 1 allocator Lorg/xnio/BufferAllocator<Ljava/nio/ByteBuffer;>;
0 13 2 bufferSize I
0 13 3 maxRegionSize I
0 13 4 threadLocalQueueSize I
Signature: (Lorg/xnio/BufferAllocator<Ljava/nio/ByteBuffer;>;III)V
MethodParameters:
Name Flags
allocator final
bufferSize final
maxRegionSize final
threadLocalQueueSize final
public void <init>(org.xnio.BufferAllocator<java.nio.ByteBuffer>, int, );
descriptor: (Lorg/xnio/BufferAllocator;II)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
iload 2
iload 3
getstatic org.xnio.ByteBufferSlicePool.LOCAL_LENGTH:I
invokespecial org.xnio.ByteBufferSlicePool.<init>:(Lorg/xnio/BufferAllocator;III)V
1: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/xnio/ByteBufferSlicePool;
0 2 1 allocator Lorg/xnio/BufferAllocator<Ljava/nio/ByteBuffer;>;
0 2 2 bufferSize I
0 2 3 maxRegionSize I
Signature: (Lorg/xnio/BufferAllocator<Ljava/nio/ByteBuffer;>;II)V
MethodParameters:
Name Flags
allocator final
bufferSize final
maxRegionSize final
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
getstatic org.xnio.BufferAllocator.DIRECT_BYTE_BUFFER_ALLOCATOR:Lorg/xnio/BufferAllocator;
iload 1
iload 2
invokespecial org.xnio.ByteBufferSlicePool.<init>:(Lorg/xnio/BufferAllocator;II)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/xnio/ByteBufferSlicePool;
0 2 1 bufferSize I
0 2 2 maxRegionSize I
MethodParameters:
Name Flags
bufferSize final
maxRegionSize final
public org.xnio.Pooled<java.nio.ByteBuffer> allocate();
descriptor: ()Lorg/xnio/Pooled;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=9, args_size=1
start local 0 0: aload 0
getfield org.xnio.ByteBufferSlicePool.threadLocalQueueSize:I
ifle 7
1: aload 0
getfield org.xnio.ByteBufferSlicePool.localQueueHolder:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast org.xnio.ByteBufferSlicePool$ThreadLocalCache
astore 2
start local 2 2: aload 2
getfield org.xnio.ByteBufferSlicePool$ThreadLocalCache.outstanding:I
aload 0
getfield org.xnio.ByteBufferSlicePool.threadLocalQueueSize:I
if_icmpeq 4
3: aload 2
dup
getfield org.xnio.ByteBufferSlicePool$ThreadLocalCache.outstanding:I
iconst_1
iadd
putfield org.xnio.ByteBufferSlicePool$ThreadLocalCache.outstanding:I
4: StackMap locals: org.xnio.ByteBufferSlicePool top org.xnio.ByteBufferSlicePool$ThreadLocalCache
StackMap stack:
aload 2
getfield org.xnio.ByteBufferSlicePool$ThreadLocalCache.queue:Ljava/util/ArrayDeque;
invokevirtual java.util.ArrayDeque.poll:()Ljava/lang/Object;
checkcast org.xnio.ByteBufferSlicePool$Slice
astore 1
start local 1 5: aload 1
ifnull 7
6: new org.xnio.ByteBufferSlicePool$PooledByteBuffer
dup
aload 0
aload 1
aload 1
invokevirtual org.xnio.ByteBufferSlicePool$Slice.slice:()Ljava/nio/ByteBuffer;
invokespecial org.xnio.ByteBufferSlicePool$PooledByteBuffer.<init>:(Lorg/xnio/ByteBufferSlicePool;Lorg/xnio/ByteBufferSlicePool$Slice;Ljava/nio/ByteBuffer;)V
areturn
end local 2 end local 1 7: StackMap locals: org.xnio.ByteBufferSlicePool
StackMap stack:
aload 0
getfield org.xnio.ByteBufferSlicePool.sliceQueue:Ljava/util/Queue;
astore 2
start local 2 8: aload 2
invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
checkcast org.xnio.ByteBufferSlicePool$Slice
astore 1
start local 1 9: aload 1
ifnull 11
10: new org.xnio.ByteBufferSlicePool$PooledByteBuffer
dup
aload 0
aload 1
aload 1
invokevirtual org.xnio.ByteBufferSlicePool$Slice.slice:()Ljava/nio/ByteBuffer;
invokespecial org.xnio.ByteBufferSlicePool$PooledByteBuffer.<init>:(Lorg/xnio/ByteBufferSlicePool;Lorg/xnio/ByteBufferSlicePool$Slice;Ljava/nio/ByteBuffer;)V
areturn
11: StackMap locals: org.xnio.ByteBufferSlicePool$Slice java.util.Queue
StackMap stack:
aload 2
dup
astore 3
monitorenter
12: aload 2
invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
checkcast org.xnio.ByteBufferSlicePool$Slice
astore 1
13: aload 1
ifnull 16
14: new org.xnio.ByteBufferSlicePool$PooledByteBuffer
dup
aload 0
aload 1
aload 1
invokevirtual org.xnio.ByteBufferSlicePool$Slice.slice:()Ljava/nio/ByteBuffer;
invokespecial org.xnio.ByteBufferSlicePool$PooledByteBuffer.<init>:(Lorg/xnio/ByteBufferSlicePool;Lorg/xnio/ByteBufferSlicePool$Slice;Ljava/nio/ByteBuffer;)V
aload 3
monitorexit
15: areturn
16: StackMap locals: java.util.Queue
StackMap stack:
aload 0
getfield org.xnio.ByteBufferSlicePool.bufferSize:I
istore 4
start local 4 17: aload 0
getfield org.xnio.ByteBufferSlicePool.buffersPerRegion:I
istore 5
start local 5 18: aload 0
getfield org.xnio.ByteBufferSlicePool.allocator:Lorg/xnio/BufferAllocator;
iload 5
iload 4
imul
invokeinterface org.xnio.BufferAllocator.allocate:(I)Ljava/nio/Buffer;
checkcast java.nio.ByteBuffer
astore 6
start local 6 19: iload 4
istore 7
start local 7 20: iconst_1
istore 8
start local 8 21: goto 25
22: StackMap locals: org.xnio.ByteBufferSlicePool org.xnio.ByteBufferSlicePool$Slice java.util.Queue java.util.Queue int int java.nio.ByteBuffer int int
StackMap stack:
aload 2
new org.xnio.ByteBufferSlicePool$Slice
dup
aload 0
aload 6
iload 7
iload 4
invokespecial org.xnio.ByteBufferSlicePool$Slice.<init>:(Lorg/xnio/ByteBufferSlicePool;Ljava/nio/ByteBuffer;II)V
invokeinterface java.util.Queue.add:(Ljava/lang/Object;)Z
pop
23: iload 7
iload 4
iadd
istore 7
24: iinc 8 1
StackMap locals:
StackMap stack:
25: iload 8
iload 5
if_icmplt 22
end local 8 26: new org.xnio.ByteBufferSlicePool$Slice
dup
aload 0
aload 6
iconst_0
iload 4
invokespecial org.xnio.ByteBufferSlicePool$Slice.<init>:(Lorg/xnio/ByteBufferSlicePool;Ljava/nio/ByteBuffer;II)V
astore 8
start local 8 27: new org.xnio.ByteBufferSlicePool$PooledByteBuffer
dup
aload 0
aload 8
aload 8
invokevirtual org.xnio.ByteBufferSlicePool$Slice.slice:()Ljava/nio/ByteBuffer;
invokespecial org.xnio.ByteBufferSlicePool$PooledByteBuffer.<init>:(Lorg/xnio/ByteBufferSlicePool;Lorg/xnio/ByteBufferSlicePool$Slice;Ljava/nio/ByteBuffer;)V
aload 3
monitorexit
28: areturn
end local 8 end local 7 end local 6 end local 5 end local 4 29: StackMap locals: org.xnio.ByteBufferSlicePool org.xnio.ByteBufferSlicePool$Slice java.util.Queue java.util.Queue
StackMap stack: java.lang.Throwable
aload 3
monitorexit
30: athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 31 0 this Lorg/xnio/ByteBufferSlicePool;
5 7 1 slice Lorg/xnio/ByteBufferSlicePool$Slice;
9 31 1 slice Lorg/xnio/ByteBufferSlicePool$Slice;
2 7 2 localCache Lorg/xnio/ByteBufferSlicePool$ThreadLocalCache;
8 31 2 sliceQueue Ljava/util/Queue<Lorg/xnio/ByteBufferSlicePool$Slice;>;
17 29 4 bufferSize I
18 29 5 buffersPerRegion I
19 29 6 region Ljava/nio/ByteBuffer;
20 29 7 idx I
21 26 8 i I
27 29 8 newSlice Lorg/xnio/ByteBufferSlicePool$Slice;
Exception table:
from to target type
12 15 29 any
16 28 29 any
29 30 29 any
Signature: ()Lorg/xnio/Pooled<Ljava/nio/ByteBuffer;>;
public int getBufferSize();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.xnio.ByteBufferSlicePool.bufferSize:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/xnio/ByteBufferSlicePool;
private void doFree(org.xnio.ByteBufferSlicePool$Slice);
descriptor: (Lorg/xnio/ByteBufferSlicePool$Slice;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=5, args_size=2
start local 0 start local 1 0: aload 0
getfield org.xnio.ByteBufferSlicePool.threadLocalQueueSize:I
ifle 12
1: aload 0
getfield org.xnio.ByteBufferSlicePool.localQueueHolder:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast org.xnio.ByteBufferSlicePool$ThreadLocalCache
astore 2
start local 2 2: iconst_0
istore 3
start local 3 3: aload 2
getfield org.xnio.ByteBufferSlicePool$ThreadLocalCache.outstanding:I
ifle 6
4: aload 2
dup
getfield org.xnio.ByteBufferSlicePool$ThreadLocalCache.outstanding:I
iconst_1
isub
putfield org.xnio.ByteBufferSlicePool$ThreadLocalCache.outstanding:I
5: iconst_1
istore 3
6: StackMap locals: org.xnio.ByteBufferSlicePool$ThreadLocalCache int
StackMap stack:
aload 2
getfield org.xnio.ByteBufferSlicePool$ThreadLocalCache.queue:Ljava/util/ArrayDeque;
astore 4
start local 4 7: aload 4
invokevirtual java.util.ArrayDeque.size:()I
aload 0
getfield org.xnio.ByteBufferSlicePool.threadLocalQueueSize:I
if_icmpeq 8
iload 3
ifne 10
8: StackMap locals: java.util.ArrayDeque
StackMap stack:
aload 0
getfield org.xnio.ByteBufferSlicePool.sliceQueue:Ljava/util/Queue;
aload 1
invokeinterface java.util.Queue.add:(Ljava/lang/Object;)Z
pop
9: goto 13
10: StackMap locals:
StackMap stack:
aload 4
aload 1
invokevirtual java.util.ArrayDeque.add:(Ljava/lang/Object;)Z
pop
end local 4 end local 3 end local 2 11: goto 13
12: StackMap locals:
StackMap stack:
aload 0
getfield org.xnio.ByteBufferSlicePool.sliceQueue:Ljava/util/Queue;
aload 1
invokeinterface java.util.Queue.add:(Ljava/lang/Object;)Z
pop
13: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/xnio/ByteBufferSlicePool;
0 14 1 region Lorg/xnio/ByteBufferSlicePool$Slice;
2 11 2 localCache Lorg/xnio/ByteBufferSlicePool$ThreadLocalCache;
3 11 3 cacheOk Z
7 11 4 localQueue Ljava/util/ArrayDeque<Lorg/xnio/ByteBufferSlicePool$Slice;>;
MethodParameters:
Name Flags
region
}
Signature: Ljava/lang/Object;Lorg/xnio/Pool<Ljava/nio/ByteBuffer;>;
SourceFile: "ByteBufferSlicePool.java"
NestMembers:
org.xnio.ByteBufferSlicePool$1 org.xnio.ByteBufferSlicePool$PooledByteBuffer org.xnio.ByteBufferSlicePool$Ref org.xnio.ByteBufferSlicePool$Slice org.xnio.ByteBufferSlicePool$ThreadLocalCache org.xnio.ByteBufferSlicePool$ThreadLocalCache$1
InnerClasses:
org.xnio.ByteBufferSlicePool$1
private final PooledByteBuffer = org.xnio.ByteBufferSlicePool$PooledByteBuffer of org.xnio.ByteBufferSlicePool
final Ref = org.xnio.ByteBufferSlicePool$Ref of org.xnio.ByteBufferSlicePool
private final Slice = org.xnio.ByteBufferSlicePool$Slice of org.xnio.ByteBufferSlicePool
private final ThreadLocalCache = org.xnio.ByteBufferSlicePool$ThreadLocalCache of org.xnio.ByteBufferSlicePool