You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2011/12/17 18:59:54 UTC
svn commit: r1215539 -
/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/ResourceManager_impl.java
Author: schor
Date: Sat Dec 17 17:59:54 2011
New Revision: 1215539
URL: http://svn.apache.org/viewvc?rev=1215539&view=rev
Log:
no Jira - added comment
Modified:
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/ResourceManager_impl.java
Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/ResourceManager_impl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/ResourceManager_impl.java?rev=1215539&r1=1215538&r2=1215539&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/ResourceManager_impl.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/ResourceManager_impl.java Sat Dec 17 17:59:54 2011
@@ -109,6 +109,13 @@ public class ResourceManager_impl implem
/**
* Cache of imported descriptors, so that parsed objects can be reused if the
* same URL is imported more than once.
+ *
+ * Use Case where synchronization is needed:
+ * running multiple instances on multiple threads, sharing a common resource manager,
+ * the initialization that merges typePriorities happens lazily, when using Cas Multipliers,
+ * and occurs when the first getCas call happens on a thread. Although these calls
+ * are synchronized among themselves, any other use of this map that might occur
+ * simultaneously is not.
*/
private Map<String,XMLizable> importCache = Collections.synchronizedMap(new HashMap<String,XMLizable>());