public final class com.mongodb.internal.connection.CommandMessage extends com.mongodb.internal.connection.RequestMessage
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.mongodb.internal.connection.CommandMessage
super_class: com.mongodb.internal.connection.RequestMessage
{
private final com.mongodb.MongoNamespace namespace;
descriptor: Lcom/mongodb/MongoNamespace;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.bson.BsonDocument command;
descriptor: Lorg/bson/BsonDocument;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.bson.FieldNameValidator commandFieldNameValidator;
descriptor: Lorg/bson/FieldNameValidator;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.ReadPreference readPreference;
descriptor: Lcom/mongodb/ReadPreference;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.connection.SplittablePayload payload;
descriptor: Lcom/mongodb/connection/SplittablePayload;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.bson.FieldNameValidator payloadFieldNameValidator;
descriptor: Lorg/bson/FieldNameValidator;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean responseExpected;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.connection.ClusterConnectionMode clusterConnectionMode;
descriptor: Lcom/mongodb/connection/ClusterConnectionMode;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
void <init>(com.mongodb.MongoNamespace, org.bson.BsonDocument, org.bson.FieldNameValidator, com.mongodb.ReadPreference, com.mongodb.internal.connection.MessageSettings);
descriptor: (Lcom/mongodb/MongoNamespace;Lorg/bson/BsonDocument;Lorg/bson/FieldNameValidator;Lcom/mongodb/ReadPreference;Lcom/mongodb/internal/connection/MessageSettings;)V
flags: (0x0000)
Code:
stack=10, locals=6, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
aload 1
aload 2
aload 3
aload 4
aload 5
iconst_1
aconst_null
aconst_null
1: getstatic com.mongodb.connection.ClusterConnectionMode.MULTIPLE:Lcom/mongodb/connection/ClusterConnectionMode;
invokespecial com.mongodb.internal.connection.CommandMessage.<init>:(Lcom/mongodb/MongoNamespace;Lorg/bson/BsonDocument;Lorg/bson/FieldNameValidator;Lcom/mongodb/ReadPreference;Lcom/mongodb/internal/connection/MessageSettings;ZLcom/mongodb/connection/SplittablePayload;Lorg/bson/FieldNameValidator;Lcom/mongodb/connection/ClusterConnectionMode;)V
2: return
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 3 0 this Lcom/mongodb/internal/connection/CommandMessage;
0 3 1 namespace Lcom/mongodb/MongoNamespace;
0 3 2 command Lorg/bson/BsonDocument;
0 3 3 commandFieldNameValidator Lorg/bson/FieldNameValidator;
0 3 4 readPreference Lcom/mongodb/ReadPreference;
0 3 5 settings Lcom/mongodb/internal/connection/MessageSettings;
MethodParameters:
Name Flags
namespace final
command final
commandFieldNameValidator final
readPreference final
settings final
void <init>(com.mongodb.MongoNamespace, org.bson.BsonDocument, org.bson.FieldNameValidator, com.mongodb.ReadPreference, com.mongodb.internal.connection.MessageSettings, boolean, com.mongodb.connection.SplittablePayload, org.bson.FieldNameValidator, com.mongodb.connection.ClusterConnectionMode);
descriptor: (Lcom/mongodb/MongoNamespace;Lorg/bson/BsonDocument;Lorg/bson/FieldNameValidator;Lcom/mongodb/ReadPreference;Lcom/mongodb/internal/connection/MessageSettings;ZLcom/mongodb/connection/SplittablePayload;Lorg/bson/FieldNameValidator;Lcom/mongodb/connection/ClusterConnectionMode;)V
flags: (0x0000)
Code:
stack=4, locals=10, args_size=10
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 start local 6 start local 7 start local 8 start local 9 0: aload 0
aload 1
invokevirtual com.mongodb.MongoNamespace.getFullName:()Ljava/lang/String;
aload 5
invokestatic com.mongodb.internal.connection.CommandMessage.getOpCode:(Lcom/mongodb/internal/connection/MessageSettings;)Lcom/mongodb/internal/connection/OpCode;
aload 5
invokespecial com.mongodb.internal.connection.RequestMessage.<init>:(Ljava/lang/String;Lcom/mongodb/internal/connection/OpCode;Lcom/mongodb/internal/connection/MessageSettings;)V
1: aload 0
aload 1
putfield com.mongodb.internal.connection.CommandMessage.namespace:Lcom/mongodb/MongoNamespace;
2: aload 0
aload 2
putfield com.mongodb.internal.connection.CommandMessage.command:Lorg/bson/BsonDocument;
3: aload 0
aload 3
putfield com.mongodb.internal.connection.CommandMessage.commandFieldNameValidator:Lorg/bson/FieldNameValidator;
4: aload 0
aload 4
putfield com.mongodb.internal.connection.CommandMessage.readPreference:Lcom/mongodb/ReadPreference;
5: aload 0
iload 6
putfield com.mongodb.internal.connection.CommandMessage.responseExpected:Z
6: aload 0
aload 7
putfield com.mongodb.internal.connection.CommandMessage.payload:Lcom/mongodb/connection/SplittablePayload;
7: aload 0
aload 8
putfield com.mongodb.internal.connection.CommandMessage.payloadFieldNameValidator:Lorg/bson/FieldNameValidator;
8: aload 0
aload 9
putfield com.mongodb.internal.connection.CommandMessage.clusterConnectionMode:Lcom/mongodb/connection/ClusterConnectionMode;
9: return
end local 9 end local 8 end local 7 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 10 0 this Lcom/mongodb/internal/connection/CommandMessage;
0 10 1 namespace Lcom/mongodb/MongoNamespace;
0 10 2 command Lorg/bson/BsonDocument;
0 10 3 commandFieldNameValidator Lorg/bson/FieldNameValidator;
0 10 4 readPreference Lcom/mongodb/ReadPreference;
0 10 5 settings Lcom/mongodb/internal/connection/MessageSettings;
0 10 6 responseExpected Z
0 10 7 payload Lcom/mongodb/connection/SplittablePayload;
0 10 8 payloadFieldNameValidator Lorg/bson/FieldNameValidator;
0 10 9 clusterConnectionMode Lcom/mongodb/connection/ClusterConnectionMode;
MethodParameters:
Name Flags
namespace final
command final
commandFieldNameValidator final
readPreference final
settings final
responseExpected final
payload final
payloadFieldNameValidator final
clusterConnectionMode final
org.bson.BsonDocument getCommandDocument(com.mongodb.connection.ByteBufferBsonOutput);
descriptor: (Lcom/mongodb/connection/ByteBufferBsonOutput;)Lorg/bson/BsonDocument;
flags: (0x0000)
Code:
stack=6, locals=5, args_size=2
start local 0 start local 1 0: aload 1
1: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getEncodingMetadata:()Lcom/mongodb/internal/connection/RequestMessage$EncodingMetadata;
invokevirtual com.mongodb.internal.connection.RequestMessage$EncodingMetadata.getFirstDocumentPosition:()I
2: invokestatic com.mongodb.internal.connection.ByteBufBsonDocument.createOne:(Lcom/mongodb/connection/ByteBufferBsonOutput;I)Lcom/mongodb/internal/connection/ByteBufBsonDocument;
astore 2
start local 2 3: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.useOpMsg:()Z
ifeq 20
aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.containsPayload:()Z
ifeq 20
4: aload 2
invokevirtual com.mongodb.internal.connection.ByteBufBsonDocument.toBsonDocument:()Lorg/bson/BsonDocument;
astore 3
start local 3 5: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getEncodingMetadata:()Lcom/mongodb/internal/connection/RequestMessage$EncodingMetadata;
invokevirtual com.mongodb.internal.connection.RequestMessage$EncodingMetadata.getFirstDocumentPosition:()I
6: aload 2
invokevirtual com.mongodb.internal.connection.ByteBufBsonDocument.getSizeInBytes:()I
7: iadd
8: iconst_1
9: iadd
10: iconst_4
11: iadd
12: aload 0
getfield com.mongodb.internal.connection.CommandMessage.payload:Lcom/mongodb/connection/SplittablePayload;
invokevirtual com.mongodb.connection.SplittablePayload.getPayloadName:()Ljava/lang/String;
ldc "UTF-8"
invokestatic java.nio.charset.Charset.forName:(Ljava/lang/String;)Ljava/nio/charset/Charset;
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
arraylength
13: iadd
14: iconst_1
15: iadd
istore 4
start local 4 16: aload 3
aload 0
getfield com.mongodb.internal.connection.CommandMessage.payload:Lcom/mongodb/connection/SplittablePayload;
invokevirtual com.mongodb.connection.SplittablePayload.getPayloadName:()Ljava/lang/String;
17: new org.bson.BsonArray
dup
aload 1
iload 4
invokestatic com.mongodb.internal.connection.ByteBufBsonDocument.createList:(Lcom/mongodb/connection/ByteBufferBsonOutput;I)Ljava/util/List;
invokespecial org.bson.BsonArray.<init>:(Ljava/util/List;)V
18: invokevirtual org.bson.BsonDocument.append:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonDocument;
pop
end local 4 19: goto 21
end local 3 20: StackMap locals: com.mongodb.internal.connection.ByteBufBsonDocument
StackMap stack:
aload 2
astore 3
start local 3 21: StackMap locals: org.bson.BsonDocument
StackMap stack:
aload 3
ldc "$query"
invokevirtual org.bson.BsonDocument.containsKey:(Ljava/lang/Object;)Z
ifeq 23
22: aload 3
ldc "$query"
invokevirtual org.bson.BsonDocument.getDocument:(Ljava/lang/Object;)Lorg/bson/BsonDocument;
astore 3
23: StackMap locals:
StackMap stack:
aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 this Lcom/mongodb/internal/connection/CommandMessage;
0 24 1 bsonOutput Lcom/mongodb/connection/ByteBufferBsonOutput;
3 24 2 byteBufBsonDocument Lcom/mongodb/internal/connection/ByteBufBsonDocument;
5 20 3 commandBsonDocument Lorg/bson/BsonDocument;
21 24 3 commandBsonDocument Lorg/bson/BsonDocument;
16 19 4 payloadStartPosition I
MethodParameters:
Name Flags
bsonOutput final
boolean containsPayload();
descriptor: ()Z
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.CommandMessage.payload:Lcom/mongodb/connection/SplittablePayload;
ifnull 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/internal/connection/CommandMessage;
boolean isResponseExpected();
descriptor: ()Z
flags: (0x0000)
Code:
stack=2, locals=1, args_size=1
start local 0 0: ldc "The message must be encoded before determining if a response is expected"
aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getEncodingMetadata:()Lcom/mongodb/internal/connection/RequestMessage$EncodingMetadata;
ifnull 1
iconst_1
goto 2
StackMap locals:
StackMap stack: java.lang.String
1: iconst_0
StackMap locals: com.mongodb.internal.connection.CommandMessage
StackMap stack: java.lang.String int
2: invokestatic com.mongodb.assertions.Assertions.isTrue:(Ljava/lang/String;Z)V
3: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.useOpMsg:()Z
ifeq 4
aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.requireOpMsgResponse:()Z
ifne 4
iconst_0
ireturn
StackMap locals:
StackMap stack:
4: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/internal/connection/CommandMessage;
com.mongodb.MongoNamespace getNamespace();
descriptor: ()Lcom/mongodb/MongoNamespace;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.CommandMessage.namespace:Lcom/mongodb/MongoNamespace;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/CommandMessage;
protected com.mongodb.internal.connection.RequestMessage$EncodingMetadata encodeMessageBodyWithMetadata(org.bson.io.BsonOutput, com.mongodb.session.SessionContext);
descriptor: (Lorg/bson/io/BsonOutput;Lcom/mongodb/session/SessionContext;)Lcom/mongodb/internal/connection/RequestMessage$EncodingMetadata;
flags: (0x0004) ACC_PROTECTED
Code:
stack=6, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokeinterface org.bson.io.BsonOutput.getPosition:()I
bipush 16
isub
istore 3
start local 3 1: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.useOpMsg:()Z
ifeq 19
2: aload 1
invokeinterface org.bson.io.BsonOutput.getPosition:()I
istore 5
start local 5 3: aload 1
iconst_0
invokeinterface org.bson.io.BsonOutput.writeInt32:(I)V
4: aload 1
iconst_0
invokeinterface org.bson.io.BsonOutput.writeByte:(I)V
5: aload 1
invokeinterface org.bson.io.BsonOutput.getPosition:()I
istore 4
start local 4 6: aload 0
aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getCommandToEncode:()Lorg/bson/BsonDocument;
aload 1
aload 0
getfield com.mongodb.internal.connection.CommandMessage.commandFieldNameValidator:Lorg/bson/FieldNameValidator;
aload 0
aload 2
invokevirtual com.mongodb.internal.connection.CommandMessage.getExtraElements:(Lcom/mongodb/session/SessionContext;)Ljava/util/List;
invokevirtual com.mongodb.internal.connection.CommandMessage.addDocument:(Lorg/bson/BsonDocument;Lorg/bson/io/BsonOutput;Lorg/bson/FieldNameValidator;Ljava/util/List;)V
7: aload 0
getfield com.mongodb.internal.connection.CommandMessage.payload:Lcom/mongodb/connection/SplittablePayload;
ifnull 17
8: aload 1
iconst_1
invokeinterface org.bson.io.BsonOutput.writeByte:(I)V
9: aload 1
invokeinterface org.bson.io.BsonOutput.getPosition:()I
istore 6
start local 6 10: aload 1
iconst_0
invokeinterface org.bson.io.BsonOutput.writeInt32:(I)V
11: aload 1
aload 0
getfield com.mongodb.internal.connection.CommandMessage.payload:Lcom/mongodb/connection/SplittablePayload;
invokevirtual com.mongodb.connection.SplittablePayload.getPayloadName:()Ljava/lang/String;
invokeinterface org.bson.io.BsonOutput.writeCString:(Ljava/lang/String;)V
12: new org.bson.BsonBinaryWriter
dup
aload 1
aload 0
getfield com.mongodb.internal.connection.CommandMessage.payloadFieldNameValidator:Lorg/bson/FieldNameValidator;
invokespecial org.bson.BsonBinaryWriter.<init>:(Lorg/bson/io/BsonOutput;Lorg/bson/FieldNameValidator;)V
aload 1
aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getSettings:()Lcom/mongodb/internal/connection/MessageSettings;
13: iload 3
aload 0
getfield com.mongodb.internal.connection.CommandMessage.payload:Lcom/mongodb/connection/SplittablePayload;
14: invokestatic com.mongodb.internal.connection.BsonWriterHelper.writePayload:(Lorg/bson/BsonWriter;Lorg/bson/io/BsonOutput;Lcom/mongodb/internal/connection/MessageSettings;ILcom/mongodb/connection/SplittablePayload;)V
15: aload 1
invokeinterface org.bson.io.BsonOutput.getPosition:()I
iload 6
isub
istore 7
start local 7 16: aload 1
iload 6
iload 7
invokeinterface org.bson.io.BsonOutput.writeInt32:(II)V
end local 7 end local 6 17: StackMap locals: int int int
StackMap stack:
aload 1
iload 5
aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getOpMsgFlagBits:()I
invokeinterface org.bson.io.BsonOutput.writeInt32:(II)V
end local 5 18: goto 28
end local 4 19: StackMap locals:
StackMap stack:
aload 1
aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getOpQueryFlagBits:()I
invokeinterface org.bson.io.BsonOutput.writeInt32:(I)V
20: aload 1
aload 0
getfield com.mongodb.internal.connection.CommandMessage.namespace:Lcom/mongodb/MongoNamespace;
invokevirtual com.mongodb.MongoNamespace.getFullName:()Ljava/lang/String;
invokeinterface org.bson.io.BsonOutput.writeCString:(Ljava/lang/String;)V
21: aload 1
iconst_0
invokeinterface org.bson.io.BsonOutput.writeInt32:(I)V
22: aload 1
iconst_m1
invokeinterface org.bson.io.BsonOutput.writeInt32:(I)V
23: aload 1
invokeinterface org.bson.io.BsonOutput.getPosition:()I
istore 4
start local 4 24: aload 0
getfield com.mongodb.internal.connection.CommandMessage.payload:Lcom/mongodb/connection/SplittablePayload;
ifnonnull 27
25: aload 0
aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getCommandToEncode:()Lorg/bson/BsonDocument;
aload 1
aload 0
getfield com.mongodb.internal.connection.CommandMessage.commandFieldNameValidator:Lorg/bson/FieldNameValidator;
aconst_null
invokevirtual com.mongodb.internal.connection.CommandMessage.addDocument:(Lorg/bson/BsonDocument;Lorg/bson/io/BsonOutput;Lorg/bson/FieldNameValidator;Ljava/util/List;)V
26: goto 28
27: StackMap locals: int
StackMap stack:
aload 0
aload 1
iload 3
invokevirtual com.mongodb.internal.connection.CommandMessage.addDocumentWithPayload:(Lorg/bson/io/BsonOutput;I)V
28: StackMap locals:
StackMap stack:
new com.mongodb.internal.connection.RequestMessage$EncodingMetadata
dup
iload 4
invokespecial com.mongodb.internal.connection.RequestMessage$EncodingMetadata.<init>:(I)V
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 29 0 this Lcom/mongodb/internal/connection/CommandMessage;
0 29 1 bsonOutput Lorg/bson/io/BsonOutput;
0 29 2 sessionContext Lcom/mongodb/session/SessionContext;
1 29 3 messageStartPosition I
6 19 4 commandStartPosition I
24 29 4 commandStartPosition I
3 18 5 flagPosition I
10 17 6 payloadBsonOutputStartPosition I
16 17 7 payloadBsonOutputLength I
MethodParameters:
Name Flags
bsonOutput final
sessionContext final
private org.bson.FieldNameValidator getPayloadArrayFieldNameValidator();
descriptor: ()Lorg/bson/FieldNameValidator;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=1
start local 0 0: new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
astore 1
start local 1 1: aload 1
aload 0
getfield com.mongodb.internal.connection.CommandMessage.payload:Lcom/mongodb/connection/SplittablePayload;
invokevirtual com.mongodb.connection.SplittablePayload.getPayloadName:()Ljava/lang/String;
aload 0
getfield com.mongodb.internal.connection.CommandMessage.payloadFieldNameValidator:Lorg/bson/FieldNameValidator;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
2: new com.mongodb.internal.validator.MappedFieldNameValidator
dup
aload 0
getfield com.mongodb.internal.connection.CommandMessage.commandFieldNameValidator:Lorg/bson/FieldNameValidator;
aload 1
invokespecial com.mongodb.internal.validator.MappedFieldNameValidator.<init>:(Lorg/bson/FieldNameValidator;Ljava/util/Map;)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/CommandMessage;
1 3 1 rootMap Ljava/util/Map<Ljava/lang/String;Lorg/bson/FieldNameValidator;>;
private void addDocumentWithPayload(org.bson.io.BsonOutput, int);
descriptor: (Lorg/bson/io/BsonOutput;I)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=6, args_size=3
start local 0 start local 1 start local 2 0: new org.bson.BsonBinaryWriter
dup
aload 1
aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getPayloadArrayFieldNameValidator:()Lorg/bson/FieldNameValidator;
invokespecial org.bson.BsonBinaryWriter.<init>:(Lorg/bson/io/BsonOutput;Lorg/bson/FieldNameValidator;)V
astore 3
start local 3 1: new com.mongodb.internal.connection.SplittablePayloadBsonWriter
dup
aload 3
aload 1
iload 2
aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getSettings:()Lcom/mongodb/internal/connection/MessageSettings;
aload 0
getfield com.mongodb.internal.connection.CommandMessage.payload:Lcom/mongodb/connection/SplittablePayload;
invokespecial com.mongodb.internal.connection.SplittablePayloadBsonWriter.<init>:(Lorg/bson/BsonBinaryWriter;Lorg/bson/io/BsonOutput;ILcom/mongodb/internal/connection/MessageSettings;Lcom/mongodb/connection/SplittablePayload;)V
astore 4
start local 4 2: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getCommandToEncode:()Lorg/bson/BsonDocument;
astore 5
start local 5 3: aload 0
aload 5
invokevirtual com.mongodb.internal.connection.CommandMessage.getCodec:(Lorg/bson/BsonDocument;)Lorg/bson/codecs/Codec;
aload 4
aload 5
invokestatic org.bson.codecs.EncoderContext.builder:()Lorg/bson/codecs/EncoderContext$Builder;
invokevirtual org.bson.codecs.EncoderContext$Builder.build:()Lorg/bson/codecs/EncoderContext;
invokeinterface org.bson.codecs.Codec.encode:(Lorg/bson/BsonWriter;Ljava/lang/Object;Lorg/bson/codecs/EncoderContext;)V
4: return
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 5 0 this Lcom/mongodb/internal/connection/CommandMessage;
0 5 1 bsonOutput Lorg/bson/io/BsonOutput;
0 5 2 messageStartPosition I
1 5 3 bsonBinaryWriter Lorg/bson/BsonBinaryWriter;
2 5 4 bsonWriter Lorg/bson/BsonWriter;
3 5 5 commandToEncode Lorg/bson/BsonDocument;
MethodParameters:
Name Flags
bsonOutput final
messageStartPosition final
private int getOpMsgFlagBits();
descriptor: ()I
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getOpMsgResponseExpectedFlagBit:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/CommandMessage;
private int getOpMsgResponseExpectedFlagBit();
descriptor: ()I
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.requireOpMsgResponse:()Z
ifeq 2
1: iconst_0
ireturn
2: StackMap locals:
StackMap stack:
iconst_2
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/CommandMessage;
private boolean requireOpMsgResponse();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.CommandMessage.responseExpected:Z
ifeq 2
1: iconst_1
ireturn
2: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.internal.connection.CommandMessage.payload:Lcom/mongodb/connection/SplittablePayload;
ifnull 3
aload 0
getfield com.mongodb.internal.connection.CommandMessage.payload:Lcom/mongodb/connection/SplittablePayload;
invokevirtual com.mongodb.connection.SplittablePayload.hasAnotherSplit:()Z
ifeq 3
iconst_1
ireturn
StackMap locals:
StackMap stack:
3: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/internal/connection/CommandMessage;
private int getOpQueryFlagBits();
descriptor: ()I
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getOpQuerySlaveOkFlagBit:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/CommandMessage;
private int getOpQuerySlaveOkFlagBit();
descriptor: ()I
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.isSlaveOk:()Z
ifeq 2
1: iconst_4
ireturn
2: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/CommandMessage;
private boolean isSlaveOk();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.CommandMessage.readPreference:Lcom/mongodb/ReadPreference;
ifnull 1
aload 0
getfield com.mongodb.internal.connection.CommandMessage.readPreference:Lcom/mongodb/ReadPreference;
invokevirtual com.mongodb.ReadPreference.isSlaveOk:()Z
ifne 2
StackMap locals:
StackMap stack:
1: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.isDirectConnectionToReplicaSetMember:()Z
ifne 2
iconst_0
ireturn
StackMap locals:
StackMap stack:
2: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/CommandMessage;
private boolean isDirectConnectionToReplicaSetMember();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.CommandMessage.clusterConnectionMode:Lcom/mongodb/connection/ClusterConnectionMode;
getstatic com.mongodb.connection.ClusterConnectionMode.SINGLE:Lcom/mongodb/connection/ClusterConnectionMode;
if_acmpne 4
1: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getSettings:()Lcom/mongodb/internal/connection/MessageSettings;
invokevirtual com.mongodb.internal.connection.MessageSettings.getServerType:()Lcom/mongodb/connection/ServerType;
getstatic com.mongodb.connection.ServerType.SHARD_ROUTER:Lcom/mongodb/connection/ServerType;
if_acmpeq 4
2: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getSettings:()Lcom/mongodb/internal/connection/MessageSettings;
invokevirtual com.mongodb.internal.connection.MessageSettings.getServerType:()Lcom/mongodb/connection/ServerType;
getstatic com.mongodb.connection.ServerType.STANDALONE:Lcom/mongodb/connection/ServerType;
if_acmpeq 4
3: iconst_1
ireturn
StackMap locals:
StackMap stack:
4: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/internal/connection/CommandMessage;
private boolean useOpMsg();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getOpCode:()Lcom/mongodb/internal/connection/OpCode;
getstatic com.mongodb.internal.connection.OpCode.OP_MSG:Lcom/mongodb/internal/connection/OpCode;
invokevirtual com.mongodb.internal.connection.OpCode.equals:(Ljava/lang/Object;)Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/CommandMessage;
private org.bson.BsonDocument getCommandToEncode();
descriptor: ()Lorg/bson/BsonDocument;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.CommandMessage.command:Lorg/bson/BsonDocument;
astore 1
start local 1 1: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.useOpMsg:()Z
ifne 3
aload 0
getfield com.mongodb.internal.connection.CommandMessage.readPreference:Lcom/mongodb/ReadPreference;
ifnull 3
aload 0
getfield com.mongodb.internal.connection.CommandMessage.readPreference:Lcom/mongodb/ReadPreference;
invokestatic com.mongodb.ReadPreference.primary:()Lcom/mongodb/ReadPreference;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifne 3
2: new org.bson.BsonDocument
dup
ldc "$query"
aload 0
getfield com.mongodb.internal.connection.CommandMessage.command:Lorg/bson/BsonDocument;
invokespecial org.bson.BsonDocument.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
ldc "$readPreference"
aload 0
getfield com.mongodb.internal.connection.CommandMessage.readPreference:Lcom/mongodb/ReadPreference;
invokevirtual com.mongodb.ReadPreference.toDocument:()Lorg/bson/BsonDocument;
invokevirtual org.bson.BsonDocument.append:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonDocument;
astore 1
3: StackMap locals: org.bson.BsonDocument
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/internal/connection/CommandMessage;
1 4 1 commandToEncode Lorg/bson/BsonDocument;
private java.util.List<org.bson.BsonElement> getExtraElements(com.mongodb.session.SessionContext);
descriptor: (Lcom/mongodb/session/SessionContext;)Ljava/util/List;
flags: (0x0002) ACC_PRIVATE
Code:
stack=9, locals=4, args_size=2
start local 0 start local 1 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 2
start local 2 1: aload 2
new org.bson.BsonElement
dup
ldc "$db"
new org.bson.BsonString
dup
new com.mongodb.MongoNamespace
dup
aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getCollectionName:()Ljava/lang/String;
invokespecial com.mongodb.MongoNamespace.<init>:(Ljava/lang/String;)V
invokevirtual com.mongodb.MongoNamespace.getDatabaseName:()Ljava/lang/String;
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokespecial org.bson.BsonElement.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
2: aload 1
invokeinterface com.mongodb.session.SessionContext.getClusterTime:()Lorg/bson/BsonDocument;
ifnull 4
3: aload 2
new org.bson.BsonElement
dup
ldc "$clusterTime"
aload 1
invokeinterface com.mongodb.session.SessionContext.getClusterTime:()Lorg/bson/BsonDocument;
invokespecial org.bson.BsonElement.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
4: StackMap locals: java.util.List
StackMap stack:
aload 1
invokeinterface com.mongodb.session.SessionContext.hasSession:()Z
ifeq 6
aload 0
getfield com.mongodb.internal.connection.CommandMessage.responseExpected:Z
ifeq 6
5: aload 2
new org.bson.BsonElement
dup
ldc "lsid"
aload 1
invokeinterface com.mongodb.session.SessionContext.getSessionId:()Lorg/bson/BsonDocument;
invokespecial org.bson.BsonElement.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
6: StackMap locals:
StackMap stack:
aload 1
invokeinterface com.mongodb.session.SessionContext.notifyMessageSent:()Z
istore 3
start local 3 7: aload 1
invokeinterface com.mongodb.session.SessionContext.hasActiveTransaction:()Z
ifeq 14
8: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.checkServerVersionForTransactionSupport:()V
9: aload 2
new org.bson.BsonElement
dup
ldc "txnNumber"
new org.bson.BsonInt64
dup
aload 1
invokeinterface com.mongodb.session.SessionContext.getTransactionNumber:()J
invokespecial org.bson.BsonInt64.<init>:(J)V
invokespecial org.bson.BsonElement.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
10: iload 3
ifeq 13
11: aload 2
new org.bson.BsonElement
dup
ldc "startTransaction"
getstatic org.bson.BsonBoolean.TRUE:Lorg/bson/BsonBoolean;
invokespecial org.bson.BsonElement.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
12: aload 0
aload 2
aload 1
invokevirtual com.mongodb.internal.connection.CommandMessage.addReadConcernDocument:(Ljava/util/List;Lcom/mongodb/session/SessionContext;)V
13: StackMap locals: int
StackMap stack:
aload 2
new org.bson.BsonElement
dup
ldc "autocommit"
getstatic org.bson.BsonBoolean.FALSE:Lorg/bson/BsonBoolean;
invokespecial org.bson.BsonElement.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
14: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.internal.connection.CommandMessage.readPreference:Lcom/mongodb/ReadPreference;
ifnull 20
15: aload 0
getfield com.mongodb.internal.connection.CommandMessage.readPreference:Lcom/mongodb/ReadPreference;
invokestatic com.mongodb.ReadPreference.primary:()Lcom/mongodb/ReadPreference;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifne 18
16: aload 2
new org.bson.BsonElement
dup
ldc "$readPreference"
aload 0
getfield com.mongodb.internal.connection.CommandMessage.readPreference:Lcom/mongodb/ReadPreference;
invokevirtual com.mongodb.ReadPreference.toDocument:()Lorg/bson/BsonDocument;
invokespecial org.bson.BsonElement.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
17: goto 20
StackMap locals:
StackMap stack:
18: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.isDirectConnectionToReplicaSetMember:()Z
ifeq 20
19: aload 2
new org.bson.BsonElement
dup
ldc "$readPreference"
invokestatic com.mongodb.ReadPreference.primaryPreferred:()Lcom/mongodb/ReadPreference;
invokevirtual com.mongodb.ReadPreference.toDocument:()Lorg/bson/BsonDocument;
invokespecial org.bson.BsonElement.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
20: StackMap locals:
StackMap stack:
aload 2
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 this Lcom/mongodb/internal/connection/CommandMessage;
0 21 1 sessionContext Lcom/mongodb/session/SessionContext;
1 21 2 extraElements Ljava/util/List<Lorg/bson/BsonElement;>;
7 21 3 firstMessageInTransaction Z
Signature: (Lcom/mongodb/session/SessionContext;)Ljava/util/List<Lorg/bson/BsonElement;>;
MethodParameters:
Name Flags
sessionContext final
private void checkServerVersionForTransactionSupport();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getSettings:()Lcom/mongodb/internal/connection/MessageSettings;
invokevirtual com.mongodb.internal.connection.MessageSettings.getMaxWireVersion:()I
istore 1
start local 1 1: iload 1
bipush 7
if_icmplt 3
2: iload 1
bipush 8
if_icmpge 4
aload 0
invokevirtual com.mongodb.internal.connection.CommandMessage.getSettings:()Lcom/mongodb/internal/connection/MessageSettings;
invokevirtual com.mongodb.internal.connection.MessageSettings.getServerType:()Lcom/mongodb/connection/ServerType;
getstatic com.mongodb.connection.ServerType.SHARD_ROUTER:Lcom/mongodb/connection/ServerType;
if_acmpne 4
3: StackMap locals: int
StackMap stack:
new com.mongodb.MongoClientException
dup
ldc "Transactions are not supported by the MongoDB cluster to which this client is connected."
invokespecial com.mongodb.MongoClientException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/internal/connection/CommandMessage;
1 5 1 wireVersion I
private void addReadConcernDocument(java.util.List<org.bson.BsonElement>, com.mongodb.session.SessionContext);
descriptor: (Ljava/util/List;Lcom/mongodb/session/SessionContext;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokestatic com.mongodb.internal.connection.ReadConcernHelper.getReadConcernDocument:(Lcom/mongodb/session/SessionContext;)Lorg/bson/BsonDocument;
astore 3
start local 3 1: aload 3
invokevirtual org.bson.BsonDocument.isEmpty:()Z
ifne 3
2: aload 1
new org.bson.BsonElement
dup
ldc "readConcern"
aload 3
invokespecial org.bson.BsonElement.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
3: StackMap locals: org.bson.BsonDocument
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/internal/connection/CommandMessage;
0 4 1 extraElements Ljava/util/List<Lorg/bson/BsonElement;>;
0 4 2 sessionContext Lcom/mongodb/session/SessionContext;
1 4 3 readConcernDocument Lorg/bson/BsonDocument;
Signature: (Ljava/util/List<Lorg/bson/BsonElement;>;Lcom/mongodb/session/SessionContext;)V
MethodParameters:
Name Flags
extraElements final
sessionContext final
private static com.mongodb.internal.connection.OpCode getOpCode(com.mongodb.internal.connection.MessageSettings);
descriptor: (Lcom/mongodb/internal/connection/MessageSettings;)Lcom/mongodb/internal/connection/OpCode;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic com.mongodb.internal.connection.CommandMessage.isServerVersionAtLeastThreeDotSix:(Lcom/mongodb/internal/connection/MessageSettings;)Z
ifeq 1
getstatic com.mongodb.internal.connection.OpCode.OP_MSG:Lcom/mongodb/internal/connection/OpCode;
goto 2
StackMap locals:
StackMap stack:
1: getstatic com.mongodb.internal.connection.OpCode.OP_QUERY:Lcom/mongodb/internal/connection/OpCode;
StackMap locals:
StackMap stack: com.mongodb.internal.connection.OpCode
2: areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 settings Lcom/mongodb/internal/connection/MessageSettings;
MethodParameters:
Name Flags
settings final
private static boolean isServerVersionAtLeastThreeDotSix(com.mongodb.internal.connection.MessageSettings);
descriptor: (Lcom/mongodb/internal/connection/MessageSettings;)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.internal.connection.MessageSettings.getMaxWireVersion:()I
bipush 6
if_icmplt 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 settings Lcom/mongodb/internal/connection/MessageSettings;
MethodParameters:
Name Flags
settings final
public com.mongodb.internal.connection.OpCode getOpCode();
descriptor: ()Lcom/mongodb/internal/connection/OpCode;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokespecial com.mongodb.internal.connection.RequestMessage.getOpCode:()Lcom/mongodb/internal/connection/OpCode;
areturn
LocalVariableTable:
Start End Slot Name Signature
public int getId();
descriptor: ()I
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokespecial com.mongodb.internal.connection.RequestMessage.getId:()I
ireturn
LocalVariableTable:
Start End Slot Name Signature
public com.mongodb.internal.connection.RequestMessage$EncodingMetadata getEncodingMetadata();
descriptor: ()Lcom/mongodb/internal/connection/RequestMessage$EncodingMetadata;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokespecial com.mongodb.internal.connection.RequestMessage.getEncodingMetadata:()Lcom/mongodb/internal/connection/RequestMessage$EncodingMetadata;
areturn
LocalVariableTable:
Start End Slot Name Signature
public com.mongodb.internal.connection.MessageSettings getSettings();
descriptor: ()Lcom/mongodb/internal/connection/MessageSettings;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokespecial com.mongodb.internal.connection.RequestMessage.getSettings:()Lcom/mongodb/internal/connection/MessageSettings;
areturn
LocalVariableTable:
Start End Slot Name Signature
public void encode(org.bson.io.BsonOutput, com.mongodb.session.SessionContext);
descriptor: (Lorg/bson/io/BsonOutput;Lcom/mongodb/session/SessionContext;)V
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=3, locals=3, args_size=3
0: aload 0
aload 1
aload 2
invokespecial com.mongodb.internal.connection.RequestMessage.encode:(Lorg/bson/io/BsonOutput;Lcom/mongodb/session/SessionContext;)V
return
LocalVariableTable:
Start End Slot Name Signature
}
SourceFile: "CommandMessage.java"
InnerClasses:
EncodingMetadata = com.mongodb.internal.connection.RequestMessage$EncodingMetadata of com.mongodb.internal.connection.RequestMessage
public final Builder = org.bson.codecs.EncoderContext$Builder of org.bson.codecs.EncoderContext