final class io.netty.util.Recycler$Stack<T>
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: io.netty.util.Recycler$Stack
super_class: java.lang.Object
{
final io.netty.util.Recycler<T> parent;
descriptor: Lio/netty/util/Recycler;
flags: (0x0010) ACC_FINAL
Signature: Lio/netty/util/Recycler<TT;>;
final java.lang.ref.WeakReference<java.lang.Thread> threadRef;
descriptor: Ljava/lang/ref/WeakReference;
flags: (0x0010) ACC_FINAL
Signature: Ljava/lang/ref/WeakReference<Ljava/lang/Thread;>;
final java.util.concurrent.atomic.AtomicInteger availableSharedCapacity;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0010) ACC_FINAL
final int maxDelayedQueues;
descriptor: I
flags: (0x0010) ACC_FINAL
private final int maxCapacity;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int ratioMask;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private io.netty.util.Recycler$DefaultHandle<?>[] elements;
descriptor: [Lio/netty/util/Recycler$DefaultHandle;
flags: (0x0002) ACC_PRIVATE
Signature: [Lio/netty/util/Recycler$DefaultHandle<*>;
private int size;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int handleRecycleCount;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private io.netty.util.Recycler$WeakOrderQueue cursor;
descriptor: Lio/netty/util/Recycler$WeakOrderQueue;
flags: (0x0002) ACC_PRIVATE
private io.netty.util.Recycler$WeakOrderQueue prev;
descriptor: Lio/netty/util/Recycler$WeakOrderQueue;
flags: (0x0002) ACC_PRIVATE
private volatile io.netty.util.Recycler$WeakOrderQueue head;
descriptor: Lio/netty/util/Recycler$WeakOrderQueue;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
void <init>(io.netty.util.Recycler<T>, java.lang.Thread, int, int, int, );
descriptor: (Lio/netty/util/Recycler;Ljava/lang/Thread;IIII)V
flags: (0x0000)
Code:
stack=5, locals=7, args_size=7
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 start local 6 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_m1
putfield io.netty.util.Recycler$Stack.handleRecycleCount:I
2: aload 0
aload 1
putfield io.netty.util.Recycler$Stack.parent:Lio/netty/util/Recycler;
3: aload 0
new java.lang.ref.WeakReference
dup
aload 2
invokespecial java.lang.ref.WeakReference.<init>:(Ljava/lang/Object;)V
putfield io.netty.util.Recycler$Stack.threadRef:Ljava/lang/ref/WeakReference;
4: aload 0
iload 3
putfield io.netty.util.Recycler$Stack.maxCapacity:I
5: aload 0
new java.util.concurrent.atomic.AtomicInteger
dup
iload 3
iload 4
idiv
getstatic io.netty.util.Recycler.LINK_CAPACITY:I
invokestatic java.lang.Math.max:(II)I
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:(I)V
putfield io.netty.util.Recycler$Stack.availableSharedCapacity:Ljava/util/concurrent/atomic/AtomicInteger;
6: aload 0
getstatic io.netty.util.Recycler.INITIAL_CAPACITY:I
iload 3
invokestatic java.lang.Math.min:(II)I
anewarray io.netty.util.Recycler$DefaultHandle
putfield io.netty.util.Recycler$Stack.elements:[Lio/netty/util/Recycler$DefaultHandle;
7: aload 0
iload 5
putfield io.netty.util.Recycler$Stack.ratioMask:I
8: aload 0
iload 6
putfield io.netty.util.Recycler$Stack.maxDelayedQueues:I
9: return
end local 6 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 10 0 this Lio/netty/util/Recycler$Stack<TT;>;
0 10 1 parent Lio/netty/util/Recycler<TT;>;
0 10 2 thread Ljava/lang/Thread;
0 10 3 maxCapacity I
0 10 4 maxSharedCapacityFactor I
0 10 5 ratioMask I
0 10 6 maxDelayedQueues I
Signature: (Lio/netty/util/Recycler<TT;>;Ljava/lang/Thread;IIII)V
MethodParameters:
Name Flags
parent
thread
maxCapacity
maxSharedCapacityFactor
ratioMask
maxDelayedQueues
synchronized void setHead(io.netty.util.Recycler$WeakOrderQueue);
descriptor: (Lio/netty/util/Recycler$WeakOrderQueue;)V
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
getfield io.netty.util.Recycler$Stack.head:Lio/netty/util/Recycler$WeakOrderQueue;
invokevirtual io.netty.util.Recycler$WeakOrderQueue.setNext:(Lio/netty/util/Recycler$WeakOrderQueue;)V
1: aload 0
aload 1
putfield io.netty.util.Recycler$Stack.head:Lio/netty/util/Recycler$WeakOrderQueue;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/netty/util/Recycler$Stack<TT;>;
0 3 1 queue Lio/netty/util/Recycler$WeakOrderQueue;
MethodParameters:
Name Flags
queue
int increaseCapacity(int);
descriptor: (I)I
flags: (0x0000)
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield io.netty.util.Recycler$Stack.elements:[Lio/netty/util/Recycler$DefaultHandle;
arraylength
istore 2
start local 2 1: aload 0
getfield io.netty.util.Recycler$Stack.maxCapacity:I
istore 3
start local 3 2: StackMap locals: int int
StackMap stack:
iload 2
iconst_1
ishl
istore 2
3: iload 2
iload 1
if_icmpge 5
iload 2
iload 3
4: if_icmplt 2
5: StackMap locals:
StackMap stack:
iload 2
iload 3
invokestatic java.lang.Math.min:(II)I
istore 2
6: iload 2
aload 0
getfield io.netty.util.Recycler$Stack.elements:[Lio/netty/util/Recycler$DefaultHandle;
arraylength
if_icmpeq 8
7: aload 0
aload 0
getfield io.netty.util.Recycler$Stack.elements:[Lio/netty/util/Recycler$DefaultHandle;
iload 2
invokestatic java.util.Arrays.copyOf:([Ljava/lang/Object;I)[Ljava/lang/Object;
checkcast io.netty.util.Recycler$DefaultHandle[]
putfield io.netty.util.Recycler$Stack.elements:[Lio/netty/util/Recycler$DefaultHandle;
8: StackMap locals:
StackMap stack:
iload 2
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lio/netty/util/Recycler$Stack<TT;>;
0 9 1 expectedCapacity I
1 9 2 newCapacity I
2 9 3 maxCapacity I
MethodParameters:
Name Flags
expectedCapacity
io.netty.util.Recycler$DefaultHandle<T> pop();
descriptor: ()Lio/netty/util/Recycler$DefaultHandle;
flags: (0x0000)
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
getfield io.netty.util.Recycler$Stack.size:I
istore 1
start local 1 1: iload 1
ifne 5
2: aload 0
invokevirtual io.netty.util.Recycler$Stack.scavenge:()Z
ifne 4
3: aconst_null
areturn
4: StackMap locals: int
StackMap stack:
aload 0
getfield io.netty.util.Recycler$Stack.size:I
istore 1
5: StackMap locals:
StackMap stack:
iinc 1 -1
6: aload 0
getfield io.netty.util.Recycler$Stack.elements:[Lio/netty/util/Recycler$DefaultHandle;
iload 1
aaload
astore 2
start local 2 7: aload 0
getfield io.netty.util.Recycler$Stack.elements:[Lio/netty/util/Recycler$DefaultHandle;
iload 1
aconst_null
aastore
8: aload 2
getfield io.netty.util.Recycler$DefaultHandle.lastRecycledId:I
aload 2
getfield io.netty.util.Recycler$DefaultHandle.recycleId:I
if_icmpeq 10
9: new java.lang.IllegalStateException
dup
ldc "recycled multiple times"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
10: StackMap locals: io.netty.util.Recycler$DefaultHandle
StackMap stack:
aload 2
iconst_0
putfield io.netty.util.Recycler$DefaultHandle.recycleId:I
11: aload 2
iconst_0
putfield io.netty.util.Recycler$DefaultHandle.lastRecycledId:I
12: aload 0
iload 1
putfield io.netty.util.Recycler$Stack.size:I
13: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lio/netty/util/Recycler$Stack<TT;>;
1 14 1 size I
7 14 2 ret Lio/netty/util/Recycler$DefaultHandle;
Signature: ()Lio/netty/util/Recycler$DefaultHandle<TT;>;
boolean scavenge();
descriptor: ()Z
flags: (0x0000)
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual io.netty.util.Recycler$Stack.scavengeSome:()Z
ifeq 2
1: iconst_1
ireturn
2: StackMap locals:
StackMap stack:
aload 0
aconst_null
putfield io.netty.util.Recycler$Stack.prev:Lio/netty/util/Recycler$WeakOrderQueue;
3: aload 0
aload 0
getfield io.netty.util.Recycler$Stack.head:Lio/netty/util/Recycler$WeakOrderQueue;
putfield io.netty.util.Recycler$Stack.cursor:Lio/netty/util/Recycler$WeakOrderQueue;
4: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lio/netty/util/Recycler$Stack<TT;>;
boolean scavengeSome();
descriptor: ()Z
flags: (0x0000)
Code:
stack=2, locals=5, args_size=1
start local 0 0: aload 0
getfield io.netty.util.Recycler$Stack.cursor:Lio/netty/util/Recycler$WeakOrderQueue;
astore 2
start local 2 1: aload 2
ifnonnull 6
2: aconst_null
astore 1
start local 1 3: aload 0
getfield io.netty.util.Recycler$Stack.head:Lio/netty/util/Recycler$WeakOrderQueue;
astore 2
4: aload 2
ifnonnull 7
5: iconst_0
ireturn
end local 1 6: StackMap locals: io.netty.util.Recycler$Stack top io.netty.util.Recycler$WeakOrderQueue
StackMap stack:
aload 0
getfield io.netty.util.Recycler$Stack.prev:Lio/netty/util/Recycler$WeakOrderQueue;
astore 1
start local 1 7: StackMap locals: io.netty.util.Recycler$Stack io.netty.util.Recycler$WeakOrderQueue io.netty.util.Recycler$WeakOrderQueue
StackMap stack:
iconst_0
istore 3
start local 3 8: StackMap locals: int
StackMap stack:
aload 2
aload 0
invokevirtual io.netty.util.Recycler$WeakOrderQueue.transfer:(Lio/netty/util/Recycler$Stack;)Z
ifeq 11
9: iconst_1
istore 3
10: goto 23
11: StackMap locals:
StackMap stack:
aload 2
getfield io.netty.util.Recycler$WeakOrderQueue.next:Lio/netty/util/Recycler$WeakOrderQueue;
astore 4
start local 4 12: aload 2
getfield io.netty.util.Recycler$WeakOrderQueue.owner:Ljava/lang/ref/WeakReference;
invokevirtual java.lang.ref.WeakReference.get:()Ljava/lang/Object;
ifnonnull 20
13: aload 2
invokevirtual io.netty.util.Recycler$WeakOrderQueue.hasFinalData:()Z
ifeq 17
14: StackMap locals: io.netty.util.Recycler$WeakOrderQueue
StackMap stack:
aload 2
aload 0
invokevirtual io.netty.util.Recycler$WeakOrderQueue.transfer:(Lio/netty/util/Recycler$Stack;)Z
ifeq 17
15: iconst_1
istore 3
16: goto 14
17: StackMap locals:
StackMap stack:
aload 1
ifnull 21
18: aload 1
aload 4
invokevirtual io.netty.util.Recycler$WeakOrderQueue.setNext:(Lio/netty/util/Recycler$WeakOrderQueue;)V
19: goto 21
20: StackMap locals:
StackMap stack:
aload 2
astore 1
21: StackMap locals:
StackMap stack:
aload 4
astore 2
end local 4 22: aload 2
ifnull 23
iload 3
ifeq 8
23: StackMap locals:
StackMap stack:
aload 0
aload 1
putfield io.netty.util.Recycler$Stack.prev:Lio/netty/util/Recycler$WeakOrderQueue;
24: aload 0
aload 2
putfield io.netty.util.Recycler$Stack.cursor:Lio/netty/util/Recycler$WeakOrderQueue;
25: iload 3
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 26 0 this Lio/netty/util/Recycler$Stack<TT;>;
3 6 1 prev Lio/netty/util/Recycler$WeakOrderQueue;
7 26 1 prev Lio/netty/util/Recycler$WeakOrderQueue;
1 26 2 cursor Lio/netty/util/Recycler$WeakOrderQueue;
8 26 3 success Z
12 22 4 next Lio/netty/util/Recycler$WeakOrderQueue;
void push(io.netty.util.Recycler$DefaultHandle<?>);
descriptor: (Lio/netty/util/Recycler$DefaultHandle;)V
flags: (0x0000)
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
astore 2
start local 2 1: aload 0
getfield io.netty.util.Recycler$Stack.threadRef:Ljava/lang/ref/WeakReference;
invokevirtual java.lang.ref.WeakReference.get:()Ljava/lang/Object;
aload 2
if_acmpne 4
2: aload 0
aload 1
invokevirtual io.netty.util.Recycler$Stack.pushNow:(Lio/netty/util/Recycler$DefaultHandle;)V
3: goto 5
4: StackMap locals: java.lang.Thread
StackMap stack:
aload 0
aload 1
aload 2
invokevirtual io.netty.util.Recycler$Stack.pushLater:(Lio/netty/util/Recycler$DefaultHandle;Ljava/lang/Thread;)V
5: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lio/netty/util/Recycler$Stack<TT;>;
0 6 1 item Lio/netty/util/Recycler$DefaultHandle<*>;
1 6 2 currentThread Ljava/lang/Thread;
Signature: (Lio/netty/util/Recycler$DefaultHandle<*>;)V
MethodParameters:
Name Flags
item
private void pushNow(io.netty.util.Recycler$DefaultHandle<?>);
descriptor: (Lio/netty/util/Recycler$DefaultHandle;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 1
getfield io.netty.util.Recycler$DefaultHandle.recycleId:I
aload 1
getfield io.netty.util.Recycler$DefaultHandle.lastRecycledId:I
ior
ifeq 2
1: new java.lang.IllegalStateException
dup
ldc "recycled already"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 1
aload 1
getstatic io.netty.util.Recycler.OWN_THREAD_ID:I
dup_x1
putfield io.netty.util.Recycler$DefaultHandle.lastRecycledId:I
putfield io.netty.util.Recycler$DefaultHandle.recycleId:I
3: aload 0
getfield io.netty.util.Recycler$Stack.size:I
istore 2
start local 2 4: iload 2
aload 0
getfield io.netty.util.Recycler$Stack.maxCapacity:I
if_icmpge 5
aload 0
aload 1
invokevirtual io.netty.util.Recycler$Stack.dropHandle:(Lio/netty/util/Recycler$DefaultHandle;)Z
ifeq 6
5: StackMap locals: int
StackMap stack:
return
6: StackMap locals:
StackMap stack:
iload 2
aload 0
getfield io.netty.util.Recycler$Stack.elements:[Lio/netty/util/Recycler$DefaultHandle;
arraylength
if_icmpne 8
7: aload 0
aload 0
getfield io.netty.util.Recycler$Stack.elements:[Lio/netty/util/Recycler$DefaultHandle;
iload 2
iconst_1
ishl
aload 0
getfield io.netty.util.Recycler$Stack.maxCapacity:I
invokestatic java.lang.Math.min:(II)I
invokestatic java.util.Arrays.copyOf:([Ljava/lang/Object;I)[Ljava/lang/Object;
checkcast io.netty.util.Recycler$DefaultHandle[]
putfield io.netty.util.Recycler$Stack.elements:[Lio/netty/util/Recycler$DefaultHandle;
8: StackMap locals:
StackMap stack:
aload 0
getfield io.netty.util.Recycler$Stack.elements:[Lio/netty/util/Recycler$DefaultHandle;
iload 2
aload 1
aastore
9: aload 0
iload 2
iconst_1
iadd
putfield io.netty.util.Recycler$Stack.size:I
10: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lio/netty/util/Recycler$Stack<TT;>;
0 11 1 item Lio/netty/util/Recycler$DefaultHandle<*>;
4 11 2 size I
Signature: (Lio/netty/util/Recycler$DefaultHandle<*>;)V
MethodParameters:
Name Flags
item
private void pushLater(io.netty.util.Recycler$DefaultHandle<?>, java.lang.Thread);
descriptor: (Lio/netty/util/Recycler$DefaultHandle;Ljava/lang/Thread;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: getstatic io.netty.util.Recycler.DELAYED_RECYCLED:Lio/netty/util/concurrent/FastThreadLocal;
invokevirtual io.netty.util.concurrent.FastThreadLocal.get:()Ljava/lang/Object;
checkcast java.util.Map
astore 3
start local 3 1: aload 3
aload 0
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast io.netty.util.Recycler$WeakOrderQueue
astore 4
start local 4 2: aload 4
ifnonnull 10
3: aload 3
invokeinterface java.util.Map.size:()I
aload 0
getfield io.netty.util.Recycler$Stack.maxDelayedQueues:I
if_icmplt 6
4: aload 3
aload 0
getstatic io.netty.util.Recycler$WeakOrderQueue.DUMMY:Lio/netty/util/Recycler$WeakOrderQueue;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
5: return
6: StackMap locals: java.util.Map io.netty.util.Recycler$WeakOrderQueue
StackMap stack:
aload 0
aload 2
invokestatic io.netty.util.Recycler$WeakOrderQueue.allocate:(Lio/netty/util/Recycler$Stack;Ljava/lang/Thread;)Lio/netty/util/Recycler$WeakOrderQueue;
dup
astore 4
ifnonnull 8
7: return
8: StackMap locals:
StackMap stack:
aload 3
aload 0
aload 4
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
9: goto 12
StackMap locals:
StackMap stack:
10: aload 4
getstatic io.netty.util.Recycler$WeakOrderQueue.DUMMY:Lio/netty/util/Recycler$WeakOrderQueue;
if_acmpne 12
11: return
12: StackMap locals:
StackMap stack:
aload 4
aload 1
invokevirtual io.netty.util.Recycler$WeakOrderQueue.add:(Lio/netty/util/Recycler$DefaultHandle;)V
13: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lio/netty/util/Recycler$Stack<TT;>;
0 14 1 item Lio/netty/util/Recycler$DefaultHandle<*>;
0 14 2 thread Ljava/lang/Thread;
1 14 3 delayedRecycled Ljava/util/Map<Lio/netty/util/Recycler$Stack<*>;Lio/netty/util/Recycler$WeakOrderQueue;>;
2 14 4 queue Lio/netty/util/Recycler$WeakOrderQueue;
Signature: (Lio/netty/util/Recycler$DefaultHandle<*>;Ljava/lang/Thread;)V
MethodParameters:
Name Flags
item
thread
boolean dropHandle(io.netty.util.Recycler$DefaultHandle<?>);
descriptor: (Lio/netty/util/Recycler$DefaultHandle;)Z
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 1
getfield io.netty.util.Recycler$DefaultHandle.hasBeenRecycled:Z
ifne 4
1: aload 0
dup
getfield io.netty.util.Recycler$Stack.handleRecycleCount:I
iconst_1
iadd
dup_x1
putfield io.netty.util.Recycler$Stack.handleRecycleCount:I
aload 0
getfield io.netty.util.Recycler$Stack.ratioMask:I
iand
ifeq 3
2: iconst_1
ireturn
3: StackMap locals:
StackMap stack:
aload 1
iconst_1
putfield io.netty.util.Recycler$DefaultHandle.hasBeenRecycled:Z
4: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lio/netty/util/Recycler$Stack<TT;>;
0 5 1 handle Lio/netty/util/Recycler$DefaultHandle<*>;
Signature: (Lio/netty/util/Recycler$DefaultHandle<*>;)Z
MethodParameters:
Name Flags
handle
io.netty.util.Recycler$DefaultHandle<T> newHandle();
descriptor: ()Lio/netty/util/Recycler$DefaultHandle;
flags: (0x0000)
Code:
stack=3, locals=1, args_size=1
start local 0 0: new io.netty.util.Recycler$DefaultHandle
dup
aload 0
invokespecial io.netty.util.Recycler$DefaultHandle.<init>:(Lio/netty/util/Recycler$Stack;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/util/Recycler$Stack<TT;>;
Signature: ()Lio/netty/util/Recycler$DefaultHandle<TT;>;
}
Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;
SourceFile: "Recycler.java"
NestHost: io.netty.util.Recycler
InnerClasses:
final DefaultHandle = io.netty.util.Recycler$DefaultHandle of io.netty.util.Recycler
final Stack = io.netty.util.Recycler$Stack of io.netty.util.Recycler
private final WeakOrderQueue = io.netty.util.Recycler$WeakOrderQueue of io.netty.util.Recycler