portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r727545 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/ jetspeed-api/src/main/java/org/apache/jetspeed/page/
Date Wed, 17 Dec 2008 22:22:11 GMT
Author: rwatler
Date: Wed Dec 17 14:22:10 2008
New Revision: 727545

URL: http://svn.apache.org/viewvc?rev=727545&view=rev
Log:
DB Page Manager Distributed Cache
- propagate distributed cache update/remove notification to page manager event listeners


Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java?rev=727545&r1=727544&r2=727545&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
Wed Dec 17 14:22:10 2008
@@ -84,6 +84,7 @@
 import org.apache.jetspeed.page.document.DocumentNotFoundException;
 import org.apache.jetspeed.page.document.FailedToDeleteDocumentException;
 import org.apache.jetspeed.page.document.FailedToUpdateDocumentException;
+import org.apache.jetspeed.page.document.Node;
 import org.apache.jetspeed.page.document.NodeException;
 import org.apache.jetspeed.page.document.NodeSet;
 import org.apache.jetspeed.page.document.impl.NodeImpl;
@@ -1850,4 +1851,13 @@
     {
         return DatabasePageManagerCache.isDistributed();
     }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.PageManager#notifyUpdatedNode(org.apache.jetspeed.page.document.Node)
+     */
+    public void notifyUpdatedNode(Node node)
+    {
+        // notify page manager listeners
+        delegator.notifyUpdatedNode(node);
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java?rev=727545&r1=727544&r2=727545&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
Wed Dec 17 14:22:10 2008
@@ -198,6 +198,8 @@
                                 {
                                     ((FolderImpl)node).resetAll(false);
                                 }
+                                // notify page manager of update
+                                pageManager.notifyUpdatedNode(node);
                                 // remove from cache
                                 oidCache.removeQuiet(oid);
                             }
@@ -212,7 +214,7 @@
                                 {
                                     ((FolderImpl)parentNode).resetAll(false);
                                 }
-                                // remove from cache
+                                // ensure removed from cache
                                 pathCache.removeQuiet(path);
                             }
                         }                        
@@ -255,8 +257,7 @@
             if (pathElement != null)
             {
                 final DatabasePageManagerCacheObject cacheObject = (DatabasePageManagerCacheObject)pathElement.getContent();
-                final NodeImpl node = (NodeImpl)cacheLookup(cacheObject.getId());
-                return node;
+                return (NodeImpl)cacheLookup(cacheObject.getId());
             }
         }
         return null;

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java?rev=727545&r1=727544&r2=727545&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java
Wed Dec 17 14:22:10 2008
@@ -40,6 +40,7 @@
 import org.apache.jetspeed.page.document.DocumentNotFoundException;
 import org.apache.jetspeed.page.document.FailedToDeleteDocumentException;
 import org.apache.jetspeed.page.document.FailedToUpdateDocumentException;
+import org.apache.jetspeed.page.document.Node;
 import org.apache.jetspeed.page.document.NodeException;
 import org.apache.jetspeed.page.document.NodeSet;
 import org.apache.jetspeed.page.document.UnsupportedDocumentTypeException;
@@ -721,4 +722,11 @@
      * @return distributed flag
      */
     public boolean isDistributed();
+
+    /**
+     * Notify page manager listeners that node modification was externally detected.
+     *
+     * @param node updated managed node if known
+     */
+    public void notifyUpdatedNode(Node node);
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message