portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r727527 - in /portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE: components/page-manager/src/java/org/apache/jetspeed/page/impl/ jetspeed-api/src/java/org/apache/jetspeed/page/
Date Wed, 17 Dec 2008 21:53:31 GMT
Author: rwatler
Date: Wed Dec 17 13:53:30 2008
New Revision: 727527

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


Modified:
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManager.java?rev=727527&r1=727526&r2=727527&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
(original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
Wed Dec 17 13:53:30 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;
@@ -1835,4 +1836,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/branches/JETSPEED-2.1.3-POSTRELEASE/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java?rev=727527&r1=727526&r2=727527&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
(original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/page-manager/src/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
Wed Dec 17 13:53:30 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/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java?rev=727527&r1=727526&r2=727527&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java
(original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java
Wed Dec 17 13:53:30 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;
@@ -702,4 +703,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