class sun.nio.ch.KQueueSelectorImpl extends sun.nio.ch.SelectorImpl
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: sun.nio.ch.KQueueSelectorImpl
super_class: sun.nio.ch.SelectorImpl
{
protected int fd0;
descriptor: I
flags: (0x0004) ACC_PROTECTED
protected int fd1;
descriptor: I
flags: (0x0004) ACC_PROTECTED
sun.nio.ch.KQueueArrayWrapper kqueueWrapper;
descriptor: Lsun/nio/ch/KQueueArrayWrapper;
flags: (0x0000)
private int totalChannels;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private java.util.HashMap<java.lang.Integer, sun.nio.ch.KQueueSelectorImpl$MapEntry> fdMap;
descriptor: Ljava/util/HashMap;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/HashMap<Ljava/lang/Integer;Lsun/nio/ch/KQueueSelectorImpl$MapEntry;>;
private boolean closed;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private java.lang.Object interruptLock;
descriptor: Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
private boolean interruptTriggered;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private long updateCount;
descriptor: J
flags: (0x0002) ACC_PRIVATE
void <init>(java.nio.channels.spi.SelectorProvider);
descriptor: (Ljava/nio/channels/spi/SelectorProvider;)V
flags: (0x0000)
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokespecial sun.nio.ch.SelectorImpl.<init>:(Ljava/nio/channels/spi/SelectorProvider;)V
1: aload 0
iconst_0
putfield sun.nio.ch.KQueueSelectorImpl.closed:Z
2: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield sun.nio.ch.KQueueSelectorImpl.interruptLock:Ljava/lang/Object;
3: aload 0
iconst_0
putfield sun.nio.ch.KQueueSelectorImpl.interruptTriggered:Z
4: iconst_0
invokestatic sun.nio.ch.IOUtil.makePipe:(Z)J
lstore 2
start local 2 5: aload 0
lload 2
bipush 32
lushr
l2i
putfield sun.nio.ch.KQueueSelectorImpl.fd0:I
6: aload 0
lload 2
l2i
putfield sun.nio.ch.KQueueSelectorImpl.fd1:I
7: aload 0
new sun.nio.ch.KQueueArrayWrapper
dup
invokespecial sun.nio.ch.KQueueArrayWrapper.<init>:()V
putfield sun.nio.ch.KQueueSelectorImpl.kqueueWrapper:Lsun/nio/ch/KQueueArrayWrapper;
8: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.kqueueWrapper:Lsun/nio/ch/KQueueArrayWrapper;
aload 0
getfield sun.nio.ch.KQueueSelectorImpl.fd0:I
aload 0
getfield sun.nio.ch.KQueueSelectorImpl.fd1:I
invokevirtual sun.nio.ch.KQueueArrayWrapper.initInterrupt:(II)V
9: aload 0
new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putfield sun.nio.ch.KQueueSelectorImpl.fdMap:Ljava/util/HashMap;
10: aload 0
iconst_1
putfield sun.nio.ch.KQueueSelectorImpl.totalChannels:I
11: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lsun/nio/ch/KQueueSelectorImpl;
0 12 1 sp Ljava/nio/channels/spi/SelectorProvider;
5 12 2 fds J
MethodParameters:
Name Flags
sp
protected int doSelect(long);
descriptor: (J)I
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=5, args_size=2
start local 0 start local 1 0: iconst_0
istore 3
start local 3 1: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.closed:Z
ifeq 3
2: new java.nio.channels.ClosedSelectorException
dup
invokespecial java.nio.channels.ClosedSelectorException.<init>:()V
athrow
3: StackMap locals: int
StackMap stack:
aload 0
invokevirtual sun.nio.ch.KQueueSelectorImpl.processDeregisterQueue:()V
4: aload 0
invokevirtual sun.nio.ch.KQueueSelectorImpl.begin:()V
5: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.kqueueWrapper:Lsun/nio/ch/KQueueArrayWrapper;
lload 1
invokevirtual sun.nio.ch.KQueueArrayWrapper.poll:(J)I
istore 3
6: goto 10
StackMap locals:
StackMap stack: java.lang.Throwable
7: astore 4
8: aload 0
invokevirtual sun.nio.ch.KQueueSelectorImpl.end:()V
9: aload 4
athrow
10: StackMap locals:
StackMap stack:
aload 0
invokevirtual sun.nio.ch.KQueueSelectorImpl.end:()V
11: aload 0
invokevirtual sun.nio.ch.KQueueSelectorImpl.processDeregisterQueue:()V
12: aload 0
iload 3
invokevirtual sun.nio.ch.KQueueSelectorImpl.updateSelectedKeys:(I)I
ireturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lsun/nio/ch/KQueueSelectorImpl;
0 13 1 timeout J
1 13 3 entries I
Exception table:
from to target type
4 7 7 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
timeout
private int updateSelectedKeys(int);
descriptor: (I)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=9, args_size=2
start local 0 start local 1 0: iconst_0
istore 2
start local 2 1: iconst_0
istore 3
start local 3 2: aload 0
dup
getfield sun.nio.ch.KQueueSelectorImpl.updateCount:J
lconst_1
ladd
putfield sun.nio.ch.KQueueSelectorImpl.updateCount:J
3: iconst_0
istore 4
start local 4 4: goto 27
5: StackMap locals: int int int
StackMap stack:
aload 0
getfield sun.nio.ch.KQueueSelectorImpl.kqueueWrapper:Lsun/nio/ch/KQueueArrayWrapper;
iload 4
invokevirtual sun.nio.ch.KQueueArrayWrapper.getDescriptor:(I)I
istore 5
start local 5 6: iload 5
aload 0
getfield sun.nio.ch.KQueueSelectorImpl.fd0:I
if_icmpne 9
7: iconst_1
istore 3
8: goto 26
9: StackMap locals: int
StackMap stack:
aload 0
getfield sun.nio.ch.KQueueSelectorImpl.fdMap:Ljava/util/HashMap;
iload 5
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokevirtual java.util.HashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast sun.nio.ch.KQueueSelectorImpl$MapEntry
astore 6
start local 6 10: aload 6
ifnull 26
11: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.kqueueWrapper:Lsun/nio/ch/KQueueArrayWrapper;
iload 4
invokevirtual sun.nio.ch.KQueueArrayWrapper.getReventOps:(I)I
istore 7
start local 7 12: aload 6
getfield sun.nio.ch.KQueueSelectorImpl$MapEntry.ski:Lsun/nio/ch/SelectionKeyImpl;
astore 8
start local 8 13: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.selectedKeys:Ljava/util/Set;
aload 8
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifeq 21
14: aload 6
getfield sun.nio.ch.KQueueSelectorImpl$MapEntry.updateCount:J
aload 0
getfield sun.nio.ch.KQueueSelectorImpl.updateCount:J
lcmp
ifeq 19
15: aload 8
getfield sun.nio.ch.SelectionKeyImpl.channel:Lsun/nio/ch/SelChImpl;
iload 7
aload 8
invokeinterface sun.nio.ch.SelChImpl.translateAndSetReadyOps:(ILsun/nio/ch/SelectionKeyImpl;)Z
ifeq 26
16: iinc 2 1
17: aload 6
aload 0
getfield sun.nio.ch.KQueueSelectorImpl.updateCount:J
putfield sun.nio.ch.KQueueSelectorImpl$MapEntry.updateCount:J
18: goto 26
19: StackMap locals: sun.nio.ch.KQueueSelectorImpl$MapEntry int sun.nio.ch.SelectionKeyImpl
StackMap stack:
aload 8
getfield sun.nio.ch.SelectionKeyImpl.channel:Lsun/nio/ch/SelChImpl;
iload 7
aload 8
invokeinterface sun.nio.ch.SelChImpl.translateAndUpdateReadyOps:(ILsun/nio/ch/SelectionKeyImpl;)Z
pop
20: goto 26
21: StackMap locals:
StackMap stack:
aload 8
getfield sun.nio.ch.SelectionKeyImpl.channel:Lsun/nio/ch/SelChImpl;
iload 7
aload 8
invokeinterface sun.nio.ch.SelChImpl.translateAndSetReadyOps:(ILsun/nio/ch/SelectionKeyImpl;)Z
pop
22: aload 8
invokevirtual sun.nio.ch.SelectionKeyImpl.nioReadyOps:()I
aload 8
invokevirtual sun.nio.ch.SelectionKeyImpl.nioInterestOps:()I
iand
ifeq 26
23: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.selectedKeys:Ljava/util/Set;
aload 8
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
24: iinc 2 1
25: aload 6
aload 0
getfield sun.nio.ch.KQueueSelectorImpl.updateCount:J
putfield sun.nio.ch.KQueueSelectorImpl$MapEntry.updateCount:J
end local 8 end local 7 end local 6 end local 5 26: StackMap locals: sun.nio.ch.KQueueSelectorImpl int int int int
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
27: iload 4
iload 1
if_icmplt 5
end local 4 28: iload 3
ifeq 36
29: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.interruptLock:Ljava/lang/Object;
dup
astore 4
monitorenter
30: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.fd0:I
invokestatic sun.nio.ch.IOUtil.drain:(I)Z
pop
31: aload 0
iconst_0
putfield sun.nio.ch.KQueueSelectorImpl.interruptTriggered:Z
32: aload 4
monitorexit
33: goto 36
StackMap locals: sun.nio.ch.KQueueSelectorImpl int int int java.lang.Object
StackMap stack: java.lang.Throwable
34: aload 4
monitorexit
35: athrow
36: 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 37 0 this Lsun/nio/ch/KQueueSelectorImpl;
0 37 1 entries I
1 37 2 numKeysUpdated I
2 37 3 interrupted Z
4 28 4 i I
6 26 5 nextFD I
10 26 6 me Lsun/nio/ch/KQueueSelectorImpl$MapEntry;
12 26 7 rOps I
13 26 8 ski Lsun/nio/ch/SelectionKeyImpl;
Exception table:
from to target type
30 33 34 any
34 35 34 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
entries
protected void implClose();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=4, args_size=1
start local 0 0: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.closed:Z
ifne 26
1: aload 0
iconst_1
putfield sun.nio.ch.KQueueSelectorImpl.closed:Z
2: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.interruptLock:Ljava/lang/Object;
dup
astore 1
monitorenter
3: aload 0
iconst_1
putfield sun.nio.ch.KQueueSelectorImpl.interruptTriggered:Z
4: aload 1
monitorexit
5: goto 8
StackMap locals: sun.nio.ch.KQueueSelectorImpl java.lang.Object
StackMap stack: java.lang.Throwable
6: aload 1
monitorexit
7: athrow
8: StackMap locals:
StackMap stack:
aload 0
getfield sun.nio.ch.KQueueSelectorImpl.fd0:I
invokestatic sun.nio.ch.FileDispatcherImpl.closeIntFD:(I)V
9: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.fd1:I
invokestatic sun.nio.ch.FileDispatcherImpl.closeIntFD:(I)V
10: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.kqueueWrapper:Lsun/nio/ch/KQueueArrayWrapper;
ifnull 24
11: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.kqueueWrapper:Lsun/nio/ch/KQueueArrayWrapper;
invokevirtual sun.nio.ch.KQueueArrayWrapper.close:()V
12: aload 0
aconst_null
putfield sun.nio.ch.KQueueSelectorImpl.kqueueWrapper:Lsun/nio/ch/KQueueArrayWrapper;
13: aload 0
aconst_null
putfield sun.nio.ch.KQueueSelectorImpl.selectedKeys:Ljava/util/Set;
14: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.keys:Ljava/util/HashSet;
invokevirtual java.util.HashSet.iterator:()Ljava/util/Iterator;
astore 1
start local 1 15: goto 22
16: StackMap locals: java.util.Iterator
StackMap stack:
aload 1
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast sun.nio.ch.SelectionKeyImpl
astore 2
start local 2 17: aload 0
aload 2
invokevirtual sun.nio.ch.KQueueSelectorImpl.deregister:(Ljava/nio/channels/spi/AbstractSelectionKey;)V
18: aload 2
invokevirtual sun.nio.ch.SelectionKeyImpl.channel:()Ljava/nio/channels/SelectableChannel;
astore 3
start local 3 19: aload 3
invokevirtual java.nio.channels.SelectableChannel.isOpen:()Z
ifne 21
aload 3
invokevirtual java.nio.channels.SelectableChannel.isRegistered:()Z
ifne 21
20: aload 3
checkcast sun.nio.ch.SelChImpl
invokeinterface sun.nio.ch.SelChImpl.kill:()V
21: StackMap locals: sun.nio.ch.SelectionKeyImpl java.nio.channels.SelectableChannel
StackMap stack:
aload 1
invokeinterface java.util.Iterator.remove:()V
end local 3 end local 2 22: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.util.Iterator.hasNext:()Z
ifne 16
23: aload 0
iconst_0
putfield sun.nio.ch.KQueueSelectorImpl.totalChannels:I
end local 1 24: StackMap locals:
StackMap stack:
aload 0
iconst_m1
putfield sun.nio.ch.KQueueSelectorImpl.fd0:I
25: aload 0
iconst_m1
putfield sun.nio.ch.KQueueSelectorImpl.fd1:I
26: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 27 0 this Lsun/nio/ch/KQueueSelectorImpl;
15 24 1 i Ljava/util/Iterator<Ljava/nio/channels/SelectionKey;>;
17 22 2 ski Lsun/nio/ch/SelectionKeyImpl;
19 22 3 selch Ljava/nio/channels/SelectableChannel;
Exception table:
from to target type
3 5 6 any
6 7 6 any
Exceptions:
throws java.io.IOException
protected void implRegister(sun.nio.ch.SelectionKeyImpl);
descriptor: (Lsun/nio/ch/SelectionKeyImpl;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.closed:Z
ifeq 2
1: new java.nio.channels.ClosedSelectorException
dup
invokespecial java.nio.channels.ClosedSelectorException.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
aload 1
getfield sun.nio.ch.SelectionKeyImpl.channel:Lsun/nio/ch/SelChImpl;
invokeinterface sun.nio.ch.SelChImpl.getFD:()Ljava/io/FileDescriptor;
invokestatic sun.nio.ch.IOUtil.fdVal:(Ljava/io/FileDescriptor;)I
istore 2
start local 2 3: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.fdMap:Ljava/util/HashMap;
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
new sun.nio.ch.KQueueSelectorImpl$MapEntry
dup
aload 1
invokespecial sun.nio.ch.KQueueSelectorImpl$MapEntry.<init>:(Lsun/nio/ch/SelectionKeyImpl;)V
invokevirtual java.util.HashMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
4: aload 0
dup
getfield sun.nio.ch.KQueueSelectorImpl.totalChannels:I
iconst_1
iadd
putfield sun.nio.ch.KQueueSelectorImpl.totalChannels:I
5: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.keys:Ljava/util/HashSet;
aload 1
invokevirtual java.util.HashSet.add:(Ljava/lang/Object;)Z
pop
6: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lsun/nio/ch/KQueueSelectorImpl;
0 7 1 ski Lsun/nio/ch/SelectionKeyImpl;
3 7 2 fd I
MethodParameters:
Name Flags
ski
protected void implDereg(sun.nio.ch.SelectionKeyImpl);
descriptor: (Lsun/nio/ch/SelectionKeyImpl;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 1
getfield sun.nio.ch.SelectionKeyImpl.channel:Lsun/nio/ch/SelChImpl;
invokeinterface sun.nio.ch.SelChImpl.getFDVal:()I
istore 2
start local 2 1: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.fdMap:Ljava/util/HashMap;
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokevirtual java.util.HashMap.remove:(Ljava/lang/Object;)Ljava/lang/Object;
pop
2: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.kqueueWrapper:Lsun/nio/ch/KQueueArrayWrapper;
aload 1
getfield sun.nio.ch.SelectionKeyImpl.channel:Lsun/nio/ch/SelChImpl;
invokevirtual sun.nio.ch.KQueueArrayWrapper.release:(Lsun/nio/ch/SelChImpl;)V
3: aload 0
dup
getfield sun.nio.ch.KQueueSelectorImpl.totalChannels:I
iconst_1
isub
putfield sun.nio.ch.KQueueSelectorImpl.totalChannels:I
4: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.keys:Ljava/util/HashSet;
aload 1
invokevirtual java.util.HashSet.remove:(Ljava/lang/Object;)Z
pop
5: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.selectedKeys:Ljava/util/Set;
aload 1
invokeinterface java.util.Set.remove:(Ljava/lang/Object;)Z
pop
6: aload 0
aload 1
invokevirtual sun.nio.ch.KQueueSelectorImpl.deregister:(Ljava/nio/channels/spi/AbstractSelectionKey;)V
7: aload 1
invokevirtual sun.nio.ch.SelectionKeyImpl.channel:()Ljava/nio/channels/SelectableChannel;
astore 3
start local 3 8: aload 3
invokevirtual java.nio.channels.SelectableChannel.isOpen:()Z
ifne 10
aload 3
invokevirtual java.nio.channels.SelectableChannel.isRegistered:()Z
ifne 10
9: aload 3
checkcast sun.nio.ch.SelChImpl
invokeinterface sun.nio.ch.SelChImpl.kill:()V
10: StackMap locals: int java.nio.channels.SelectableChannel
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 Lsun/nio/ch/KQueueSelectorImpl;
0 11 1 ski Lsun/nio/ch/SelectionKeyImpl;
1 11 2 fd I
8 11 3 selch Ljava/nio/channels/SelectableChannel;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
ski
public void putEventOps(sun.nio.ch.SelectionKeyImpl, int);
descriptor: (Lsun/nio/ch/SelectionKeyImpl;I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.closed:Z
ifeq 2
1: new java.nio.channels.ClosedSelectorException
dup
invokespecial java.nio.channels.ClosedSelectorException.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield sun.nio.ch.KQueueSelectorImpl.kqueueWrapper:Lsun/nio/ch/KQueueArrayWrapper;
aload 1
getfield sun.nio.ch.SelectionKeyImpl.channel:Lsun/nio/ch/SelChImpl;
iload 2
invokevirtual sun.nio.ch.KQueueArrayWrapper.setInterest:(Lsun/nio/ch/SelChImpl;I)V
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lsun/nio/ch/KQueueSelectorImpl;
0 4 1 ski Lsun/nio/ch/SelectionKeyImpl;
0 4 2 ops I
MethodParameters:
Name Flags
ski
ops
public java.nio.channels.Selector wakeup();
descriptor: ()Ljava/nio/channels/Selector;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.interruptLock:Ljava/lang/Object;
dup
astore 1
monitorenter
1: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.interruptTriggered:Z
ifne 4
2: aload 0
getfield sun.nio.ch.KQueueSelectorImpl.kqueueWrapper:Lsun/nio/ch/KQueueArrayWrapper;
invokevirtual sun.nio.ch.KQueueArrayWrapper.interrupt:()V
3: aload 0
iconst_1
putfield sun.nio.ch.KQueueSelectorImpl.interruptTriggered:Z
4: StackMap locals: java.lang.Object
StackMap stack:
aload 1
monitorexit
5: goto 8
StackMap locals:
StackMap stack: java.lang.Throwable
6: aload 1
monitorexit
7: athrow
8: StackMap locals:
StackMap stack:
aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lsun/nio/ch/KQueueSelectorImpl;
Exception table:
from to target type
1 5 6 any
6 7 6 any
}
SourceFile: "KQueueSelectorImpl.java"
NestMembers:
sun.nio.ch.KQueueSelectorImpl$MapEntry
InnerClasses:
private MapEntry = sun.nio.ch.KQueueSelectorImpl$MapEntry of sun.nio.ch.KQueueSelectorImpl