public class com.mongodb.internal.session.ServerSessionPool
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.mongodb.internal.session.ServerSessionPool
super_class: java.lang.Object
{
private static final int END_SESSIONS_BATCH_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 10000
private final com.mongodb.internal.connection.ConcurrentPool<com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl> serverSessionPool;
descriptor: Lcom/mongodb/internal/connection/ConcurrentPool;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lcom/mongodb/internal/connection/ConcurrentPool<Lcom/mongodb/internal/session/ServerSessionPool$ServerSessionImpl;>;
private final com.mongodb.connection.Cluster cluster;
descriptor: Lcom/mongodb/connection/Cluster;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.internal.session.ServerSessionPool$Clock clock;
descriptor: Lcom/mongodb/internal/session/ServerSessionPool$Clock;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile boolean closing;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private volatile boolean closed;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private final java.util.List<org.bson.BsonDocument> closedSessionIdentifiers;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<Lorg/bson/BsonDocument;>;
public void <init>(com.mongodb.connection.Cluster);
descriptor: (Lcom/mongodb/connection/Cluster;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
new com.mongodb.internal.session.ServerSessionPool$1
dup
invokespecial com.mongodb.internal.session.ServerSessionPool$1.<init>:()V
invokespecial com.mongodb.internal.session.ServerSessionPool.<init>:(Lcom/mongodb/connection/Cluster;Lcom/mongodb/internal/session/ServerSessionPool$Clock;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/internal/session/ServerSessionPool;
0 2 1 cluster Lcom/mongodb/connection/Cluster;
MethodParameters:
Name Flags
cluster final
public void <init>(com.mongodb.connection.Cluster, com.mongodb.internal.session.ServerSessionPool$Clock);
descriptor: (Lcom/mongodb/connection/Cluster;Lcom/mongodb/internal/session/ServerSessionPool$Clock;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
2: new com.mongodb.internal.connection.ConcurrentPool
dup
ldc 2147483647
new com.mongodb.internal.session.ServerSessionPool$ServerSessionItemFactory
dup
aload 0
invokespecial com.mongodb.internal.session.ServerSessionPool$ServerSessionItemFactory.<init>:(Lcom/mongodb/internal/session/ServerSessionPool;)V
invokespecial com.mongodb.internal.connection.ConcurrentPool.<init>:(ILcom/mongodb/internal/connection/ConcurrentPool$ItemFactory;)V
putfield com.mongodb.internal.session.ServerSessionPool.serverSessionPool:Lcom/mongodb/internal/connection/ConcurrentPool;
3: aload 0
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putfield com.mongodb.internal.session.ServerSessionPool.closedSessionIdentifiers:Ljava/util/List;
4: aload 0
aload 1
putfield com.mongodb.internal.session.ServerSessionPool.cluster:Lcom/mongodb/connection/Cluster;
5: aload 0
aload 2
putfield com.mongodb.internal.session.ServerSessionPool.clock:Lcom/mongodb/internal/session/ServerSessionPool$Clock;
6: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/mongodb/internal/session/ServerSessionPool;
0 7 1 cluster Lcom/mongodb/connection/Cluster;
0 7 2 clock Lcom/mongodb/internal/session/ServerSessionPool$Clock;
MethodParameters:
Name Flags
cluster final
clock final
public com.mongodb.session.ServerSession get();
descriptor: ()Lcom/mongodb/session/ServerSession;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: ldc "server session pool is open"
aload 0
getfield com.mongodb.internal.session.ServerSessionPool.closed:Z
ifeq 1
iconst_0
goto 2
StackMap locals:
StackMap stack: java.lang.String
1: iconst_1
StackMap locals: com.mongodb.internal.session.ServerSessionPool
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.session.ServerSessionPool.serverSessionPool:Lcom/mongodb/internal/connection/ConcurrentPool;
invokevirtual com.mongodb.internal.connection.ConcurrentPool.get:()Ljava/lang/Object;
checkcast com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl
astore 1
start local 1 4: goto 7
5: StackMap locals: com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl
StackMap stack:
aload 0
getfield com.mongodb.internal.session.ServerSessionPool.serverSessionPool:Lcom/mongodb/internal/connection/ConcurrentPool;
aload 1
iconst_1
invokevirtual com.mongodb.internal.connection.ConcurrentPool.release:(Ljava/lang/Object;Z)V
6: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.serverSessionPool:Lcom/mongodb/internal/connection/ConcurrentPool;
invokevirtual com.mongodb.internal.connection.ConcurrentPool.get:()Ljava/lang/Object;
checkcast com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl
astore 1
7: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual com.mongodb.internal.session.ServerSessionPool.shouldPrune:(Lcom/mongodb/internal/session/ServerSessionPool$ServerSessionImpl;)Z
ifne 5
8: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lcom/mongodb/internal/session/ServerSessionPool;
4 9 1 serverSession Lcom/mongodb/internal/session/ServerSessionPool$ServerSessionImpl;
public void release(com.mongodb.session.ServerSession);
descriptor: (Lcom/mongodb/session/ServerSession;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.serverSessionPool:Lcom/mongodb/internal/connection/ConcurrentPool;
aload 1
checkcast com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl
invokevirtual com.mongodb.internal.connection.ConcurrentPool.release:(Ljava/lang/Object;)V
1: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.serverSessionPool:Lcom/mongodb/internal/connection/ConcurrentPool;
invokevirtual com.mongodb.internal.connection.ConcurrentPool.prune:()V
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/session/ServerSessionPool;
0 3 1 serverSession Lcom/mongodb/session/ServerSession;
MethodParameters:
Name Flags
serverSession final
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: aload 0
iconst_1
putfield com.mongodb.internal.session.ServerSessionPool.closing:Z
1: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.serverSessionPool:Lcom/mongodb/internal/connection/ConcurrentPool;
invokevirtual com.mongodb.internal.connection.ConcurrentPool.close:()V
2: aload 0
dup
astore 2
monitorenter
3: new java.util.ArrayList
dup
aload 0
getfield com.mongodb.internal.session.ServerSessionPool.closedSessionIdentifiers:Ljava/util/List;
invokespecial java.util.ArrayList.<init>:(Ljava/util/Collection;)V
astore 1
start local 1 4: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.closedSessionIdentifiers:Ljava/util/List;
invokeinterface java.util.List.clear:()V
5: aload 2
monitorexit
6: goto 9
end local 1 StackMap locals: com.mongodb.internal.session.ServerSessionPool top com.mongodb.internal.session.ServerSessionPool
StackMap stack: java.lang.Throwable
7: aload 2
monitorexit
8: athrow
start local 1 9: StackMap locals: com.mongodb.internal.session.ServerSessionPool java.util.List
StackMap stack:
aload 0
aload 1
invokevirtual com.mongodb.internal.session.ServerSessionPool.endClosedSessions:(Ljava/util/List;)V
end local 1 10: goto 14
StackMap locals: com.mongodb.internal.session.ServerSessionPool
StackMap stack: java.lang.Throwable
11: astore 3
12: aload 0
iconst_1
putfield com.mongodb.internal.session.ServerSessionPool.closed:Z
13: aload 3
athrow
14: StackMap locals:
StackMap stack:
aload 0
iconst_1
putfield com.mongodb.internal.session.ServerSessionPool.closed:Z
15: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lcom/mongodb/internal/session/ServerSessionPool;
4 7 1 identifiers Ljava/util/List<Lorg/bson/BsonDocument;>;
9 10 1 identifiers Ljava/util/List<Lorg/bson/BsonDocument;>;
Exception table:
from to target type
3 6 7 any
7 8 7 any
0 11 11 any
public int getInUseCount();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.serverSessionPool:Lcom/mongodb/internal/connection/ConcurrentPool;
invokevirtual com.mongodb.internal.connection.ConcurrentPool.getInUseCount:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/session/ServerSessionPool;
private void closeSession(com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl);
descriptor: (Lcom/mongodb/internal/session/ServerSessionPool$ServerSessionImpl;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl.close:()V
1: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.closing:Z
ifne 3
2: return
3: StackMap locals:
StackMap stack:
aconst_null
astore 2
start local 2 4: aload 0
dup
astore 3
monitorenter
5: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.closedSessionIdentifiers:Ljava/util/List;
aload 1
invokevirtual com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl.getIdentifier:()Lorg/bson/BsonDocument;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
6: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.closedSessionIdentifiers:Ljava/util/List;
invokeinterface java.util.List.size:()I
sipush 10000
if_icmpne 9
7: new java.util.ArrayList
dup
aload 0
getfield com.mongodb.internal.session.ServerSessionPool.closedSessionIdentifiers:Ljava/util/List;
invokespecial java.util.ArrayList.<init>:(Ljava/util/Collection;)V
astore 2
8: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.closedSessionIdentifiers:Ljava/util/List;
invokeinterface java.util.List.clear:()V
9: StackMap locals: java.util.List com.mongodb.internal.session.ServerSessionPool
StackMap stack:
aload 3
monitorexit
10: goto 13
StackMap locals:
StackMap stack: java.lang.Throwable
11: aload 3
monitorexit
12: athrow
13: StackMap locals:
StackMap stack:
aload 2
ifnull 15
14: aload 0
aload 2
invokevirtual com.mongodb.internal.session.ServerSessionPool.endClosedSessions:(Ljava/util/List;)V
15: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lcom/mongodb/internal/session/ServerSessionPool;
0 16 1 serverSession Lcom/mongodb/internal/session/ServerSessionPool$ServerSessionImpl;
4 16 2 identifiers Ljava/util/List<Lorg/bson/BsonDocument;>;
Exception table:
from to target type
5 10 11 any
11 12 11 any
MethodParameters:
Name Flags
serverSession final
private void endClosedSessions(java.util.List<org.bson.BsonDocument>);
descriptor: (Ljava/util/List;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=8, locals=5, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface java.util.List.isEmpty:()Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
new com.mongodb.selector.ReadPreferenceServerSelector
dup
invokestatic com.mongodb.ReadPreference.primaryPreferred:()Lcom/mongodb/ReadPreference;
invokespecial com.mongodb.selector.ReadPreferenceServerSelector.<init>:(Lcom/mongodb/ReadPreference;)V
3: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.cluster:Lcom/mongodb/connection/Cluster;
invokeinterface com.mongodb.connection.Cluster.getCurrentDescription:()Lcom/mongodb/connection/ClusterDescription;
invokevirtual com.mongodb.selector.ReadPreferenceServerSelector.select:(Lcom/mongodb/connection/ClusterDescription;)Ljava/util/List;
4: astore 2
start local 2 5: aload 2
invokeinterface java.util.List.isEmpty:()Z
ifeq 7
6: return
7: StackMap locals: java.util.List
StackMap stack:
aconst_null
astore 3
start local 3 8: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.cluster:Lcom/mongodb/connection/Cluster;
new com.mongodb.internal.session.ServerSessionPool$2
dup
aload 0
aload 2
invokespecial com.mongodb.internal.session.ServerSessionPool$2.<init>:(Lcom/mongodb/internal/session/ServerSessionPool;Ljava/util/List;)V
invokeinterface com.mongodb.connection.Cluster.selectServer:(Lcom/mongodb/selector/ServerSelector;)Lcom/mongodb/connection/Server;
9: invokeinterface com.mongodb.connection.Server.getConnection:()Lcom/mongodb/connection/Connection;
10: astore 3
11: aload 3
ldc "admin"
12: new org.bson.BsonDocument
dup
ldc "endSessions"
new org.bson.BsonArray
dup
aload 1
invokespecial org.bson.BsonArray.<init>:(Ljava/util/List;)V
invokespecial org.bson.BsonDocument.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
new com.mongodb.internal.validator.NoOpFieldNameValidator
dup
invokespecial com.mongodb.internal.validator.NoOpFieldNameValidator.<init>:()V
13: invokestatic com.mongodb.ReadPreference.primaryPreferred:()Lcom/mongodb/ReadPreference;
new org.bson.codecs.BsonDocumentCodec
dup
invokespecial org.bson.codecs.BsonDocumentCodec.<init>:()V
getstatic com.mongodb.internal.connection.NoOpSessionContext.INSTANCE:Lcom/mongodb/internal/connection/NoOpSessionContext;
14: invokeinterface com.mongodb.connection.Connection.command:(Ljava/lang/String;Lorg/bson/BsonDocument;Lorg/bson/FieldNameValidator;Lcom/mongodb/ReadPreference;Lorg/bson/codecs/Decoder;Lcom/mongodb/session/SessionContext;)Ljava/lang/Object;
pop
15: goto 23
StackMap locals: com.mongodb.internal.session.ServerSessionPool java.util.List java.util.List com.mongodb.connection.Connection
StackMap stack: com.mongodb.MongoException
16: pop
17: aload 3
ifnull 25
18: aload 3
invokeinterface com.mongodb.connection.Connection.release:()V
goto 25
19: StackMap locals:
StackMap stack: java.lang.Throwable
astore 4
20: aload 3
ifnull 22
21: aload 3
invokeinterface com.mongodb.connection.Connection.release:()V
22: StackMap locals: java.lang.Throwable
StackMap stack:
aload 4
athrow
23: StackMap locals:
StackMap stack:
aload 3
ifnull 25
24: aload 3
invokeinterface com.mongodb.connection.Connection.release:()V
25: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 26 0 this Lcom/mongodb/internal/session/ServerSessionPool;
0 26 1 identifiers Ljava/util/List<Lorg/bson/BsonDocument;>;
5 26 2 primaryPreferred Ljava/util/List<Lcom/mongodb/connection/ServerDescription;>;
8 26 3 connection Lcom/mongodb/connection/Connection;
Exception table:
from to target type
8 15 16 Class com.mongodb.MongoException
8 17 19 any
Signature: (Ljava/util/List<Lorg/bson/BsonDocument;>;)V
MethodParameters:
Name Flags
identifiers final
private boolean shouldPrune(com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl);
descriptor: (Lcom/mongodb/internal/session/ServerSessionPool$ServerSessionImpl;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=9, args_size=2
start local 0 start local 1 0: aload 0
getfield com.mongodb.internal.session.ServerSessionPool.cluster:Lcom/mongodb/connection/Cluster;
invokeinterface com.mongodb.connection.Cluster.getCurrentDescription:()Lcom/mongodb/connection/ClusterDescription;
invokevirtual com.mongodb.connection.ClusterDescription.getLogicalSessionTimeoutMinutes:()Ljava/lang/Integer;
astore 2
start local 2 1: aload 2
ifnonnull 3
2: iconst_0
ireturn
3: StackMap locals: java.lang.Integer
StackMap stack:
aload 1
invokevirtual com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl.isMarkedDirty:()Z
ifeq 5
4: iconst_1
ireturn
5: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.internal.session.ServerSessionPool.clock:Lcom/mongodb/internal/session/ServerSessionPool$Clock;
invokeinterface com.mongodb.internal.session.ServerSessionPool$Clock.millis:()J
lstore 3
start local 3 6: lload 3
aload 1
invokevirtual com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl.getLastUsedAtMillis:()J
lsub
lstore 5
start local 5 7: getstatic java.util.concurrent.TimeUnit.MINUTES:Ljava/util/concurrent/TimeUnit;
aload 2
invokevirtual java.lang.Integer.intValue:()I
iconst_1
isub
i2l
invokevirtual java.util.concurrent.TimeUnit.toMillis:(J)J
lstore 7
start local 7 8: lload 5
lload 7
lcmp
ifle 9
iconst_1
ireturn
StackMap locals: long long long
StackMap stack:
9: iconst_0
ireturn
end local 7 end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lcom/mongodb/internal/session/ServerSessionPool;
0 10 1 serverSession Lcom/mongodb/internal/session/ServerSessionPool$ServerSessionImpl;
1 10 2 logicalSessionTimeoutMinutes Ljava/lang/Integer;
6 10 3 currentTimeMillis J
7 10 5 timeSinceLastUse J
8 10 7 oneMinuteFromTimeout J
MethodParameters:
Name Flags
serverSession final
}
SourceFile: "ServerSessionPool.java"
NestMembers:
com.mongodb.internal.session.ServerSessionPool$1 com.mongodb.internal.session.ServerSessionPool$2 com.mongodb.internal.session.ServerSessionPool$Clock com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl com.mongodb.internal.session.ServerSessionPool$ServerSessionItemFactory
InnerClasses:
public abstract ItemFactory = com.mongodb.internal.connection.ConcurrentPool$ItemFactory of com.mongodb.internal.connection.ConcurrentPool
com.mongodb.internal.session.ServerSessionPool$1
com.mongodb.internal.session.ServerSessionPool$2
abstract Clock = com.mongodb.internal.session.ServerSessionPool$Clock of com.mongodb.internal.session.ServerSessionPool
final ServerSessionImpl = com.mongodb.internal.session.ServerSessionPool$ServerSessionImpl of com.mongodb.internal.session.ServerSessionPool
private final ServerSessionItemFactory = com.mongodb.internal.session.ServerSessionPool$ServerSessionItemFactory of com.mongodb.internal.session.ServerSessionPool