private boolean isTerminated() {
        if (Thread.currentThread().isInterrupted()) {
            LOGGER.debug("Thread is interrupted");
            return true;
        } else {
            final TaskContext taskContext = taskContextFactory.current();
            if (taskContext != null && taskContext.isTerminated()) {
                LOGGER.debug("Task is terminated");
                return true;
            } else {
                return false;
            }
        }
    }
Ensures that the effective external ref stream is loaded, doing the load if it
is not. It then mutates result to set a value proxy on it so that downstream
code can use the proxy to get the value from the store.
The effective stream is determined based on the time used in the lookup() call
and the effective time of the various reference streams, i.e. picking the last ref
stream before the lookup time.
stroom-pipeline/src/main/java/stroom/pipeline/refdata/ReferenceData.java