public class org.jruby.util.io.SelectorPool
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.util.io.SelectorPool
super_class: java.lang.Object
{
private final java.util.Map<java.nio.channels.spi.SelectorProvider, java.util.List<java.nio.channels.Selector>> pool;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/nio/channels/spi/SelectorProvider;Ljava/util/List<Ljava/nio/channels/Selector;>;>;
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putfield org.jruby.util.io.SelectorPool.pool:Ljava/util/Map;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/util/io/SelectorPool;
public synchronized java.nio.channels.Selector get();
descriptor: ()Ljava/nio/channels/Selector;
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokestatic java.nio.channels.spi.SelectorProvider.provider:()Ljava/nio/channels/spi/SelectorProvider;
invokevirtual org.jruby.util.io.SelectorPool.retrieveFromPool:(Ljava/nio/channels/spi/SelectorProvider;)Ljava/nio/channels/Selector;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/util/io/SelectorPool;
Exceptions:
throws java.io.IOException
public synchronized java.nio.channels.Selector get(java.nio.channels.spi.SelectorProvider);
descriptor: (Ljava/nio/channels/spi/SelectorProvider;)Ljava/nio/channels/Selector;
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual org.jruby.util.io.SelectorPool.retrieveFromPool:(Ljava/nio/channels/spi/SelectorProvider;)Ljava/nio/channels/Selector;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/util/io/SelectorPool;
0 1 1 provider Ljava/nio/channels/spi/SelectorProvider;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
provider
public void put(java.nio.channels.Selector);
descriptor: (Ljava/nio/channels/Selector;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.nio.channels.Selector.keys:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 3
goto 4
StackMap locals: org.jruby.util.io.SelectorPool java.nio.channels.Selector top java.util.Iterator
StackMap stack:
1: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.nio.channels.SelectionKey
astore 2
start local 2 2: aload 2
ifnull 4
3: aload 2
invokevirtual java.nio.channels.SelectionKey.cancel:()V
end local 2 4: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
5: aload 1
invokevirtual java.nio.channels.Selector.selectNow:()I
pop
6: goto 8
StackMap locals: org.jruby.util.io.SelectorPool java.nio.channels.Selector
StackMap stack: java.lang.Exception
7: pop
8: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual org.jruby.util.io.SelectorPool.returnToPool:(Ljava/nio/channels/Selector;)V
9: goto 11
StackMap locals:
StackMap stack: java.nio.channels.ClosedSelectorException
10: pop
11: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/jruby/util/io/SelectorPool;
0 12 1 selector Ljava/nio/channels/Selector;
2 4 2 key Ljava/nio/channels/SelectionKey;
Exception table:
from to target type
5 6 7 Class java.lang.Exception
0 9 10 Class java.nio.channels.ClosedSelectorException
MethodParameters:
Name Flags
selector
public synchronized void cleanup();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=5, args_size=1
start local 0 0: aload 0
getfield org.jruby.util.io.SelectorPool.pool:Ljava/util/Map;
invokeinterface java.util.Map.entrySet:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 2
goto 9
StackMap locals: org.jruby.util.io.SelectorPool top java.util.Iterator
StackMap stack:
1: aload 2
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.util.Map$Entry
astore 1
start local 1 2: aload 1
invokeinterface java.util.Map$Entry.getValue:()Ljava/lang/Object;
checkcast java.util.List
astore 3
start local 3 3: goto 8
4: StackMap locals: org.jruby.util.io.SelectorPool java.util.Map$Entry java.util.Iterator java.util.List
StackMap stack:
aload 3
aload 3
invokeinterface java.util.List.size:()I
iconst_1
isub
invokeinterface java.util.List.remove:(I)Ljava/lang/Object;
checkcast java.nio.channels.Selector
astore 4
start local 4 5: aload 4
invokevirtual java.nio.channels.Selector.close:()V
6: goto 8
StackMap locals: org.jruby.util.io.SelectorPool java.util.Map$Entry java.util.Iterator java.util.List java.nio.channels.Selector
StackMap stack: java.io.IOException
7: pop
end local 4 8: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.List.isEmpty:()Z
ifeq 4
end local 3 end local 1 9: StackMap locals: org.jruby.util.io.SelectorPool top java.util.Iterator
StackMap stack:
aload 2
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
10: aload 0
getfield org.jruby.util.io.SelectorPool.pool:Ljava/util/Map;
invokeinterface java.util.Map.clear:()V
11: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/jruby/util/io/SelectorPool;
2 9 1 entry Ljava/util/Map$Entry<Ljava/nio/channels/spi/SelectorProvider;Ljava/util/List<Ljava/nio/channels/Selector;>;>;
3 9 3 providerPool Ljava/util/List<Ljava/nio/channels/Selector;>;
5 8 4 selector Ljava/nio/channels/Selector;
Exception table:
from to target type
5 6 7 Class java.io.IOException
private java.nio.channels.Selector retrieveFromPool(java.nio.channels.spi.SelectorProvider);
descriptor: (Ljava/nio/channels/spi/SelectorProvider;)Ljava/nio/channels/Selector;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.util.io.SelectorPool.pool:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.List
astore 2
start local 2 1: aload 2
ifnull 3
aload 2
invokeinterface java.util.List.isEmpty:()Z
ifne 3
2: aload 2
aload 2
invokeinterface java.util.List.size:()I
iconst_1
isub
invokeinterface java.util.List.remove:(I)Ljava/lang/Object;
checkcast java.nio.channels.Selector
areturn
3: StackMap locals: java.util.List
StackMap stack:
aconst_null
aload 1
invokestatic org.jruby.util.io.SelectorFactory.openWithRetryFrom:(Lorg/jruby/Ruby;Ljava/nio/channels/spi/SelectorProvider;)Ljava/nio/channels/Selector;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/util/io/SelectorPool;
0 4 1 provider Ljava/nio/channels/spi/SelectorProvider;
1 4 2 providerPool Ljava/util/List<Ljava/nio/channels/Selector;>;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
provider
private synchronized void returnToPool(java.nio.channels.Selector);
descriptor: (Ljava/nio/channels/Selector;)V
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.nio.channels.Selector.isOpen:()Z
ifeq 7
1: aload 1
invokevirtual java.nio.channels.Selector.provider:()Ljava/nio/channels/spi/SelectorProvider;
astore 2
start local 2 2: aload 0
getfield org.jruby.util.io.SelectorPool.pool:Ljava/util/Map;
aload 2
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.List
astore 3
start local 3 3: aload 3
ifnonnull 6
4: new java.util.LinkedList
dup
invokespecial java.util.LinkedList.<init>:()V
astore 3
5: aload 0
getfield org.jruby.util.io.SelectorPool.pool:Ljava/util/Map;
aload 2
aload 3
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
6: StackMap locals: java.nio.channels.spi.SelectorProvider java.util.List
StackMap stack:
aload 3
aload 1
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 3 end local 2 7: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/jruby/util/io/SelectorPool;
0 8 1 selector Ljava/nio/channels/Selector;
2 7 2 provider Ljava/nio/channels/spi/SelectorProvider;
3 7 3 providerPool Ljava/util/List<Ljava/nio/channels/Selector;>;
MethodParameters:
Name Flags
selector
}
SourceFile: "SelectorPool.java"
InnerClasses:
public abstract Entry = java.util.Map$Entry of java.util.Map