Author: pnedonosko
Date: 2009-12-21 10:37:24 -0500 (Mon, 21 Dec 2009)
New Revision: 1136
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
Log:
EXOJCR-333: JCR cache concepts in the class javadoc
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
---
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2009-12-21
15:30:24 UTC (rev 1135)
+++
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2009-12-21
15:37:24 UTC (rev 1136)
@@ -19,7 +19,6 @@
package org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache;
import org.exoplatform.services.jcr.access.AccessControlList;
-import org.exoplatform.services.jcr.config.CacheEntry;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.WorkspaceEntry;
import org.exoplatform.services.jcr.dataflow.ItemState;
@@ -59,32 +58,29 @@
*
* Cache based on JBossCache.<p/>
*
- * <pre>
- * TODO
- * 1. cache transparent: or item cached or not, we should not generate "not
found" Exceptions
- * 2. all child nodes should be evicted from parent at same time (Ids of childs)
- * 3. node should not be evicted if listed in child nodes somewhere, or
- * eviction of a node causes eviction of whole childs list
- * 4. properties in attributes of a node, they will be evicted with the node at
same time
- * 5. but property should not be evicted if listed in attributes of a node
somewhere, or
- * eviction of a property causes eviction of its parent node (and as a result
eviction
- * of childs where this node listed)
- * 6. or we have fully independent ITEMS and CHILD_NODES with CHILD_PROPS
- * i.e. CHILD_x contains real ItemDatas of all childs of a parent.
- * It will be simple for eviction policy but will cause more replication
traffic
- * as will replicated dublicated data often.
- * ITEMS for read by Id only. CHILD_x for read by parentId and name,
- * first read CHILD_NODES, if not found read CHILD_PROPS.
- * Only a small data will be replicated, not so big deal IMO.
- * Good that CHILD_x and ITEMS will live its own lifecycles, and will be
populated on demand independently.
- * </pre>
+ * <ul>
+ * <li>cache transparent: or item cached or not, we should not generate "not
found" Exceptions </li>
+ * <li>cache consists of next resident nodes:
+ * <ul>
+ * <li>/$ITEMS - stores items by Id</li>
+ * <li>/$CHILD_NODES, /$CHILD_PROPS - stores items by parentId and name (e.g.
/$CHILD_NODES/parentId/childName/$ITEM_ID)</li>
+ * <li>/$CHILD_NODES_LIST, /$CHILD_PROPS_LIST - stores childs list by parentId
and child Id (e.g. /$CHILD_NODES_LIST/parentId/childId)</li>
+ * </ul>
+ * </li>
+ * <li>all child properties/nodes lists should be evicted from parent at same time
+ * i.e. for /$CHILD_NODES_LIST, /$CHILD_PROPS_LIST we need customized eviction
policy (EvictionActionPolicy) to evict
+ * whole list on one of childs eviction
+ * </li>
+ * </ul>
+ *
+ * <p/>
+ * Current state notes (subject of change):
+ * <ul>
+ * <li>cache implements WorkspaceStorageCache, without any stuff about references
and locks</li>
+ * <li>transaction style implemented via JBC barches, do with JTA (i.e. via
exo's TransactionService + JBoss TM)</li>
+ * <li>we need customized eviction policy (EvictionActionPolicy) for
/$CHILD_NODES_LIST, /$CHILD_PROPS_LIST</li>
+ * </ul>
*
- * <pre>
- * TODO #2
- * 1. CHILD_x should be consistent with ITEMS (e.g. via custom eviction policy),
otherwise it's should be only ITEMS.
- * 2. CHILD_x_LIST should be consistent as list, i.e. if one of child record evicted,
the whole list should be removed.
- * </pre>
- *
* @author <a href="mailto:peter.nedonosko@exoplatform.com">Peter
Nedonosko</a>
* @version $Id: JBossCacheWorkspaceStorageCache.java 13869 2008-05-05 08:40:10Z
pnedonosko $
*/
Show replies by date