private synchronized void doLivenessCheck() {
        boolean isLive;
        String msg = null;
        try {
            isLive = delegateDestination.performLivenessCheck();
            LOGGER.debug("'{}' - isLive: {}", destinationName, isLive);
        } catch (Exception e) {
            LOGGER.debug("Error performing liveness check", e);
            isLive = false;
            msg = e.getMessage();
        }

        final boolean hasChanged = lastLiveCheckResult.compareAndSet(!isLive, isLive);
        if (hasChanged) {
            if (isLive) {
                LOGGER.info("'{}' - destination liveness check passed, resuming all forwarding and retries",
                        destinationName);
            } else {
                LOGGER.warn("'{}' - destination liveness check failed, pausing all forwarding and retries. {}",
                        destinationName, msg);
            }
        } else {
            if (!isLive) {
                LOGGER.warn("'{}' - destination liveness check still failing. {}", destinationName, msg);
            }
        }
        // Let the executor worry if it has already been set or not
        forwardExecutor.setPauseState(!isLive);
        retryExecutor.setPauseState(!isLive);
    }
Holds the state relating to retries. Held in binary form.
stroom-proxy/stroom-proxy-app/src/main/java/stroom/proxy/app/handler/RetryingForwardDestination.java