private Function<String, Optional<HeapHistogramEntry>> buildLineToEntryMapper(
            final Function<String, String> classNameReplacer) {

        Preconditions.checkNotNull(classNameReplacer);
        return line -> {
            Matcher matcher = lineMatchPattern.matcher(line);
            if (matcher.matches()) {
                //if this is a data row then extract the values of interest
                final long instances = Long.parseLong(matcher.group("instances"));
                final long bytes = Long.parseLong(matcher.group("bytes"));
                final String className = matcher.group("class");
                final String newClassName = classNameReplacer.apply(className);
                LOGGER.trace("className [{}], newClassName [{}]", className, newClassName);

                return Optional.of(new HeapHistogramEntry(newClassName, instances, bytes));
            } else {
                LOGGER.trace("Ignoring jamp histogram line [{}]", line);
                return Optional.empty();
            }
        };
    }
Generates a heap histogram using the 'gcClassHistogram' MBean action.  Will
block until the action completes/fails.
list of {@link HeapHistogramEntry}
stroom-node/stroom-node-impl/src/main/java/stroom/node/impl/HeapHistogramService.java