code: public synchronized void onPotentiallyIdle(final IdleMessage reason) {
  
      final DriverStatusManager driverStatusManagerImpl = this.driverStatusManager.get();
  
      if (driverStatusManagerImpl.isClosing()) {
        LOG.log(IDLE_REASONS_LEVEL, "Ignoring idle call from [{0}] for reason [{1}]",
            new Object[] {reason.getComponentName(), reason.getReason()});
        return;
      }
  
      LOG.log(IDLE_REASONS_LEVEL, "Checking for idle because {0} reported idleness for reason [{1}]",
          new Object[] {reason.getComponentName(), reason.getReason()});
  
      boolean isIdle = true;
      for (final DriverIdlenessSource idlenessSource : this.idlenessSources) {
  
        final IdleMessage idleMessage = idlenessSource.getIdleStatus();
  
        LOG.log(IDLE_REASONS_LEVEL, "[{0}] is reporting {1} because [{2}].",
            new Object[] {idleMessage.getComponentName(),
                idleMessage.isIdle() ? "idle" : "not idle", idleMessage.getReason()});
  
        isIdle &= idleMessage.isIdle();
      }
  
      LOG.log(IDLE_REASONS_LEVEL, "onPotentiallyIdle: isIdle: " + isIdle);
  
      if (isIdle) {
        LOG.log(Level.INFO, "All components indicated idle. Initiating Driver shutdown.");
        driverStatusManagerImpl.onComplete();
      }
    }
docs: Check whether all Driver components are idle, and initiate driver shutdown if they are.
  @param reason An indication whether the component is idle, along with a descriptive message.