final class com.mongodb.internal.connection.BaseCluster$WaitQueueHandler implements java.lang.Runnable
  minor version: 0
  major version: 59
  flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
  this_class: com.mongodb.internal.connection.BaseCluster$WaitQueueHandler
  super_class: java.lang.Object
{
  final com.mongodb.internal.connection.BaseCluster this$0;
    descriptor: Lcom/mongodb/internal/connection/BaseCluster;
    flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC

  private void <init>(com.mongodb.internal.connection.BaseCluster);
    descriptor: (Lcom/mongodb/internal/connection/BaseCluster;)V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=2, locals=2, args_size=2
        start local 0 // com.mongodb.internal.connection.BaseCluster$WaitQueueHandler this
         0: .line 482
            aload 0 /* this */
            aload 1
            putfield com.mongodb.internal.connection.BaseCluster$WaitQueueHandler.this$0:Lcom/mongodb/internal/connection/BaseCluster;
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
            return
        end local 0 // com.mongodb.internal.connection.BaseCluster$WaitQueueHandler this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lcom/mongodb/internal/connection/BaseCluster$WaitQueueHandler;
    MethodParameters:
        Name  Flags
      this$0  final

  public void run();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=6, locals=7, args_size=1
        start local 0 // com.mongodb.internal.connection.BaseCluster$WaitQueueHandler this
         0: .line 484
            goto 18
         1: .line 485
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield com.mongodb.internal.connection.BaseCluster$WaitQueueHandler.this$0:Lcom/mongodb/internal/connection/BaseCluster;
            getfield com.mongodb.internal.connection.BaseCluster.phase:Ljava/util/concurrent/atomic/AtomicReference;
            invokevirtual java.util.concurrent.atomic.AtomicReference.get:()Ljava/lang/Object;
            checkcast java.util.concurrent.CountDownLatch
            astore 1 /* currentPhase */
        start local 1 // java.util.concurrent.CountDownLatch currentPhase
         2: .line 486
            aload 0 /* this */
            getfield com.mongodb.internal.connection.BaseCluster$WaitQueueHandler.this$0:Lcom/mongodb/internal/connection/BaseCluster;
            getfield com.mongodb.internal.connection.BaseCluster.description:Lcom/mongodb/connection/ClusterDescription;
            astore 2 /* curDescription */
        start local 2 // com.mongodb.connection.ClusterDescription curDescription
         3: .line 487
            ldc 9223372036854775807
            lstore 3 /* waitTimeNanos */
        start local 3 // long waitTimeNanos
         4: .line 489
            aload 0 /* this */
            getfield com.mongodb.internal.connection.BaseCluster$WaitQueueHandler.this$0:Lcom/mongodb/internal/connection/BaseCluster;
            getfield com.mongodb.internal.connection.BaseCluster.waitQueue:Ljava/util/Deque;
            invokeinterface java.util.Deque.iterator:()Ljava/util/Iterator;
            astore 5 /* iter */
        start local 5 // java.util.Iterator iter
         5: goto 12
         6: .line 490
      StackMap locals: com.mongodb.internal.connection.BaseCluster$WaitQueueHandler java.util.concurrent.CountDownLatch com.mongodb.connection.ClusterDescription long java.util.Iterator
      StackMap stack:
            aload 5 /* iter */
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast com.mongodb.internal.connection.BaseCluster$ServerSelectionRequest
            astore 6 /* nextRequest */
        start local 6 // com.mongodb.internal.connection.BaseCluster$ServerSelectionRequest nextRequest
         7: .line 491
            aload 0 /* this */
            getfield com.mongodb.internal.connection.BaseCluster$WaitQueueHandler.this$0:Lcom/mongodb/internal/connection/BaseCluster;
            aload 6 /* nextRequest */
            aload 1 /* currentPhase */
            aload 2 /* curDescription */
            invokevirtual com.mongodb.internal.connection.BaseCluster.handleServerSelectionRequest:(Lcom/mongodb/internal/connection/BaseCluster$ServerSelectionRequest;Ljava/util/concurrent/CountDownLatch;Lcom/mongodb/connection/ClusterDescription;)Z
            ifeq 11
         8: .line 492
            aload 5 /* iter */
            invokeinterface java.util.Iterator.remove:()V
         9: .line 493
            aload 0 /* this */
            getfield com.mongodb.internal.connection.BaseCluster$WaitQueueHandler.this$0:Lcom/mongodb/internal/connection/BaseCluster;
            getfield com.mongodb.internal.connection.BaseCluster.waitQueueSize:Ljava/util/concurrent/atomic/AtomicInteger;
            invokevirtual java.util.concurrent.atomic.AtomicInteger.decrementAndGet:()I
            pop
        10: .line 494
            goto 12
        11: .line 495
      StackMap locals: com.mongodb.internal.connection.BaseCluster$ServerSelectionRequest
      StackMap stack:
            aload 6 /* nextRequest */
            invokevirtual com.mongodb.internal.connection.BaseCluster$ServerSelectionRequest.getRemainingTime:()J
            aload 0 /* this */
            getfield com.mongodb.internal.connection.BaseCluster$WaitQueueHandler.this$0:Lcom/mongodb/internal/connection/BaseCluster;
            invokevirtual com.mongodb.internal.connection.BaseCluster.getMinWaitTimeNanos:()J
            lload 3 /* waitTimeNanos */
            invokestatic java.lang.Math.min:(JJ)J
            invokestatic java.lang.Math.min:(JJ)J
            lstore 3 /* waitTimeNanos */
        end local 6 // com.mongodb.internal.connection.BaseCluster$ServerSelectionRequest nextRequest
        12: .line 489
      StackMap locals:
      StackMap stack:
            aload 5 /* iter */
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 6
        end local 5 // java.util.Iterator iter
        13: .line 500
            lload 3 /* waitTimeNanos */
            ldc 9223372036854775807
            lcmp
            ifge 15
        14: .line 501
            aload 0 /* this */
            getfield com.mongodb.internal.connection.BaseCluster$WaitQueueHandler.this$0:Lcom/mongodb/internal/connection/BaseCluster;
            invokevirtual com.mongodb.internal.connection.BaseCluster.connect:()V
        15: .line 505
      StackMap locals:
      StackMap stack:
            aload 1 /* currentPhase */
            lload 3 /* waitTimeNanos */
            getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
            invokevirtual java.util.concurrent.CountDownLatch.await:(JLjava/util/concurrent/TimeUnit;)Z
            pop
        16: .line 506
            goto 18
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
        17: pop
        end local 3 // long waitTimeNanos
        end local 2 // com.mongodb.connection.ClusterDescription curDescription
        end local 1 // java.util.concurrent.CountDownLatch currentPhase
        18: .line 484
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield com.mongodb.internal.connection.BaseCluster$WaitQueueHandler.this$0:Lcom/mongodb/internal/connection/BaseCluster;
            getfield com.mongodb.internal.connection.BaseCluster.isClosed:Z
            ifeq 1
        19: .line 511
            aload 0 /* this */
            getfield com.mongodb.internal.connection.BaseCluster$WaitQueueHandler.this$0:Lcom/mongodb/internal/connection/BaseCluster;
            getfield com.mongodb.internal.connection.BaseCluster.waitQueue:Ljava/util/Deque;
            invokeinterface java.util.Deque.iterator:()Ljava/util/Iterator;
            astore 1 /* iter */
        start local 1 // java.util.Iterator iter
        20: goto 23
        21: .line 512
      StackMap locals: java.util.Iterator
      StackMap stack:
            aload 1 /* iter */
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast com.mongodb.internal.connection.BaseCluster$ServerSelectionRequest
            aconst_null
            new com.mongodb.MongoClientException
            dup
            ldc "Shutdown in progress"
            invokespecial com.mongodb.MongoClientException.<init>:(Ljava/lang/String;)V
            invokevirtual com.mongodb.internal.connection.BaseCluster$ServerSelectionRequest.onResult:(Lcom/mongodb/connection/Server;Ljava/lang/Throwable;)V
        22: .line 513
            aload 1 /* iter */
            invokeinterface java.util.Iterator.remove:()V
        23: .line 511
      StackMap locals:
      StackMap stack:
            aload 1 /* iter */
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 21
        end local 1 // java.util.Iterator iter
        24: .line 515
            return
        end local 0 // com.mongodb.internal.connection.BaseCluster$WaitQueueHandler this
      LocalVariableTable:
        Start  End  Slot            Name  Signature
            0   25     0            this  Lcom/mongodb/internal/connection/BaseCluster$WaitQueueHandler;
            2   18     1    currentPhase  Ljava/util/concurrent/CountDownLatch;
            3   18     2  curDescription  Lcom/mongodb/connection/ClusterDescription;
            4   18     3   waitTimeNanos  J
            5   13     5            iter  Ljava/util/Iterator<Lcom/mongodb/internal/connection/BaseCluster$ServerSelectionRequest;>;
            7   12     6     nextRequest  Lcom/mongodb/internal/connection/BaseCluster$ServerSelectionRequest;
           20   24     1            iter  Ljava/util/Iterator<Lcom/mongodb/internal/connection/BaseCluster$ServerSelectionRequest;>;
      Exception table:
        from    to  target  type
          15    16      17  Class java.lang.InterruptedException
}
SourceFile: "BaseCluster.java"
NestHost: com.mongodb.internal.connection.BaseCluster
InnerClasses:
  private final ServerSelectionRequest = com.mongodb.internal.connection.BaseCluster$ServerSelectionRequest of com.mongodb.internal.connection.BaseCluster
  private final WaitQueueHandler = com.mongodb.internal.connection.BaseCluster$WaitQueueHandler of com.mongodb.internal.connection.BaseCluster