public class org.jruby.util.io.BlockingIO
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.util.io.BlockingIO
super_class: java.lang.Object
{
private static final java.util.Map<java.nio.channels.spi.SelectorProvider, org.jruby.util.io.BlockingIO$IOSelector> selectors;
descriptor: Ljava/util/Map;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Map<Ljava/nio/channels/spi/SelectorProvider;Lorg/jruby/util/io/BlockingIO$IOSelector;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new java.util.concurrent.ConcurrentHashMap
dup
invokespecial java.util.concurrent.ConcurrentHashMap.<init>:()V
1: putstatic org.jruby.util.io.BlockingIO.selectors:Ljava/util/Map;
2: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/util/io/BlockingIO;
private static org.jruby.util.io.BlockingIO$IOSelector getSelector(java.nio.channels.spi.SelectorProvider);
descriptor: (Ljava/nio/channels/spi/SelectorProvider;)Lorg/jruby/util/io/BlockingIO$IOSelector;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: getstatic org.jruby.util.io.BlockingIO.selectors:Ljava/util/Map;
aload 0
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.jruby.util.io.BlockingIO$IOSelector
astore 1
start local 1 1: aload 1
ifnull 3
2: aload 1
areturn
3: StackMap locals: org.jruby.util.io.BlockingIO$IOSelector
StackMap stack:
aload 0
dup
astore 2
monitorenter
4: getstatic org.jruby.util.io.BlockingIO.selectors:Ljava/util/Map;
aload 0
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.jruby.util.io.BlockingIO$IOSelector
astore 1
5: aload 1
ifnonnull 11
6: new org.jruby.util.io.BlockingIO$IOSelector
dup
aload 0
invokespecial org.jruby.util.io.BlockingIO$IOSelector.<init>:(Ljava/nio/channels/spi/SelectorProvider;)V
astore 1
7: getstatic org.jruby.util.io.BlockingIO.selectors:Ljava/util/Map;
aload 0
aload 1
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
8: new java.lang.Thread
dup
aload 1
invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
astore 3
start local 3 9: aload 3
iconst_1
invokevirtual java.lang.Thread.setDaemon:(Z)V
10: aload 3
invokevirtual java.lang.Thread.start:()V
end local 3 11: StackMap locals: java.nio.channels.spi.SelectorProvider
StackMap stack:
aload 2
monitorexit
12: goto 15
StackMap locals:
StackMap stack: java.lang.Throwable
13: aload 2
monitorexit
14: athrow
15: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 provider Ljava/nio/channels/spi/SelectorProvider;
1 16 1 sel Lorg/jruby/util/io/BlockingIO$IOSelector;
9 11 3 t Ljava/lang/Thread;
Exception table:
from to target type
4 12 13 any
13 14 13 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
provider
private static org.jruby.util.io.BlockingIO$IOSelector getSelector(java.nio.channels.Channel);
descriptor: (Ljava/nio/channels/Channel;)Lorg/jruby/util/io/BlockingIO$IOSelector;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
instanceof java.nio.channels.SelectableChannel
ifne 2
1: new java.lang.IllegalArgumentException
dup
ldc "channel must be a SelectableChannel"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
checkcast java.nio.channels.SelectableChannel
invokevirtual java.nio.channels.SelectableChannel.provider:()Ljava/nio/channels/spi/SelectorProvider;
invokestatic org.jruby.util.io.BlockingIO.getSelector:(Ljava/nio/channels/spi/SelectorProvider;)Lorg/jruby/util/io/BlockingIO$IOSelector;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 channel Ljava/nio/channels/Channel;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
channel
public static final org.jruby.util.io.BlockingIO$Condition newCondition(java.nio.channels.Channel, int, java.lang.Object);
descriptor: (Ljava/nio/channels/Channel;ILjava/lang/Object;)Lorg/jruby/util/io/BlockingIO$Condition;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokestatic org.jruby.util.io.BlockingIO.getSelector:(Ljava/nio/channels/Channel;)Lorg/jruby/util/io/BlockingIO$IOSelector;
aload 0
iload 1
aload 2
invokevirtual org.jruby.util.io.BlockingIO$IOSelector.add:(Ljava/nio/channels/Channel;ILjava/lang/Object;)Lorg/jruby/util/io/BlockingIO$Condition;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 channel Ljava/nio/channels/Channel;
0 1 1 ops I
0 1 2 monitor Ljava/lang/Object;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
channel
ops
monitor
public static final org.jruby.util.io.BlockingIO$Condition newCondition(java.nio.channels.Channel, int);
descriptor: (Ljava/nio/channels/Channel;I)Lorg/jruby/util/io/BlockingIO$Condition;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
invokestatic org.jruby.util.io.BlockingIO.newCondition:(Ljava/nio/channels/Channel;ILjava/lang/Object;)Lorg/jruby/util/io/BlockingIO$Condition;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 channel Ljava/nio/channels/Channel;
0 1 1 ops I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
channel
ops
public static void waitForIO(java.nio.channels.Channel, int);
descriptor: (Ljava/nio/channels/Channel;I)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokestatic org.jruby.util.io.BlockingIO.getSelector:(Ljava/nio/channels/Channel;)Lorg/jruby/util/io/BlockingIO$IOSelector;
aload 0
iload 1
invokevirtual org.jruby.util.io.BlockingIO$IOSelector.await:(Ljava/nio/channels/Channel;I)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 channel Ljava/nio/channels/Channel;
0 2 1 op I
Exceptions:
throws java.lang.InterruptedException, java.io.IOException
MethodParameters:
Name Flags
channel
op
public static void awaitReadable(java.nio.channels.ReadableByteChannel);
descriptor: (Ljava/nio/channels/ReadableByteChannel;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_1
invokestatic org.jruby.util.io.BlockingIO.waitForIO:(Ljava/nio/channels/Channel;I)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 channel Ljava/nio/channels/ReadableByteChannel;
Exceptions:
throws java.lang.InterruptedException, java.io.IOException
MethodParameters:
Name Flags
channel
public static void awaitWritable(java.nio.channels.WritableByteChannel);
descriptor: (Ljava/nio/channels/WritableByteChannel;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_4
invokestatic org.jruby.util.io.BlockingIO.waitForIO:(Ljava/nio/channels/Channel;I)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 channel Ljava/nio/channels/WritableByteChannel;
Exceptions:
throws java.lang.InterruptedException, java.io.IOException
MethodParameters:
Name Flags
channel
public static int read(java.nio.channels.ReadableByteChannel, java.nio.ByteBuffer, boolean);
descriptor: (Ljava/nio/channels/ReadableByteChannel;Ljava/nio/ByteBuffer;Z)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: StackMap locals:
StackMap stack:
aload 0
aload 1
invokeinterface java.nio.channels.ReadableByteChannel.read:(Ljava/nio/ByteBuffer;)I
istore 3
start local 3 1: iload 3
ifne 2
iload 2
ifeq 2
aload 0
instanceof java.nio.channels.SelectableChannel
ifeq 2
aload 1
invokevirtual java.nio.ByteBuffer.hasRemaining:()Z
ifne 3
2: StackMap locals: int
StackMap stack:
iload 3
ireturn
3: StackMap locals:
StackMap stack:
aload 0
invokestatic org.jruby.util.io.BlockingIO.awaitReadable:(Ljava/nio/channels/ReadableByteChannel;)V
4: goto 0
StackMap locals:
StackMap stack: java.lang.InterruptedException
5: astore 4
start local 4 6: new java.io.InterruptedIOException
dup
aload 4
invokevirtual java.lang.InterruptedException.getMessage:()Ljava/lang/String;
invokespecial java.io.InterruptedIOException.<init>:(Ljava/lang/String;)V
athrow
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 channel Ljava/nio/channels/ReadableByteChannel;
0 7 1 buf Ljava/nio/ByteBuffer;
0 7 2 blocking Z
1 7 3 n I
6 7 4 ex Ljava/lang/InterruptedException;
Exception table:
from to target type
3 4 5 Class java.lang.InterruptedException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
channel
buf
blocking
public static int write(java.nio.channels.WritableByteChannel, java.nio.ByteBuffer, boolean);
descriptor: (Ljava/nio/channels/WritableByteChannel;Ljava/nio/ByteBuffer;Z)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: StackMap locals:
StackMap stack:
aload 0
aload 1
invokeinterface java.nio.channels.WritableByteChannel.write:(Ljava/nio/ByteBuffer;)I
istore 3
start local 3 1: iload 3
ifne 2
iload 2
ifeq 2
aload 0
instanceof java.nio.channels.SelectableChannel
ifeq 2
aload 1
invokevirtual java.nio.ByteBuffer.hasRemaining:()Z
ifne 3
2: StackMap locals: int
StackMap stack:
iload 3
ireturn
3: StackMap locals:
StackMap stack:
aload 0
invokestatic org.jruby.util.io.BlockingIO.awaitWritable:(Ljava/nio/channels/WritableByteChannel;)V
4: goto 0
StackMap locals:
StackMap stack: java.lang.InterruptedException
5: astore 4
start local 4 6: new java.io.InterruptedIOException
dup
aload 4
invokevirtual java.lang.InterruptedException.getMessage:()Ljava/lang/String;
invokespecial java.io.InterruptedIOException.<init>:(Ljava/lang/String;)V
athrow
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 channel Ljava/nio/channels/WritableByteChannel;
0 7 1 buf Ljava/nio/ByteBuffer;
0 7 2 blocking Z
1 7 3 n I
6 7 4 ex Ljava/lang/InterruptedException;
Exception table:
from to target type
3 4 5 Class java.lang.InterruptedException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
channel
buf
blocking
public static int blockingRead(java.nio.channels.ReadableByteChannel, java.nio.ByteBuffer);
descriptor: (Ljava/nio/channels/ReadableByteChannel;Ljava/nio/ByteBuffer;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
iconst_1
invokestatic org.jruby.util.io.BlockingIO.read:(Ljava/nio/channels/ReadableByteChannel;Ljava/nio/ByteBuffer;Z)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 channel Ljava/nio/channels/ReadableByteChannel;
0 1 1 buf Ljava/nio/ByteBuffer;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
channel
buf
public static int blockingWrite(java.nio.channels.WritableByteChannel, java.nio.ByteBuffer);
descriptor: (Ljava/nio/channels/WritableByteChannel;Ljava/nio/ByteBuffer;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
iconst_1
invokestatic org.jruby.util.io.BlockingIO.write:(Ljava/nio/channels/WritableByteChannel;Ljava/nio/ByteBuffer;Z)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 channel Ljava/nio/channels/WritableByteChannel;
0 1 1 buf Ljava/nio/ByteBuffer;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
channel
buf
}
SourceFile: "BlockingIO.java"
NestMembers:
org.jruby.util.io.BlockingIO$Condition org.jruby.util.io.BlockingIO$IOChannel org.jruby.util.io.BlockingIO$IOSelector
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