commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1213943 - in /commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl: GenericKeyedObjectPool.java GenericObjectPool.java
Date Tue, 13 Dec 2011 21:52:42 GMT
Author: sebb
Date: Tue Dec 13 21:52:41 2011
New Revision: 1213943

URL: http://svn.apache.org/viewvc?rev=1213943&view=rev
Log:
Document thread-safety

Modified:
    commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.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=1213943&r1=1213942&r2=1213943&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
Tue Dec 13 21:52:41 2011
@@ -2126,9 +2126,9 @@ public class GenericKeyedObjectPool<K,T>
     private final AtomicLong destroyedCount = new AtomicLong(0);
     private final AtomicLong destroyedByEvictorCount = new AtomicLong(0);
     private final AtomicLong destroyedByBorrowValidationCount = new AtomicLong(0);
-    private final LinkedList<Long> activeTimes = new LinkedList<Long>();
-    private final LinkedList<Long> idleTimes = new LinkedList<Long>();
-    private final LinkedList<Long> waitTimes = new LinkedList<Long>();
+    private final LinkedList<Long> activeTimes = new LinkedList<Long>(); // @GuardedBy("activeTimes")
- except in initStats()
+    private final LinkedList<Long> idleTimes = new LinkedList<Long>(); // @GuardedBy("activeTimes")
- except in initStats()
+    private final LinkedList<Long> waitTimes = new LinkedList<Long>(); // @GuardedBy("activeTimes")
- except in initStats()
 
     private final Object maxBorrowWaitTimeMillisLock = new Object();
     private volatile long maxBorrowWaitTimeMillis = 0; // @GuardedBy("maxBorrowWaitTimeMillisLock")

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java?rev=1213943&r1=1213942&r2=1213943&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
Tue Dec 13 21:52:41 2011
@@ -1576,9 +1576,9 @@ public class GenericObjectPool<T> extend
     private final AtomicLong destroyedCount = new AtomicLong(0);
     private final AtomicLong destroyedByEvictorCount = new AtomicLong(0);
     private final AtomicLong destroyedByBorrowValidationCount = new AtomicLong(0);
-    private final LinkedList<Long> activeTimes = new LinkedList<Long>();
-    private final LinkedList<Long> idleTimes = new LinkedList<Long>();
-    private final LinkedList<Long> waitTimes = new LinkedList<Long>();
+    private final LinkedList<Long> activeTimes = new LinkedList<Long>(); // @GuardedBy("activeTimes")
- except in initStats()
+    private final LinkedList<Long> idleTimes = new LinkedList<Long>(); // @GuardedBy("activeTimes")
- except in initStats()
+    private final LinkedList<Long> waitTimes = new LinkedList<Long>(); // @GuardedBy("activeTimes")
- except in initStats()
 
     private final Object maxBorrowWaitTimeMillisLock = new Object();
     private volatile long maxBorrowWaitTimeMillis = 0; // @GuardedBy("maxBorrowWaitTimeMillisLock")



Mime
View raw message