+ /*
+ * Implementation note: cookie is currently required only for module-based sharding, which is implemented as part
+ * of normal DataBroker interfaces. For DOMDataTreeProducer cookie will always be zero, hence
+ * we may end up not needing cookie at all.
+ *
+ * We use WritableObjects.writeLongs() to output historyId and cookie (in that order). If we
+ * end up not needing the cookie at all, we can switch to writeLong() and use zero flags for
+ * compatibility.
+ */