if (LOG.isDebugEnabled())
LOG.debug("WRITE " + hex(id) + " ver: " + version + " data: " + (data != null ? "(" + data.length + " bytes)" : "null"));
final DatabaseEntry key = new DatabaseEntry(Longs.toByteArray(id));
final DatabaseEntry dbEntry = new DatabaseEntry();
entryBinding.objectToEntry(new MainMemoryEntry(version, data), dbEntry);
mainStore.put((Transaction) txn, key, dbEntry);
// try to write owner, but only if nonexistent (i.e will happen at first put only)
ownerDirectory.putNoOverwrite((Transaction) txn, key, new DatabaseEntry(Shorts.toByteArray(owner)));
}