private static Predicate<Object> createTaskTerminatedCheck(final TaskContext taskContext) {
        return obj -> {
            if (taskContext.isTerminated()) {
                LOGGER.info("{} - Task is terminated: '{}'", RE_INDEX_JOB_NAME, taskContext);
                return false;
            } else if (Thread.currentThread().isInterrupted()) {
                LOGGER.info("{} - Task thread is interrupted: '{}'", RE_INDEX_JOB_NAME, taskContext);
                return false;
            } else {
                return true;
            }
        };
    }
Re-index all indexable items on the system
stroom-index/stroom-index-lucene980/src/main/java/stroom/contentindex/LuceneContentIndex.java