public class com.mongodb.client.internal.ClientSessionBinding implements com.mongodb.binding.ReadWriteBinding
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.mongodb.client.internal.ClientSessionBinding
super_class: java.lang.Object
{
private final com.mongodb.internal.binding.ClusterAwareReadWriteBinding wrapped;
descriptor: Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.client.ClientSession session;
descriptor: Lcom/mongodb/client/ClientSession;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean ownsSession;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.internal.session.ClientSessionContext sessionContext;
descriptor: Lcom/mongodb/internal/session/ClientSessionContext;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>(com.mongodb.client.ClientSession, boolean, com.mongodb.internal.binding.ClusterAwareReadWriteBinding);
descriptor: (Lcom/mongodb/client/ClientSession;ZLcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 3
putfield com.mongodb.client.internal.ClientSessionBinding.wrapped:Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
2: aload 0
ldc "session"
aload 1
invokestatic org.bson.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.client.ClientSession
putfield com.mongodb.client.internal.ClientSessionBinding.session:Lcom/mongodb/client/ClientSession;
3: aload 0
iload 2
putfield com.mongodb.client.internal.ClientSessionBinding.ownsSession:Z
4: aload 0
new com.mongodb.client.internal.ClientSessionBinding$SyncClientSessionContext
dup
aload 0
aload 1
invokespecial com.mongodb.client.internal.ClientSessionBinding$SyncClientSessionContext.<init>:(Lcom/mongodb/client/internal/ClientSessionBinding;Lcom/mongodb/client/ClientSession;)V
putfield com.mongodb.client.internal.ClientSessionBinding.sessionContext:Lcom/mongodb/internal/session/ClientSessionContext;
5: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/client/internal/ClientSessionBinding;
0 6 1 session Lcom/mongodb/client/ClientSession;
0 6 2 ownsSession Z
0 6 3 wrapped Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
MethodParameters:
Name Flags
session final
ownsSession final
wrapped final
public com.mongodb.ReadPreference getReadPreference();
descriptor: ()Lcom/mongodb/ReadPreference;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.wrapped:Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
invokeinterface com.mongodb.internal.binding.ClusterAwareReadWriteBinding.getReadPreference:()Lcom/mongodb/ReadPreference;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/client/internal/ClientSessionBinding;
public int getCount();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.wrapped:Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
invokeinterface com.mongodb.internal.binding.ClusterAwareReadWriteBinding.getCount:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/client/internal/ClientSessionBinding;
public com.mongodb.binding.ReadWriteBinding retain();
descriptor: ()Lcom/mongodb/binding/ReadWriteBinding;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.wrapped:Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
invokeinterface com.mongodb.internal.binding.ClusterAwareReadWriteBinding.retain:()Lcom/mongodb/binding/ReadWriteBinding;
pop
1: aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/client/internal/ClientSessionBinding;
public void release();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.wrapped:Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
invokeinterface com.mongodb.internal.binding.ClusterAwareReadWriteBinding.release:()V
1: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionBinding.closeSessionIfCountIsZero:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/client/internal/ClientSessionBinding;
private void closeSessionIfCountIsZero();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionBinding.getCount:()I
ifne 2
aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.ownsSession:Z
ifeq 2
1: aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.session:Lcom/mongodb/client/ClientSession;
invokeinterface com.mongodb.client.ClientSession.close:()V
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/client/internal/ClientSessionBinding;
public com.mongodb.binding.ConnectionSource getReadConnectionSource();
descriptor: ()Lcom/mongodb/binding/ConnectionSource;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionBinding.isActiveShardedTxn:()Z
ifeq 2
1: new com.mongodb.client.internal.ClientSessionBinding$SessionBindingConnectionSource
dup
aload 0
aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.wrapped:Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
aload 0
invokevirtual com.mongodb.client.internal.ClientSessionBinding.pinServer:()Lcom/mongodb/ServerAddress;
invokeinterface com.mongodb.internal.binding.ClusterAwareReadWriteBinding.getConnectionSource:(Lcom/mongodb/ServerAddress;)Lcom/mongodb/binding/ConnectionSource;
invokespecial com.mongodb.client.internal.ClientSessionBinding$SessionBindingConnectionSource.<init>:(Lcom/mongodb/client/internal/ClientSessionBinding;Lcom/mongodb/binding/ConnectionSource;)V
areturn
2: StackMap locals:
StackMap stack:
new com.mongodb.client.internal.ClientSessionBinding$SessionBindingConnectionSource
dup
aload 0
aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.wrapped:Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
invokeinterface com.mongodb.internal.binding.ClusterAwareReadWriteBinding.getReadConnectionSource:()Lcom/mongodb/binding/ConnectionSource;
invokespecial com.mongodb.client.internal.ClientSessionBinding$SessionBindingConnectionSource.<init>:(Lcom/mongodb/client/internal/ClientSessionBinding;Lcom/mongodb/binding/ConnectionSource;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/client/internal/ClientSessionBinding;
public com.mongodb.binding.ConnectionSource getWriteConnectionSource();
descriptor: ()Lcom/mongodb/binding/ConnectionSource;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionBinding.isActiveShardedTxn:()Z
ifeq 2
1: new com.mongodb.client.internal.ClientSessionBinding$SessionBindingConnectionSource
dup
aload 0
aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.wrapped:Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
aload 0
invokevirtual com.mongodb.client.internal.ClientSessionBinding.pinServer:()Lcom/mongodb/ServerAddress;
invokeinterface com.mongodb.internal.binding.ClusterAwareReadWriteBinding.getConnectionSource:(Lcom/mongodb/ServerAddress;)Lcom/mongodb/binding/ConnectionSource;
invokespecial com.mongodb.client.internal.ClientSessionBinding$SessionBindingConnectionSource.<init>:(Lcom/mongodb/client/internal/ClientSessionBinding;Lcom/mongodb/binding/ConnectionSource;)V
areturn
2: StackMap locals:
StackMap stack:
new com.mongodb.client.internal.ClientSessionBinding$SessionBindingConnectionSource
dup
aload 0
aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.wrapped:Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
invokeinterface com.mongodb.internal.binding.ClusterAwareReadWriteBinding.getWriteConnectionSource:()Lcom/mongodb/binding/ConnectionSource;
invokespecial com.mongodb.client.internal.ClientSessionBinding$SessionBindingConnectionSource.<init>:(Lcom/mongodb/client/internal/ClientSessionBinding;Lcom/mongodb/binding/ConnectionSource;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/client/internal/ClientSessionBinding;
public com.mongodb.session.SessionContext getSessionContext();
descriptor: ()Lcom/mongodb/session/SessionContext;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.sessionContext:Lcom/mongodb/internal/session/ClientSessionContext;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/client/internal/ClientSessionBinding;
private boolean isActiveShardedTxn();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.session:Lcom/mongodb/client/ClientSession;
invokeinterface com.mongodb.client.ClientSession.hasActiveTransaction:()Z
ifeq 1
aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.wrapped:Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
invokeinterface com.mongodb.internal.binding.ClusterAwareReadWriteBinding.getCluster:()Lcom/mongodb/connection/Cluster;
invokeinterface com.mongodb.connection.Cluster.getDescription:()Lcom/mongodb/connection/ClusterDescription;
invokevirtual com.mongodb.connection.ClusterDescription.getType:()Lcom/mongodb/connection/ClusterType;
getstatic com.mongodb.connection.ClusterType.SHARDED:Lcom/mongodb/connection/ClusterType;
if_acmpne 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/client/internal/ClientSessionBinding;
private com.mongodb.ServerAddress pinServer();
descriptor: ()Lcom/mongodb/ServerAddress;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.session:Lcom/mongodb/client/ClientSession;
invokeinterface com.mongodb.client.ClientSession.getPinnedServerAddress:()Lcom/mongodb/ServerAddress;
astore 1
start local 1 1: aload 1
ifnonnull 5
2: aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.wrapped:Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
invokeinterface com.mongodb.internal.binding.ClusterAwareReadWriteBinding.getCluster:()Lcom/mongodb/connection/Cluster;
new com.mongodb.selector.ReadPreferenceServerSelector
dup
aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.wrapped:Lcom/mongodb/internal/binding/ClusterAwareReadWriteBinding;
invokeinterface com.mongodb.internal.binding.ClusterAwareReadWriteBinding.getReadPreference:()Lcom/mongodb/ReadPreference;
invokespecial com.mongodb.selector.ReadPreferenceServerSelector.<init>:(Lcom/mongodb/ReadPreference;)V
invokeinterface com.mongodb.connection.Cluster.selectServer:(Lcom/mongodb/selector/ServerSelector;)Lcom/mongodb/connection/Server;
astore 2
start local 2 3: aload 2
invokeinterface com.mongodb.connection.Server.getDescription:()Lcom/mongodb/connection/ServerDescription;
invokevirtual com.mongodb.connection.ServerDescription.getAddress:()Lcom/mongodb/ServerAddress;
astore 1
4: aload 0
getfield com.mongodb.client.internal.ClientSessionBinding.session:Lcom/mongodb/client/ClientSession;
aload 1
invokeinterface com.mongodb.client.ClientSession.setPinnedServerAddress:(Lcom/mongodb/ServerAddress;)V
end local 2 5: StackMap locals: com.mongodb.ServerAddress
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/client/internal/ClientSessionBinding;
1 6 1 pinnedServerAddress Lcom/mongodb/ServerAddress;
3 5 2 server Lcom/mongodb/connection/Server;
public com.mongodb.binding.ReferenceCounted retain();
descriptor: ()Lcom/mongodb/binding/ReferenceCounted;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionBinding.retain:()Lcom/mongodb/binding/ReadWriteBinding;
areturn
LocalVariableTable:
Start End Slot Name Signature
public com.mongodb.binding.ReadBinding retain();
descriptor: ()Lcom/mongodb/binding/ReadBinding;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionBinding.retain:()Lcom/mongodb/binding/ReadWriteBinding;
areturn
LocalVariableTable:
Start End Slot Name Signature
public com.mongodb.binding.WriteBinding retain();
descriptor: ()Lcom/mongodb/binding/WriteBinding;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokevirtual com.mongodb.client.internal.ClientSessionBinding.retain:()Lcom/mongodb/binding/ReadWriteBinding;
areturn
LocalVariableTable:
Start End Slot Name Signature
}
SourceFile: "ClientSessionBinding.java"
NestMembers:
com.mongodb.client.internal.ClientSessionBinding$SessionBindingConnectionSource com.mongodb.client.internal.ClientSessionBinding$SyncClientSessionContext
InnerClasses:
private SessionBindingConnectionSource = com.mongodb.client.internal.ClientSessionBinding$SessionBindingConnectionSource of com.mongodb.client.internal.ClientSessionBinding
private final SyncClientSessionContext = com.mongodb.client.internal.ClientSessionBinding$SyncClientSessionContext of com.mongodb.client.internal.ClientSessionBinding