private void migrateRangeValueEntries(final OffHeapRefDataLoader destStoreLoader,
                                          final BatchingWriteTxn destBatchingWriteTxn,
                                          final Txn<ByteBuffer> sourceReadTxn,
                                          final MapDefinition mapDefinition,
                                          final UID mapUid) {
        LOGGER.debug("Migrating Range/Value entries for {}, {}", mapDefinition, migrationState);
        // Loop over all range:value entries for this map name in this stream
        updateTaskContextInfoSupplier("Migrating range/value entries");
        rangeStoreDb.forEachEntryAsBytes(sourceReadTxn, mapUid, keyValBuffers -> {
            final ByteBuffer rangeStoreKeyBuffer = keyValBuffers.key();
            final ByteBuffer valueStoreKeyBuffer = keyValBuffers.val();

            final Byte typeId = valueStore.getTypeId(sourceReadTxn, valueStoreKeyBuffer);
            Objects.requireNonNull(typeId, "Every entry should have a corresponding value meta");
            final ByteBuffer refDataValueBuffer = valueStore.getAsBytes(sourceReadTxn, valueStoreKeyBuffer)
                    .orElseThrow(() -> new RuntimeException(
                            "Every entry should have a corresponding value"));

            destStoreLoader.migrateRangeEntry(
                    destBatchingWriteTxn,
                    mapDefinition,
                    rangeStoreKeyBuffer,
                    typeId,
                    refDataValueBuffer);
            migrationState.entriesMigrated.incrementAndGet();
            destBatchingWriteTxn.commitIfRequired();
        });
        LOGGER.debug("Migrated Range/Value entries for {}, {}", mapDefinition, migrationState);
    }
Migrate the data for refStreamId into destinationStore
stroom-pipeline/src/main/java/stroom/pipeline/refdata/store/offheapstore/StoreMigrator.java