code: public synchronized boolean lockdown(ConnectionException connectionException) {
          // If we are already in a lockdown state, don't change anything
          if (isLockedDown()) {
              return false;
          }
  
          if (connectionException != null && connectionException.getRecommendedLockdownTime() != null) {
              lockdownTime = connectionException.getRecommendedLockdownTime();
          } else if (lockdownTime != 0) {
              lockdownTime = lockdownTime * 2;
          } else {
              lockdownTime = baseLockdownTime;
          }
  
          lockdownTime = Math.min(maxLockdownTime, lockdownTime);
          lockdownStartTime = clock.date();
  
          return true;
      }
docs: Enable lockdown if it's not already enabled, using the recommended time
  from the provided {@link ConnectionException}, if any.
  
  @param connectionException ConnectionException to check for a recommended
  lockdown time, may be null
  @return whether or not this call actually locked the system down