code: public boolean setMasterHostFail() {
      if (masterHostFail.compareAndSet(false, true)) {
        masterHostFailNanos = System.nanoTime();
        currentConnectionAttempts.set(0);
        return true;
      }
      return false;
    }
docs: Set master fail variables.
  
  @return true if was already failed