public void setPauseState(final boolean isPaused) {
        if (isPaused) {
            pause();
        } else {
            resume();
        }
    }
If true, pause the executor's threads after they have completed their current task.
if false, resume all the executor's threads.
If already in the desired state, is a noop.
stroom-proxy/stroom-proxy-repo/src/main/java/stroom/proxy/repo/ParallelExecutor.java