This service is used to distribute smartly the data over the JCR. It can help you to have the best
possible performances in read and write accesses, especially if you have a lot of nodes of the
same type to store, instead of storing them yourself under the same parent node (which can
affect the performances if you have a lot of nodes to store), we simply delegate data access and
storage to the
corresponding to the expected mode that will store the
data for you in an optimized and reliable way.
See below an example of how it can be used
// Get the data distribution corresponding to the readable mode
DataDistributionType type = manager.getDataDistributionType(DataDistributionMode.READABLE);
// Get or create the node corresponding to "john.smith"
Node node = type.getOrCreateDataNode(parentNode, "john.smith");
- Nicolas Filotto