private RefStoreEntry buildRefStoreEntry(
            final Txn<ByteBuffer> readTxn,
            final UID mapUid,
            final String key,
            final ValueStoreKey valueStoreKey,
            final Map<UID, MapDefinition> uidToMapDefMap,
            final Map<MapDefinition, RefDataProcessingInfo> mapDefToProcessingInfoMap) {

        LOGGER.trace("mapUid: {}", mapUid);
        // Cache the map def lookups as we only have a handful and it saves the deser cost
        final MapDefinition mapDefinition = uidToMapDefMap.computeIfAbsent(
                mapUid,
                uid ->
                        mapDefinitionUIDStore.get(readTxn, mapUid)
                                .orElseThrow(() ->
                                        new RuntimeException("No MapDefinition for UID " + mapUid.toString())));

        LOGGER.trace("mapDefinition: {}", mapDefinition.toString());
        // Cache the ref stream lookups as we only have a handful and it saves the deser cost
        final RefDataProcessingInfo refDataProcessingInfo = mapDefToProcessingInfoMap.computeIfAbsent(
                mapDefinition,
                mapDefinition2 ->
                        processingInfoDb.get(readTxn,
                                        mapDefinition.getRefStreamDefinition())
                                .orElse(null));

        final String value = getReferenceDataValue(readTxn, key, valueStoreKey);

        // Not ideal having to re-serialise the key
        final int valueReferenceCount = valueStore.getReferenceCount(readTxn, valueStoreKey)
                .orElse(-1);

        return new RefStoreEntry(
                lmdbEnvironment.getFeedName(),
                mapDefinition,
                key,
                value,
                valueReferenceCount,
                refDataProcessingInfo);
    }
For use in testing at SMALL scale. Dumps the content of each DB to the logger.
stroom-pipeline/src/main/java/stroom/pipeline/refdata/store/offheapstore/RefDataOffHeapStore.java