svn commit: r653775 - /lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: jann
Date: Tue May  6 06:43:27 2008
New Revision: 653775

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

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

Modified: lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java
URL: http://svn.apache.org/viewvc/lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java?rev=653775&r1=653774&r2=653775&view=diff
==============================================================================
--- lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java (original)
+++ lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java Tue May  6 06:43:27 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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.