private static Dbi<ByteBuffer> openDbi(final Env<ByteBuffer> env,
                                           final String name,
                                           final DbiFlags... dbiFlags) {
        LOGGER.debug("Opening LMDB database with name: {}", name);
        final DbiFlags[] flags = dbiFlags.length > 0
                ? dbiFlags
                : (new DbiFlags[]{DbiFlags.MDB_CREATE});
        try {
            return env.openDbi(name, flags);
        } catch (Exception e) {
            throw new RuntimeException(LogUtil.message("Error opening LMDB database {}", name), e);
        }
    }
@param lmdbEnvironment The LMDB {@link Env} to add this DB to.
@param byteBufferPool  A self loading pool of reusable ByteBuffers.
@param keySerde        The {@link Serde} to use for the keys.
@param valueSerde      The {@link Serde} to use for the values.
@param dbName          The name of the database.
@param dbiFlags        The dbi flags to use when initialising the DB. If not provided, only MDB_CREATE will
                       be used.
stroom-lmdb/src/main/java/stroom/lmdb/AbstractLmdbDb.java