commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1214695 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
Date Thu, 15 Dec 2011 10:47:58 GMT
Author: sebb
Date: Thu Dec 15 10:47:58 2011
New Revision: 1214695

URL: http://svn.apache.org/viewvc?rev=1214695&view=rev
Log:
Document locking

Modified:
    commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java?rev=1214695&r1=1214694&r2=1214695&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
Thu Dec 15 10:47:58 2011
@@ -2134,10 +2134,10 @@ public class GenericKeyedObjectPool<K,T>
 
     /** My hash of pools (ObjectQueue). */
     private final Map<K,ObjectDeque<T>> poolMap =
-            new ConcurrentHashMap<K,ObjectDeque<T>>();
+            new ConcurrentHashMap<K,ObjectDeque<T>>(); // @GuardedBy("keyLock")
for write access (and some read access)
     
     /** List of pool keys - used to control eviction order */
-    private final List<K> poolKeyList = new ArrayList<K>();
+    private final List<K> poolKeyList = new ArrayList<K>(); // @GuardedBy("keyLock")
- except in evict() !?
 
     /** Lock used to manage adding/removing of keys */
     private final ReadWriteLock keyLock = new ReentrantReadWriteLock(true);



Mime
View raw message