class com.mongodb.internal.connection.DefaultConnectionPool implements com.mongodb.internal.connection.ConnectionPool
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: com.mongodb.internal.connection.DefaultConnectionPool
super_class: java.lang.Object
{
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.ConcurrentPool<com.mongodb.internal.connection.UsageTrackingInternalConnection> pool;
descriptor: Lcom/mongodb/internal/connection/ConcurrentPool;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lcom/mongodb/internal/connection/ConcurrentPool<Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;>;
private final com.mongodb.connection.ConnectionPoolSettings settings;
descriptor: Lcom/mongodb/connection/ConnectionPoolSettings;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.atomic.AtomicInteger waitQueueSize;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.atomic.AtomicInteger generation;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.atomic.AtomicInteger lastPrunedGeneration;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.ScheduledExecutorService sizeMaintenanceTimer;
descriptor: Ljava/util/concurrent/ScheduledExecutorService;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private java.util.concurrent.ExecutorService asyncGetter;
descriptor: Ljava/util/concurrent/ExecutorService;
flags: (0x0002) ACC_PRIVATE
private final java.lang.Runnable maintenanceTask;
descriptor: Ljava/lang/Runnable;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.event.ConnectionPoolListener connectionPoolListener;
descriptor: Lcom/mongodb/event/ConnectionPoolListener;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.connection.ServerId serverId;
descriptor: Lcom/mongodb/connection/ServerId;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile boolean closed;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc "connection"
invokestatic com.mongodb.diagnostics.logging.Loggers.getLogger:(Ljava/lang/String;)Lcom/mongodb/diagnostics/logging/Logger;
putstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(com.mongodb.connection.ServerId, com.mongodb.internal.connection.InternalConnectionFactory, com.mongodb.connection.ConnectionPoolSettings);
descriptor: (Lcom/mongodb/connection/ServerId;Lcom/mongodb/internal/connection/InternalConnectionFactory;Lcom/mongodb/connection/ConnectionPoolSettings;)V
flags: (0x0000)
Code:
stack=5, locals=5, 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
new java.util.concurrent.atomic.AtomicInteger
dup
iconst_0
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:(I)V
putfield com.mongodb.internal.connection.DefaultConnectionPool.waitQueueSize:Ljava/util/concurrent/atomic/AtomicInteger;
2: aload 0
new java.util.concurrent.atomic.AtomicInteger
dup
iconst_0
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:(I)V
putfield com.mongodb.internal.connection.DefaultConnectionPool.generation:Ljava/util/concurrent/atomic/AtomicInteger;
3: aload 0
new java.util.concurrent.atomic.AtomicInteger
dup
iconst_0
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:(I)V
putfield com.mongodb.internal.connection.DefaultConnectionPool.lastPrunedGeneration:Ljava/util/concurrent/atomic/AtomicInteger;
4: aload 0
ldc "serverId"
aload 1
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.connection.ServerId
putfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
5: aload 0
ldc "settings"
aload 3
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.connection.ConnectionPoolSettings
putfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
6: new com.mongodb.internal.connection.DefaultConnectionPool$UsageTrackingInternalConnectionItemFactory
dup
aload 0
aload 2
invokespecial com.mongodb.internal.connection.DefaultConnectionPool$UsageTrackingInternalConnectionItemFactory.<init>:(Lcom/mongodb/internal/connection/DefaultConnectionPool;Lcom/mongodb/internal/connection/InternalConnectionFactory;)V
7: astore 4
start local 4 8: aload 0
new com.mongodb.internal.connection.ConcurrentPool
dup
aload 3
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMaxSize:()I
aload 4
invokespecial com.mongodb.internal.connection.ConcurrentPool.<init>:(ILcom/mongodb/internal/connection/ConcurrentPool$ItemFactory;)V
putfield com.mongodb.internal.connection.DefaultConnectionPool.pool:Lcom/mongodb/internal/connection/ConcurrentPool;
9: aload 0
aload 3
invokestatic com.mongodb.internal.event.EventListenerHelper.getConnectionPoolListener:(Lcom/mongodb/connection/ConnectionPoolSettings;)Lcom/mongodb/event/ConnectionPoolListener;
putfield com.mongodb.internal.connection.DefaultConnectionPool.connectionPoolListener:Lcom/mongodb/event/ConnectionPoolListener;
10: aload 0
aload 0
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.createMaintenanceTask:()Ljava/lang/Runnable;
putfield com.mongodb.internal.connection.DefaultConnectionPool.maintenanceTask:Ljava/lang/Runnable;
11: aload 0
aload 0
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.createMaintenanceTimer:()Ljava/util/concurrent/ScheduledExecutorService;
putfield com.mongodb.internal.connection.DefaultConnectionPool.sizeMaintenanceTimer:Ljava/util/concurrent/ScheduledExecutorService;
12: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.connectionPoolListener:Lcom/mongodb/event/ConnectionPoolListener;
new com.mongodb.event.ConnectionPoolOpenedEvent
dup
aload 1
aload 3
invokespecial com.mongodb.event.ConnectionPoolOpenedEvent.<init>:(Lcom/mongodb/connection/ServerId;Lcom/mongodb/connection/ConnectionPoolSettings;)V
invokeinterface com.mongodb.event.ConnectionPoolListener.connectionPoolOpened:(Lcom/mongodb/event/ConnectionPoolOpenedEvent;)V
13: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
0 14 1 serverId Lcom/mongodb/connection/ServerId;
0 14 2 internalConnectionFactory Lcom/mongodb/internal/connection/InternalConnectionFactory;
0 14 3 settings Lcom/mongodb/connection/ConnectionPoolSettings;
8 14 4 connectionItemFactory Lcom/mongodb/internal/connection/DefaultConnectionPool$UsageTrackingInternalConnectionItemFactory;
MethodParameters:
Name Flags
serverId final
internalConnectionFactory final
settings final
public void start();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.sizeMaintenanceTimer:Ljava/util/concurrent/ScheduledExecutorService;
ifnull 4
1: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.sizeMaintenanceTimer:Ljava/util/concurrent/ScheduledExecutorService;
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.maintenanceTask:Ljava/lang/Runnable;
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMaintenanceInitialDelay:(Ljava/util/concurrent/TimeUnit;)J
2: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMaintenanceFrequency:(Ljava/util/concurrent/TimeUnit;)J
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
3: invokeinterface java.util.concurrent.ScheduledExecutorService.scheduleAtFixedRate:(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
pop
4: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
public com.mongodb.internal.connection.InternalConnection get();
descriptor: ()Lcom/mongodb/internal/connection/InternalConnection;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMaxWaitTime:(Ljava/util/concurrent/TimeUnit;)J
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.get:(JLjava/util/concurrent/TimeUnit;)Lcom/mongodb/internal/connection/InternalConnection;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
public com.mongodb.internal.connection.InternalConnection get(long, java.util.concurrent.TimeUnit);
descriptor: (JLjava/util/concurrent/TimeUnit;)Lcom/mongodb/internal/connection/InternalConnection;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=9, args_size=3
start local 0 start local 1 start local 3 0: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.waitQueueSize:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.incrementAndGet:()I
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMaxWaitQueueSize:()I
if_icmple 2
1: aload 0
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.createWaitQueueFullException:()Lcom/mongodb/MongoWaitQueueFullException;
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.connectionPoolListener:Lcom/mongodb/event/ConnectionPoolListener;
new com.mongodb.event.ConnectionPoolWaitQueueEnteredEvent
dup
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
invokespecial com.mongodb.event.ConnectionPoolWaitQueueEnteredEvent.<init>:(Lcom/mongodb/connection/ServerId;)V
invokeinterface com.mongodb.event.ConnectionPoolListener.waitQueueEntered:(Lcom/mongodb/event/ConnectionPoolWaitQueueEnteredEvent;)V
3: aload 0
lload 1
aload 3
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.getPooledConnection:(JLjava/util/concurrent/TimeUnit;)Lcom/mongodb/internal/connection/DefaultConnectionPool$PooledConnection;
astore 4
start local 4 4: aload 4
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.opened:()Z
ifne 12
5: aload 4
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.open:()V
6: goto 12
StackMap locals: com.mongodb.internal.connection.DefaultConnectionPool long java.util.concurrent.TimeUnit com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection
StackMap stack: java.lang.Throwable
7: astore 5
start local 5 8: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.pool:Lcom/mongodb/internal/connection/ConcurrentPool;
aload 4
getfield com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.wrapped:Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;
iconst_1
invokevirtual com.mongodb.internal.connection.ConcurrentPool.release:(Ljava/lang/Object;Z)V
9: aload 5
instanceof com.mongodb.MongoException
ifeq 11
10: aload 5
checkcast com.mongodb.MongoException
athrow
11: StackMap locals: java.lang.Throwable
StackMap stack:
new com.mongodb.MongoInternalException
dup
aload 5
invokevirtual java.lang.Throwable.toString:()Ljava/lang/String;
aload 5
invokespecial com.mongodb.MongoInternalException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 5 12: StackMap locals:
StackMap stack:
aload 4
astore 7
13: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.connectionPoolListener:Lcom/mongodb/event/ConnectionPoolListener;
new com.mongodb.event.ConnectionPoolWaitQueueExitedEvent
dup
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
invokespecial com.mongodb.event.ConnectionPoolWaitQueueExitedEvent.<init>:(Lcom/mongodb/connection/ServerId;)V
invokeinterface com.mongodb.event.ConnectionPoolListener.waitQueueExited:(Lcom/mongodb/event/ConnectionPoolWaitQueueExitedEvent;)V
14: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.waitQueueSize:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.decrementAndGet:()I
pop
15: aload 7
areturn
end local 4 16: StackMap locals: com.mongodb.internal.connection.DefaultConnectionPool long java.util.concurrent.TimeUnit
StackMap stack: java.lang.Throwable
astore 6
17: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.connectionPoolListener:Lcom/mongodb/event/ConnectionPoolListener;
new com.mongodb.event.ConnectionPoolWaitQueueExitedEvent
dup
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
invokespecial com.mongodb.event.ConnectionPoolWaitQueueExitedEvent.<init>:(Lcom/mongodb/connection/ServerId;)V
invokeinterface com.mongodb.event.ConnectionPoolListener.waitQueueExited:(Lcom/mongodb/event/ConnectionPoolWaitQueueExitedEvent;)V
18: aload 6
athrow
19: StackMap locals:
StackMap stack: java.lang.Throwable
astore 8
20: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.waitQueueSize:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.decrementAndGet:()I
pop
21: aload 8
athrow
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
0 22 1 timeout J
0 22 3 timeUnit Ljava/util/concurrent/TimeUnit;
4 16 4 pooledConnection Lcom/mongodb/internal/connection/DefaultConnectionPool$PooledConnection;
8 12 5 t Ljava/lang/Throwable;
Exception table:
from to target type
5 6 7 Class java.lang.Throwable
2 13 16 any
0 14 19 any
16 19 19 any
MethodParameters:
Name Flags
timeout final
timeUnit final
public void getAsync(com.mongodb.async.SingleResultCallback<com.mongodb.internal.connection.InternalConnection>);
descriptor: (Lcom/mongodb/async/SingleResultCallback;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=6, args_size=2
start local 0 start local 1 0: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isTraceEnabled:()Z
ifeq 2
1: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Asynchronously getting a connection from the pool for server %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
aastore
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
2: StackMap locals:
StackMap stack:
aload 1
getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokestatic com.mongodb.internal.async.ErrorHandlingResultCallback.errorHandlingCallback:(Lcom/mongodb/async/SingleResultCallback;Lcom/mongodb/diagnostics/logging/Logger;)Lcom/mongodb/async/SingleResultCallback;
astore 2
start local 2 3: aconst_null
astore 3
start local 3 4: aload 0
lconst_0
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.getPooledConnection:(JLjava/util/concurrent/TimeUnit;)Lcom/mongodb/internal/connection/DefaultConnectionPool$PooledConnection;
astore 3
5: goto 10
StackMap locals: com.mongodb.internal.connection.DefaultConnectionPool com.mongodb.async.SingleResultCallback com.mongodb.async.SingleResultCallback com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection
StackMap stack: com.mongodb.MongoTimeoutException
6: pop
goto 10
7: StackMap locals:
StackMap stack: java.lang.Throwable
astore 4
start local 4 8: aload 1
aconst_null
aload 4
invokeinterface com.mongodb.async.SingleResultCallback.onResult:(Ljava/lang/Object;Ljava/lang/Throwable;)V
9: return
end local 4 10: StackMap locals:
StackMap stack:
aload 3
ifnull 17
11: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isTraceEnabled:()Z
ifeq 15
12: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Asynchronously opening pooled connection %s to server %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
13: aload 3
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.getDescription:()Lcom/mongodb/connection/ConnectionDescription;
invokevirtual com.mongodb.connection.ConnectionDescription.getConnectionId:()Lcom/mongodb/connection/ConnectionId;
aastore
dup
iconst_1
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
aastore
14: 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
15: StackMap locals:
StackMap stack:
aload 0
aload 3
aload 2
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.openAsync:(Lcom/mongodb/internal/connection/DefaultConnectionPool$PooledConnection;Lcom/mongodb/async/SingleResultCallback;)V
16: goto 28
StackMap locals:
StackMap stack:
17: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.waitQueueSize:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.incrementAndGet:()I
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMaxWaitQueueSize:()I
if_icmple 25
18: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.waitQueueSize:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.decrementAndGet:()I
pop
19: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isTraceEnabled:()Z
ifeq 23
20: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Asynchronously failing to get a pooled connection to %s because the wait queue is full"
iconst_1
anewarray java.lang.Object
dup
iconst_0
21: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
aastore
22: 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
23: StackMap locals:
StackMap stack:
aload 1
aconst_null
aload 0
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.createWaitQueueFullException:()Lcom/mongodb/MongoWaitQueueFullException;
invokeinterface com.mongodb.async.SingleResultCallback.onResult:(Ljava/lang/Object;Ljava/lang/Throwable;)V
24: goto 28
25: StackMap locals:
StackMap stack:
invokestatic java.lang.System.currentTimeMillis:()J
lstore 4
start local 4 26: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.connectionPoolListener:Lcom/mongodb/event/ConnectionPoolListener;
new com.mongodb.event.ConnectionPoolWaitQueueEnteredEvent
dup
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
invokespecial com.mongodb.event.ConnectionPoolWaitQueueEnteredEvent.<init>:(Lcom/mongodb/connection/ServerId;)V
invokeinterface com.mongodb.event.ConnectionPoolListener.waitQueueEntered:(Lcom/mongodb/event/ConnectionPoolWaitQueueEnteredEvent;)V
27: aload 0
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.getAsyncGetter:()Ljava/util/concurrent/ExecutorService;
new com.mongodb.internal.connection.DefaultConnectionPool$1
dup
aload 0
aload 2
lload 4
invokespecial com.mongodb.internal.connection.DefaultConnectionPool$1.<init>:(Lcom/mongodb/internal/connection/DefaultConnectionPool;Lcom/mongodb/async/SingleResultCallback;J)V
invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
pop
end local 4 28: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 29 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
0 29 1 callback Lcom/mongodb/async/SingleResultCallback<Lcom/mongodb/internal/connection/InternalConnection;>;
3 29 2 errHandlingCallback Lcom/mongodb/async/SingleResultCallback<Lcom/mongodb/internal/connection/InternalConnection;>;
4 29 3 connection Lcom/mongodb/internal/connection/DefaultConnectionPool$PooledConnection;
8 10 4 t Ljava/lang/Throwable;
26 28 4 startTimeMillis J
Exception table:
from to target type
4 5 6 Class com.mongodb.MongoTimeoutException
4 5 7 Class java.lang.Throwable
Signature: (Lcom/mongodb/async/SingleResultCallback<Lcom/mongodb/internal/connection/InternalConnection;>;)V
MethodParameters:
Name Flags
callback final
private void openAsync(com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection, com.mongodb.async.SingleResultCallback<com.mongodb.internal.connection.InternalConnection>);
descriptor: (Lcom/mongodb/internal/connection/DefaultConnectionPool$PooledConnection;Lcom/mongodb/async/SingleResultCallback;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.opened:()Z
ifeq 7
1: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isTraceEnabled:()Z
ifeq 5
2: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Pooled connection %s to server %s is already open"
iconst_2
anewarray java.lang.Object
dup
iconst_0
3: aload 1
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.getDescription:()Lcom/mongodb/connection/ConnectionDescription;
invokevirtual com.mongodb.connection.ConnectionDescription.getConnectionId:()Lcom/mongodb/connection/ConnectionId;
aastore
dup
iconst_1
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
aastore
4: 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
5: StackMap locals:
StackMap stack:
aload 2
aload 1
aconst_null
invokeinterface com.mongodb.async.SingleResultCallback.onResult:(Ljava/lang/Object;Ljava/lang/Throwable;)V
6: goto 12
7: StackMap locals:
StackMap stack:
getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isTraceEnabled:()Z
ifeq 11
8: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Pooled connection %s to server %s is not yet open"
iconst_2
anewarray java.lang.Object
dup
iconst_0
9: aload 1
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.getDescription:()Lcom/mongodb/connection/ConnectionDescription;
invokevirtual com.mongodb.connection.ConnectionDescription.getConnectionId:()Lcom/mongodb/connection/ConnectionId;
aastore
dup
iconst_1
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
aastore
10: 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
11: StackMap locals:
StackMap stack:
aload 1
new com.mongodb.internal.connection.DefaultConnectionPool$2
dup
aload 0
aload 1
aload 2
invokespecial com.mongodb.internal.connection.DefaultConnectionPool$2.<init>:(Lcom/mongodb/internal/connection/DefaultConnectionPool;Lcom/mongodb/internal/connection/DefaultConnectionPool$PooledConnection;Lcom/mongodb/async/SingleResultCallback;)V
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.openAsync:(Lcom/mongodb/async/SingleResultCallback;)V
12: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
0 13 1 pooledConnection Lcom/mongodb/internal/connection/DefaultConnectionPool$PooledConnection;
0 13 2 callback Lcom/mongodb/async/SingleResultCallback<Lcom/mongodb/internal/connection/InternalConnection;>;
Signature: (Lcom/mongodb/internal/connection/DefaultConnectionPool$PooledConnection;Lcom/mongodb/async/SingleResultCallback<Lcom/mongodb/internal/connection/InternalConnection;>;)V
MethodParameters:
Name Flags
pooledConnection final
callback final
private synchronized java.util.concurrent.ExecutorService getAsyncGetter();
descriptor: ()Ljava/util/concurrent/ExecutorService;
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.asyncGetter:Ljava/util/concurrent/ExecutorService;
ifnonnull 2
1: aload 0
new com.mongodb.internal.thread.DaemonThreadFactory
dup
ldc "AsyncGetter"
invokespecial com.mongodb.internal.thread.DaemonThreadFactory.<init>:(Ljava/lang/String;)V
invokestatic java.util.concurrent.Executors.newSingleThreadExecutor:(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;
putfield com.mongodb.internal.connection.DefaultConnectionPool.asyncGetter:Ljava/util/concurrent/ExecutorService;
2: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.asyncGetter:Ljava/util/concurrent/ExecutorService;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
private synchronized void shutdownAsyncGetter();
descriptor: ()V
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.asyncGetter:Ljava/util/concurrent/ExecutorService;
ifnull 2
1: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.asyncGetter:Ljava/util/concurrent/ExecutorService;
invokeinterface java.util.concurrent.ExecutorService.shutdownNow:()Ljava/util/List;
pop
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
public void invalidate();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Invalidating the connection pool"
invokeinterface com.mongodb.diagnostics.logging.Logger.debug:(Ljava/lang/String;)V
1: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.generation:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.incrementAndGet:()I
pop
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.closed:Z
ifne 7
1: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.pool:Lcom/mongodb/internal/connection/ConcurrentPool;
invokevirtual com.mongodb.internal.connection.ConcurrentPool.close:()V
2: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.sizeMaintenanceTimer:Ljava/util/concurrent/ScheduledExecutorService;
ifnull 4
3: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.sizeMaintenanceTimer:Ljava/util/concurrent/ScheduledExecutorService;
invokeinterface java.util.concurrent.ScheduledExecutorService.shutdownNow:()Ljava/util/List;
pop
4: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.shutdownAsyncGetter:()V
5: aload 0
iconst_1
putfield com.mongodb.internal.connection.DefaultConnectionPool.closed:Z
6: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.connectionPoolListener:Lcom/mongodb/event/ConnectionPoolListener;
new com.mongodb.event.ConnectionPoolClosedEvent
dup
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
invokespecial com.mongodb.event.ConnectionPoolClosedEvent.<init>:(Lcom/mongodb/connection/ServerId;)V
invokeinterface com.mongodb.event.ConnectionPoolListener.connectionPoolClosed:(Lcom/mongodb/event/ConnectionPoolClosedEvent;)V
7: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
public void doMaintenance();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.maintenanceTask:Ljava/lang/Runnable;
ifnull 2
1: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.maintenanceTask:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
private com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection getPooledConnection(long, java.util.concurrent.TimeUnit);
descriptor: (JLjava/util/concurrent/TimeUnit;)Lcom/mongodb/internal/connection/DefaultConnectionPool$PooledConnection;
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=5, args_size=3
start local 0 start local 1 start local 3 0: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.pool:Lcom/mongodb/internal/connection/ConcurrentPool;
lload 1
aload 3
invokevirtual com.mongodb.internal.connection.ConcurrentPool.get:(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
checkcast com.mongodb.internal.connection.UsageTrackingInternalConnection
astore 4
start local 4 1: goto 4
2: StackMap locals: com.mongodb.internal.connection.UsageTrackingInternalConnection
StackMap stack:
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.pool:Lcom/mongodb/internal/connection/ConcurrentPool;
aload 4
iconst_1
invokevirtual com.mongodb.internal.connection.ConcurrentPool.release:(Ljava/lang/Object;Z)V
3: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.pool:Lcom/mongodb/internal/connection/ConcurrentPool;
lload 1
aload 3
invokevirtual com.mongodb.internal.connection.ConcurrentPool.get:(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
checkcast com.mongodb.internal.connection.UsageTrackingInternalConnection
astore 4
4: StackMap locals:
StackMap stack:
aload 0
aload 4
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.shouldPrune:(Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;)Z
ifne 2
5: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.connectionPoolListener:Lcom/mongodb/event/ConnectionPoolListener;
new com.mongodb.event.ConnectionCheckedOutEvent
dup
aload 4
invokevirtual com.mongodb.internal.connection.UsageTrackingInternalConnection.getDescription:()Lcom/mongodb/connection/ConnectionDescription;
invokevirtual com.mongodb.connection.ConnectionDescription.getConnectionId:()Lcom/mongodb/connection/ConnectionId;
invokespecial com.mongodb.event.ConnectionCheckedOutEvent.<init>:(Lcom/mongodb/connection/ConnectionId;)V
invokeinterface com.mongodb.event.ConnectionPoolListener.connectionCheckedOut:(Lcom/mongodb/event/ConnectionCheckedOutEvent;)V
6: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isTraceEnabled:()Z
ifeq 8
7: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Checked out connection [%s] to server %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
aload 4
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.getId:(Lcom/mongodb/internal/connection/InternalConnection;)Lcom/mongodb/connection/ConnectionId;
aastore
dup
iconst_1
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
invokevirtual com.mongodb.connection.ServerId.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.trace:(Ljava/lang/String;)V
8: StackMap locals:
StackMap stack:
new com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection
dup
aload 0
aload 4
invokespecial com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.<init>:(Lcom/mongodb/internal/connection/DefaultConnectionPool;Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;)V
areturn
end local 4 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
0 9 1 timeout J
0 9 3 timeUnit Ljava/util/concurrent/TimeUnit;
1 9 4 internalConnection Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;
MethodParameters:
Name Flags
timeout final
timeUnit final
private com.mongodb.MongoTimeoutException createTimeoutException();
descriptor: ()Lcom/mongodb/MongoTimeoutException;
flags: (0x0002) ACC_PRIVATE
Code:
stack=8, locals=1, args_size=1
start local 0 0: new com.mongodb.MongoTimeoutException
dup
ldc "Timed out after %d ms while waiting for a connection to server %s."
iconst_2
anewarray java.lang.Object
dup
iconst_0
1: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMaxWaitTime:(Ljava/util/concurrent/TimeUnit;)J
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aastore
dup
iconst_1
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
invokevirtual com.mongodb.connection.ServerId.getAddress:()Lcom/mongodb/ServerAddress;
aastore
2: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial com.mongodb.MongoTimeoutException.<init>:(Ljava/lang/String;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
private com.mongodb.MongoWaitQueueFullException createWaitQueueFullException();
descriptor: ()Lcom/mongodb/MongoWaitQueueFullException;
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=1, args_size=1
start local 0 0: new com.mongodb.MongoWaitQueueFullException
dup
ldc "Too many operations are already waiting for a connection. Max number of operations (maxWaitQueueSize) of %d has been exceeded."
iconst_1
anewarray java.lang.Object
dup
iconst_0
1: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMaxWaitQueueSize:()I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
2: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial com.mongodb.MongoWaitQueueFullException.<init>:(Ljava/lang/String;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
com.mongodb.internal.connection.ConcurrentPool<com.mongodb.internal.connection.UsageTrackingInternalConnection> getPool();
descriptor: ()Lcom/mongodb/internal/connection/ConcurrentPool;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.pool:Lcom/mongodb/internal/connection/ConcurrentPool;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
Signature: ()Lcom/mongodb/internal/connection/ConcurrentPool<Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;>;
private java.lang.Runnable createMaintenanceTask();
descriptor: ()Ljava/lang/Runnable;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=1
start local 0 0: aconst_null
astore 1
start local 1 1: aload 0
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.shouldPrune:()Z
ifne 2
aload 0
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.shouldEnsureMinSize:()Z
ifeq 3
2: StackMap locals: java.lang.Runnable
StackMap stack:
new com.mongodb.internal.connection.DefaultConnectionPool$3
dup
aload 0
invokespecial com.mongodb.internal.connection.DefaultConnectionPool$3.<init>:(Lcom/mongodb/internal/connection/DefaultConnectionPool;)V
astore 1
3: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
1 4 1 newMaintenanceTask Ljava/lang/Runnable;
private java.util.concurrent.ScheduledExecutorService createMaintenanceTimer();
descriptor: ()Ljava/util/concurrent/ScheduledExecutorService;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.maintenanceTask:Ljava/lang/Runnable;
ifnonnull 2
1: aconst_null
areturn
2: StackMap locals:
StackMap stack:
new com.mongodb.internal.thread.DaemonThreadFactory
dup
ldc "MaintenanceTimer"
invokespecial com.mongodb.internal.thread.DaemonThreadFactory.<init>:(Ljava/lang/String;)V
invokestatic java.util.concurrent.Executors.newSingleThreadScheduledExecutor:(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
private boolean shouldEnsureMinSize();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMinSize:()I
ifle 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/internal/connection/DefaultConnectionPool;
private boolean shouldPrune();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMaxConnectionIdleTime:(Ljava/util/concurrent/TimeUnit;)J
lconst_0
lcmp
ifgt 1
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMaxConnectionLifeTime:(Ljava/util/concurrent/TimeUnit;)J
lconst_0
lcmp
ifgt 1
iconst_0
ireturn
StackMap locals:
StackMap stack:
1: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
private boolean shouldPrune(com.mongodb.internal.connection.UsageTrackingInternalConnection);
descriptor: (Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.fromPreviousGeneration:(Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;)Z
ifne 1
aload 0
aload 1
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.pastMaxLifeTime:(Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;)Z
ifne 1
aload 0
aload 1
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.pastMaxIdleTime:(Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;)Z
ifne 1
iconst_0
ireturn
StackMap locals:
StackMap stack:
1: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
0 2 1 connection Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;
MethodParameters:
Name Flags
connection final
private boolean pastMaxIdleTime(com.mongodb.internal.connection.UsageTrackingInternalConnection);
descriptor: (Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual com.mongodb.internal.connection.UsageTrackingInternalConnection.getLastUsedAt:()J
invokestatic java.lang.System.currentTimeMillis:()J
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMaxConnectionIdleTime:(Ljava/util/concurrent/TimeUnit;)J
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.expired:(JJJ)Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
0 1 1 connection Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;
MethodParameters:
Name Flags
connection final
private boolean pastMaxLifeTime(com.mongodb.internal.connection.UsageTrackingInternalConnection);
descriptor: (Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual com.mongodb.internal.connection.UsageTrackingInternalConnection.getOpenedAt:()J
invokestatic java.lang.System.currentTimeMillis:()J
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.settings:Lcom/mongodb/connection/ConnectionPoolSettings;
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.ConnectionPoolSettings.getMaxConnectionLifeTime:(Ljava/util/concurrent/TimeUnit;)J
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.expired:(JJJ)Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
0 1 1 connection Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;
MethodParameters:
Name Flags
connection final
private boolean fromPreviousGeneration(com.mongodb.internal.connection.UsageTrackingInternalConnection);
descriptor: (Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;)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.DefaultConnectionPool.generation:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
aload 1
invokevirtual com.mongodb.internal.connection.UsageTrackingInternalConnection.getGeneration:()I
if_icmple 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
0 2 1 connection Lcom/mongodb/internal/connection/UsageTrackingInternalConnection;
MethodParameters:
Name Flags
connection final
private boolean expired(long, long, long);
descriptor: (JJJ)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=7, args_size=4
start local 0 start local 1 start local 3 start local 5 0: lload 5
lconst_0
lcmp
ifeq 1
lload 3
lload 1
lsub
lload 5
lcmp
ifle 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
0 2 1 startTime J
0 2 3 curTime J
0 2 5 maxTime J
MethodParameters:
Name Flags
startTime final
curTime final
maxTime final
private void incrementGenerationOnSocketException(com.mongodb.internal.connection.InternalConnection, java.lang.Throwable);
descriptor: (Lcom/mongodb/internal/connection/InternalConnection;Ljava/lang/Throwable;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 2
instanceof com.mongodb.MongoSocketException
ifeq 6
aload 2
instanceof com.mongodb.MongoSocketReadTimeoutException
ifne 6
1: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
invokeinterface com.mongodb.diagnostics.logging.Logger.isWarnEnabled:()Z
ifeq 5
2: getstatic com.mongodb.internal.connection.DefaultConnectionPool.LOGGER:Lcom/mongodb/diagnostics/logging/Logger;
ldc "Got socket exception on connection [%s] to %s. All connections to %s will be closed."
iconst_3
anewarray java.lang.Object
dup
iconst_0
3: aload 0
aload 1
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.getId:(Lcom/mongodb/internal/connection/InternalConnection;)Lcom/mongodb/connection/ConnectionId;
aastore
dup
iconst_1
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
invokevirtual com.mongodb.connection.ServerId.getAddress:()Lcom/mongodb/ServerAddress;
aastore
dup
iconst_2
aload 0
getfield com.mongodb.internal.connection.DefaultConnectionPool.serverId:Lcom/mongodb/connection/ServerId;
invokevirtual com.mongodb.connection.ServerId.getAddress:()Lcom/mongodb/ServerAddress;
aastore
4: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface com.mongodb.diagnostics.logging.Logger.warn:(Ljava/lang/String;)V
5: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.mongodb.internal.connection.DefaultConnectionPool.invalidate:()V
6: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
0 7 1 connection Lcom/mongodb/internal/connection/InternalConnection;
0 7 2 t Ljava/lang/Throwable;
MethodParameters:
Name Flags
connection final
t final
private com.mongodb.connection.ConnectionId getId(com.mongodb.internal.connection.InternalConnection);
descriptor: (Lcom/mongodb/internal/connection/InternalConnection;)Lcom/mongodb/connection/ConnectionId;
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface com.mongodb.internal.connection.InternalConnection.getDescription:()Lcom/mongodb/connection/ConnectionDescription;
invokevirtual com.mongodb.connection.ConnectionDescription.getConnectionId:()Lcom/mongodb/connection/ConnectionId;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/DefaultConnectionPool;
0 1 1 internalConnection Lcom/mongodb/internal/connection/InternalConnection;
MethodParameters:
Name Flags
internalConnection final
}
SourceFile: "DefaultConnectionPool.java"
NestMembers:
com.mongodb.internal.connection.DefaultConnectionPool$1 com.mongodb.internal.connection.DefaultConnectionPool$2 com.mongodb.internal.connection.DefaultConnectionPool$3 com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection$1 com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection$2 com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection$3 com.mongodb.internal.connection.DefaultConnectionPool$UsageTrackingInternalConnectionItemFactory
InnerClasses:
public abstract ItemFactory = com.mongodb.internal.connection.ConcurrentPool$ItemFactory of com.mongodb.internal.connection.ConcurrentPool
com.mongodb.internal.connection.DefaultConnectionPool$1
com.mongodb.internal.connection.DefaultConnectionPool$2
com.mongodb.internal.connection.DefaultConnectionPool$3
private PooledConnection = com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection of com.mongodb.internal.connection.DefaultConnectionPool
private UsageTrackingInternalConnectionItemFactory = com.mongodb.internal.connection.DefaultConnectionPool$UsageTrackingInternalConnectionItemFactory of com.mongodb.internal.connection.DefaultConnectionPool