final class org.jruby.util.io.BlockingIO$IOSelector implements java.lang.Runnable
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: org.jruby.util.io.BlockingIO$IOSelector
super_class: java.lang.Object
{
private final java.nio.channels.Selector selector;
descriptor: Ljava/nio/channels/Selector;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.ConcurrentLinkedQueue<org.jruby.util.io.BlockingIO$IOChannel> registrationQueue;
descriptor: Ljava/util/concurrent/ConcurrentLinkedQueue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/ConcurrentLinkedQueue<Lorg/jruby/util/io/BlockingIO$IOChannel;>;
public void <init>(java.nio.channels.spi.SelectorProvider);
descriptor: (Ljava/nio/channels/spi/SelectorProvider;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aconst_null
aload 1
invokestatic org.jruby.util.io.SelectorFactory.openWithRetryFrom:(Lorg/jruby/Ruby;Ljava/nio/channels/spi/SelectorProvider;)Ljava/nio/channels/Selector;
putfield org.jruby.util.io.BlockingIO$IOSelector.selector:Ljava/nio/channels/Selector;
2: aload 0
new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putfield org.jruby.util.io.BlockingIO$IOSelector.registrationQueue:Ljava/util/concurrent/ConcurrentLinkedQueue;
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/util/io/BlockingIO$IOSelector;
0 4 1 provider Ljava/nio/channels/spi/SelectorProvider;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
provider
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=7, args_size=1
start local 0 0: StackMap locals:
StackMap stack:
new java.util.HashSet
dup
aload 0
getfield org.jruby.util.io.BlockingIO$IOSelector.selector:Ljava/nio/channels/Selector;
invokevirtual java.nio.channels.Selector.selectedKeys:()Ljava/util/Set;
invokespecial java.util.HashSet.<init>:(Ljava/util/Collection;)V
astore 1
start local 1 1: aload 1
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 3
goto 9
StackMap locals: org.jruby.util.io.BlockingIO$IOSelector java.util.Set top java.util.Iterator
StackMap stack:
2: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.nio.channels.SelectionKey
astore 2
start local 2 3: aload 2
invokevirtual java.nio.channels.SelectionKey.attachment:()Ljava/lang/Object;
checkcast java.util.List
astore 4
start local 4 4: aload 4
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 6
goto 7
StackMap locals: org.jruby.util.io.BlockingIO$IOSelector java.util.Set java.nio.channels.SelectionKey java.util.Iterator java.util.List top java.util.Iterator
StackMap stack:
5: aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.jruby.util.io.BlockingIO$IOChannel
astore 5
start local 5 6: aload 5
iconst_1
invokevirtual org.jruby.util.io.BlockingIO$IOChannel.wakeup:(Z)V
end local 5 7: StackMap locals:
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 5
8: aload 4
invokeinterface java.util.List.clear:()V
end local 4 end local 2 9: StackMap locals: org.jruby.util.io.BlockingIO$IOSelector java.util.Set top java.util.Iterator
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
10: new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
astore 3
start local 3 11: goto 20
start local 2 12: StackMap locals: org.jruby.util.io.BlockingIO$IOSelector java.util.Set org.jruby.util.io.BlockingIO$IOChannel java.util.Set
StackMap stack:
aload 2
getfield org.jruby.util.io.BlockingIO$IOChannel.channel:Ljava/nio/channels/SelectableChannel;
aload 0
getfield org.jruby.util.io.BlockingIO$IOSelector.selector:Ljava/nio/channels/Selector;
invokevirtual java.nio.channels.SelectableChannel.keyFor:(Ljava/nio/channels/Selector;)Ljava/nio/channels/SelectionKey;
astore 4
start local 4 13: aload 4
ifnonnull 15
14: new java.util.LinkedList
dup
invokespecial java.util.LinkedList.<init>:()V
goto 16
15: StackMap locals: java.nio.channels.SelectionKey
StackMap stack:
aload 4
invokevirtual java.nio.channels.SelectionKey.attachment:()Ljava/lang/Object;
checkcast java.util.List
16: StackMap locals:
StackMap stack: java.util.List
astore 5
start local 5 17: aload 2
getfield org.jruby.util.io.BlockingIO$IOChannel.channel:Ljava/nio/channels/SelectableChannel;
aload 0
getfield org.jruby.util.io.BlockingIO$IOSelector.selector:Ljava/nio/channels/Selector;
aload 2
getfield org.jruby.util.io.BlockingIO$IOChannel.ops:I
aload 5
invokevirtual java.nio.channels.SelectableChannel.register:(Ljava/nio/channels/Selector;ILjava/lang/Object;)Ljava/nio/channels/SelectionKey;
pop
18: aload 5
aload 2
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
19: aload 3
aload 2
getfield org.jruby.util.io.BlockingIO$IOChannel.channel:Ljava/nio/channels/SelectableChannel;
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
end local 5 end local 4 end local 2 20: StackMap locals: org.jruby.util.io.BlockingIO$IOSelector java.util.Set top java.util.Set
StackMap stack:
aload 0
getfield org.jruby.util.io.BlockingIO$IOSelector.registrationQueue:Ljava/util/concurrent/ConcurrentLinkedQueue;
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.poll:()Ljava/lang/Object;
checkcast org.jruby.util.io.BlockingIO$IOChannel
dup
astore 2
start local 2 21: ifnonnull 12
22: aload 1
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 5
goto 26
StackMap locals: org.jruby.util.io.BlockingIO$IOSelector java.util.Set org.jruby.util.io.BlockingIO$IOChannel java.util.Set top java.util.Iterator
StackMap stack:
23: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.nio.channels.SelectionKey
astore 4
start local 4 24: aload 3
aload 4
invokevirtual java.nio.channels.SelectionKey.channel:()Ljava/nio/channels/SelectableChannel;
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifne 26
25: aload 4
invokevirtual java.nio.channels.SelectionKey.cancel:()V
end local 4 26: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 23
27: aload 0
getfield org.jruby.util.io.BlockingIO$IOSelector.selector:Ljava/nio/channels/Selector;
invokevirtual java.nio.channels.Selector.select:()I
pop
end local 3 end local 2 end local 1 28: goto 0
StackMap locals: org.jruby.util.io.BlockingIO$IOSelector
StackMap stack: java.io.IOException
29: pop
30: goto 0
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 31 0 this Lorg/jruby/util/io/BlockingIO$IOSelector;
1 28 1 selected Ljava/util/Set<Ljava/nio/channels/SelectionKey;>;
3 9 2 k Ljava/nio/channels/SelectionKey;
4 9 4 waitq Ljava/util/List<Lorg/jruby/util/io/BlockingIO$IOChannel;>;
6 7 5 ch Lorg/jruby/util/io/BlockingIO$IOChannel;
12 20 2 ch Lorg/jruby/util/io/BlockingIO$IOChannel;
21 28 2 ch Lorg/jruby/util/io/BlockingIO$IOChannel;
11 28 3 added Ljava/util/Set<Ljava/nio/channels/SelectableChannel;>;
13 20 4 k Ljava/nio/channels/SelectionKey;
17 20 5 waitq Ljava/util/List<Lorg/jruby/util/io/BlockingIO$IOChannel;>;
24 26 4 k Ljava/nio/channels/SelectionKey;
Exception table:
from to target type
0 28 29 Class java.io.IOException
org.jruby.util.io.BlockingIO$Condition add(java.nio.channels.Channel, int, java.lang.Object);
descriptor: (Ljava/nio/channels/Channel;ILjava/lang/Object;)Lorg/jruby/util/io/BlockingIO$Condition;
flags: (0x0000)
Code:
stack=5, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: new org.jruby.util.io.BlockingIO$IOChannel
dup
aload 1
checkcast java.nio.channels.SelectableChannel
iload 2
aload 3
invokespecial org.jruby.util.io.BlockingIO$IOChannel.<init>:(Ljava/nio/channels/SelectableChannel;ILjava/lang/Object;)V
astore 4
start local 4 1: aload 0
getfield org.jruby.util.io.BlockingIO$IOSelector.registrationQueue:Ljava/util/concurrent/ConcurrentLinkedQueue;
aload 4
invokevirtual java.util.concurrent.ConcurrentLinkedQueue.add:(Ljava/lang/Object;)Z
pop
2: aload 0
getfield org.jruby.util.io.BlockingIO$IOSelector.selector:Ljava/nio/channels/Selector;
invokevirtual java.nio.channels.Selector.wakeup:()Ljava/nio/channels/Selector;
pop
3: new org.jruby.util.io.BlockingIO$Condition
dup
aload 4
invokespecial org.jruby.util.io.BlockingIO$Condition.<init>:(Lorg/jruby/util/io/BlockingIO$IOChannel;)V
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/util/io/BlockingIO$IOSelector;
0 4 1 channel Ljava/nio/channels/Channel;
0 4 2 ops I
0 4 3 monitor Ljava/lang/Object;
1 4 4 io Lorg/jruby/util/io/BlockingIO$IOChannel;
MethodParameters:
Name Flags
channel
ops
monitor
public void await(java.nio.channels.Channel, int);
descriptor: (Ljava/nio/channels/Channel;I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
iload 2
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
invokevirtual org.jruby.util.io.BlockingIO$IOSelector.add:(Ljava/nio/channels/Channel;ILjava/lang/Object;)Lorg/jruby/util/io/BlockingIO$Condition;
invokevirtual org.jruby.util.io.BlockingIO$Condition.await:()Z
pop
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/util/io/BlockingIO$IOSelector;
0 2 1 channel Ljava/nio/channels/Channel;
0 2 2 op I
Exceptions:
throws java.lang.InterruptedException
MethodParameters:
Name Flags
channel
op
}
SourceFile: "BlockingIO.java"
NestHost: org.jruby.util.io.BlockingIO
InnerClasses:
public final Condition = org.jruby.util.io.BlockingIO$Condition of org.jruby.util.io.BlockingIO
final IOChannel = org.jruby.util.io.BlockingIO$IOChannel of org.jruby.util.io.BlockingIO
final IOSelector = org.jruby.util.io.BlockingIO$IOSelector of org.jruby.util.io.BlockingIO