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 static final java.util.Queue<java.nio.ByteBuffer> FREE_DIRECT_BUFFERS;
descriptor: Ljava/util/Queue;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Queue<Ljava/nio/ByteBuffer;>;
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.util.List<java.nio.ByteBuffer> directBuffers;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<Ljava/nio/ByteBuffer;>;
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
6: new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putstatic org.xnio.ByteBufferSlicePool.FREE_DIRECT_BUFFERS:Ljava/util/Queue;
end local 1 end local 0 7: return
LocalVariableTable:
Start End Slot Name Signature
1 7 0 value Ljava/lang/String;
2 3 1 val I
5 7 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$ThreadLocalCacheWrapper
dup
aload 0
invokespecial org.xnio.ByteBufferSlicePool$ThreadLocalCacheWrapper.<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: aload 1
getstatic org.xnio.BufferAllocator.DIRECT_BYTE_BUFFER_ALLOCATOR:Lorg/xnio/BufferAllocator;
if_acmpne 15
13: aload 0
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
invokestatic java.util.Collections.synchronizedList:(Ljava/util/List;)Ljava/util/List;
putfield org.xnio.ByteBufferSlicePool.directBuffers:Ljava/util/List;
14: goto 16
15: StackMap locals:
StackMap stack:
aload 0
aconst_null
putfield org.xnio.ByteBufferSlicePool.directBuffers:Ljava/util/List;
16: 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 17 0 this Lorg/xnio/ByteBufferSlicePool;
0 17 1 allocator Lorg/xnio/BufferAllocator<Ljava/nio/ByteBuffer;>;
0 17 2 bufferSize I
0 17 3 maxRegionSize I
0 17 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=5, locals=5, 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
aload 0
getfield org.xnio.ByteBufferSlicePool.buffersPerRegion:I
aload 0
getfield org.xnio.ByteBufferSlicePool.bufferSize:I
invokevirtual org.xnio.ByteBufferSlicePool.allocateSlices:(II)Lorg/xnio/ByteBufferSlicePool$Slice;
astore 4
start local 4 17: new org.xnio.ByteBufferSlicePool$PooledByteBuffer
dup
aload 0
aload 4
aload 4
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
18: areturn
end local 4 19: StackMap locals:
StackMap stack: java.lang.Throwable
aload 3
monitorexit
20: athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 this Lorg/xnio/ByteBufferSlicePool;
5 7 1 slice Lorg/xnio/ByteBufferSlicePool$Slice;
9 21 1 slice Lorg/xnio/ByteBufferSlicePool$Slice;
2 7 2 localCache Lorg/xnio/ByteBufferSlicePool$ThreadLocalCache;
8 21 2 sliceQueue Ljava/util/Queue<Lorg/xnio/ByteBufferSlicePool$Slice;>;
17 19 4 newSlice Lorg/xnio/ByteBufferSlicePool$Slice;
Exception table:
from to target type
12 15 19 any
16 18 19 any
19 20 19 any
Signature: ()Lorg/xnio/Pooled<Ljava/nio/ByteBuffer;>;
private org.xnio.ByteBufferSlicePool$Slice allocateSlices(int, int);
descriptor: (II)Lorg/xnio/ByteBufferSlicePool$Slice;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.xnio.ByteBufferSlicePool.directBuffers:Ljava/util/List;
ifnull 13
1: getstatic org.xnio.ByteBufferSlicePool.FREE_DIRECT_BUFFERS:Ljava/util/Queue;
invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
checkcast java.nio.ByteBuffer
astore 3
start local 3 2: aload 3
ifnull 6
3: aload 0
aload 3
iload 1
iload 2
invokevirtual org.xnio.ByteBufferSlicePool.sliceReusedBuffer:(Ljava/nio/ByteBuffer;II)Lorg/xnio/ByteBufferSlicePool$Slice;
astore 5
4: aload 0
getfield org.xnio.ByteBufferSlicePool.directBuffers:Ljava/util/List;
aload 3
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
5: aload 5
areturn
6: StackMap locals: java.nio.ByteBuffer
StackMap stack:
aload 0
getfield org.xnio.ByteBufferSlicePool.allocator:Lorg/xnio/BufferAllocator;
iload 1
iload 2
imul
invokeinterface org.xnio.BufferAllocator.allocate:(I)Ljava/nio/Buffer;
checkcast java.nio.ByteBuffer
astore 3
7: aload 0
aload 3
iload 1
iload 2
invokevirtual org.xnio.ByteBufferSlicePool.sliceAllocatedBuffer:(Ljava/nio/ByteBuffer;II)Lorg/xnio/ByteBufferSlicePool$Slice;
astore 5
8: aload 0
getfield org.xnio.ByteBufferSlicePool.directBuffers:Ljava/util/List;
aload 3
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
9: aload 5
areturn
10: StackMap locals:
StackMap stack: java.lang.Throwable
astore 4
11: aload 0
getfield org.xnio.ByteBufferSlicePool.directBuffers:Ljava/util/List;
aload 3
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
12: aload 4
athrow
end local 3 13: StackMap locals:
StackMap stack:
aload 0
14: aload 0
getfield org.xnio.ByteBufferSlicePool.allocator:Lorg/xnio/BufferAllocator;
iload 1
iload 2
imul
invokeinterface org.xnio.BufferAllocator.allocate:(I)Ljava/nio/Buffer;
checkcast java.nio.ByteBuffer
15: iload 1
iload 2
16: invokevirtual org.xnio.ByteBufferSlicePool.sliceAllocatedBuffer:(Ljava/nio/ByteBuffer;II)Lorg/xnio/ByteBufferSlicePool$Slice;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lorg/xnio/ByteBufferSlicePool;
0 17 1 buffersPerRegion I
0 17 2 bufferSize I
2 13 3 region Ljava/nio/ByteBuffer;
Exception table:
from to target type
2 4 10 any
6 8 10 any
MethodParameters:
Name Flags
buffersPerRegion final
bufferSize final
private org.xnio.ByteBufferSlicePool$Slice sliceReusedBuffer(java.nio.ByteBuffer, int, int);
descriptor: (Ljava/nio/ByteBuffer;II)Lorg/xnio/ByteBufferSlicePool$Slice;
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=7, args_size=4
start local 0 start local 1 start local 2 start local 3 0: iload 2
aload 1
invokevirtual java.nio.ByteBuffer.capacity:()I
iload 3
idiv
invokestatic java.lang.Math.min:(II)I
istore 4
start local 4 1: iload 3
istore 5
start local 5 2: iconst_1
istore 6
start local 6 3: goto 7
4: StackMap locals: int int int
StackMap stack:
aload 0
getfield org.xnio.ByteBufferSlicePool.sliceQueue:Ljava/util/Queue;
new org.xnio.ByteBufferSlicePool$Slice
dup
aload 1
iload 5
iload 3
invokespecial org.xnio.ByteBufferSlicePool$Slice.<init>:(Ljava/nio/ByteBuffer;II)V
invokeinterface java.util.Queue.add:(Ljava/lang/Object;)Z
pop
5: iload 5
iload 3
iadd
istore 5
6: iinc 6 1
StackMap locals:
StackMap stack:
7: iload 6
iload 4
if_icmplt 4
end local 6 8: iload 4
ifne 10
9: aload 0
iload 2
iload 3
invokevirtual org.xnio.ByteBufferSlicePool.allocateSlices:(II)Lorg/xnio/ByteBufferSlicePool$Slice;
areturn
10: StackMap locals:
StackMap stack:
iload 4
iload 2
if_icmpge 12
11: aload 0
getfield org.xnio.ByteBufferSlicePool.sliceQueue:Ljava/util/Queue;
aload 0
iload 2
iload 4
isub
iload 3
invokevirtual org.xnio.ByteBufferSlicePool.allocateSlices:(II)Lorg/xnio/ByteBufferSlicePool$Slice;
invokeinterface java.util.Queue.add:(Ljava/lang/Object;)Z
pop
12: StackMap locals:
StackMap stack:
new org.xnio.ByteBufferSlicePool$Slice
dup
aload 1
iconst_0
iload 3
invokespecial org.xnio.ByteBufferSlicePool$Slice.<init>:(Ljava/nio/ByteBuffer;II)V
areturn
end local 5 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 region Ljava/nio/ByteBuffer;
0 13 2 buffersPerRegion I
0 13 3 bufferSize I
1 13 4 maxI I
2 13 5 idx I
3 8 6 i I
MethodParameters:
Name Flags
region final
buffersPerRegion final
bufferSize final
private org.xnio.ByteBufferSlicePool$Slice sliceAllocatedBuffer(java.nio.ByteBuffer, int, int);
descriptor: (Ljava/nio/ByteBuffer;II)Lorg/xnio/ByteBufferSlicePool$Slice;
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: iload 3
istore 4
start local 4 1: iconst_1
istore 5
start local 5 2: goto 6
3: StackMap locals: int int
StackMap stack:
aload 0
getfield org.xnio.ByteBufferSlicePool.sliceQueue:Ljava/util/Queue;
new org.xnio.ByteBufferSlicePool$Slice
dup
aload 1
iload 4
iload 3
invokespecial org.xnio.ByteBufferSlicePool$Slice.<init>:(Ljava/nio/ByteBuffer;II)V
invokeinterface java.util.Queue.add:(Ljava/lang/Object;)Z
pop
4: iload 4
iload 3
iadd
istore 4
5: iinc 5 1
StackMap locals:
StackMap stack:
6: iload 5
iload 2
if_icmplt 3
end local 5 7: new org.xnio.ByteBufferSlicePool$Slice
dup
aload 1
iconst_0
iload 3
invokespecial org.xnio.ByteBufferSlicePool$Slice.<init>:(Ljava/nio/ByteBuffer;II)V
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/xnio/ByteBufferSlicePool;
0 8 1 region Ljava/nio/ByteBuffer;
0 8 2 buffersPerRegion I
0 8 3 bufferSize I
1 8 4 idx I
2 7 5 i I
MethodParameters:
Name Flags
region final
buffersPerRegion final
bufferSize final
public void clean();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield org.xnio.ByteBufferSlicePool.localQueueHolder:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast org.xnio.ByteBufferSlicePool$ThreadLocalCache
astore 1
start local 1 1: aload 1
getfield org.xnio.ByteBufferSlicePool$ThreadLocalCache.queue:Ljava/util/ArrayDeque;
invokevirtual java.util.ArrayDeque.isEmpty:()Z
ifne 3
2: aload 1
getfield org.xnio.ByteBufferSlicePool$ThreadLocalCache.queue:Ljava/util/ArrayDeque;
invokevirtual java.util.ArrayDeque.clear:()V
3: StackMap locals: org.xnio.ByteBufferSlicePool$ThreadLocalCache
StackMap stack:
aload 0
getfield org.xnio.ByteBufferSlicePool.sliceQueue:Ljava/util/Queue;
invokeinterface java.util.Queue.isEmpty:()Z
ifne 5
4: aload 0
getfield org.xnio.ByteBufferSlicePool.sliceQueue:Ljava/util/Queue;
invokeinterface java.util.Queue.clear:()V
5: StackMap locals:
StackMap stack:
aload 0
getfield org.xnio.ByteBufferSlicePool.directBuffers:Ljava/util/List;
ifnull 7
6: getstatic org.xnio.ByteBufferSlicePool.FREE_DIRECT_BUFFERS:Ljava/util/Queue;
aload 0
getfield org.xnio.ByteBufferSlicePool.directBuffers:Ljava/util/List;
invokeinterface java.util.Queue.addAll:(Ljava/util/Collection;)Z
pop
7: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/xnio/ByteBufferSlicePool;
1 8 1 localCache Lorg/xnio/ByteBufferSlicePool$ThreadLocalCache;
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 org.xnio.ByteBufferSlicePool$ThreadLocalCache createThreadLocalCache();
descriptor: ()Lorg/xnio/ByteBufferSlicePool$ThreadLocalCache;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: new org.xnio.ByteBufferSlicePool$ThreadLocalCache
dup
aload 0
invokespecial org.xnio.ByteBufferSlicePool$ThreadLocalCache.<init>:(Lorg/xnio/ByteBufferSlicePool;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/xnio/ByteBufferSlicePool;
private void freeThreadLocalCache(org.xnio.ByteBufferSlicePool$ThreadLocalCache);
descriptor: (Lorg/xnio/ByteBufferSlicePool$ThreadLocalCache;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=4, args_size=2
start local 0 start local 1 0: aload 1
getfield org.xnio.ByteBufferSlicePool$ThreadLocalCache.queue:Ljava/util/ArrayDeque;
astore 2
start local 2 1: aload 2
invokevirtual java.util.ArrayDeque.poll:()Ljava/lang/Object;
checkcast org.xnio.ByteBufferSlicePool$Slice
astore 3
start local 3 2: goto 5
3: StackMap locals: java.util.ArrayDeque org.xnio.ByteBufferSlicePool$Slice
StackMap stack:
aload 0
aload 3
invokevirtual org.xnio.ByteBufferSlicePool.doFree:(Lorg/xnio/ByteBufferSlicePool$Slice;)V
4: aload 2
invokevirtual java.util.ArrayDeque.poll:()Ljava/lang/Object;
checkcast org.xnio.ByteBufferSlicePool$Slice
astore 3
5: StackMap locals:
StackMap stack:
aload 3
ifnonnull 3
6: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/xnio/ByteBufferSlicePool;
0 7 1 cache Lorg/xnio/ByteBufferSlicePool$ThreadLocalCache;
1 7 2 deque Ljava/util/ArrayDeque<Lorg/xnio/ByteBufferSlicePool$Slice;>;
2 7 3 slice Lorg/xnio/ByteBufferSlicePool$Slice;
MethodParameters:
Name Flags
cache
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$PooledByteBuffer org.xnio.ByteBufferSlicePool$Ref org.xnio.ByteBufferSlicePool$Slice org.xnio.ByteBufferSlicePool$ThreadLocalCache org.xnio.ByteBufferSlicePool$ThreadLocalCache$1 org.xnio.ByteBufferSlicePool$ThreadLocalCacheWrapper
InnerClasses:
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
final ThreadLocalCache = org.xnio.ByteBufferSlicePool$ThreadLocalCache of org.xnio.ByteBufferSlicePool
private ThreadLocalCacheWrapper = org.xnio.ByteBufferSlicePool$ThreadLocalCacheWrapper of org.xnio.ByteBufferSlicePool