protected String[] listSupportedSASLMechanisms(AtomicBoolean done) {
    final CountDownLatch listMechsLatch = new CountDownLatch(1);
    final AtomicReference<String> supportedMechs =
      new AtomicReference<String>();
    Operation listMechsOp = opFact.saslMechs(new OperationCallback() {
      @Override
      public void receivedStatus(OperationStatus status) {
        if(status.isSuccess()) {
          supportedMechs.set(status.getMessage());
          getLogger().debug("Received SASL supported mechs: "
            + status.getMessage());
        } else {
          getLogger().warn("Received non-success response for SASL mechs: "
            + status);
        }
      }

      @Override
      public void complete() {
        listMechsLatch.countDown();
      }

    });

    conn.insertOperation(node, listMechsOp);

    try {
      if (!conn.isShutDown()) {
        listMechsLatch.await();
      } else {
        done.set(true); // Connection is shutting down, tear.down.
      }
    } catch(InterruptedException ex) {
      getLogger().warn("Interrupted in Auth while waiting for SASL mechs.");
      // we can be interrupted if we were in the
      // process of auth'ing and the connection is
      // lost or dropped due to bad auth
      Thread.currentThread().interrupt();
      if (listMechsOp != null) {
        listMechsOp.cancel();
      }
      done.set(true); // If we were interrupted, tear down.
    }

    String supported = supportedMechs.get();
    if (supported == null || supported.isEmpty()) {
      return null;
    }
    return supported.split(MECH_SEPARATOR);
  }
If the total AUTH steps take longer than this period in milliseconds, a
warning will be issued instead of a debug message.
src/main/java/net/spy/memcached/auth/AuthThread.java