@Override
    public Long ping(final String sourceNode) {
        try {
            // Update the cluster state if the node trying to ping us is not us.
            final String thisNodeName = nodeInfo.getThisNodeName();
            if (!thisNodeName.equals(sourceNode)) {
                // Try and get the cluster state and make sure we know about the
                // node trying to ping us. If we can't get the cluster state or
                // the current state doesn't know the source node is active then
                // update the cluster state.
                if (clusterState.getUpdateTime() != 0) {
                    final Set<String> enabledActiveNodes = clusterState.getEnabledActiveNodes();
                    if (!enabledActiveNodes.contains(sourceNode)) {
                        LOGGER.debug("""
                                ping() - Just had a ping from a node that was not in our ping list. \
                                Next cluster call we will re-discover""");
                        updateClusterStateAsync(REQUERY_DELAY, true);
                    }
                } else {
                    updateClusterStateAsync(REQUERY_DELAY, true);
                }
            }
        } catch (final RuntimeException e) {
            LOGGER.error(e.getMessage(), e);
        }

        return System.currentTimeMillis();
    }
Gets the current cluster state or builds a new cluster state if no
current state exists but without locking. This method is quick as either
the current state is returned or a basic state is created that does not
attempt to determine which nodes are active or what the current master
node is.
stroom-cluster/stroom-cluster-impl/src/main/java/stroom/cluster/impl/ClusterNodeManagerImpl.java