openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r932118 - /openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
Date Thu, 08 Apr 2010 21:18:13 GMT
Author: ppoddar
Date: Thu Apr  8 21:18:12 2010
New Revision: 932118

URL: http://svn.apache.org/viewvc?rev=932118&view=rev
Log:
OPENJPA-703: Use weak map for caches

Modified:
    openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java

Modified: openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java?rev=932118&r1=932117&r2=932118&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
(original)
+++ openjpa/branches/2.0.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
Thu Apr  8 21:18:12 2010
@@ -39,6 +39,7 @@ import org.apache.openjpa.kernel.QuerySt
 import org.apache.openjpa.lib.conf.Configuration;
 import org.apache.openjpa.lib.log.Log;
 import org.apache.openjpa.lib.util.Localizer;
+import org.apache.openjpa.util.CacheMap;
 
 /**
  * An implementation of the cache of {@link PreparedQuery prepared queries}. 
@@ -62,8 +63,8 @@ public class PreparedQueryCacheImpl impl
     private static Localizer _loc = Localizer.forPackage(PreparedQueryCacheImpl.class);
     
 	public PreparedQueryCacheImpl() {
-		_delegate = new HashMap<String, PreparedQuery>();
-		_uncachables = new HashMap<String, Exclusion>();
+		_delegate = new CacheMap();
+		_uncachables = new CacheMap();
 		_stats = new QueryStatistics.Default<String>();
 		_exclusionPatterns = new ArrayList<Exclusion>();
 	}



Mime
View raw message