@NotNull
    private <T> List<T> acquireListUnderLock(@NotNull Collection<? extends T> files) {
      return withLock(PROCESSING_LOCK.writeLock(), () -> {
        List<T> copiedFiles = new ArrayList<>(files);
        files.clear();
        return copiedFiles;
      });
    }
@NotNull
    private <T> List<T> acquireListUnderLock(@NotNull Collection<? extends T> files)