public boolean initiateShutdown() {
        synchronized (this) {
            if (isRunning()) {
                log.info("Shutting down");
                shutdownInitiated.countDown();
                if (isInterruptible)
                    interrupt();
                return true;
            } else
                return false;
        }
    }
@return true if the thread hasn't initiated shutdown already
server-common/src/main/java/org/apache/kafka/server/util/ShutdownableThread.java