public LmdbEnvDir getDir() {
        return lmdbEnvDir;
    }
Synchronise writes to ensure only a single thread can write.

@param consumer Consumer for the write transaction.
stroom-lmdb/src/main/java/stroom/lmdb2/LmdbEnv.java