public final class com.mongodb.internal.connection.ProtocolHelper
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.mongodb.internal.connection.ProtocolHelper
super_class: java.lang.Object
{
private static final com.mongodb.diagnostics.logging.Logger PROTOCOL_EVENT_LOGGER;
descriptor: Lcom/mongodb/diagnostics/logging/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final org.bson.codecs.configuration.CodecRegistry REGISTRY;
descriptor: Lorg/bson/codecs/configuration/CodecRegistry;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.List<java.lang.Integer> NOT_MASTER_CODES;
descriptor: Ljava/util/List;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/List<Ljava/lang/Integer;>;
private static final java.util.List<java.lang.Integer> RECOVERING_CODES;
descriptor: Ljava/util/List;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/List<Ljava/lang/Integer;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=0, args_size=0
0: ldc "protocol.event"
invokestatic com.mongodb.diagnostics.logging.Loggers.getLogger:(Ljava/lang/String;)Lcom/mongodb/diagnostics/logging/Logger;
putstatic com.mongodb.internal.connection.ProtocolHelper.PROTOCOL_EVENT_LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
1: iconst_1
anewarray org.bson.codecs.configuration.CodecProvider
dup
iconst_0
new org.bson.codecs.BsonValueCodecProvider
dup
invokespecial org.bson.codecs.BsonValueCodecProvider.<init>:()V
aastore
invokestatic org.bson.codecs.configuration.CodecRegistries.fromProviders:([Lorg/bson/codecs/configuration/CodecProvider;)Lorg/bson/codecs/configuration/CodecRegistry;
putstatic com.mongodb.internal.connection.ProtocolHelper.REGISTRY:Lorg/bson/codecs/configuration/CodecRegistry;
2: iconst_2
anewarray java.lang.Integer
dup
iconst_0
sipush 10107
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
sipush 13435
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
putstatic com.mongodb.internal.connection.ProtocolHelper.NOT_MASTER_CODES:Ljava/util/List;
3: iconst_5
anewarray java.lang.Integer
dup
iconst_0
sipush 11600
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
sipush 11602
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_2
sipush 13436
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_3
sipush 189
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_4
bipush 91
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
putstatic com.mongodb.internal.connection.ProtocolHelper.RECOVERING_CODES:Ljava/util/List;
return
LocalVariableTable:
Start End Slot Name Signature
private static com.mongodb.WriteConcernResult createWriteResult(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)Lcom/mongodb/WriteConcernResult;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
ldc "updatedExisting"
getstatic org.bson.BsonBoolean.FALSE:Lorg/bson/BsonBoolean;
invokevirtual org.bson.BsonDocument.getBoolean:(Ljava/lang/Object;Lorg/bson/BsonBoolean;)Lorg/bson/BsonBoolean;
astore 1
start local 1 1: aload 0
ldc "n"
new org.bson.BsonInt32
dup
iconst_0
invokespecial org.bson.BsonInt32.<init>:(I)V
invokevirtual org.bson.BsonDocument.getNumber:(Ljava/lang/Object;Lorg/bson/BsonNumber;)Lorg/bson/BsonNumber;
invokevirtual org.bson.BsonNumber.intValue:()I
2: aload 1
invokevirtual org.bson.BsonBoolean.getValue:()Z
aload 0
ldc "upserted"
invokevirtual org.bson.BsonDocument.get:(Ljava/lang/Object;)Lorg/bson/BsonValue;
3: invokestatic com.mongodb.WriteConcernResult.acknowledged:(IZLorg/bson/BsonValue;)Lcom/mongodb/WriteConcernResult;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 result Lorg/bson/BsonDocument;
1 4 1 updatedExisting Lorg/bson/BsonBoolean;
MethodParameters:
Name Flags
result final
static boolean isCommandOk(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)Z
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
ldc "ok"
invokevirtual org.bson.BsonDocument.get:(Ljava/lang/Object;)Lorg/bson/BsonValue;
astore 1
start local 1 1: aload 1
invokestatic com.mongodb.internal.connection.ProtocolHelper.isCommandOk:(Lorg/bson/BsonValue;)Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 response Lorg/bson/BsonDocument;
1 2 1 okValue Lorg/bson/BsonValue;
MethodParameters:
Name Flags
response final
static boolean isCommandOk(org.bson.BsonReader);
descriptor: (Lorg/bson/BsonReader;)Z
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc "ok"
invokestatic com.mongodb.internal.connection.ProtocolHelper.getField:(Lorg/bson/BsonReader;Ljava/lang/String;)Lorg/bson/BsonValue;
invokestatic com.mongodb.internal.connection.ProtocolHelper.isCommandOk:(Lorg/bson/BsonValue;)Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 bsonReader Lorg/bson/BsonReader;
MethodParameters:
Name Flags
bsonReader final
static boolean isCommandOk(com.mongodb.internal.connection.ResponseBuffers);
descriptor: (Lcom/mongodb/internal/connection/ResponseBuffers;)Z
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=3, args_size=1
start local 0 0: aload 0
invokestatic com.mongodb.internal.connection.ProtocolHelper.createBsonReader:(Lcom/mongodb/internal/connection/ResponseBuffers;)Lorg/bson/BsonBinaryReader;
invokestatic com.mongodb.internal.connection.ProtocolHelper.isCommandOk:(Lorg/bson/BsonReader;)Z
istore 2
1: aload 0
invokevirtual com.mongodb.internal.connection.ResponseBuffers.reset:()V
2: iload 2
ireturn
3: StackMap locals:
StackMap stack: java.lang.Throwable
astore 1
4: aload 0
invokevirtual com.mongodb.internal.connection.ResponseBuffers.reset:()V
5: aload 1
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 responseBuffers Lcom/mongodb/internal/connection/ResponseBuffers;
Exception table:
from to target type
0 1 3 any
MethodParameters:
Name Flags
responseBuffers final
static com.mongodb.MongoException createSpecialWriteConcernException(com.mongodb.internal.connection.ResponseBuffers, com.mongodb.ServerAddress);
descriptor: (Lcom/mongodb/internal/connection/ResponseBuffers;Lcom/mongodb/ServerAddress;)Lcom/mongodb/MongoException;
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokestatic com.mongodb.internal.connection.ProtocolHelper.createBsonReader:(Lcom/mongodb/internal/connection/ResponseBuffers;)Lorg/bson/BsonBinaryReader;
ldc "writeConcernError"
invokestatic com.mongodb.internal.connection.ProtocolHelper.getField:(Lorg/bson/BsonReader;Ljava/lang/String;)Lorg/bson/BsonValue;
astore 2
start local 2 1: aload 2
ifnonnull 3
2: aconst_null
areturn
3: StackMap locals: org.bson.BsonValue
StackMap stack:
aload 2
invokevirtual org.bson.BsonValue.asDocument:()Lorg/bson/BsonDocument;
aload 1
ldc "errmsg"
invokestatic com.mongodb.internal.connection.ProtocolHelper.createSpecialException:(Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;Ljava/lang/String;)Lcom/mongodb/MongoException;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 responseBuffers Lcom/mongodb/internal/connection/ResponseBuffers;
0 4 1 serverAddress Lcom/mongodb/ServerAddress;
1 4 2 writeConcernError Lorg/bson/BsonValue;
MethodParameters:
Name Flags
responseBuffers final
serverAddress final
static org.bson.BsonTimestamp getOperationTime(com.mongodb.internal.connection.ResponseBuffers);
descriptor: (Lcom/mongodb/internal/connection/ResponseBuffers;)Lorg/bson/BsonTimestamp;
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=4, args_size=1
start local 0 0: aload 0
invokestatic com.mongodb.internal.connection.ProtocolHelper.createBsonReader:(Lcom/mongodb/internal/connection/ResponseBuffers;)Lorg/bson/BsonBinaryReader;
ldc "operationTime"
invokestatic com.mongodb.internal.connection.ProtocolHelper.getField:(Lorg/bson/BsonReader;Ljava/lang/String;)Lorg/bson/BsonValue;
astore 1
start local 1 1: aload 1
ifnonnull 4
2: aload 0
invokevirtual com.mongodb.internal.connection.ResponseBuffers.reset:()V
3: aconst_null
areturn
4: StackMap locals: org.bson.BsonValue
StackMap stack:
aload 1
invokevirtual org.bson.BsonValue.asTimestamp:()Lorg/bson/BsonTimestamp;
astore 3
5: aload 0
invokevirtual com.mongodb.internal.connection.ResponseBuffers.reset:()V
6: aload 3
areturn
end local 1 7: StackMap locals: com.mongodb.internal.connection.ResponseBuffers
StackMap stack: java.lang.Throwable
astore 2
8: aload 0
invokevirtual com.mongodb.internal.connection.ResponseBuffers.reset:()V
9: aload 2
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 responseBuffers Lcom/mongodb/internal/connection/ResponseBuffers;
1 7 1 operationTime Lorg/bson/BsonValue;
Exception table:
from to target type
0 2 7 any
4 5 7 any
MethodParameters:
Name Flags
responseBuffers final
static org.bson.BsonDocument getClusterTime(com.mongodb.internal.connection.ResponseBuffers);
descriptor: (Lcom/mongodb/internal/connection/ResponseBuffers;)Lorg/bson/BsonDocument;
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc "$clusterTime"
invokestatic com.mongodb.internal.connection.ProtocolHelper.getFieldDocument:(Lcom/mongodb/internal/connection/ResponseBuffers;Ljava/lang/String;)Lorg/bson/BsonDocument;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 responseBuffers Lcom/mongodb/internal/connection/ResponseBuffers;
MethodParameters:
Name Flags
responseBuffers final
static org.bson.BsonDocument getClusterTime(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)Lorg/bson/BsonDocument;
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
ldc "$clusterTime"
invokevirtual org.bson.BsonDocument.get:(Ljava/lang/Object;)Lorg/bson/BsonValue;
astore 1
start local 1 1: aload 1
ifnonnull 3
2: aconst_null
areturn
3: StackMap locals: org.bson.BsonValue
StackMap stack:
aload 1
invokevirtual org.bson.BsonValue.asDocument:()Lorg/bson/BsonDocument;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 response Lorg/bson/BsonDocument;
1 4 1 clusterTime Lorg/bson/BsonValue;
MethodParameters:
Name Flags
response final
static org.bson.BsonDocument getRecoveryToken(com.mongodb.internal.connection.ResponseBuffers);
descriptor: (Lcom/mongodb/internal/connection/ResponseBuffers;)Lorg/bson/BsonDocument;
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc "recoveryToken"
invokestatic com.mongodb.internal.connection.ProtocolHelper.getFieldDocument:(Lcom/mongodb/internal/connection/ResponseBuffers;Ljava/lang/String;)Lorg/bson/BsonDocument;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 responseBuffers Lcom/mongodb/internal/connection/ResponseBuffers;
MethodParameters:
Name Flags
responseBuffers final
private static org.bson.BsonDocument getFieldDocument(com.mongodb.internal.connection.ResponseBuffers, java.lang.String);
descriptor: (Lcom/mongodb/internal/connection/ResponseBuffers;Ljava/lang/String;)Lorg/bson/BsonDocument;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=5, args_size=2
start local 0 start local 1 0: aload 0
invokestatic com.mongodb.internal.connection.ProtocolHelper.createBsonReader:(Lcom/mongodb/internal/connection/ResponseBuffers;)Lorg/bson/BsonBinaryReader;
aload 1
invokestatic com.mongodb.internal.connection.ProtocolHelper.getField:(Lorg/bson/BsonReader;Ljava/lang/String;)Lorg/bson/BsonValue;
astore 2
start local 2 1: aload 2
ifnonnull 4
2: aload 0
invokevirtual com.mongodb.internal.connection.ResponseBuffers.reset:()V
3: aconst_null
areturn
4: StackMap locals: org.bson.BsonValue
StackMap stack:
aload 2
invokevirtual org.bson.BsonValue.asDocument:()Lorg/bson/BsonDocument;
astore 4
5: aload 0
invokevirtual com.mongodb.internal.connection.ResponseBuffers.reset:()V
6: aload 4
areturn
end local 2 7: StackMap locals: com.mongodb.internal.connection.ResponseBuffers java.lang.String
StackMap stack: java.lang.Throwable
astore 3
8: aload 0
invokevirtual com.mongodb.internal.connection.ResponseBuffers.reset:()V
9: aload 3
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 responseBuffers Lcom/mongodb/internal/connection/ResponseBuffers;
0 10 1 fieldName Ljava/lang/String;
1 7 2 fieldValue Lorg/bson/BsonValue;
Exception table:
from to target type
0 2 7 any
4 5 7 any
MethodParameters:
Name Flags
responseBuffers final
fieldName final
private static org.bson.BsonBinaryReader createBsonReader(com.mongodb.internal.connection.ResponseBuffers);
descriptor: (Lcom/mongodb/internal/connection/ResponseBuffers;)Lorg/bson/BsonBinaryReader;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: new org.bson.BsonBinaryReader
dup
new org.bson.io.ByteBufferBsonInput
dup
aload 0
invokevirtual com.mongodb.internal.connection.ResponseBuffers.getBodyByteBuffer:()Lorg/bson/ByteBuf;
invokespecial org.bson.io.ByteBufferBsonInput.<init>:(Lorg/bson/ByteBuf;)V
invokespecial org.bson.BsonBinaryReader.<init>:(Lorg/bson/io/BsonInput;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 responseBuffers Lcom/mongodb/internal/connection/ResponseBuffers;
MethodParameters:
Name Flags
responseBuffers final
private static org.bson.BsonValue getField(org.bson.BsonReader, java.lang.String);
descriptor: (Lorg/bson/BsonReader;Ljava/lang/String;)Lorg/bson/BsonValue;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokeinterface org.bson.BsonReader.readStartDocument:()V
1: goto 7
2: StackMap locals:
StackMap stack:
aload 0
invokeinterface org.bson.BsonReader.readName:()Ljava/lang/String;
aload 1
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 6
3: getstatic com.mongodb.internal.connection.ProtocolHelper.REGISTRY:Lorg/bson/codecs/configuration/CodecRegistry;
aload 0
invokeinterface org.bson.BsonReader.getCurrentBsonType:()Lorg/bson/BsonType;
invokestatic org.bson.codecs.BsonValueCodecProvider.getClassForBsonType:(Lorg/bson/BsonType;)Ljava/lang/Class;
invokeinterface org.bson.codecs.configuration.CodecRegistry.get:(Ljava/lang/Class;)Lorg/bson/codecs/Codec;
aload 0
4: invokestatic org.bson.codecs.DecoderContext.builder:()Lorg/bson/codecs/DecoderContext$Builder;
invokevirtual org.bson.codecs.DecoderContext$Builder.build:()Lorg/bson/codecs/DecoderContext;
5: invokeinterface org.bson.codecs.Codec.decode:(Lorg/bson/BsonReader;Lorg/bson/codecs/DecoderContext;)Ljava/lang/Object;
checkcast org.bson.BsonValue
areturn
6: StackMap locals:
StackMap stack:
aload 0
invokeinterface org.bson.BsonReader.skipValue:()V
7: StackMap locals:
StackMap stack:
aload 0
invokeinterface org.bson.BsonReader.readBsonType:()Lorg/bson/BsonType;
getstatic org.bson.BsonType.END_OF_DOCUMENT:Lorg/bson/BsonType;
if_acmpne 2
8: aload 0
invokeinterface org.bson.BsonReader.readEndDocument:()V
9: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 bsonReader Lorg/bson/BsonReader;
0 10 1 fieldName Ljava/lang/String;
MethodParameters:
Name Flags
bsonReader final
fieldName final
private static boolean isCommandOk(org.bson.BsonValue);
descriptor: (Lorg/bson/BsonValue;)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ifnonnull 2
1: iconst_0
ireturn
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.bson.BsonValue.isBoolean:()Z
ifeq 4
3: aload 0
invokevirtual org.bson.BsonValue.asBoolean:()Lorg/bson/BsonBoolean;
invokevirtual org.bson.BsonBoolean.getValue:()Z
ireturn
4: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.bson.BsonValue.isNumber:()Z
ifeq 7
5: aload 0
invokevirtual org.bson.BsonValue.asNumber:()Lorg/bson/BsonNumber;
invokevirtual org.bson.BsonNumber.intValue:()I
iconst_1
if_icmpne 6
iconst_1
ireturn
StackMap locals:
StackMap stack:
6: iconst_0
ireturn
7: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 okValue Lorg/bson/BsonValue;
MethodParameters:
Name Flags
okValue final
static com.mongodb.MongoException getCommandFailureException(org.bson.BsonDocument, com.mongodb.ServerAddress);
descriptor: (Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;)Lcom/mongodb/MongoException;
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
ldc "errmsg"
invokestatic com.mongodb.internal.connection.ProtocolHelper.createSpecialException:(Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;Ljava/lang/String;)Lcom/mongodb/MongoException;
astore 2
start local 2 1: aload 2
ifnull 3
2: aload 2
areturn
3: StackMap locals: com.mongodb.MongoException
StackMap stack:
new com.mongodb.MongoCommandException
dup
aload 0
aload 1
invokespecial com.mongodb.MongoCommandException.<init>:(Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 response Lorg/bson/BsonDocument;
0 4 1 serverAddress Lcom/mongodb/ServerAddress;
1 4 2 specialException Lcom/mongodb/MongoException;
MethodParameters:
Name Flags
response final
serverAddress final
static int getErrorCode(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)I
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
ldc "code"
new org.bson.BsonInt32
dup
iconst_m1
invokespecial org.bson.BsonInt32.<init>:(I)V
invokevirtual org.bson.BsonDocument.getNumber:(Ljava/lang/Object;Lorg/bson/BsonNumber;)Lorg/bson/BsonNumber;
invokevirtual org.bson.BsonNumber.intValue:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 response Lorg/bson/BsonDocument;
MethodParameters:
Name Flags
response final
static java.lang.String getErrorMessage(org.bson.BsonDocument, java.lang.String);
descriptor: (Lorg/bson/BsonDocument;Ljava/lang/String;)Ljava/lang/String;
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
new org.bson.BsonString
dup
ldc ""
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokevirtual org.bson.BsonDocument.getString:(Ljava/lang/Object;Lorg/bson/BsonString;)Lorg/bson/BsonString;
invokevirtual org.bson.BsonString.getValue:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 response Lorg/bson/BsonDocument;
0 1 1 errorMessageFieldName Ljava/lang/String;
MethodParameters:
Name Flags
response final
errorMessageFieldName final
static com.mongodb.MongoException getQueryFailureException(org.bson.BsonDocument, com.mongodb.ServerAddress);
descriptor: (Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;)Lcom/mongodb/MongoException;
flags: (0x0008) ACC_STATIC
Code:
stack=6, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
ldc "$err"
invokestatic com.mongodb.internal.connection.ProtocolHelper.createSpecialException:(Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;Ljava/lang/String;)Lcom/mongodb/MongoException;
astore 2
start local 2 1: aload 2
ifnull 3
2: aload 2
areturn
3: StackMap locals: com.mongodb.MongoException
StackMap stack:
new com.mongodb.MongoQueryException
dup
aload 1
aload 0
invokestatic com.mongodb.internal.connection.ProtocolHelper.getErrorCode:(Lorg/bson/BsonDocument;)I
aload 0
ldc "$err"
invokestatic com.mongodb.internal.connection.ProtocolHelper.getErrorMessage:(Lorg/bson/BsonDocument;Ljava/lang/String;)Ljava/lang/String;
invokespecial com.mongodb.MongoQueryException.<init>:(Lcom/mongodb/ServerAddress;ILjava/lang/String;)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 errorDocument Lorg/bson/BsonDocument;
0 4 1 serverAddress Lcom/mongodb/ServerAddress;
1 4 2 specialException Lcom/mongodb/MongoException;
MethodParameters:
Name Flags
errorDocument final
serverAddress final
static com.mongodb.internal.connection.MessageSettings getMessageSettings(com.mongodb.connection.ConnectionDescription);
descriptor: (Lcom/mongodb/connection/ConnectionDescription;)Lcom/mongodb/internal/connection/MessageSettings;
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: invokestatic com.mongodb.internal.connection.MessageSettings.builder:()Lcom/mongodb/internal/connection/MessageSettings$Builder;
1: aload 0
invokevirtual com.mongodb.connection.ConnectionDescription.getMaxDocumentSize:()I
invokevirtual com.mongodb.internal.connection.MessageSettings$Builder.maxDocumentSize:(I)Lcom/mongodb/internal/connection/MessageSettings$Builder;
2: aload 0
invokevirtual com.mongodb.connection.ConnectionDescription.getMaxMessageSize:()I
invokevirtual com.mongodb.internal.connection.MessageSettings$Builder.maxMessageSize:(I)Lcom/mongodb/internal/connection/MessageSettings$Builder;
3: aload 0
invokevirtual com.mongodb.connection.ConnectionDescription.getMaxBatchCount:()I
invokevirtual com.mongodb.internal.connection.MessageSettings$Builder.maxBatchCount:(I)Lcom/mongodb/internal/connection/MessageSettings$Builder;
4: aload 0
invokevirtual com.mongodb.connection.ConnectionDescription.getMaxWireVersion:()I
invokevirtual com.mongodb.internal.connection.MessageSettings$Builder.maxWireVersion:(I)Lcom/mongodb/internal/connection/MessageSettings$Builder;
5: aload 0
invokevirtual com.mongodb.connection.ConnectionDescription.getServerType:()Lcom/mongodb/connection/ServerType;
invokevirtual com.mongodb.internal.connection.MessageSettings$Builder.serverType:(Lcom/mongodb/connection/ServerType;)Lcom/mongodb/internal/connection/MessageSettings$Builder;
6: invokevirtual com.mongodb.internal.connection.MessageSettings$Builder.build:()Lcom/mongodb/internal/connection/MessageSettings;
7: areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 connectionDescription Lcom/mongodb/connection/ConnectionDescription;
MethodParameters:
Name Flags
connectionDescription final
static void encodeMessage(com.mongodb.internal.connection.RequestMessage, org.bson.io.BsonOutput);
descriptor: (Lcom/mongodb/internal/connection/RequestMessage;Lorg/bson/io/BsonOutput;)V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
getstatic com.mongodb.internal.connection.NoOpSessionContext.INSTANCE:Lcom/mongodb/internal/connection/NoOpSessionContext;
invokevirtual com.mongodb.internal.connection.RequestMessage.encode:(Lorg/bson/io/BsonOutput;Lcom/mongodb/session/SessionContext;)V
1: goto 8
StackMap locals:
StackMap stack: java.lang.RuntimeException
2: astore 2
start local 2 3: aload 1
invokeinterface org.bson.io.BsonOutput.close:()V
4: aload 2
athrow
end local 2 5: StackMap locals:
StackMap stack: java.lang.Error
astore 2
start local 2 6: aload 1
invokeinterface org.bson.io.BsonOutput.close:()V
7: aload 2
athrow
end local 2 8: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 message Lcom/mongodb/internal/connection/RequestMessage;
0 9 1 bsonOutput Lorg/bson/io/BsonOutput;
3 5 2 e Ljava/lang/RuntimeException;
6 8 2 e Ljava/lang/Error;
Exception table:
from to target type
0 1 2 Class java.lang.RuntimeException
0 1 5 Class java.lang.Error
MethodParameters:
Name Flags
message final
bsonOutput final
static com.mongodb.internal.connection.RequestMessage$EncodingMetadata encodeMessageWithMetadata(com.mongodb.internal.connection.RequestMessage, org.bson.io.BsonOutput);
descriptor: (Lcom/mongodb/internal/connection/RequestMessage;Lorg/bson/io/BsonOutput;)Lcom/mongodb/internal/connection/RequestMessage$EncodingMetadata;
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
getstatic com.mongodb.internal.connection.NoOpSessionContext.INSTANCE:Lcom/mongodb/internal/connection/NoOpSessionContext;
invokevirtual com.mongodb.internal.connection.RequestMessage.encode:(Lorg/bson/io/BsonOutput;Lcom/mongodb/session/SessionContext;)V
1: aload 0
invokevirtual com.mongodb.internal.connection.RequestMessage.getEncodingMetadata:()Lcom/mongodb/internal/connection/RequestMessage$EncodingMetadata;
2: areturn
3: StackMap locals:
StackMap stack: java.lang.RuntimeException
astore 2
start local 2 4: aload 1
invokeinterface org.bson.io.BsonOutput.close:()V
5: aload 2
athrow
end local 2 6: StackMap locals:
StackMap stack: java.lang.Error
astore 2
start local 2 7: aload 1
invokeinterface org.bson.io.BsonOutput.close:()V
8: aload 2
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 message Lcom/mongodb/internal/connection/RequestMessage;
0 9 1 bsonOutput Lorg/bson/io/BsonOutput;
4 6 2 e Ljava/lang/RuntimeException;
7 9 2 e Ljava/lang/Error;
Exception table:
from to target type
0 2 3 Class java.lang.RuntimeException
0 2 6 Class java.lang.Error
MethodParameters:
Name Flags
message final
bsonOutput final
public static com.mongodb.MongoException createSpecialException(org.bson.BsonDocument, com.mongodb.ServerAddress, java.lang.String);
descriptor: (Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;Ljava/lang/String;)Lcom/mongodb/MongoException;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
ifnonnull 2
1: aconst_null
areturn
2: StackMap locals:
StackMap stack:
aload 0
invokestatic com.mongodb.internal.connection.ProtocolHelper.getErrorCode:(Lorg/bson/BsonDocument;)I
istore 3
start local 3 3: aload 0
aload 2
invokestatic com.mongodb.internal.connection.ProtocolHelper.getErrorMessage:(Lorg/bson/BsonDocument;Ljava/lang/String;)Ljava/lang/String;
astore 4
start local 4 4: iload 3
invokestatic com.mongodb.ErrorCategory.fromErrorCode:(I)Lcom/mongodb/ErrorCategory;
getstatic com.mongodb.ErrorCategory.EXECUTION_TIMEOUT:Lcom/mongodb/ErrorCategory;
if_acmpne 6
5: new com.mongodb.MongoExecutionTimeoutException
dup
iload 3
aload 4
invokespecial com.mongodb.MongoExecutionTimeoutException.<init>:(ILjava/lang/String;)V
areturn
6: StackMap locals: int java.lang.String
StackMap stack:
aload 4
ldc "not master or secondary"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifne 8
aload 4
ldc "node is recovering"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifne 8
7: getstatic com.mongodb.internal.connection.ProtocolHelper.RECOVERING_CODES:Ljava/util/List;
iload 3
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokeinterface java.util.List.contains:(Ljava/lang/Object;)Z
ifeq 9
8: StackMap locals:
StackMap stack:
new com.mongodb.MongoNodeIsRecoveringException
dup
aload 0
aload 1
invokespecial com.mongodb.MongoNodeIsRecoveringException.<init>:(Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;)V
areturn
9: StackMap locals:
StackMap stack:
aload 4
ldc "not master"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifne 10
getstatic com.mongodb.internal.connection.ProtocolHelper.NOT_MASTER_CODES:Ljava/util/List;
iload 3
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokeinterface java.util.List.contains:(Ljava/lang/Object;)Z
ifeq 11
10: StackMap locals:
StackMap stack:
new com.mongodb.MongoNotPrimaryException
dup
aload 0
aload 1
invokespecial com.mongodb.MongoNotPrimaryException.<init>:(Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;)V
areturn
11: StackMap locals:
StackMap stack:
aload 0
ldc "writeConcernError"
invokevirtual org.bson.BsonDocument.containsKey:(Ljava/lang/Object;)Z
ifeq 13
12: aload 0
ldc "writeConcernError"
invokevirtual org.bson.BsonDocument.getDocument:(Ljava/lang/Object;)Lorg/bson/BsonDocument;
aload 1
ldc "errmsg"
invokestatic com.mongodb.internal.connection.ProtocolHelper.createSpecialException:(Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;Ljava/lang/String;)Lcom/mongodb/MongoException;
areturn
13: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 response Lorg/bson/BsonDocument;
0 14 1 serverAddress Lcom/mongodb/ServerAddress;
0 14 2 errorMessageFieldName Ljava/lang/String;
3 14 3 errorCode I
4 14 4 errorMessage Ljava/lang/String;
MethodParameters:
Name Flags
response final
serverAddress final
errorMessageFieldName final
private static boolean hasWriteError(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=1, locals=2, args_size=1
start local 0 0: aload 0
invokestatic com.mongodb.WriteConcernException.extractErrorMessage:(Lorg/bson/BsonDocument;)Ljava/lang/String;
astore 1
start local 1 1: aload 1
ifnull 2
aload 1
invokevirtual java.lang.String.length:()I
ifle 2
iconst_1
ireturn
StackMap locals: java.lang.String
StackMap stack:
2: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 response Lorg/bson/BsonDocument;
1 3 1 err Ljava/lang/String;
MethodParameters:
Name Flags
response final
private static void throwWriteException(org.bson.BsonDocument, com.mongodb.ServerAddress);
descriptor: (Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 0
aload 1
ldc "err"
invokestatic com.mongodb.internal.connection.ProtocolHelper.createSpecialException:(Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;Ljava/lang/String;)Lcom/mongodb/MongoException;
astore 2
start local 2 1: aload 2
ifnull 3
2: aload 2
athrow
3: StackMap locals: com.mongodb.MongoException
StackMap stack:
aload 0
invokestatic com.mongodb.WriteConcernException.extractErrorCode:(Lorg/bson/BsonDocument;)I
istore 3
start local 3 4: iload 3
invokestatic com.mongodb.ErrorCategory.fromErrorCode:(I)Lcom/mongodb/ErrorCategory;
getstatic com.mongodb.ErrorCategory.DUPLICATE_KEY:Lcom/mongodb/ErrorCategory;
if_acmpne 6
5: new com.mongodb.DuplicateKeyException
dup
aload 0
aload 1
aload 0
invokestatic com.mongodb.internal.connection.ProtocolHelper.createWriteResult:(Lorg/bson/BsonDocument;)Lcom/mongodb/WriteConcernResult;
invokespecial com.mongodb.DuplicateKeyException.<init>:(Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;Lcom/mongodb/WriteConcernResult;)V
athrow
6: StackMap locals: int
StackMap stack:
new com.mongodb.WriteConcernException
dup
aload 0
aload 1
aload 0
invokestatic com.mongodb.internal.connection.ProtocolHelper.createWriteResult:(Lorg/bson/BsonDocument;)Lcom/mongodb/WriteConcernResult;
invokespecial com.mongodb.WriteConcernException.<init>:(Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;Lcom/mongodb/WriteConcernResult;)V
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 result Lorg/bson/BsonDocument;
0 7 1 serverAddress Lcom/mongodb/ServerAddress;
1 7 2 specialException Lcom/mongodb/MongoException;
4 7 3 code I
MethodParameters:
Name Flags
result final
serverAddress final
static void sendCommandStartedEvent(com.mongodb.internal.connection.RequestMessage, java.lang.String, java.lang.String, org.bson.BsonDocument, com.mongodb.connection.ConnectionDescription, com.mongodb.event.CommandListener);
descriptor: (Lcom/mongodb/internal/connection/RequestMessage;Ljava/lang/String;Ljava/lang/String;Lorg/bson/BsonDocument;Lcom/mongodb/connection/ConnectionDescription;Lcom/mongodb/event/CommandListener;)V
flags: (0x0008) ACC_STATIC
Code:
stack=8, locals=7, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 5
new com.mongodb.event.CommandStartedEvent
dup
aload 0
invokevirtual com.mongodb.internal.connection.RequestMessage.getId:()I
aload 4
1: aload 1
aload 2
aload 3
invokespecial com.mongodb.event.CommandStartedEvent.<init>:(ILcom/mongodb/connection/ConnectionDescription;Ljava/lang/String;Ljava/lang/String;Lorg/bson/BsonDocument;)V
2: invokeinterface com.mongodb.event.CommandListener.commandStarted:(Lcom/mongodb/event/CommandStartedEvent;)V
3: goto 7
StackMap locals:
StackMap stack: java.lang.Exception
4: astore 6
start local 6 5: getstatic com.mongodb.internal.connection.ProtocolHelper.PROTOCOL_EVENT_LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isWarnEnabled:()Z
ifeq 7
6: getstatic com.mongodb.internal.connection.ProtocolHelper.PROTOCOL_EVENT_LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Exception thrown raising command started event to listener %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 5
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 6
invokeinterface com.mongodb.diagnostics.logging.Logger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 6 7: StackMap locals:
StackMap stack:
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 8 0 message Lcom/mongodb/internal/connection/RequestMessage;
0 8 1 databaseName Ljava/lang/String;
0 8 2 commandName Ljava/lang/String;
0 8 3 command Lorg/bson/BsonDocument;
0 8 4 connectionDescription Lcom/mongodb/connection/ConnectionDescription;
0 8 5 commandListener Lcom/mongodb/event/CommandListener;
5 7 6 e Ljava/lang/Exception;
Exception table:
from to target type
0 3 4 Class java.lang.Exception
MethodParameters:
Name Flags
message final
databaseName final
commandName final
command final
connectionDescription final
commandListener final
static void sendCommandSucceededEvent(com.mongodb.internal.connection.RequestMessage, java.lang.String, org.bson.BsonDocument, com.mongodb.connection.ConnectionDescription, long, com.mongodb.event.CommandListener);
descriptor: (Lcom/mongodb/internal/connection/RequestMessage;Ljava/lang/String;Lorg/bson/BsonDocument;Lcom/mongodb/connection/ConnectionDescription;JLcom/mongodb/event/CommandListener;)V
flags: (0x0008) ACC_STATIC
Code:
stack=9, locals=8, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 6 0: aload 6
new com.mongodb.event.CommandSucceededEvent
dup
aload 0
invokevirtual com.mongodb.internal.connection.RequestMessage.getId:()I
aload 3
aload 1
aload 2
1: lload 4
invokespecial com.mongodb.event.CommandSucceededEvent.<init>:(ILcom/mongodb/connection/ConnectionDescription;Ljava/lang/String;Lorg/bson/BsonDocument;J)V
2: invokeinterface com.mongodb.event.CommandListener.commandSucceeded:(Lcom/mongodb/event/CommandSucceededEvent;)V
3: goto 7
StackMap locals:
StackMap stack: java.lang.Exception
4: astore 7
start local 7 5: getstatic com.mongodb.internal.connection.ProtocolHelper.PROTOCOL_EVENT_LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isWarnEnabled:()Z
ifeq 7
6: getstatic com.mongodb.internal.connection.ProtocolHelper.PROTOCOL_EVENT_LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Exception thrown raising command succeeded event to listener %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 6
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 7
invokeinterface com.mongodb.diagnostics.logging.Logger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 7 7: StackMap locals:
StackMap stack:
return
end local 6 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 message Lcom/mongodb/internal/connection/RequestMessage;
0 8 1 commandName Ljava/lang/String;
0 8 2 response Lorg/bson/BsonDocument;
0 8 3 connectionDescription Lcom/mongodb/connection/ConnectionDescription;
0 8 4 elapsedTimeNanos J
0 8 6 commandListener Lcom/mongodb/event/CommandListener;
5 7 7 e Ljava/lang/Exception;
Exception table:
from to target type
0 3 4 Class java.lang.Exception
MethodParameters:
Name Flags
message final
commandName final
response final
connectionDescription final
elapsedTimeNanos final
commandListener final
static void sendCommandFailedEvent(com.mongodb.internal.connection.RequestMessage, java.lang.String, com.mongodb.connection.ConnectionDescription, long, java.lang.Throwable, com.mongodb.event.CommandListener);
descriptor: (Lcom/mongodb/internal/connection/RequestMessage;Ljava/lang/String;Lcom/mongodb/connection/ConnectionDescription;JLjava/lang/Throwable;Lcom/mongodb/event/CommandListener;)V
flags: (0x0008) ACC_STATIC
Code:
stack=9, locals=8, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 5 start local 6 0: aload 6
new com.mongodb.event.CommandFailedEvent
dup
aload 0
invokevirtual com.mongodb.internal.connection.RequestMessage.getId:()I
aload 2
aload 1
lload 3
1: aload 5
invokespecial com.mongodb.event.CommandFailedEvent.<init>:(ILcom/mongodb/connection/ConnectionDescription;Ljava/lang/String;JLjava/lang/Throwable;)V
2: invokeinterface com.mongodb.event.CommandListener.commandFailed:(Lcom/mongodb/event/CommandFailedEvent;)V
3: goto 7
StackMap locals:
StackMap stack: java.lang.Exception
4: astore 7
start local 7 5: getstatic com.mongodb.internal.connection.ProtocolHelper.PROTOCOL_EVENT_LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isWarnEnabled:()Z
ifeq 7
6: getstatic com.mongodb.internal.connection.ProtocolHelper.PROTOCOL_EVENT_LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Exception thrown raising command failed event to listener %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 6
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 7
invokeinterface com.mongodb.diagnostics.logging.Logger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 7 7: StackMap locals:
StackMap stack:
return
end local 6 end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 message Lcom/mongodb/internal/connection/RequestMessage;
0 8 1 commandName Ljava/lang/String;
0 8 2 connectionDescription Lcom/mongodb/connection/ConnectionDescription;
0 8 3 elapsedTimeNanos J
0 8 5 throwable Ljava/lang/Throwable;
0 8 6 commandListener Lcom/mongodb/event/CommandListener;
5 7 7 e Ljava/lang/Exception;
Exception table:
from to target type
0 3 4 Class java.lang.Exception
MethodParameters:
Name Flags
message final
commandName final
connectionDescription final
elapsedTimeNanos final
throwable final
commandListener final
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/internal/connection/ProtocolHelper;
}
SourceFile: "ProtocolHelper.java"
InnerClasses:
public final Builder = com.mongodb.internal.connection.MessageSettings$Builder of com.mongodb.internal.connection.MessageSettings
EncodingMetadata = com.mongodb.internal.connection.RequestMessage$EncodingMetadata of com.mongodb.internal.connection.RequestMessage
public final Builder = org.bson.codecs.DecoderContext$Builder of org.bson.codecs.DecoderContext