@Override
    protected synchronized void setWorking(boolean working, String explanation) {
        atStartUp = false;
        if (this.isWorking == working) return; // Old news

        if (explanation == null) {
            explanation = "";
        } else {
            explanation = ": " + explanation;
        }

        if (working) {
            log.info("Putting " + node + " in service" + explanation);
        } else {
            log.warning("Taking " + node + " out of service" + explanation);
            failedAt = now();
        }

        this.isWorking = working;
    }
Thread-safely changes the state of this node if required
container-search/src/main/java/com/yahoo/search/cluster/TrafficNodeMonitor.java