public abstract class com.mongodb.internal.connection.AbstractMultiServerCluster extends com.mongodb.internal.connection.BaseCluster
minor version: 0
major version: 59
flags: flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
this_class: com.mongodb.internal.connection.AbstractMultiServerCluster
super_class: com.mongodb.internal.connection.BaseCluster
{
private static final com.mongodb.diagnostics.logging.Logger LOGGER;
descriptor: Lcom/mongodb/diagnostics/logging/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private com.mongodb.connection.ClusterType clusterType;
descriptor: Lcom/mongodb/connection/ClusterType;
flags: (0x0002) ACC_PRIVATE
private java.lang.String replicaSetName;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private org.bson.types.ObjectId maxElectionId;
descriptor: Lorg/bson/types/ObjectId;
flags: (0x0002) ACC_PRIVATE
private java.lang.Integer maxSetVersion;
descriptor: Ljava/lang/Integer;
flags: (0x0002) ACC_PRIVATE
private final java.util.concurrent.ConcurrentMap<com.mongodb.ServerAddress, com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple> addressToServerTupleMap;
descriptor: Ljava/util/concurrent/ConcurrentMap;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/ConcurrentMap<Lcom/mongodb/ServerAddress;Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;>;
private static volatile int[] $SWITCH_TABLE$com$mongodb$connection$ClusterType;
descriptor: [I
flags: (0x104a) ACC_PRIVATE, ACC_STATIC, ACC_VOLATILE, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc "cluster"
invokestatic com.mongodb.diagnostics.logging.Loggers.getLogger:(Ljava/lang/String;)Lcom/mongodb/diagnostics/logging/Logger;
putstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(com.mongodb.connection.ClusterId, com.mongodb.connection.ClusterSettings, com.mongodb.internal.connection.ClusterableServerFactory);
descriptor: (Lcom/mongodb/connection/ClusterId;Lcom/mongodb/connection/ClusterSettings;Lcom/mongodb/internal/connection/ClusterableServerFactory;)V
flags: (0x0000)
Code:
stack=6, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
aload 2
aload 3
invokespecial com.mongodb.internal.connection.BaseCluster.<init>:(Lcom/mongodb/connection/ClusterId;Lcom/mongodb/connection/ClusterSettings;Lcom/mongodb/internal/connection/ClusterableServerFactory;)V
1: aload 0
2: new java.util.concurrent.ConcurrentHashMap
dup
invokespecial java.util.concurrent.ConcurrentHashMap.<init>:()V
putfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
3: ldc "connection mode is multiple"
aload 2
invokevirtual com.mongodb.connection.ClusterSettings.getMode:()Lcom/mongodb/connection/ClusterConnectionMode;
getstatic com.mongodb.connection.ClusterConnectionMode.MULTIPLE:Lcom/mongodb/connection/ClusterConnectionMode;
if_acmpne 4
iconst_1
goto 5
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster com.mongodb.connection.ClusterId com.mongodb.connection.ClusterSettings com.mongodb.internal.connection.ClusterableServerFactory
StackMap stack: java.lang.String
4: iconst_0
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster com.mongodb.connection.ClusterId com.mongodb.connection.ClusterSettings com.mongodb.internal.connection.ClusterableServerFactory
StackMap stack: java.lang.String int
5: invokestatic com.mongodb.assertions.Assertions.isTrue:(Ljava/lang/String;Z)V
6: aload 0
aload 2
invokevirtual com.mongodb.connection.ClusterSettings.getRequiredClusterType:()Lcom/mongodb/connection/ClusterType;
putfield com.mongodb.internal.connection.AbstractMultiServerCluster.clusterType:Lcom/mongodb/connection/ClusterType;
7: aload 0
aload 2
invokevirtual com.mongodb.connection.ClusterSettings.getRequiredReplicaSetName:()Ljava/lang/String;
putfield com.mongodb.internal.connection.AbstractMultiServerCluster.replicaSetName:Ljava/lang/String;
8: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isInfoEnabled:()Z
ifeq 10
9: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Cluster created with settings %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 2
invokevirtual com.mongodb.connection.ClusterSettings.getShortDescription:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.info:(Ljava/lang/String;)V
10: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 11 1 clusterId Lcom/mongodb/connection/ClusterId;
0 11 2 settings Lcom/mongodb/connection/ClusterSettings;
0 11 3 serverFactory Lcom/mongodb/internal/connection/ClusterableServerFactory;
MethodParameters:
Name Flags
clusterId final
settings final
serverFactory final
com.mongodb.connection.ClusterType getClusterType();
descriptor: ()Lcom/mongodb/connection/ClusterType;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.clusterType:Lcom/mongodb/connection/ClusterType;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
com.mongodb.MongoException getSrvResolutionException();
descriptor: ()Lcom/mongodb/MongoException;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aconst_null
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
protected void initialize(java.util.Collection<com.mongodb.ServerAddress>);
descriptor: (Ljava/util/Collection;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=6, locals=7, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getCurrentDescription:()Lcom/mongodb/connection/ClusterDescription;
astore 2
start local 2 1: aload 0
dup
astore 4
monitorenter
2: aload 1
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 6
goto 5
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster java.util.Collection com.mongodb.connection.ClusterDescription top com.mongodb.internal.connection.AbstractMultiServerCluster top java.util.Iterator
StackMap stack:
3: aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.ServerAddress
astore 5
start local 5 4: aload 0
aload 5
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.addServer:(Lcom/mongodb/ServerAddress;)V
end local 5 5: StackMap locals:
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
6: aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.updateDescription:()Lcom/mongodb/connection/ClusterDescription;
astore 3
start local 3 7: aload 4
monitorexit
8: goto 11
end local 3 StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster java.util.Collection com.mongodb.connection.ClusterDescription top com.mongodb.internal.connection.AbstractMultiServerCluster
StackMap stack: java.lang.Throwable
9: aload 4
monitorexit
10: athrow
start local 3 11: StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster java.util.Collection com.mongodb.connection.ClusterDescription com.mongodb.connection.ClusterDescription
StackMap stack:
aload 0
new com.mongodb.event.ClusterDescriptionChangedEvent
dup
aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getClusterId:()Lcom/mongodb/connection/ClusterId;
aload 3
aload 2
invokespecial com.mongodb.event.ClusterDescriptionChangedEvent.<init>:(Lcom/mongodb/connection/ClusterId;Lcom/mongodb/connection/ClusterDescription;Lcom/mongodb/connection/ClusterDescription;)V
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.fireChangeEvent:(Lcom/mongodb/event/ClusterDescriptionChangedEvent;)V
12: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 13 1 serverAddresses Ljava/util/Collection<Lcom/mongodb/ServerAddress;>;
1 13 2 currentDescription Lcom/mongodb/connection/ClusterDescription;
7 9 3 newDescription Lcom/mongodb/connection/ClusterDescription;
11 13 3 newDescription Lcom/mongodb/connection/ClusterDescription;
4 5 5 serverAddress Lcom/mongodb/ServerAddress;
Exception table:
from to target type
2 8 9 any
9 10 9 any
Signature: (Ljava/util/Collection<Lcom/mongodb/ServerAddress;>;)V
MethodParameters:
Name Flags
serverAddresses final
protected void connect();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=3, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
invokeinterface java.util.concurrent.ConcurrentMap.values:()Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 2
goto 3
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster top java.util.Iterator
StackMap stack:
1: aload 2
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
astore 1
start local 1 2: aload 1
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.server:Lcom/mongodb/internal/connection/ClusterableServer;
invokeinterface com.mongodb.internal.connection.ClusterableServer.connect:()V
end local 1 3: StackMap locals:
StackMap stack:
aload 2
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
2 3 1 cur Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=4, args_size=1
start local 0 0: aload 0
dup
astore 1
monitorenter
1: aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.isClosed:()Z
ifne 6
2: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
invokeinterface java.util.concurrent.ConcurrentMap.values:()Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 3
goto 5
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster com.mongodb.internal.connection.AbstractMultiServerCluster top java.util.Iterator
StackMap stack:
3: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
astore 2
start local 2 4: aload 2
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.server:Lcom/mongodb/internal/connection/ClusterableServer;
invokeinterface com.mongodb.internal.connection.ClusterableServer.close:()V
end local 2 5: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
6: StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster com.mongodb.internal.connection.AbstractMultiServerCluster
StackMap stack:
aload 0
invokespecial com.mongodb.internal.connection.BaseCluster.close:()V
7: aload 1
monitorexit
8: goto 11
StackMap locals:
StackMap stack: java.lang.Throwable
9: aload 1
monitorexit
10: athrow
11: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
4 5 2 serverTuple Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;
Exception table:
from to target type
1 8 9 any
9 10 9 any
protected com.mongodb.internal.connection.ClusterableServer getServer(com.mongodb.ServerAddress);
descriptor: (Lcom/mongodb/ServerAddress;)Lcom/mongodb/internal/connection/ClusterableServer;
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: ldc "is open"
aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.isClosed:()Z
ifeq 1
iconst_0
goto 2
StackMap locals:
StackMap stack: java.lang.String
1: iconst_1
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster com.mongodb.ServerAddress
StackMap stack: java.lang.String int
2: invokestatic com.mongodb.assertions.Assertions.isTrue:(Ljava/lang/String;Z)V
3: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
aload 1
invokeinterface java.util.concurrent.ConcurrentMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
astore 2
start local 2 4: aload 2
ifnonnull 6
5: aconst_null
areturn
6: StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
StackMap stack:
aload 2
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.server:Lcom/mongodb/internal/connection/ClusterableServer;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 7 1 serverAddress Lcom/mongodb/ServerAddress;
4 7 2 serverTuple Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;
MethodParameters:
Name Flags
serverAddress final
void onChange(java.util.Collection<com.mongodb.ServerAddress>);
descriptor: (Ljava/util/Collection;)V
flags: (0x0000)
Code:
stack=6, locals=5, args_size=2
start local 0 start local 1 0: aload 0
dup
astore 2
monitorenter
1: aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.isClosed:()Z
ifeq 4
2: aload 2
monitorexit
3: return
4: StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster
StackMap stack:
aload 1
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 4
goto 7
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster java.util.Collection com.mongodb.internal.connection.AbstractMultiServerCluster top java.util.Iterator
StackMap stack:
5: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.ServerAddress
astore 3
start local 3 6: aload 0
aload 3
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.addServer:(Lcom/mongodb/ServerAddress;)V
end local 3 7: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 5
8: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
invokeinterface java.util.concurrent.ConcurrentMap.values:()Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 3
start local 3 9: goto 16
10: StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster java.util.Collection com.mongodb.internal.connection.AbstractMultiServerCluster java.util.Iterator
StackMap stack:
aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
astore 4
start local 4 11: aload 1
aload 4
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.description:Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
invokeinterface java.util.Collection.contains:(Ljava/lang/Object;)Z
ifne 16
12: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isInfoEnabled:()Z
ifeq 14
13: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Removing %s from client view of cluster."
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 4
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.description:Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.info:(Ljava/lang/String;)V
14: StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
StackMap stack:
aload 3
invokeinterface java.util.Iterator.remove:()V
15: aload 4
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.server:Lcom/mongodb/internal/connection/ClusterableServer;
invokeinterface com.mongodb.internal.connection.ClusterableServer.close:()V
end local 4 16: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 10
end local 3 17: aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getCurrentDescription:()Lcom/mongodb/connection/ClusterDescription;
astore 3
start local 3 18: aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.updateDescription:()Lcom/mongodb/connection/ClusterDescription;
astore 4
start local 4 19: aload 0
new com.mongodb.event.ClusterDescriptionChangedEvent
dup
aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getClusterId:()Lcom/mongodb/connection/ClusterId;
aload 4
aload 3
invokespecial com.mongodb.event.ClusterDescriptionChangedEvent.<init>:(Lcom/mongodb/connection/ClusterId;Lcom/mongodb/connection/ClusterDescription;Lcom/mongodb/connection/ClusterDescription;)V
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.fireChangeEvent:(Lcom/mongodb/event/ClusterDescriptionChangedEvent;)V
end local 4 end local 3 20: aload 2
monitorexit
21: goto 24
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster java.util.Collection com.mongodb.internal.connection.AbstractMultiServerCluster
StackMap stack: java.lang.Throwable
22: aload 2
monitorexit
23: athrow
24: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 25 1 newHosts Ljava/util/Collection<Lcom/mongodb/ServerAddress;>;
6 7 3 cur Lcom/mongodb/ServerAddress;
9 17 3 iterator Ljava/util/Iterator<Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;>;
11 16 4 cur Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;
18 20 3 oldClusterDescription Lcom/mongodb/connection/ClusterDescription;
19 20 4 newClusterDescription Lcom/mongodb/connection/ClusterDescription;
Exception table:
from to target type
1 3 22 any
4 21 22 any
22 23 22 any
Signature: (Ljava/util/Collection<Lcom/mongodb/ServerAddress;>;)V
MethodParameters:
Name Flags
newHosts final
private void onChange(com.mongodb.event.ServerDescriptionChangedEvent);
descriptor: (Lcom/mongodb/event/ServerDescriptionChangedEvent;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=8, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
start local 2 1: aconst_null
astore 3
start local 3 2: iconst_1
istore 4
start local 4 3: aload 0
dup
astore 5
monitorenter
4: aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.isClosed:()Z
ifeq 7
5: aload 5
monitorexit
6: return
7: StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster com.mongodb.event.ServerDescriptionChangedEvent com.mongodb.connection.ClusterDescription com.mongodb.connection.ClusterDescription int com.mongodb.internal.connection.AbstractMultiServerCluster
StackMap stack:
aload 1
invokevirtual com.mongodb.event.ServerDescriptionChangedEvent.getNewDescription:()Lcom/mongodb/connection/ServerDescription;
astore 6
start local 6 8: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isTraceEnabled:()Z
ifeq 12
9: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Handling description changed event for server %s with description %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
10: aload 6
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
dup
iconst_1
aload 6
aastore
11: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.trace:(Ljava/lang/String;)V
12: StackMap locals: com.mongodb.connection.ServerDescription
StackMap stack:
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
aload 6
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
invokeinterface java.util.concurrent.ConcurrentMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
astore 7
start local 7 13: aload 7
ifnonnull 20
14: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isTraceEnabled:()Z
ifeq 18
15: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Ignoring description changed event for removed server %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
16: aload 6
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
17: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.trace:(Ljava/lang/String;)V
18: StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
StackMap stack:
aload 5
monitorexit
19: return
20: StackMap locals:
StackMap stack:
aload 1
invokevirtual com.mongodb.event.ServerDescriptionChangedEvent.getNewDescription:()Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.connection.ServerDescription.isOk:()Z
ifeq 32
21: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.clusterType:Lcom/mongodb/connection/ClusterType;
getstatic com.mongodb.connection.ClusterType.UNKNOWN:Lcom/mongodb/connection/ClusterType;
if_acmpne 25
aload 6
invokevirtual com.mongodb.connection.ServerDescription.getType:()Lcom/mongodb/connection/ServerType;
getstatic com.mongodb.connection.ServerType.REPLICA_SET_GHOST:Lcom/mongodb/connection/ServerType;
if_acmpeq 25
22: aload 0
aload 6
invokevirtual com.mongodb.connection.ServerDescription.getClusterType:()Lcom/mongodb/connection/ClusterType;
putfield com.mongodb.internal.connection.AbstractMultiServerCluster.clusterType:Lcom/mongodb/connection/ClusterType;
23: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isInfoEnabled:()Z
ifeq 25
24: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Discovered cluster type of %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.clusterType:Lcom/mongodb/connection/ClusterType;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.info:(Ljava/lang/String;)V
25: StackMap locals:
StackMap stack:
invokestatic com.mongodb.internal.connection.AbstractMultiServerCluster.$SWITCH_TABLE$com$mongodb$connection$ClusterType:()[I
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.clusterType:Lcom/mongodb/connection/ClusterType;
invokevirtual com.mongodb.connection.ClusterType.ordinal:()I
iaload
tableswitch { // 1 - 3
1: 30
2: 26
3: 28
default: 32
}
26: StackMap locals:
StackMap stack:
aload 0
aload 6
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.handleReplicaSetMemberChanged:(Lcom/mongodb/connection/ServerDescription;)Z
istore 4
27: goto 32
28: StackMap locals:
StackMap stack:
aload 0
aload 6
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.handleShardRouterChanged:(Lcom/mongodb/connection/ServerDescription;)Z
istore 4
29: goto 32
30: StackMap locals:
StackMap stack:
aload 0
aload 6
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.handleStandAloneChanged:(Lcom/mongodb/connection/ServerDescription;)Z
istore 4
31: goto 32
32: StackMap locals:
StackMap stack:
iload 4
ifeq 36
33: aload 7
aload 6
putfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.description:Lcom/mongodb/connection/ServerDescription;
34: aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getCurrentDescription:()Lcom/mongodb/connection/ClusterDescription;
astore 2
35: aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.updateDescription:()Lcom/mongodb/connection/ClusterDescription;
astore 3
end local 7 end local 6 36: StackMap locals:
StackMap stack:
aload 5
monitorexit
37: goto 40
StackMap locals:
StackMap stack: java.lang.Throwable
38: aload 5
monitorexit
39: athrow
40: StackMap locals:
StackMap stack:
iload 4
ifeq 42
41: aload 0
new com.mongodb.event.ClusterDescriptionChangedEvent
dup
aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getClusterId:()Lcom/mongodb/connection/ClusterId;
aload 3
aload 2
invokespecial com.mongodb.event.ClusterDescriptionChangedEvent.<init>:(Lcom/mongodb/connection/ClusterId;Lcom/mongodb/connection/ClusterDescription;Lcom/mongodb/connection/ClusterDescription;)V
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.fireChangeEvent:(Lcom/mongodb/event/ClusterDescriptionChangedEvent;)V
42: 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 43 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 43 1 event Lcom/mongodb/event/ServerDescriptionChangedEvent;
1 43 2 oldClusterDescription Lcom/mongodb/connection/ClusterDescription;
2 43 3 newClusterDescription Lcom/mongodb/connection/ClusterDescription;
3 43 4 shouldUpdateDescription Z
8 36 6 newDescription Lcom/mongodb/connection/ServerDescription;
13 36 7 serverTuple Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;
Exception table:
from to target type
4 6 38 any
7 19 38 any
20 37 38 any
38 39 38 any
MethodParameters:
Name Flags
event final
private boolean handleReplicaSetMemberChanged(com.mongodb.connection.ServerDescription);
descriptor: (Lcom/mongodb/connection/ServerDescription;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual com.mongodb.connection.ServerDescription.isReplicaSetMember:()Z
ifne 6
1: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Expecting replica set member, but found a %s. Removing %s from client view of cluster."
iconst_2
anewarray java.lang.Object
dup
iconst_0
2: aload 1
invokevirtual com.mongodb.connection.ServerDescription.getType:()Lcom/mongodb/connection/ServerType;
aastore
dup
iconst_1
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
3: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.error:(Ljava/lang/String;)V
4: aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.removeServer:(Lcom/mongodb/ServerAddress;)V
5: iconst_1
ireturn
6: StackMap locals:
StackMap stack:
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getType:()Lcom/mongodb/connection/ServerType;
getstatic com.mongodb.connection.ServerType.REPLICA_SET_GHOST:Lcom/mongodb/connection/ServerType;
if_acmpne 10
7: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isInfoEnabled:()Z
ifeq 9
8: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Server %s does not appear to be a member of an initiated replica set."
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.info:(Ljava/lang/String;)V
9: StackMap locals:
StackMap stack:
iconst_1
ireturn
10: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.replicaSetName:Ljava/lang/String;
ifnonnull 12
11: aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getSetName:()Ljava/lang/String;
putfield com.mongodb.internal.connection.AbstractMultiServerCluster.replicaSetName:Ljava/lang/String;
12: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.replicaSetName:Ljava/lang/String;
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getSetName:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 18
13: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Expecting replica set member from set '%s', but found one from set '%s'. Removing %s from client view of cluster."
iconst_3
anewarray java.lang.Object
dup
iconst_0
14: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.replicaSetName:Ljava/lang/String;
aastore
dup
iconst_1
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getSetName:()Ljava/lang/String;
aastore
dup
iconst_2
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
15: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.error:(Ljava/lang/String;)V
16: aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.removeServer:(Lcom/mongodb/ServerAddress;)V
17: iconst_1
ireturn
18: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.ensureServers:(Lcom/mongodb/connection/ServerDescription;)V
19: aload 1
invokevirtual com.mongodb.connection.ServerDescription.getCanonicalAddress:()Ljava/lang/String;
ifnull 27
20: aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
new com.mongodb.ServerAddress
dup
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getCanonicalAddress:()Ljava/lang/String;
invokespecial com.mongodb.ServerAddress.<init>:(Ljava/lang/String;)V
invokevirtual com.mongodb.ServerAddress.equals:(Ljava/lang/Object;)Z
ifne 27
21: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isInfoEnabled:()Z
ifeq 25
22: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Canonical address %s does not match server address. Removing %s from client view of cluster"
iconst_2
anewarray java.lang.Object
dup
iconst_0
23: aload 1
invokevirtual com.mongodb.connection.ServerDescription.getCanonicalAddress:()Ljava/lang/String;
aastore
dup
iconst_1
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
24: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.info:(Ljava/lang/String;)V
25: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.removeServer:(Lcom/mongodb/ServerAddress;)V
26: iconst_1
ireturn
27: StackMap locals:
StackMap stack:
aload 1
invokevirtual com.mongodb.connection.ServerDescription.isPrimary:()Z
ifeq 54
28: aload 1
invokevirtual com.mongodb.connection.ServerDescription.getSetVersion:()Ljava/lang/Integer;
ifnull 44
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getElectionId:()Lorg/bson/types/ObjectId;
ifnull 44
29: aload 0
aload 1
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.isStalePrimary:(Lcom/mongodb/connection/ServerDescription;)Z
ifeq 38
30: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isInfoEnabled:()Z
ifeq 36
31: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Invalidating potential primary %s whose (set version, election id) tuple of (%d, %s) is less than one already seen of (%d, %s)"
iconst_5
anewarray java.lang.Object
dup
iconst_0
32: aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
dup
iconst_1
33: aload 1
invokevirtual com.mongodb.connection.ServerDescription.getSetVersion:()Ljava/lang/Integer;
aastore
dup
iconst_2
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getElectionId:()Lorg/bson/types/ObjectId;
aastore
dup
iconst_3
34: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.maxSetVersion:Ljava/lang/Integer;
aastore
dup
iconst_4
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.maxElectionId:Lorg/bson/types/ObjectId;
aastore
35: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.info:(Ljava/lang/String;)V
36: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
invokeinterface java.util.concurrent.ConcurrentMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.server:Lcom/mongodb/internal/connection/ClusterableServer;
invokeinterface com.mongodb.internal.connection.ClusterableServer.invalidate:()V
37: iconst_0
ireturn
38: StackMap locals:
StackMap stack:
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getElectionId:()Lorg/bson/types/ObjectId;
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.maxElectionId:Lorg/bson/types/ObjectId;
invokevirtual org.bson.types.ObjectId.equals:(Ljava/lang/Object;)Z
ifne 44
39: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isInfoEnabled:()Z
ifeq 43
40: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Setting max election id to %s from replica set primary %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getElectionId:()Lorg/bson/types/ObjectId;
aastore
dup
iconst_1
41: aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
42: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.info:(Ljava/lang/String;)V
43: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getElectionId:()Lorg/bson/types/ObjectId;
putfield com.mongodb.internal.connection.AbstractMultiServerCluster.maxElectionId:Lorg/bson/types/ObjectId;
44: StackMap locals:
StackMap stack:
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getSetVersion:()Ljava/lang/Integer;
ifnull 51
45: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.maxSetVersion:Ljava/lang/Integer;
ifnull 46
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getSetVersion:()Ljava/lang/Integer;
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.maxSetVersion:Ljava/lang/Integer;
invokevirtual java.lang.Integer.compareTo:(Ljava/lang/Integer;)I
ifle 51
46: StackMap locals:
StackMap stack:
getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isInfoEnabled:()Z
ifeq 50
47: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Setting max set version to %d from replica set primary %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getSetVersion:()Ljava/lang/Integer;
aastore
dup
iconst_1
48: aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
49: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.info:(Ljava/lang/String;)V
50: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getSetVersion:()Ljava/lang/Integer;
putfield com.mongodb.internal.connection.AbstractMultiServerCluster.maxSetVersion:Ljava/lang/Integer;
51: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.isNotAlreadyPrimary:(Lcom/mongodb/ServerAddress;)Z
ifeq 53
52: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Discovered replica set primary %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.info:(Ljava/lang/String;)V
53: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.invalidateOldPrimaries:(Lcom/mongodb/ServerAddress;)V
54: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 55 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 55 1 newDescription Lcom/mongodb/connection/ServerDescription;
MethodParameters:
Name Flags
newDescription final
private boolean isStalePrimary(com.mongodb.connection.ServerDescription);
descriptor: (Lcom/mongodb/connection/ServerDescription;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.maxSetVersion:Ljava/lang/Integer;
ifnull 1
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.maxElectionId:Lorg/bson/types/ObjectId;
ifnonnull 2
1: StackMap locals:
StackMap stack:
iconst_0
ireturn
2: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.maxSetVersion:Ljava/lang/Integer;
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getSetVersion:()Ljava/lang/Integer;
invokevirtual java.lang.Integer.compareTo:(Ljava/lang/Integer;)I
ifgt 6
3: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.maxSetVersion:Ljava/lang/Integer;
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getSetVersion:()Ljava/lang/Integer;
invokevirtual java.lang.Integer.equals:(Ljava/lang/Object;)Z
ifeq 5
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.maxElectionId:Lorg/bson/types/ObjectId;
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getElectionId:()Lorg/bson/types/ObjectId;
invokevirtual org.bson.types.ObjectId.compareTo:(Lorg/bson/types/ObjectId;)I
4: ifgt 6
StackMap locals:
StackMap stack:
5: iconst_0
ireturn
StackMap locals:
StackMap stack:
6: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 7 1 newDescription Lcom/mongodb/connection/ServerDescription;
MethodParameters:
Name Flags
newDescription final
private boolean isNotAlreadyPrimary(com.mongodb.ServerAddress);
descriptor: (Lcom/mongodb/ServerAddress;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
aload 1
invokeinterface java.util.concurrent.ConcurrentMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
astore 2
start local 2 1: aload 2
ifnull 2
aload 2
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.description:Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.connection.ServerDescription.isPrimary:()Z
ifeq 2
iconst_0
ireturn
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
StackMap stack:
2: iconst_1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 3 1 address Lcom/mongodb/ServerAddress;
1 3 2 serverTuple Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;
MethodParameters:
Name Flags
address final
private boolean handleShardRouterChanged(com.mongodb.connection.ServerDescription);
descriptor: (Lcom/mongodb/connection/ServerDescription;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual com.mongodb.connection.ServerDescription.isShardRouter:()Z
ifne 5
1: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Expecting a %s, but found a %s. Removing %s from client view of cluster."
iconst_3
anewarray java.lang.Object
dup
iconst_0
2: getstatic com.mongodb.connection.ServerType.SHARD_ROUTER:Lcom/mongodb/connection/ServerType;
aastore
dup
iconst_1
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getType:()Lcom/mongodb/connection/ServerType;
aastore
dup
iconst_2
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
3: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.error:(Ljava/lang/String;)V
4: aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.removeServer:(Lcom/mongodb/ServerAddress;)V
5: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 6 1 newDescription Lcom/mongodb/connection/ServerDescription;
MethodParameters:
Name Flags
newDescription final
private boolean handleStandAloneChanged(com.mongodb.connection.ServerDescription);
descriptor: (Lcom/mongodb/connection/ServerDescription;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getSettings:()Lcom/mongodb/connection/ClusterSettings;
invokevirtual com.mongodb.connection.ClusterSettings.getHosts:()Ljava/util/List;
invokeinterface java.util.List.size:()I
iconst_1
if_icmple 6
1: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Expecting a single %s, but found more than one. Removing %s from client view of cluster."
iconst_2
anewarray java.lang.Object
dup
iconst_0
2: getstatic com.mongodb.connection.ServerType.STANDALONE:Lcom/mongodb/connection/ServerType;
aastore
dup
iconst_1
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
3: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.error:(Ljava/lang/String;)V
4: aload 0
getstatic com.mongodb.connection.ClusterType.UNKNOWN:Lcom/mongodb/connection/ClusterType;
putfield com.mongodb.internal.connection.AbstractMultiServerCluster.clusterType:Lcom/mongodb/connection/ClusterType;
5: aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.removeServer:(Lcom/mongodb/ServerAddress;)V
6: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 7 1 newDescription Lcom/mongodb/connection/ServerDescription;
MethodParameters:
Name Flags
newDescription final
private void addServer(com.mongodb.ServerAddress);
descriptor: (Lcom/mongodb/ServerAddress;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
aload 1
invokeinterface java.util.concurrent.ConcurrentMap.containsKey:(Ljava/lang/Object;)Z
ifne 5
1: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isInfoEnabled:()Z
ifeq 3
2: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Adding discovered server %s to client view of cluster"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.info:(Ljava/lang/String;)V
3: StackMap locals:
StackMap stack:
aload 0
aload 1
new com.mongodb.internal.connection.AbstractMultiServerCluster$DefaultServerStateListener
dup
aload 0
invokespecial com.mongodb.internal.connection.AbstractMultiServerCluster$DefaultServerStateListener.<init>:(Lcom/mongodb/internal/connection/AbstractMultiServerCluster;)V
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.createServer:(Lcom/mongodb/ServerAddress;Lcom/mongodb/event/ServerListener;)Lcom/mongodb/internal/connection/ClusterableServer;
astore 2
start local 2 4: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
aload 1
new com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
dup
aload 2
aload 0
aload 1
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getConnectingServerDescription:(Lcom/mongodb/ServerAddress;)Lcom/mongodb/connection/ServerDescription;
invokespecial com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.<init>:(Lcom/mongodb/internal/connection/ClusterableServer;Lcom/mongodb/connection/ServerDescription;)V
invokeinterface java.util.concurrent.ConcurrentMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 2 5: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 6 1 serverAddress Lcom/mongodb/ServerAddress;
4 5 2 server Lcom/mongodb/internal/connection/ClusterableServer;
MethodParameters:
Name Flags
serverAddress final
private void removeServer(com.mongodb.ServerAddress);
descriptor: (Lcom/mongodb/ServerAddress;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
aload 1
invokeinterface java.util.concurrent.ConcurrentMap.remove:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
astore 2
start local 2 1: aload 2
ifnull 3
2: aload 2
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.server:Lcom/mongodb/internal/connection/ClusterableServer;
invokeinterface com.mongodb.internal.connection.ClusterableServer.close:()V
3: StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 4 1 serverAddress Lcom/mongodb/ServerAddress;
1 4 2 removed Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;
MethodParameters:
Name Flags
serverAddress final
private void invalidateOldPrimaries(com.mongodb.ServerAddress);
descriptor: (Lcom/mongodb/ServerAddress;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
invokeinterface java.util.concurrent.ConcurrentMap.values:()Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 3
goto 6
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster com.mongodb.ServerAddress top java.util.Iterator
StackMap stack:
1: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
astore 2
start local 2 2: aload 2
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.description:Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aload 1
invokevirtual com.mongodb.ServerAddress.equals:(Ljava/lang/Object;)Z
ifne 6
aload 2
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.description:Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.connection.ServerDescription.isPrimary:()Z
ifeq 6
3: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isInfoEnabled:()Z
ifeq 5
4: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Rediscovering type of existing primary %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 2
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.description:Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.info:(Ljava/lang/String;)V
5: StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster com.mongodb.ServerAddress com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple java.util.Iterator
StackMap stack:
aload 2
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.server:Lcom/mongodb/internal/connection/ClusterableServer;
new com.mongodb.MongoNotPrimaryException
dup
new org.bson.BsonDocument
dup
invokespecial org.bson.BsonDocument.<init>:()V
aload 2
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.description:Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
invokespecial com.mongodb.MongoNotPrimaryException.<init>:(Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;)V
invokeinterface com.mongodb.internal.connection.ClusterableServer.invalidate:(Ljava/lang/Throwable;)V
end local 2 6: StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster com.mongodb.ServerAddress top java.util.Iterator
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 8 1 newPrimary Lcom/mongodb/ServerAddress;
2 6 2 serverTuple Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;
MethodParameters:
Name Flags
newPrimary final
private com.mongodb.connection.ServerDescription getConnectingServerDescription(com.mongodb.ServerAddress);
descriptor: (Lcom/mongodb/ServerAddress;)Lcom/mongodb/connection/ServerDescription;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: invokestatic com.mongodb.connection.ServerDescription.builder:()Lcom/mongodb/connection/ServerDescription$Builder;
getstatic com.mongodb.connection.ServerConnectionState.CONNECTING:Lcom/mongodb/connection/ServerConnectionState;
invokevirtual com.mongodb.connection.ServerDescription$Builder.state:(Lcom/mongodb/connection/ServerConnectionState;)Lcom/mongodb/connection/ServerDescription$Builder;
aload 1
invokevirtual com.mongodb.connection.ServerDescription$Builder.address:(Lcom/mongodb/ServerAddress;)Lcom/mongodb/connection/ServerDescription$Builder;
invokevirtual com.mongodb.connection.ServerDescription$Builder.build:()Lcom/mongodb/connection/ServerDescription;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 1 1 serverAddress Lcom/mongodb/ServerAddress;
MethodParameters:
Name Flags
serverAddress final
private com.mongodb.connection.ClusterDescription updateDescription();
descriptor: ()Lcom/mongodb/connection/ClusterDescription;
flags: (0x0002) ACC_PRIVATE
Code:
stack=8, locals=2, args_size=1
start local 0 0: new com.mongodb.connection.ClusterDescription
dup
getstatic com.mongodb.connection.ClusterConnectionMode.MULTIPLE:Lcom/mongodb/connection/ClusterConnectionMode;
aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.clusterType:Lcom/mongodb/connection/ClusterType;
aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getSrvResolutionException:()Lcom/mongodb/MongoException;
1: aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getNewServerDescriptionList:()Ljava/util/List;
aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getSettings:()Lcom/mongodb/connection/ClusterSettings;
aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getServerFactory:()Lcom/mongodb/internal/connection/ClusterableServerFactory;
invokeinterface com.mongodb.internal.connection.ClusterableServerFactory.getSettings:()Lcom/mongodb/connection/ServerSettings;
2: invokespecial com.mongodb.connection.ClusterDescription.<init>:(Lcom/mongodb/connection/ClusterConnectionMode;Lcom/mongodb/connection/ClusterType;Lcom/mongodb/MongoException;Ljava/util/List;Lcom/mongodb/connection/ClusterSettings;Lcom/mongodb/connection/ServerSettings;)V
astore 1
start local 1 3: aload 0
aload 1
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.updateDescription:(Lcom/mongodb/connection/ClusterDescription;)V
4: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
3 5 1 newDescription Lcom/mongodb/connection/ClusterDescription;
private java.util.List<com.mongodb.connection.ServerDescription> getNewServerDescriptionList();
descriptor: ()Ljava/util/List;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=4, args_size=1
start local 0 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 1
start local 1 1: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
invokeinterface java.util.concurrent.ConcurrentMap.values:()Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 3
goto 4
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster java.util.List top java.util.Iterator
StackMap stack:
2: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
astore 2
start local 2 3: aload 1
aload 2
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.description:Lcom/mongodb/connection/ServerDescription;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 2 4: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
5: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
1 6 1 serverDescriptions Ljava/util/List<Lcom/mongodb/connection/ServerDescription;>;
3 4 2 cur Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;
Signature: ()Ljava/util/List<Lcom/mongodb/connection/ServerDescription;>;
private void ensureServers(com.mongodb.connection.ServerDescription);
descriptor: (Lcom/mongodb/connection/ServerDescription;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual com.mongodb.connection.ServerDescription.isPrimary:()Z
ifne 1
aload 0
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.hasPrimary:()Z
ifne 4
1: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getHosts:()Ljava/util/Set;
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.addNewHosts:(Ljava/util/Set;)V
2: aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getPassives:()Ljava/util/Set;
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.addNewHosts:(Ljava/util/Set;)V
3: aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getArbiters:()Ljava/util/Set;
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.addNewHosts:(Ljava/util/Set;)V
4: StackMap locals:
StackMap stack:
aload 1
invokevirtual com.mongodb.connection.ServerDescription.isPrimary:()Z
ifeq 6
5: aload 0
aload 1
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.removeExtraHosts:(Lcom/mongodb/connection/ServerDescription;)V
6: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 7 1 description Lcom/mongodb/connection/ServerDescription;
MethodParameters:
Name Flags
description final
private boolean hasPrimary();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=3, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
invokeinterface java.util.concurrent.ConcurrentMap.values:()Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 2
goto 4
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster top java.util.Iterator
StackMap stack:
1: aload 2
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
astore 1
start local 1 2: aload 1
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.description:Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.connection.ServerDescription.isPrimary:()Z
ifeq 4
3: iconst_1
ireturn
end local 1 4: StackMap locals:
StackMap stack:
aload 2
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
5: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
2 4 1 serverTuple Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;
private void addNewHosts(java.util.Set<java.lang.String>);
descriptor: (Ljava/util/Set;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 3
goto 3
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster java.util.Set top java.util.Iterator
StackMap stack:
1: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 2
start local 2 2: aload 0
new com.mongodb.ServerAddress
dup
aload 2
invokespecial com.mongodb.ServerAddress.<init>:(Ljava/lang/String;)V
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.addServer:(Lcom/mongodb/ServerAddress;)V
end local 2 3: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 5 1 hosts Ljava/util/Set<Ljava/lang/String;>;
2 3 2 cur Ljava/lang/String;
Signature: (Ljava/util/Set<Ljava/lang/String;>;)V
MethodParameters:
Name Flags
hosts final
private void (com.mongodb.connection.ServerDescription);
descriptor: (Lcom/mongodb/connection/ServerDescription;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=5, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.getAllServerAddresses:(Lcom/mongodb/connection/ServerDescription;)Ljava/util/Set;
astore 2
start local 2 1: aload 0
getfield com.mongodb.internal.connection.AbstractMultiServerCluster.addressToServerTupleMap:Ljava/util/concurrent/ConcurrentMap;
invokeinterface java.util.concurrent.ConcurrentMap.values:()Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 3
start local 3 2: goto 11
3: StackMap locals: java.util.Set java.util.Iterator
StackMap stack:
aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
astore 4
start local 4 4: aload 2
aload 4
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.description:Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifne 11
5: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isInfoEnabled:()Z
ifeq 9
6: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Server %s is no longer a member of the replica set. Removing from client view of cluster."
iconst_1
anewarray java.lang.Object
dup
iconst_0
7: aload 4
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.description:Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
aastore
8: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.info:(Ljava/lang/String;)V
9: StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
StackMap stack:
aload 3
invokeinterface java.util.Iterator.remove:()V
10: aload 4
getfield com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple.server:Lcom/mongodb/internal/connection/ClusterableServer;
invokeinterface com.mongodb.internal.connection.ClusterableServer.close:()V
end local 4 11: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
end local 3 12: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 13 1 serverDescription Lcom/mongodb/connection/ServerDescription;
1 13 2 allServerAddresses Ljava/util/Set<Lcom/mongodb/ServerAddress;>;
2 12 3 iterator Ljava/util/Iterator<Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;>;
4 11 4 cur Lcom/mongodb/internal/connection/AbstractMultiServerCluster$ServerTuple;
MethodParameters:
Name Flags
serverDescription final
private java.util.Set<com.mongodb.ServerAddress> getAllServerAddresses(com.mongodb.connection.ServerDescription);
descriptor: (Lcom/mongodb/connection/ServerDescription;)Ljava/util/Set;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
astore 2
start local 2 1: aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getHosts:()Ljava/util/Set;
aload 2
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.addHostsToSet:(Ljava/util/Set;Ljava/util/Set;)V
2: aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getPassives:()Ljava/util/Set;
aload 2
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.addHostsToSet:(Ljava/util/Set;Ljava/util/Set;)V
3: aload 0
aload 1
invokevirtual com.mongodb.connection.ServerDescription.getArbiters:()Ljava/util/Set;
aload 2
invokevirtual com.mongodb.internal.connection.AbstractMultiServerCluster.addHostsToSet:(Ljava/util/Set;Ljava/util/Set;)V
4: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 5 1 serverDescription Lcom/mongodb/connection/ServerDescription;
1 5 2 retVal Ljava/util/Set<Lcom/mongodb/ServerAddress;>;
Signature: (Lcom/mongodb/connection/ServerDescription;)Ljava/util/Set<Lcom/mongodb/ServerAddress;>;
MethodParameters:
Name Flags
serverDescription final
private void addHostsToSet(java.util.Set<java.lang.String>, java.util.Set<com.mongodb.ServerAddress>);
descriptor: (Ljava/util/Set;Ljava/util/Set;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 4
goto 3
StackMap locals: com.mongodb.internal.connection.AbstractMultiServerCluster java.util.Set java.util.Set top java.util.Iterator
StackMap stack:
1: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 3
start local 3 2: aload 2
new com.mongodb.ServerAddress
dup
aload 3
invokespecial com.mongodb.ServerAddress.<init>:(Ljava/lang/String;)V
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
end local 3 3: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
4: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/internal/connection/AbstractMultiServerCluster;
0 5 1 hosts Ljava/util/Set<Ljava/lang/String;>;
0 5 2 retVal Ljava/util/Set<Lcom/mongodb/ServerAddress;>;
2 3 3 host Ljava/lang/String;
Signature: (Ljava/util/Set<Ljava/lang/String;>;Ljava/util/Set<Lcom/mongodb/ServerAddress;>;)V
MethodParameters:
Name Flags
hosts final
retVal final
public void selectServerAsync(com.mongodb.selector.ServerSelector, com.mongodb.async.SingleResultCallback);
descriptor: (Lcom/mongodb/selector/ServerSelector;Lcom/mongodb/async/SingleResultCallback;)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.BaseCluster.selectServerAsync:(Lcom/mongodb/selector/ServerSelector;Lcom/mongodb/async/SingleResultCallback;)V
return
LocalVariableTable:
Start End Slot Name Signature
public boolean isClosed();
descriptor: ()Z
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokespecial com.mongodb.internal.connection.BaseCluster.isClosed:()Z
ireturn
LocalVariableTable:
Start End Slot Name Signature
public com.mongodb.connection.Server selectServer(com.mongodb.selector.ServerSelector);
descriptor: (Lcom/mongodb/selector/ServerSelector;)Lcom/mongodb/connection/Server;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload 0
aload 1
invokespecial com.mongodb.internal.connection.BaseCluster.selectServer:(Lcom/mongodb/selector/ServerSelector;)Lcom/mongodb/connection/Server;
areturn
LocalVariableTable:
Start End Slot Name Signature
public com.mongodb.connection.ClusterSettings getSettings();
descriptor: ()Lcom/mongodb/connection/ClusterSettings;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokespecial com.mongodb.internal.connection.BaseCluster.getSettings:()Lcom/mongodb/connection/ClusterSettings;
areturn
LocalVariableTable:
Start End Slot Name Signature
public org.bson.BsonTimestamp getClusterTime();
descriptor: ()Lorg/bson/BsonTimestamp;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokespecial com.mongodb.internal.connection.BaseCluster.getClusterTime:()Lorg/bson/BsonTimestamp;
areturn
LocalVariableTable:
Start End Slot Name Signature
public com.mongodb.connection.ClusterDescription getCurrentDescription();
descriptor: ()Lcom/mongodb/connection/ClusterDescription;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokespecial com.mongodb.internal.connection.BaseCluster.getCurrentDescription:()Lcom/mongodb/connection/ClusterDescription;
areturn
LocalVariableTable:
Start End Slot Name Signature
public com.mongodb.connection.ClusterDescription getDescription();
descriptor: ()Lcom/mongodb/connection/ClusterDescription;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokespecial com.mongodb.internal.connection.BaseCluster.getDescription:()Lcom/mongodb/connection/ClusterDescription;
areturn
LocalVariableTable:
Start End Slot Name Signature
public com.mongodb.internal.connection.ClusterableServerFactory getServerFactory();
descriptor: ()Lcom/mongodb/internal/connection/ClusterableServerFactory;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokespecial com.mongodb.internal.connection.BaseCluster.getServerFactory:()Lcom/mongodb/internal/connection/ClusterableServerFactory;
areturn
LocalVariableTable:
Start End Slot Name Signature
static int[] $SWITCH_TABLE$com$mongodb$connection$ClusterType();
descriptor: ()[I
flags: (0x1008) ACC_STATIC, ACC_SYNTHETIC
Code:
stack=3, locals=1, args_size=0
0: getstatic com.mongodb.internal.connection.AbstractMultiServerCluster.$SWITCH_TABLE$com$mongodb$connection$ClusterType:[I
dup
ifnull 1
areturn
StackMap locals:
StackMap stack: int[]
1: pop
invokestatic com.mongodb.connection.ClusterType.values:()[Lcom/mongodb/connection/ClusterType;
arraylength
newarray 10
astore 0
2: aload 0
getstatic com.mongodb.connection.ClusterType.REPLICA_SET:Lcom/mongodb/connection/ClusterType;
invokevirtual com.mongodb.connection.ClusterType.ordinal:()I
iconst_2
iastore
3: goto 5
StackMap locals: int[]
StackMap stack: java.lang.NoSuchFieldError
4: pop
StackMap locals:
StackMap stack:
5: aload 0
getstatic com.mongodb.connection.ClusterType.SHARDED:Lcom/mongodb/connection/ClusterType;
invokevirtual com.mongodb.connection.ClusterType.ordinal:()I
iconst_3
iastore
6: goto 8
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
7: pop
StackMap locals:
StackMap stack:
8: aload 0
getstatic com.mongodb.connection.ClusterType.STANDALONE:Lcom/mongodb/connection/ClusterType;
invokevirtual com.mongodb.connection.ClusterType.ordinal:()I
iconst_1
iastore
9: goto 11
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
10: pop
StackMap locals:
StackMap stack:
11: aload 0
getstatic com.mongodb.connection.ClusterType.UNKNOWN:Lcom/mongodb/connection/ClusterType;
invokevirtual com.mongodb.connection.ClusterType.ordinal:()I
iconst_4
iastore
12: goto 14
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
13: pop
StackMap locals:
StackMap stack:
14: aload 0
dup
putstatic com.mongodb.internal.connection.AbstractMultiServerCluster.$SWITCH_TABLE$com$mongodb$connection$ClusterType:[I
areturn
LocalVariableTable:
Start End Slot Name Signature
Exception table:
from to target type
2 3 4 Class java.lang.NoSuchFieldError
5 6 7 Class java.lang.NoSuchFieldError
8 9 10 Class java.lang.NoSuchFieldError
11 12 13 Class java.lang.NoSuchFieldError
}
SourceFile: "AbstractMultiServerCluster.java"
NestMembers:
com.mongodb.internal.connection.AbstractMultiServerCluster$DefaultServerStateListener com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple
InnerClasses:
public Builder = com.mongodb.connection.ServerDescription$Builder of com.mongodb.connection.ServerDescription
private final DefaultServerStateListener = com.mongodb.internal.connection.AbstractMultiServerCluster$DefaultServerStateListener of com.mongodb.internal.connection.AbstractMultiServerCluster
private final ServerTuple = com.mongodb.internal.connection.AbstractMultiServerCluster$ServerTuple of com.mongodb.internal.connection.AbstractMultiServerCluster