final class com.mongodb.connection.netty.NettyStream implements com.mongodb.connection.Stream
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: com.mongodb.connection.netty.NettyStream
super_class: java.lang.Object
{
private static final java.lang.String READ_HANDLER_NAME;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "ReadTimeoutHandler"
private final com.mongodb.ServerAddress address;
descriptor: Lcom/mongodb/ServerAddress;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.connection.SocketSettings settings;
descriptor: Lcom/mongodb/connection/SocketSettings;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.connection.SslSettings sslSettings;
descriptor: Lcom/mongodb/connection/SslSettings;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final io.netty.channel.EventLoopGroup workerGroup;
descriptor: Lio/netty/channel/EventLoopGroup;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.Class<? extends io.netty.channel.socket.SocketChannel> socketChannelClass;
descriptor: Ljava/lang/Class;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/Class<+Lio/netty/channel/socket/SocketChannel;>;
private final io.netty.buffer.ByteBufAllocator allocator;
descriptor: Lio/netty/buffer/ByteBufAllocator;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile boolean isClosed;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private volatile io.netty.channel.Channel channel;
descriptor: Lio/netty/channel/Channel;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private final java.util.LinkedList<io.netty.buffer.ByteBuf> pendingInboundBuffers;
descriptor: Ljava/util/LinkedList;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/LinkedList<Lio/netty/buffer/ByteBuf;>;
private volatile com.mongodb.connection.netty.NettyStream$PendingReader pendingReader;
descriptor: Lcom/mongodb/connection/netty/NettyStream$PendingReader;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private volatile java.lang.Throwable pendingException;
descriptor: Ljava/lang/Throwable;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
void <init>(com.mongodb.ServerAddress, com.mongodb.connection.SocketSettings, com.mongodb.connection.SslSettings, io.netty.channel.EventLoopGroup, java.lang.Class<? extends io.netty.channel.socket.SocketChannel>, io.netty.buffer.ByteBufAllocator);
descriptor: (Lcom/mongodb/ServerAddress;Lcom/mongodb/connection/SocketSettings;Lcom/mongodb/connection/SslSettings;Lio/netty/channel/EventLoopGroup;Ljava/lang/Class;Lio/netty/buffer/ByteBufAllocator;)V
flags: (0x0000)
Code:
stack=3, 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
new java.util.LinkedList
dup
invokespecial java.util.LinkedList.<init>:()V
putfield com.mongodb.connection.netty.NettyStream.pendingInboundBuffers:Ljava/util/LinkedList;
2: aload 0
aload 1
putfield com.mongodb.connection.netty.NettyStream.address:Lcom/mongodb/ServerAddress;
3: aload 0
aload 2
putfield com.mongodb.connection.netty.NettyStream.settings:Lcom/mongodb/connection/SocketSettings;
4: aload 0
aload 3
putfield com.mongodb.connection.netty.NettyStream.sslSettings:Lcom/mongodb/connection/SslSettings;
5: aload 0
aload 4
putfield com.mongodb.connection.netty.NettyStream.workerGroup:Lio/netty/channel/EventLoopGroup;
6: aload 0
aload 5
putfield com.mongodb.connection.netty.NettyStream.socketChannelClass:Ljava/lang/Class;
7: aload 0
aload 6
putfield com.mongodb.connection.netty.NettyStream.allocator:Lio/netty/buffer/ByteBufAllocator;
8: 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 9 0 this Lcom/mongodb/connection/netty/NettyStream;
0 9 1 address Lcom/mongodb/ServerAddress;
0 9 2 settings Lcom/mongodb/connection/SocketSettings;
0 9 3 sslSettings Lcom/mongodb/connection/SslSettings;
0 9 4 workerGroup Lio/netty/channel/EventLoopGroup;
0 9 5 socketChannelClass Ljava/lang/Class<+Lio/netty/channel/socket/SocketChannel;>;
0 9 6 allocator Lio/netty/buffer/ByteBufAllocator;
Signature: (Lcom/mongodb/ServerAddress;Lcom/mongodb/connection/SocketSettings;Lcom/mongodb/connection/SslSettings;Lio/netty/channel/EventLoopGroup;Ljava/lang/Class<+Lio/netty/channel/socket/SocketChannel;>;Lio/netty/buffer/ByteBufAllocator;)V
MethodParameters:
Name Flags
address final
settings final
sslSettings final
workerGroup final
socketChannelClass final
allocator final
public org.bson.ByteBuf getBuffer(int);
descriptor: (I)Lorg/bson/ByteBuf;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: new com.mongodb.connection.netty.NettyByteBuf
dup
aload 0
getfield com.mongodb.connection.netty.NettyStream.allocator:Lio/netty/buffer/ByteBufAllocator;
iload 1
iload 1
invokeinterface io.netty.buffer.ByteBufAllocator.buffer:(II)Lio/netty/buffer/ByteBuf;
invokespecial com.mongodb.connection.netty.NettyByteBuf.<init>:(Lio/netty/buffer/ByteBuf;)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/connection/netty/NettyStream;
0 1 1 size I
MethodParameters:
Name Flags
size final
public void open();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: new com.mongodb.connection.netty.NettyStream$FutureAsyncCompletionHandler
dup
invokespecial com.mongodb.connection.netty.NettyStream$FutureAsyncCompletionHandler.<init>:()V
astore 1
start local 1 1: aload 0
aload 1
invokevirtual com.mongodb.connection.netty.NettyStream.openAsync:(Lcom/mongodb/connection/AsyncCompletionHandler;)V
2: aload 1
invokevirtual com.mongodb.connection.netty.NettyStream$FutureAsyncCompletionHandler.get:()Ljava/lang/Object;
pop
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/connection/netty/NettyStream;
1 4 1 handler Lcom/mongodb/connection/netty/NettyStream$FutureAsyncCompletionHandler<Ljava/lang/Void;>;
Exceptions:
throws java.io.IOException
public void openAsync(com.mongodb.connection.AsyncCompletionHandler<java.lang.Void>);
descriptor: (Lcom/mongodb/connection/AsyncCompletionHandler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
new java.util.LinkedList
dup
aload 0
getfield com.mongodb.connection.netty.NettyStream.address:Lcom/mongodb/ServerAddress;
invokevirtual com.mongodb.ServerAddress.getSocketAddresses:()Ljava/util/List;
invokespecial java.util.LinkedList.<init>:(Ljava/util/Collection;)V
invokevirtual com.mongodb.connection.netty.NettyStream.initializeChannel:(Lcom/mongodb/connection/AsyncCompletionHandler;Ljava/util/Queue;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/connection/netty/NettyStream;
0 2 1 handler Lcom/mongodb/connection/AsyncCompletionHandler<Ljava/lang/Void;>;
Signature: (Lcom/mongodb/connection/AsyncCompletionHandler<Ljava/lang/Void;>;)V
MethodParameters:
Name Flags
handler final
private void initializeChannel(com.mongodb.connection.AsyncCompletionHandler<java.lang.Void>, java.util.Queue<java.net.SocketAddress>);
descriptor: (Lcom/mongodb/connection/AsyncCompletionHandler;Ljava/util/Queue;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokeinterface java.util.Queue.isEmpty:()Z
ifeq 3
1: aload 1
new com.mongodb.MongoSocketException
dup
ldc "Exception opening socket"
aload 0
invokevirtual com.mongodb.connection.netty.NettyStream.getAddress:()Lcom/mongodb/ServerAddress;
invokespecial com.mongodb.MongoSocketException.<init>:(Ljava/lang/String;Lcom/mongodb/ServerAddress;)V
invokeinterface com.mongodb.connection.AsyncCompletionHandler.failed:(Ljava/lang/Throwable;)V
2: goto 18
3: StackMap locals:
StackMap stack:
aload 2
invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
checkcast java.net.SocketAddress
astore 3
start local 3 4: new io.netty.bootstrap.Bootstrap
dup
invokespecial io.netty.bootstrap.Bootstrap.<init>:()V
astore 4
start local 4 5: aload 4
aload 0
getfield com.mongodb.connection.netty.NettyStream.workerGroup:Lio/netty/channel/EventLoopGroup;
invokevirtual io.netty.bootstrap.Bootstrap.group:(Lio/netty/channel/EventLoopGroup;)Lio/netty/bootstrap/AbstractBootstrap;
pop
6: aload 4
aload 0
getfield com.mongodb.connection.netty.NettyStream.socketChannelClass:Ljava/lang/Class;
invokevirtual io.netty.bootstrap.Bootstrap.channel:(Ljava/lang/Class;)Lio/netty/bootstrap/AbstractBootstrap;
pop
7: aload 4
getstatic io.netty.channel.ChannelOption.CONNECT_TIMEOUT_MILLIS:Lio/netty/channel/ChannelOption;
aload 0
getfield com.mongodb.connection.netty.NettyStream.settings:Lcom/mongodb/connection/SocketSettings;
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.SocketSettings.getConnectTimeout:(Ljava/util/concurrent/TimeUnit;)I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokevirtual io.netty.bootstrap.Bootstrap.option:(Lio/netty/channel/ChannelOption;Ljava/lang/Object;)Lio/netty/bootstrap/AbstractBootstrap;
pop
8: aload 4
getstatic io.netty.channel.ChannelOption.TCP_NODELAY:Lio/netty/channel/ChannelOption;
iconst_1
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
invokevirtual io.netty.bootstrap.Bootstrap.option:(Lio/netty/channel/ChannelOption;Ljava/lang/Object;)Lio/netty/bootstrap/AbstractBootstrap;
pop
9: aload 4
getstatic io.netty.channel.ChannelOption.SO_KEEPALIVE:Lio/netty/channel/ChannelOption;
aload 0
getfield com.mongodb.connection.netty.NettyStream.settings:Lcom/mongodb/connection/SocketSettings;
invokevirtual com.mongodb.connection.SocketSettings.isKeepAlive:()Z
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
invokevirtual io.netty.bootstrap.Bootstrap.option:(Lio/netty/channel/ChannelOption;Ljava/lang/Object;)Lio/netty/bootstrap/AbstractBootstrap;
pop
10: aload 0
getfield com.mongodb.connection.netty.NettyStream.settings:Lcom/mongodb/connection/SocketSettings;
invokevirtual com.mongodb.connection.SocketSettings.getReceiveBufferSize:()I
ifle 12
11: aload 4
getstatic io.netty.channel.ChannelOption.SO_RCVBUF:Lio/netty/channel/ChannelOption;
aload 0
getfield com.mongodb.connection.netty.NettyStream.settings:Lcom/mongodb/connection/SocketSettings;
invokevirtual com.mongodb.connection.SocketSettings.getReceiveBufferSize:()I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokevirtual io.netty.bootstrap.Bootstrap.option:(Lio/netty/channel/ChannelOption;Ljava/lang/Object;)Lio/netty/bootstrap/AbstractBootstrap;
pop
12: StackMap locals: java.net.SocketAddress io.netty.bootstrap.Bootstrap
StackMap stack:
aload 0
getfield com.mongodb.connection.netty.NettyStream.settings:Lcom/mongodb/connection/SocketSettings;
invokevirtual com.mongodb.connection.SocketSettings.getSendBufferSize:()I
ifle 14
13: aload 4
getstatic io.netty.channel.ChannelOption.SO_SNDBUF:Lio/netty/channel/ChannelOption;
aload 0
getfield com.mongodb.connection.netty.NettyStream.settings:Lcom/mongodb/connection/SocketSettings;
invokevirtual com.mongodb.connection.SocketSettings.getSendBufferSize:()I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokevirtual io.netty.bootstrap.Bootstrap.option:(Lio/netty/channel/ChannelOption;Ljava/lang/Object;)Lio/netty/bootstrap/AbstractBootstrap;
pop
14: StackMap locals:
StackMap stack:
aload 4
getstatic io.netty.channel.ChannelOption.ALLOCATOR:Lio/netty/channel/ChannelOption;
aload 0
getfield com.mongodb.connection.netty.NettyStream.allocator:Lio/netty/buffer/ByteBufAllocator;
invokevirtual io.netty.bootstrap.Bootstrap.option:(Lio/netty/channel/ChannelOption;Ljava/lang/Object;)Lio/netty/bootstrap/AbstractBootstrap;
pop
15: aload 4
new com.mongodb.connection.netty.NettyStream$1
dup
aload 0
invokespecial com.mongodb.connection.netty.NettyStream$1.<init>:(Lcom/mongodb/connection/netty/NettyStream;)V
invokevirtual io.netty.bootstrap.Bootstrap.handler:(Lio/netty/channel/ChannelHandler;)Lio/netty/bootstrap/AbstractBootstrap;
pop
16: aload 4
aload 3
invokevirtual io.netty.bootstrap.Bootstrap.connect:(Ljava/net/SocketAddress;)Lio/netty/channel/ChannelFuture;
astore 5
start local 5 17: aload 5
new com.mongodb.connection.netty.NettyStream$OpenChannelFutureListener
dup
aload 0
aload 2
aload 5
aload 1
invokespecial com.mongodb.connection.netty.NettyStream$OpenChannelFutureListener.<init>:(Lcom/mongodb/connection/netty/NettyStream;Ljava/util/Queue;Lio/netty/channel/ChannelFuture;Lcom/mongodb/connection/AsyncCompletionHandler;)V
invokeinterface io.netty.channel.ChannelFuture.addListener:(Lio/netty/util/concurrent/GenericFutureListener;)Lio/netty/channel/ChannelFuture;
pop
end local 5 end local 4 end local 3 18: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lcom/mongodb/connection/netty/NettyStream;
0 19 1 handler Lcom/mongodb/connection/AsyncCompletionHandler<Ljava/lang/Void;>;
0 19 2 socketAddressQueue Ljava/util/Queue<Ljava/net/SocketAddress;>;
4 18 3 nextAddress Ljava/net/SocketAddress;
5 18 4 bootstrap Lio/netty/bootstrap/Bootstrap;
17 18 5 channelFuture Lio/netty/channel/ChannelFuture;
Signature: (Lcom/mongodb/connection/AsyncCompletionHandler<Ljava/lang/Void;>;Ljava/util/Queue<Ljava/net/SocketAddress;>;)V
MethodParameters:
Name Flags
handler final
socketAddressQueue final
public void write(java.util.List<org.bson.ByteBuf>);
descriptor: (Ljava/util/List;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: new com.mongodb.connection.netty.NettyStream$FutureAsyncCompletionHandler
dup
invokespecial com.mongodb.connection.netty.NettyStream$FutureAsyncCompletionHandler.<init>:()V
astore 2
start local 2 1: aload 0
aload 1
aload 2
invokevirtual com.mongodb.connection.netty.NettyStream.writeAsync:(Ljava/util/List;Lcom/mongodb/connection/AsyncCompletionHandler;)V
2: aload 2
invokevirtual com.mongodb.connection.netty.NettyStream$FutureAsyncCompletionHandler.get:()Ljava/lang/Object;
pop
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/connection/netty/NettyStream;
0 4 1 buffers Ljava/util/List<Lorg/bson/ByteBuf;>;
1 4 2 future Lcom/mongodb/connection/netty/NettyStream$FutureAsyncCompletionHandler<Ljava/lang/Void;>;
Exceptions:
throws java.io.IOException
Signature: (Ljava/util/List<Lorg/bson/ByteBuf;>;)V
MethodParameters:
Name Flags
buffers final
public org.bson.ByteBuf read(int);
descriptor: (I)Lorg/bson/ByteBuf;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: new com.mongodb.connection.netty.NettyStream$FutureAsyncCompletionHandler
dup
invokespecial com.mongodb.connection.netty.NettyStream$FutureAsyncCompletionHandler.<init>:()V
astore 2
start local 2 1: aload 0
iload 1
aload 2
invokevirtual com.mongodb.connection.netty.NettyStream.readAsync:(ILcom/mongodb/connection/AsyncCompletionHandler;)V
2: aload 2
invokevirtual com.mongodb.connection.netty.NettyStream$FutureAsyncCompletionHandler.get:()Ljava/lang/Object;
checkcast org.bson.ByteBuf
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/connection/netty/NettyStream;
0 3 1 numBytes I
1 3 2 future Lcom/mongodb/connection/netty/NettyStream$FutureAsyncCompletionHandler<Lorg/bson/ByteBuf;>;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
numBytes final
public void writeAsync(java.util.List<org.bson.ByteBuf>, com.mongodb.connection.AsyncCompletionHandler<java.lang.Void>);
descriptor: (Ljava/util/List;Lcom/mongodb/connection/AsyncCompletionHandler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=3
start local 0 start local 1 start local 2 0: getstatic io.netty.buffer.PooledByteBufAllocator.DEFAULT:Lio/netty/buffer/PooledByteBufAllocator;
invokevirtual io.netty.buffer.PooledByteBufAllocator.compositeBuffer:()Lio/netty/buffer/CompositeByteBuf;
astore 3
start local 3 1: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 5
goto 4
StackMap locals: com.mongodb.connection.netty.NettyStream java.util.List com.mongodb.connection.AsyncCompletionHandler io.netty.buffer.CompositeByteBuf top java.util.Iterator
StackMap stack:
2: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.bson.ByteBuf
astore 4
start local 4 3: aload 3
iconst_1
aload 4
checkcast com.mongodb.connection.netty.NettyByteBuf
invokevirtual com.mongodb.connection.netty.NettyByteBuf.asByteBuf:()Lio/netty/buffer/ByteBuf;
invokevirtual io.netty.buffer.CompositeByteBuf.addComponent:(ZLio/netty/buffer/ByteBuf;)Lio/netty/buffer/CompositeByteBuf;
pop
end local 4 4: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
5: aload 0
getfield com.mongodb.connection.netty.NettyStream.channel:Lio/netty/channel/Channel;
aload 3
invokeinterface io.netty.channel.Channel.writeAndFlush:(Ljava/lang/Object;)Lio/netty/channel/ChannelFuture;
new com.mongodb.connection.netty.NettyStream$2
dup
aload 0
aload 2
invokespecial com.mongodb.connection.netty.NettyStream$2.<init>:(Lcom/mongodb/connection/netty/NettyStream;Lcom/mongodb/connection/AsyncCompletionHandler;)V
invokeinterface io.netty.channel.ChannelFuture.addListener:(Lio/netty/util/concurrent/GenericFutureListener;)Lio/netty/channel/ChannelFuture;
pop
6: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/mongodb/connection/netty/NettyStream;
0 7 1 buffers Ljava/util/List<Lorg/bson/ByteBuf;>;
0 7 2 handler Lcom/mongodb/connection/AsyncCompletionHandler<Ljava/lang/Void;>;
1 7 3 composite Lio/netty/buffer/CompositeByteBuf;
3 4 4 cur Lorg/bson/ByteBuf;
Signature: (Ljava/util/List<Lorg/bson/ByteBuf;>;Lcom/mongodb/connection/AsyncCompletionHandler<Ljava/lang/Void;>;)V
MethodParameters:
Name Flags
buffers final
handler final
public void readAsync(int, com.mongodb.connection.AsyncCompletionHandler<org.bson.ByteBuf>);
descriptor: (ILcom/mongodb/connection/AsyncCompletionHandler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=11, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual com.mongodb.connection.netty.NettyStream.scheduleReadTimeout:()V
1: aconst_null
astore 3
start local 3 2: aconst_null
astore 4
start local 4 3: aload 0
dup
astore 5
monitorenter
4: aload 0
getfield com.mongodb.connection.netty.NettyStream.pendingException:Ljava/lang/Throwable;
astore 4
5: aload 4
ifnonnull 27
6: aload 0
iload 1
invokevirtual com.mongodb.connection.netty.NettyStream.hasBytesAvailable:(I)Z
ifne 9
7: aload 0
new com.mongodb.connection.netty.NettyStream$PendingReader
dup
iload 1
aload 2
invokespecial com.mongodb.connection.netty.NettyStream$PendingReader.<init>:(ILcom/mongodb/connection/AsyncCompletionHandler;)V
putfield com.mongodb.connection.netty.NettyStream.pendingReader:Lcom/mongodb/connection/netty/NettyStream$PendingReader;
8: goto 27
9: StackMap locals: org.bson.ByteBuf java.lang.Throwable com.mongodb.connection.netty.NettyStream
StackMap stack:
aload 0
getfield com.mongodb.connection.netty.NettyStream.allocator:Lio/netty/buffer/ByteBufAllocator;
aload 0
getfield com.mongodb.connection.netty.NettyStream.pendingInboundBuffers:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.size:()I
invokeinterface io.netty.buffer.ByteBufAllocator.compositeBuffer:(I)Lio/netty/buffer/CompositeByteBuf;
astore 6
start local 6 10: iload 1
istore 7
start local 7 11: aload 0
getfield com.mongodb.connection.netty.NettyStream.pendingInboundBuffers:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.iterator:()Ljava/util/Iterator;
astore 8
start local 8 12: goto 25
13: StackMap locals: io.netty.buffer.CompositeByteBuf int java.util.Iterator
StackMap stack:
aload 8
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast io.netty.buffer.ByteBuf
astore 9
start local 9 14: aload 9
invokevirtual io.netty.buffer.ByteBuf.readableBytes:()I
iload 7
invokestatic java.lang.Math.min:(II)I
istore 10
start local 10 15: iload 10
aload 9
invokevirtual io.netty.buffer.ByteBuf.readableBytes:()I
if_icmpne 19
16: aload 6
aload 9
invokevirtual io.netty.buffer.CompositeByteBuf.addComponent:(Lio/netty/buffer/ByteBuf;)Lio/netty/buffer/CompositeByteBuf;
pop
17: aload 8
invokeinterface java.util.Iterator.remove:()V
18: goto 21
19: StackMap locals: io.netty.buffer.ByteBuf int
StackMap stack:
aload 9
invokevirtual io.netty.buffer.ByteBuf.retain:()Lio/netty/buffer/ByteBuf;
pop
20: aload 6
aload 9
iload 10
invokevirtual io.netty.buffer.ByteBuf.readSlice:(I)Lio/netty/buffer/ByteBuf;
invokevirtual io.netty.buffer.CompositeByteBuf.addComponent:(Lio/netty/buffer/ByteBuf;)Lio/netty/buffer/CompositeByteBuf;
pop
21: StackMap locals:
StackMap stack:
aload 6
aload 6
invokevirtual io.netty.buffer.CompositeByteBuf.writerIndex:()I
iload 10
iadd
invokevirtual io.netty.buffer.CompositeByteBuf.writerIndex:(I)Lio/netty/buffer/CompositeByteBuf;
pop
22: iload 7
iload 10
isub
istore 7
23: iload 7
ifne 25
24: goto 26
end local 10 end local 9 25: StackMap locals:
StackMap stack:
aload 8
invokeinterface java.util.Iterator.hasNext:()Z
ifne 13
end local 8 26: StackMap locals:
StackMap stack:
new com.mongodb.connection.netty.NettyByteBuf
dup
aload 6
invokespecial com.mongodb.connection.netty.NettyByteBuf.<init>:(Lio/netty/buffer/ByteBuf;)V
invokevirtual com.mongodb.connection.netty.NettyByteBuf.flip:()Lorg/bson/ByteBuf;
astore 3
end local 7 end local 6 27: StackMap locals:
StackMap stack:
aload 5
monitorexit
28: goto 31
StackMap locals:
StackMap stack: java.lang.Throwable
29: aload 5
monitorexit
30: athrow
31: StackMap locals:
StackMap stack:
aload 4
ifnull 34
32: aload 0
invokevirtual com.mongodb.connection.netty.NettyStream.disableReadTimeout:()V
33: aload 2
aload 4
invokeinterface com.mongodb.connection.AsyncCompletionHandler.failed:(Ljava/lang/Throwable;)V
34: StackMap locals:
StackMap stack:
aload 3
ifnull 37
35: aload 0
invokevirtual com.mongodb.connection.netty.NettyStream.disableReadTimeout:()V
36: aload 2
aload 3
invokeinterface com.mongodb.connection.AsyncCompletionHandler.completed:(Ljava/lang/Object;)V
37: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 38 0 this Lcom/mongodb/connection/netty/NettyStream;
0 38 1 numBytes I
0 38 2 handler Lcom/mongodb/connection/AsyncCompletionHandler<Lorg/bson/ByteBuf;>;
2 38 3 buffer Lorg/bson/ByteBuf;
3 38 4 exceptionResult Ljava/lang/Throwable;
10 27 6 composite Lio/netty/buffer/CompositeByteBuf;
11 27 7 bytesNeeded I
12 26 8 iter Ljava/util/Iterator<Lio/netty/buffer/ByteBuf;>;
14 25 9 next Lio/netty/buffer/ByteBuf;
15 25 10 bytesNeededFromCurrentBuffer I
Exception table:
from to target type
4 28 29 any
29 30 29 any
Signature: (ILcom/mongodb/connection/AsyncCompletionHandler<Lorg/bson/ByteBuf;>;)V
MethodParameters:
Name Flags
numBytes final
handler final
private boolean hasBytesAvailable(int);
descriptor: (I)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=5, args_size=2
start local 0 start local 1 0: iconst_0
istore 2
start local 2 1: aload 0
getfield com.mongodb.connection.netty.NettyStream.pendingInboundBuffers:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.iterator:()Ljava/util/Iterator;
astore 4
goto 6
StackMap locals: com.mongodb.connection.netty.NettyStream int int top java.util.Iterator
StackMap stack:
2: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast io.netty.buffer.ByteBuf
astore 3
start local 3 3: iload 2
aload 3
invokevirtual io.netty.buffer.ByteBuf.readableBytes:()I
iadd
istore 2
4: iload 2
iload 1
if_icmplt 6
5: iconst_1
ireturn
end local 3 6: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
7: iconst_0
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/mongodb/connection/netty/NettyStream;
0 8 1 numBytes I
1 8 2 bytesAvailable I
3 6 3 cur Lio/netty/buffer/ByteBuf;
MethodParameters:
Name Flags
numBytes final
private void handleReadResponse(io.netty.buffer.ByteBuf, java.lang.Throwable);
descriptor: (Lio/netty/buffer/ByteBuf;Ljava/lang/Throwable;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aconst_null
astore 3
start local 3 1: aload 0
dup
astore 4
monitorenter
2: aload 1
ifnull 5
3: aload 0
getfield com.mongodb.connection.netty.NettyStream.pendingInboundBuffers:Ljava/util/LinkedList;
aload 1
invokevirtual io.netty.buffer.ByteBuf.retain:()Lio/netty/buffer/ByteBuf;
invokevirtual java.util.LinkedList.add:(Ljava/lang/Object;)Z
pop
4: goto 6
5: StackMap locals: com.mongodb.connection.netty.NettyStream$PendingReader com.mongodb.connection.netty.NettyStream
StackMap stack:
aload 0
aload 2
putfield com.mongodb.connection.netty.NettyStream.pendingException:Ljava/lang/Throwable;
6: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.connection.netty.NettyStream.pendingReader:Lcom/mongodb/connection/netty/NettyStream$PendingReader;
ifnull 9
7: aload 0
getfield com.mongodb.connection.netty.NettyStream.pendingReader:Lcom/mongodb/connection/netty/NettyStream$PendingReader;
astore 3
8: aload 0
aconst_null
putfield com.mongodb.connection.netty.NettyStream.pendingReader:Lcom/mongodb/connection/netty/NettyStream$PendingReader;
9: StackMap locals:
StackMap stack:
aload 4
monitorexit
10: goto 13
StackMap locals:
StackMap stack: java.lang.Throwable
11: aload 4
monitorexit
12: athrow
13: StackMap locals:
StackMap stack:
aload 3
ifnull 15
14: aload 0
aload 3
getfield com.mongodb.connection.netty.NettyStream$PendingReader.numBytes:I
aload 3
getfield com.mongodb.connection.netty.NettyStream$PendingReader.handler:Lcom/mongodb/connection/AsyncCompletionHandler;
invokevirtual com.mongodb.connection.netty.NettyStream.readAsync:(ILcom/mongodb/connection/AsyncCompletionHandler;)V
15: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lcom/mongodb/connection/netty/NettyStream;
0 16 1 buffer Lio/netty/buffer/ByteBuf;
0 16 2 t Ljava/lang/Throwable;
1 16 3 localPendingReader Lcom/mongodb/connection/netty/NettyStream$PendingReader;
Exception table:
from to target type
2 10 11 any
11 12 11 any
MethodParameters:
Name Flags
buffer final
t final
public com.mongodb.ServerAddress getAddress();
descriptor: ()Lcom/mongodb/ServerAddress;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.connection.netty.NettyStream.address:Lcom/mongodb/ServerAddress;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/connection/netty/NettyStream;
public synchronized void close();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=3, args_size=1
start local 0 0: aload 0
iconst_1
putfield com.mongodb.connection.netty.NettyStream.isClosed:Z
1: aload 0
getfield com.mongodb.connection.netty.NettyStream.channel:Lio/netty/channel/Channel;
ifnull 4
2: aload 0
getfield com.mongodb.connection.netty.NettyStream.channel:Lio/netty/channel/Channel;
invokeinterface io.netty.channel.Channel.close:()Lio/netty/channel/ChannelFuture;
pop
3: aload 0
aconst_null
putfield com.mongodb.connection.netty.NettyStream.channel:Lio/netty/channel/Channel;
4: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.connection.netty.NettyStream.pendingInboundBuffers:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.iterator:()Ljava/util/Iterator;
astore 1
start local 1 5: goto 9
6: StackMap locals: java.util.Iterator
StackMap stack:
aload 1
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast io.netty.buffer.ByteBuf
astore 2
start local 2 7: aload 1
invokeinterface java.util.Iterator.remove:()V
8: aload 2
invokevirtual io.netty.buffer.ByteBuf.release:()Z
pop
end local 2 9: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.util.Iterator.hasNext:()Z
ifne 6
end local 1 10: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/mongodb/connection/netty/NettyStream;
5 10 1 iterator Ljava/util/Iterator<Lio/netty/buffer/ByteBuf;>;
7 9 2 nextByteBuf Lio/netty/buffer/ByteBuf;
public boolean isClosed();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.connection.netty.NettyStream.isClosed:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/connection/netty/NettyStream;
public com.mongodb.connection.SocketSettings getSettings();
descriptor: ()Lcom/mongodb/connection/SocketSettings;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.connection.netty.NettyStream.settings:Lcom/mongodb/connection/SocketSettings;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/connection/netty/NettyStream;
public com.mongodb.connection.SslSettings getSslSettings();
descriptor: ()Lcom/mongodb/connection/SslSettings;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.connection.netty.NettyStream.sslSettings:Lcom/mongodb/connection/SslSettings;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/connection/netty/NettyStream;
public io.netty.channel.EventLoopGroup getWorkerGroup();
descriptor: ()Lio/netty/channel/EventLoopGroup;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.connection.netty.NettyStream.workerGroup:Lio/netty/channel/EventLoopGroup;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/connection/netty/NettyStream;
public java.lang.Class<? extends io.netty.channel.socket.SocketChannel> getSocketChannelClass();
descriptor: ()Ljava/lang/Class;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.connection.netty.NettyStream.socketChannelClass:Ljava/lang/Class;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/connection/netty/NettyStream;
Signature: ()Ljava/lang/Class<+Lio/netty/channel/socket/SocketChannel;>;
public io.netty.buffer.ByteBufAllocator getAllocator();
descriptor: ()Lio/netty/buffer/ByteBufAllocator;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.connection.netty.NettyStream.allocator:Lio/netty/buffer/ByteBufAllocator;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/connection/netty/NettyStream;
private javax.net.ssl.SSLContext getSslContext();
descriptor: ()Ljavax/net/ssl/SSLContext;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield com.mongodb.connection.netty.NettyStream.sslSettings:Lcom/mongodb/connection/SslSettings;
invokevirtual com.mongodb.connection.SslSettings.getContext:()Ljavax/net/ssl/SSLContext;
ifnonnull 1
invokestatic javax.net.ssl.SSLContext.getDefault:()Ljavax/net/ssl/SSLContext;
goto 2
StackMap locals:
StackMap stack:
1: aload 0
getfield com.mongodb.connection.netty.NettyStream.sslSettings:Lcom/mongodb/connection/SslSettings;
invokevirtual com.mongodb.connection.SslSettings.getContext:()Ljavax/net/ssl/SSLContext;
StackMap locals:
StackMap stack: javax.net.ssl.SSLContext
2: areturn
3: StackMap locals:
StackMap stack: java.security.NoSuchAlgorithmException
astore 1
start local 1 4: new com.mongodb.MongoClientException
dup
ldc "Unable to create default SSLContext"
aload 1
invokespecial com.mongodb.MongoClientException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/connection/netty/NettyStream;
4 5 1 e Ljava/security/NoSuchAlgorithmException;
Exception table:
from to target type
0 2 3 Class java.security.NoSuchAlgorithmException
private void scheduleReadTimeout();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_0
invokevirtual com.mongodb.connection.netty.NettyStream.adjustTimeout:(Z)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/connection/netty/NettyStream;
private void disableReadTimeout();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_1
invokevirtual com.mongodb.connection.netty.NettyStream.adjustTimeout:(Z)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/connection/netty/NettyStream;
private void adjustTimeout(boolean);
descriptor: (Z)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=6, args_size=2
start local 0 start local 1 0: aload 0
getfield com.mongodb.connection.netty.NettyStream.channel:Lio/netty/channel/Channel;
invokeinterface io.netty.channel.Channel.pipeline:()Lio/netty/channel/ChannelPipeline;
ldc "ReadTimeoutHandler"
invokeinterface io.netty.channel.ChannelPipeline.get:(Ljava/lang/String;)Lio/netty/channel/ChannelHandler;
astore 2
start local 2 1: aload 2
ifnull 15
2: aload 2
checkcast com.mongodb.connection.netty.ReadTimeoutHandler
astore 3
start local 3 3: aload 0
getfield com.mongodb.connection.netty.NettyStream.channel:Lio/netty/channel/Channel;
invokeinterface io.netty.channel.Channel.pipeline:()Lio/netty/channel/ChannelPipeline;
aload 2
invokeinterface io.netty.channel.ChannelPipeline.context:(Lio/netty/channel/ChannelHandler;)Lio/netty/channel/ChannelHandlerContext;
astore 4
start local 4 4: aload 4
invokeinterface io.netty.channel.ChannelHandlerContext.executor:()Lio/netty/util/concurrent/EventExecutor;
astore 5
start local 5 5: iload 1
ifeq 11
6: aload 5
invokeinterface io.netty.util.concurrent.EventExecutor.inEventLoop:()Z
ifeq 9
7: aload 3
aload 4
invokevirtual com.mongodb.connection.netty.ReadTimeoutHandler.removeTimeout:(Lio/netty/channel/ChannelHandlerContext;)V
8: goto 15
9: StackMap locals: com.mongodb.connection.netty.NettyStream int io.netty.channel.ChannelHandler com.mongodb.connection.netty.ReadTimeoutHandler io.netty.channel.ChannelHandlerContext io.netty.util.concurrent.EventExecutor
StackMap stack:
aload 5
new com.mongodb.connection.netty.NettyStream$3
dup
aload 0
aload 3
aload 4
invokespecial com.mongodb.connection.netty.NettyStream$3.<init>:(Lcom/mongodb/connection/netty/NettyStream;Lcom/mongodb/connection/netty/ReadTimeoutHandler;Lio/netty/channel/ChannelHandlerContext;)V
invokeinterface io.netty.util.concurrent.EventExecutor.submit:(Ljava/lang/Runnable;)Lio/netty/util/concurrent/Future;
pop
10: goto 15
11: StackMap locals:
StackMap stack:
aload 5
invokeinterface io.netty.util.concurrent.EventExecutor.inEventLoop:()Z
ifeq 14
12: aload 3
aload 4
invokevirtual com.mongodb.connection.netty.ReadTimeoutHandler.scheduleTimeout:(Lio/netty/channel/ChannelHandlerContext;)V
13: goto 15
14: StackMap locals:
StackMap stack:
aload 5
new com.mongodb.connection.netty.NettyStream$4
dup
aload 0
aload 3
aload 4
invokespecial com.mongodb.connection.netty.NettyStream$4.<init>:(Lcom/mongodb/connection/netty/NettyStream;Lcom/mongodb/connection/netty/ReadTimeoutHandler;Lio/netty/channel/ChannelHandlerContext;)V
invokeinterface io.netty.util.concurrent.EventExecutor.submit:(Ljava/lang/Runnable;)Lio/netty/util/concurrent/Future;
pop
end local 5 end local 4 end local 3 15: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lcom/mongodb/connection/netty/NettyStream;
0 16 1 disable Z
1 16 2 timeoutHandler Lio/netty/channel/ChannelHandler;
3 15 3 readTimeoutHandler Lcom/mongodb/connection/netty/ReadTimeoutHandler;
4 15 4 handlerContext Lio/netty/channel/ChannelHandlerContext;
5 15 5 executor Lio/netty/util/concurrent/EventExecutor;
MethodParameters:
Name Flags
disable final
}
SourceFile: "NettyStream.java"
NestMembers:
com.mongodb.connection.netty.NettyStream$1 com.mongodb.connection.netty.NettyStream$2 com.mongodb.connection.netty.NettyStream$3 com.mongodb.connection.netty.NettyStream$4 com.mongodb.connection.netty.NettyStream$FutureAsyncCompletionHandler com.mongodb.connection.netty.NettyStream$InboundBufferHandler com.mongodb.connection.netty.NettyStream$OpenChannelFutureListener com.mongodb.connection.netty.NettyStream$OpenChannelFutureListener$1 com.mongodb.connection.netty.NettyStream$PendingReader
InnerClasses:
com.mongodb.connection.netty.NettyStream$1
com.mongodb.connection.netty.NettyStream$2
com.mongodb.connection.netty.NettyStream$3
com.mongodb.connection.netty.NettyStream$4
private final FutureAsyncCompletionHandler = com.mongodb.connection.netty.NettyStream$FutureAsyncCompletionHandler of com.mongodb.connection.netty.NettyStream
private InboundBufferHandler = com.mongodb.connection.netty.NettyStream$InboundBufferHandler of com.mongodb.connection.netty.NettyStream
private OpenChannelFutureListener = com.mongodb.connection.netty.NettyStream$OpenChannelFutureListener of com.mongodb.connection.netty.NettyStream
private final PendingReader = com.mongodb.connection.netty.NettyStream$PendingReader of com.mongodb.connection.netty.NettyStream