private <K> void doPut(final K key,
                           final ByteBuffer keyBuffer,
                           final StagingValue stagingValue,
                           final AbstractLmdbDb<K, ?> stagingDb) {

        stagingDb.serializeKey(keyBuffer, key);
        final ByteBuffer valueBuffer = stagingValue.getFullByteBuffer();

        batchingWriteTxn.processBatchItem(writeTxn -> {
            // Use the put method on the Dbi as we want to put directly without all the get/put stuff
            // to determine what was there before. Also, the db is set to MDB_DUPSORT so any dups in
            // the source data will be kept as dups in the db.
            try {
                final PutOutcome putOutcome = stagingDb.put(
                        writeTxn,
                        keyBuffer,
                        valueBuffer,
                        false,
                        false);
                if (!putOutcome.isSuccess()) {
                    throw new RuntimeException(LogUtil.message("Unsuccessful putOutcome {} putting entry to {}",
                            putOutcome, stagingDb.getDbName()));
                }
            } catch (Exception e) {
                throw new RuntimeException(LogUtil.message("""
                                Error putting entry to staging store (db: {}): {}
                                keyBuffer: {},
                                valueBuffer: {}""",
                        stagingDb.getDbName(),
                        e.getMessage(),
                        ByteBufferUtils.byteBufferInfo(keyBuffer),
                        ByteBufferUtils.byteBufferInfo(valueBuffer)), e);
            }
        });
    }
Put an entry into the staging store. Entries with null values or duplicate keys will
all be stored.
stroom-pipeline/src/main/java/stroom/pipeline/refdata/store/offheapstore/OffHeapStagingStore.java