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;
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.