eXo JCR :: Component :: Extension Service 1.15.0-CR2

org.exoplatform.services.jcr.ext.distribution
Interface DataDistributionManager

All Known Implementing Classes:
DataDistributionManagerImpl

public interface DataDistributionManager

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 DataDistributionType 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");
 

Version:
$Id$
Author:
Nicolas Filotto

Method Summary
 DataDistributionType getDataDistributionType(DataDistributionMode mode)
          Retrieves the data distribution type corresponding to given mode.
 

Method Detail

getDataDistributionType

DataDistributionType getDataDistributionType(DataDistributionMode mode)
Retrieves the data distribution type corresponding to given mode.

Parameters:
mode - the mode of distribution to use
Returns:
the expected mode if it exists null otherwise.

eXo JCR :: Component :: Extension Service 1.15.0-CR2

Copyright © 2012 eXo Platform SAS. All Rights Reserved.