public final class com.mongodb.internal.connection.SingleServerCluster extends com.mongodb.internal.connection.BaseCluster
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.mongodb.internal.connection.SingleServerCluster
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 final com.mongodb.internal.connection.ClusterableServer server;
descriptor: Lcom/mongodb/internal/connection/ClusterableServer;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
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.SingleServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
public 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: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=5, 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: ldc "one server in a direct cluster"
aload 2
invokevirtual com.mongodb.connection.ClusterSettings.getHosts:()Ljava/util/List;
invokeinterface java.util.List.size:()I
iconst_1
if_icmpne 2
iconst_1
goto 3
StackMap locals: com.mongodb.internal.connection.SingleServerCluster com.mongodb.connection.ClusterId com.mongodb.connection.ClusterSettings com.mongodb.internal.connection.ClusterableServerFactory
StackMap stack: java.lang.String
2: iconst_0
StackMap locals: com.mongodb.internal.connection.SingleServerCluster com.mongodb.connection.ClusterId com.mongodb.connection.ClusterSettings com.mongodb.internal.connection.ClusterableServerFactory
StackMap stack: java.lang.String int
3: invokestatic com.mongodb.assertions.Assertions.isTrue:(Ljava/lang/String;Z)V
4: ldc "connection mode is single"
aload 2
invokevirtual com.mongodb.connection.ClusterSettings.getMode:()Lcom/mongodb/connection/ClusterConnectionMode;
getstatic com.mongodb.connection.ClusterConnectionMode.SINGLE:Lcom/mongodb/connection/ClusterConnectionMode;
if_acmpne 5
iconst_1
goto 6
StackMap locals:
StackMap stack: java.lang.String
5: iconst_0
StackMap locals: com.mongodb.internal.connection.SingleServerCluster com.mongodb.connection.ClusterId com.mongodb.connection.ClusterSettings com.mongodb.internal.connection.ClusterableServerFactory
StackMap stack: java.lang.String int
6: invokestatic com.mongodb.assertions.Assertions.isTrue:(Ljava/lang/String;Z)V
7: getstatic com.mongodb.internal.connection.SingleServerCluster.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isInfoEnabled:()Z
ifeq 9
8: getstatic com.mongodb.internal.connection.SingleServerCluster.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
9: StackMap locals:
StackMap stack:
aload 0
dup
astore 4
monitorenter
10: aload 0
aload 0
aload 2
invokevirtual com.mongodb.connection.ClusterSettings.getHosts:()Ljava/util/List;
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.mongodb.ServerAddress
new com.mongodb.internal.connection.SingleServerCluster$DefaultServerStateListener
dup
aload 0
invokespecial com.mongodb.internal.connection.SingleServerCluster$DefaultServerStateListener.<init>:(Lcom/mongodb/internal/connection/SingleServerCluster;)V
invokevirtual com.mongodb.internal.connection.SingleServerCluster.createServer:(Lcom/mongodb/ServerAddress;Lcom/mongodb/event/ServerListener;)Lcom/mongodb/internal/connection/ClusterableServer;
putfield com.mongodb.internal.connection.SingleServerCluster.server:Lcom/mongodb/internal/connection/ClusterableServer;
11: aload 0
aload 0
getfield com.mongodb.internal.connection.SingleServerCluster.server:Lcom/mongodb/internal/connection/ClusterableServer;
invokeinterface com.mongodb.internal.connection.ClusterableServer.getDescription:()Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.internal.connection.SingleServerCluster.publishDescription:(Lcom/mongodb/connection/ServerDescription;)V
12: aload 4
monitorexit
13: goto 16
StackMap locals: com.mongodb.internal.connection.SingleServerCluster com.mongodb.connection.ClusterId com.mongodb.connection.ClusterSettings com.mongodb.internal.connection.ClusterableServerFactory com.mongodb.internal.connection.SingleServerCluster
StackMap stack: java.lang.Throwable
14: aload 4
monitorexit
15: athrow
16: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lcom/mongodb/internal/connection/SingleServerCluster;
0 17 1 clusterId Lcom/mongodb/connection/ClusterId;
0 17 2 settings Lcom/mongodb/connection/ClusterSettings;
0 17 3 serverFactory Lcom/mongodb/internal/connection/ClusterableServerFactory;
Exception table:
from to target type
10 13 14 any
14 15 14 any
MethodParameters:
Name Flags
clusterId final
settings final
serverFactory final
protected void connect();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.SingleServerCluster.server:Lcom/mongodb/internal/connection/ClusterableServer;
invokeinterface com.mongodb.internal.connection.ClusterableServer.connect:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/internal/connection/SingleServerCluster;
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=2, args_size=2
start local 0 start local 1 0: ldc "open"
aload 0
invokevirtual com.mongodb.internal.connection.SingleServerCluster.isClosed:()Z
ifeq 1
iconst_0
goto 2
StackMap locals:
StackMap stack: java.lang.String
1: iconst_1
StackMap locals: com.mongodb.internal.connection.SingleServerCluster 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.SingleServerCluster.server:Lcom/mongodb/internal/connection/ClusterableServer;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/internal/connection/SingleServerCluster;
0 4 1 serverAddress Lcom/mongodb/ServerAddress;
MethodParameters:
Name Flags
serverAddress final
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.internal.connection.SingleServerCluster.isClosed:()Z
ifne 3
1: aload 0
getfield com.mongodb.internal.connection.SingleServerCluster.server:Lcom/mongodb/internal/connection/ClusterableServer;
invokeinterface com.mongodb.internal.connection.ClusterableServer.close:()V
2: aload 0
invokespecial com.mongodb.internal.connection.BaseCluster.close:()V
3: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/internal/connection/SingleServerCluster;
private void publishDescription(com.mongodb.connection.ServerDescription);
descriptor: (Lcom/mongodb/connection/ServerDescription;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=5, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual com.mongodb.internal.connection.SingleServerCluster.getSettings:()Lcom/mongodb/connection/ClusterSettings;
invokevirtual com.mongodb.connection.ClusterSettings.getRequiredClusterType:()Lcom/mongodb/connection/ClusterType;
astore 2
start local 2 1: aload 2
getstatic com.mongodb.connection.ClusterType.UNKNOWN:Lcom/mongodb/connection/ClusterType;
if_acmpne 3
aload 1
ifnull 3
2: aload 1
invokevirtual com.mongodb.connection.ServerDescription.getClusterType:()Lcom/mongodb/connection/ClusterType;
astore 2
3: StackMap locals: com.mongodb.connection.ClusterType
StackMap stack:
aload 0
invokevirtual com.mongodb.internal.connection.SingleServerCluster.getCurrentDescription:()Lcom/mongodb/connection/ClusterDescription;
astore 3
start local 3 4: new com.mongodb.connection.ClusterDescription
dup
getstatic com.mongodb.connection.ClusterConnectionMode.SINGLE:Lcom/mongodb/connection/ClusterConnectionMode;
aload 2
5: aload 1
ifnonnull 6
invokestatic java.util.Collections.emptyList:()Ljava/util/List;
goto 7
StackMap locals: com.mongodb.internal.connection.SingleServerCluster com.mongodb.connection.ServerDescription com.mongodb.connection.ClusterType com.mongodb.connection.ClusterDescription
StackMap stack: new 4 new 4 com.mongodb.connection.ClusterConnectionMode com.mongodb.connection.ClusterType
6: aload 1
invokestatic java.util.Collections.singletonList:(Ljava/lang/Object;)Ljava/util/List;
StackMap locals: com.mongodb.internal.connection.SingleServerCluster com.mongodb.connection.ServerDescription com.mongodb.connection.ClusterType com.mongodb.connection.ClusterDescription
StackMap stack: new 4 new 4 com.mongodb.connection.ClusterConnectionMode com.mongodb.connection.ClusterType java.util.List
7: aload 0
invokevirtual com.mongodb.internal.connection.SingleServerCluster.getSettings:()Lcom/mongodb/connection/ClusterSettings;
8: aload 0
invokevirtual com.mongodb.internal.connection.SingleServerCluster.getServerFactory:()Lcom/mongodb/internal/connection/ClusterableServerFactory;
invokeinterface com.mongodb.internal.connection.ClusterableServerFactory.getSettings:()Lcom/mongodb/connection/ServerSettings;
9: invokespecial com.mongodb.connection.ClusterDescription.<init>:(Lcom/mongodb/connection/ClusterConnectionMode;Lcom/mongodb/connection/ClusterType;Ljava/util/List;Lcom/mongodb/connection/ClusterSettings;Lcom/mongodb/connection/ServerSettings;)V
astore 4
start local 4 10: aload 0
aload 4
invokevirtual com.mongodb.internal.connection.SingleServerCluster.updateDescription:(Lcom/mongodb/connection/ClusterDescription;)V
11: aload 0
new com.mongodb.event.ClusterDescriptionChangedEvent
dup
aload 0
invokevirtual com.mongodb.internal.connection.SingleServerCluster.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.SingleServerCluster.fireChangeEvent:(Lcom/mongodb/event/ClusterDescriptionChangedEvent;)V
12: return
end local 4 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/SingleServerCluster;
0 13 1 serverDescription Lcom/mongodb/connection/ServerDescription;
1 13 2 clusterType Lcom/mongodb/connection/ClusterType;
4 13 3 currentDescription Lcom/mongodb/connection/ClusterDescription;
10 13 4 description Lcom/mongodb/connection/ClusterDescription;
MethodParameters:
Name Flags
serverDescription 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
}
SourceFile: "SingleServerCluster.java"
NestMembers:
com.mongodb.internal.connection.SingleServerCluster$DefaultServerStateListener
InnerClasses:
private DefaultServerStateListener = com.mongodb.internal.connection.SingleServerCluster$DefaultServerStateListener of com.mongodb.internal.connection.SingleServerCluster