private void outputDebug(final ClusterState clusterState) {
        try {
            if (LOGGER.isDebugEnabled()) {
                final StringBuilder builder = new StringBuilder();
                builder.append("Setting cluster state:");

                if (clusterState == null) {
                    builder.append(" NULL");

                } else {
                    final List<String> nodes = asList(clusterState.getAllNodes());
                    for (final String nodeName : nodes) {
                        builder.append("\n\t");
                        builder.append(nodeName);
                        if (nodeName.equals(clusterState.getMasterNodeName())) {
                            builder.append("(MASTER)");
                        }
                    }
                }

                LOGGER.debug(builder.toString());
            }
        } catch (final RuntimeException e) {
            // Ignore exceptions.
        }
    }
Gets the current cluster state. If the current state is null or is older
than the expiry time then the cluster state will be updated
asynchronously ready for subsequent calls. The current state is still
returned so could be null
stroom-cluster/stroom-cluster-impl/src/main/java/stroom/cluster/impl/ClusterNodeManagerImpl.java