private LinkedBlockingQueue<Long> deleteMetaFiles(
            final TaskContext taskContext,
            final List<SimpleMeta> simpleMetas,
            final WorkQueue workQueue,
            final Progress progress,
            final Map<Path, Path> dirToVolPathMap) throws InterruptedException {

        final LinkedBlockingQueue<Long> successfulMetaIdDeleteQueue = new LinkedBlockingQueue<>();
        final DurationTimer durationTimer = DurationTimer.start();

        // Delete all matching files with concurrent threads working on a simpleMeta at a time
        for (final SimpleMeta simpleMeta : simpleMetas) {
            // No point starting jobs if we have gone over failure limit
            if (progress.hasBreachedThreshold()) {
                break;
            }
            final Runnable runnable = deleteFiles(
                    simpleMeta,
                    taskContext,
                    successfulMetaIdDeleteQueue,
                    progress,
                    dirToVolPathMap);

            workQueue.exec(runnable);
        }

        // Wait for all completable futures to complete.
        workQueue.join();
        progress.addFileDeletionDuration(durationTimer);
        // Can't use logDurationIfDebugEnabled due to InterruptedException
        LOGGER.debug(() -> LogUtil.message("{} - Deleted {} files for {} meta records in {}. " +
                                           "Number of failed streams: {}",
                TASK_NAME,
                progress.getSuccessCount(),
                simpleMetas.size(),
                durationTimer.get(),
                progress.getFailureCount()));

        if (Thread.interrupted()) {
            throw new InterruptedException();
        }
        return successfulMetaIdDeleteQueue;
    }
Deletes a batch of simpleMetas from the file system and the database.

@param deleteThresholdEpoch The threshold for statusTime, i.e. records <= deleteThresholdEpoch
@param progress             Count of failures that spans multiple batches
@return Those simpleMeta items that could not be deleted for some reason.
stroom-data/stroom-data-store-impl-fs/src/main/java/stroom/data/store/impl/fs/PhysicalDeleteExecutor.java