private <T> List<T> getListOnAllStores(final int limit,
                                           final Function<RefDataOffHeapStore, List<T>> listFunction) {

        // It is possible this would benefit from some form of parallelism but have not used .parallel() as IO
        // is involved, so it may tie up the fork join pool
        Stream<T> stream = getAllStoresAsStream()
                .flatMap(store ->
                        listFunction.apply(store).stream());
        if (limit > 0 && limit < Integer.MAX_VALUE) {
            stream = stream.limit(limit);
        }
        return stream.collect(Collectors.toList());
    }
Get all ref stores keyed by feed name

@return Map of feedName => {@link RefDataOffHeapStore}
stroom-pipeline/src/main/java/stroom/pipeline/refdata/store/offheapstore/DelegatingRefDataOffHeapStore.java