You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ja...@apache.org on 2008/05/06 15:44:02 UTC

svn commit: r653776 - /lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java

Author: jann
Date: Tue May  6 06:44:02 2008
New Revision: 653776

URL: http://svn.apache.org/viewvc?rev=653776&view=rev
Log:
synchronize all access to LRUMap

Modified:
    lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java

Modified: lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java?rev=653776&r1=653775&r2=653776&view=diff
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java (original)
+++ lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java Tue May  6 06:44:02 2008
@@ -78,7 +78,7 @@
     /**
      * @see org.apache.lenya.ac.cache.SourceCache#get(java.lang.String, org.apache.lenya.ac.cache.InputStreamBuilder)
      */
-    public Object get(String sourceUri, InputStreamBuilder builder) throws CachingException {
+    public synchronized Object get(String sourceUri, InputStreamBuilder builder) throws CachingException {
 
         String key = sourceUri;
         Object value = null;
@@ -186,7 +186,7 @@
      * @throws SourceNotFoundException when an error occurs.
      * @throws BuildException if an error occurs.
      */
-    protected Object buildObject(String sourceUri, InputStreamBuilder builder)
+    protected synchronized Object buildObject(String sourceUri, InputStreamBuilder builder)
         throws MalformedURLException, IOException, SourceNotFoundException, BuildException {
         Object value = null;
         Source source = null;
@@ -211,7 +211,7 @@
      * @throws MalformedURLException when an error occurs.
      * @throws IOException when an error occurs.
      */
-    protected SourceValidity getSourceValidity(String sourceUri)
+    protected synchronized SourceValidity getSourceValidity(String sourceUri)
         throws MalformedURLException, IOException {
         SourceValidity sourceValidity;
         Source source = null;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org