roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r233403 - in /incubator/roller/trunk/src/org/roller/business: PlanetManagerImpl.java hibernate/HibernatePlanetManagerImpl.java
Date Fri, 19 Aug 2005 01:57:25 GMT
Author: snoopdave
Date: Thu Aug 18 18:57:12 2005
New Revision: 233403

URL: http://svn.apache.org/viewcvs?rev=233403&view=rev
Log:
Fixed bug that was causing Planet feed's lastBuildDate to get stuck at startup time

Modified:
    incubator/roller/trunk/src/org/roller/business/PlanetManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernatePlanetManagerImpl.java

Modified: incubator/roller/trunk/src/org/roller/business/PlanetManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/business/PlanetManagerImpl.java?rev=233403&r1=233402&r2=233403&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/business/PlanetManagerImpl.java (original)
+++ incubator/roller/trunk/src/org/roller/business/PlanetManagerImpl.java Thu Aug 18 18:57:12
2005
@@ -38,8 +38,6 @@
 {
     protected Roller roller = null;
     protected PersistenceStrategy strategy;
-    protected Date lastUpdated = new Date();
-    protected Map lastUpdatedByGroup = new HashMap();
     
     // Cache up to 20 aggregations, each for up to 30 minutes
     // TODO: make this aggregation cache configurable
@@ -229,21 +227,4 @@
                 + ((endTime-startTime)/1000.0) + " seconds");
     }
 
-    public synchronized void clearCachedAggregations() 
-    {
-        aggregationsByGroup.purge();
-        topSubscriptionsByGroup.purge();
-        lastUpdatedByGroup.clear();
-        lastUpdated = new Date();
-    }
-    
-    public Date getLastUpdated()
-    {
-        return lastUpdated;
-    }
-    
-    public Date getLastUpdated(PlanetGroupData group)
-    {
-        return (Date)lastUpdatedByGroup.get(group);
-    }
 }

Modified: incubator/roller/trunk/src/org/roller/business/hibernate/HibernatePlanetManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/business/hibernate/HibernatePlanetManagerImpl.java?rev=233403&r1=233402&r2=233403&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/business/hibernate/HibernatePlanetManagerImpl.java
(original)
+++ incubator/roller/trunk/src/org/roller/business/hibernate/HibernatePlanetManagerImpl.java
Thu Aug 18 18:57:12 2005
@@ -18,8 +18,10 @@
 
 import java.util.ArrayList;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import net.sf.hibernate.Criteria;
 import net.sf.hibernate.HibernateException;
@@ -46,9 +48,9 @@
  * @author Dave Johnson
  */
 public class HibernatePlanetManagerImpl extends PlanetManagerImpl
-{
-    private static final String NO_GROUP = "zzz_nogroup_zzz"; 
-    
+{    
+    protected Map lastUpdatedByGroup = new HashMap();
+    protected static final String NO_GROUP = "zzz_nogroup_zzz";
     private static Log logger = 
         LogFactory.getFactory().getInstance(HibernatePlanetManagerImpl.class);
 
@@ -352,6 +354,23 @@
             topSubscriptionsByGroup.put(groupHandle, ret);
         }
         return ret;
+    }
+        
+    public synchronized void clearCachedAggregations() 
+    {
+        aggregationsByGroup.purge();
+        topSubscriptionsByGroup.purge();
+        lastUpdatedByGroup.clear();
+    }
+    
+    public Date getLastUpdated()
+    {
+        return (Date)lastUpdatedByGroup.get(NO_GROUP);
+    }
+    
+    public Date getLastUpdated(PlanetGroupData group)
+    {
+        return (Date)lastUpdatedByGroup.get(group);
     }
 }
 



Mime
View raw message