[exo-jcr-commits] exo-jcr SVN: r475 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Nov 4 11:52:10 EST 2009
Author: pnedonosko
Date: 2009-11-04 11:52:09 -0500 (Wed, 04 Nov 2009)
New Revision: 475
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorage.java
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
Log:
EXOJCR-200: reorg for new storage arch
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorage.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorage.java 2009-11-04 16:44:38 UTC (rev 474)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorage.java 2009-11-04 16:52:09 UTC (rev 475)
@@ -59,16 +59,17 @@
public static final String ITEM_ID = "$id".intern();
- protected final Fqn<String> namesRoot;
+ protected final Fqn<String> treeRoot;
protected final Fqn<String> itemsRoot;
- protected JBossCacheStorage(Fqn<String> namesRoot, Fqn<String> itemsRoot)
+ protected JBossCacheStorage(Fqn<String> treeRoot, Fqn<String> itemsRoot)
{
- this.namesRoot = namesRoot;
+ this.treeRoot = treeRoot;
this.itemsRoot = itemsRoot;
}
+ @Deprecated
protected Fqn<String> makeNodeFqn(QPath nodePath)
{
QPathEntry[] path = nodePath.getEntries();
@@ -79,9 +80,10 @@
fqns[i] = path[i].getAsString(true);
}
- return Fqn.fromRelativeFqn(namesRoot, Fqn.fromElements(fqns));
+ return Fqn.fromRelativeFqn(treeRoot, Fqn.fromElements(fqns));
}
+ @Deprecated
protected Fqn<String> makeParentFqn(QPath propertyPath)
{
QPathEntry[] path = propertyPath.getEntries();
@@ -93,9 +95,14 @@
fqns[i] = path[i].getAsString(true);
}
- return Fqn.fromRelativeFqn(namesRoot, Fqn.fromElements(fqns));
+ return Fqn.fromRelativeFqn(treeRoot, Fqn.fromElements(fqns));
}
+ protected Fqn<String> makeTreeFqn(String parentId, QPathEntry itemName)
+ {
+ return Fqn.fromRelativeFqn(treeRoot, Fqn.fromElements(parentId, itemName.getAsString(true)));
+ }
+
protected Fqn<String> makeIdFqn(String itemId)
{
return Fqn.fromRelativeFqn(itemsRoot, Fqn.fromString(itemId));
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-11-04 16:44:38 UTC (rev 474)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-11-04 16:52:09 UTC (rev 475)
@@ -43,8 +43,10 @@
* <br/>Date: 23.10.2009<br/>
*
* Cache contains several regions:<br/>
- * Workspace tree. /$ROOT: On each leaf (JBossCache Node) an JCR Item Id stored.<br/>
- * Items map. /$ITEMS: Key=Id, Value = ItemData.<br/>
+ * Items stored in /$ITEMS: one level ItemId, ItemData in attrs<br/>
+ * Hierarchy in /$ITEMS: two level subtree, <br/>
+ * first ItemId (+attr=Properties Ids,ItemData), <br/>
+ * second JCR Node names with Node id in attr.<br/> <br/>
* References map ??? /$REFS: Key=NodeId, Value = PropertyId.<br/>
*
* @author <a href="mailto:peter.nedonosko at exoplatform.com.ua">Peter Nedonosko</a>
@@ -57,10 +59,6 @@
private final Cache<Serializable, Object> cache;
- //private final Node<Serializable, Object> treeRoot;
-
- //private final Node<Serializable, Object> itemsRoot;
-
/**
* Start batching flag. 'true' if batching was started, 'false' if batching is not start.
*/
More information about the exo-jcr-commits
mailing list