public PutOutcome put(final Txn<ByteBuffer> writeTxn,
                          final K key,
                          final V value,
                          final boolean overwriteExisting,
                          final boolean isAppending) {
        try (final PooledByteBuffer pooledKeyBuffer = getPooledKeyBuffer();
                final PooledByteBuffer pooledValueBuffer = getPooledValueBuffer()) {

            final ByteBuffer keyBuffer = pooledKeyBuffer.getByteBuffer();
            final ByteBuffer valueBuffer = pooledValueBuffer.getByteBuffer();

            serializeKey(keyBuffer, key);
            serializeValue(valueBuffer, value);

            return put(
                    writeTxn,
                    keyBuffer,
                    valueBuffer,
                    overwriteExisting,
                    isAppending);
        } catch (RuntimeException e) {
            throw new RuntimeException(LogUtil.message("Error putting key {}, value {}", key, value), e);
        }
    }
@param writeTxn
@param key
@param value
@param overwriteExisting If true it will overwrite an existing entry with the same key. If false will
                         not do anything if an existing entry exists. If the database has
                         {@link DbiFlags#MDB_DUPSORT} set then you need to set this to true
                         to put multiple values for the same key.
@param isAppending       Set this to true if you are sure the key is going on the end of the DB.
                         Speeds up the put.
@return
stroom-lmdb/src/main/java/stroom/lmdb/AbstractLmdbDb.java