private Function<String, String> getClassReplacementMapper() {
        final String anonymousIdRegex = heapHistogramConfigProvider.get().getClassNameReplacementRegex();

        if (anonymousIdRegex == null || anonymousIdRegex.isEmpty()) {
            return Function.identity();
        } else {
            try {
                final Pattern pattern = Pattern.compile(anonymousIdRegex);
                return className -> pattern.matcher(className).replaceAll(ID_REPLACEMENT);
            } catch (final RuntimeException e) {
                LOGGER.error("Value [{}] for property [{}] is not valid regex",
                        anonymousIdRegex, "classNameReplacementRegex", e);
                return Function.identity();
            }
        }
    }
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