[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: svn commit: r1163822 - in
From: markt () apache ! org
Date: 2011-08-31 21:23:29
Message-ID: 20110831212330.0DB3F2388A19 () eris ! apache ! org
[Download RAW message or body]
Author: markt
Date: Wed Aug 31 21:23:29 2011
New Revision: 1163822
URL: http://svn.apache.org/viewvc?rev=1163822&view=rev
Log:
Fix regression in r1158831
Deque (Java 6 interface) -> LinkedList (Java 5 implementation)
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/common \
s/pool2/impl/GenericKeyedObjectPool.java?rev=1163822&r1=1163821&r2=1163822&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 \
Wed Aug 31 21:23:29 2011 @@ -19,7 +19,6 @@ package org.apache.commons.pool2.impl;
import java.lang.management.ManagementFactory;
import java.util.ArrayList;
-import java.util.Deque;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
@@ -1609,7 +1608,7 @@ public class GenericKeyedObjectPool<K,T>
}
}
- private long getMeanFromStatsCache(Deque<Long> cache) {
+ private long getMeanFromStatsCache(LinkedList<Long> cache) {
List<Long> times = new ArrayList<Long>(AVERAGE_TIMING_STATS_CACHE_SIZE);
synchronized (cache) {
times.addAll(cache);
@@ -1946,9 +1945,9 @@ public class GenericKeyedObjectPool<K,T>
private AtomicLong destroyedCount = new AtomicLong(0);
private AtomicLong destroyedByEvictorCount = new AtomicLong(0);
private AtomicLong destroyedByBorrowValidationCount = new AtomicLong(0);
- private final Deque<Long> activeTimes = new LinkedList<Long>();
- private final Deque<Long> idleTimes = new LinkedList<Long>();
- private final Deque<Long> waitTimes = new LinkedList<Long>();
+ 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 Object maxBorrowWaitTimeMillisLock = new Object();
private volatile long maxBorrowWaitTimeMillis = 0;
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=1163822&r1=1163821&r2=1163822&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 \
Wed Aug 31 21:23:29 2011 @@ -19,7 +19,6 @@ package org.apache.commons.pool2.impl;
import java.lang.management.ManagementFactory;
import java.util.ArrayList;
-import java.util.Deque;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -1268,7 +1267,7 @@ public class GenericObjectPool<T> extend
}
}
- private long getMeanFromStatsCache(Deque<Long> cache) {
+ private long getMeanFromStatsCache(LinkedList<Long> cache) {
List<Long> times = new ArrayList<Long>(AVERAGE_TIMING_STATS_CACHE_SIZE);
synchronized (cache) {
times.addAll(cache);
@@ -1547,9 +1546,9 @@ public class GenericObjectPool<T> extend
private AtomicLong destroyedCount = new AtomicLong(0);
private AtomicLong destroyedByEvictorCount = new AtomicLong(0);
private AtomicLong destroyedByBorrowValidationCount = new AtomicLong(0);
- private final Deque<Long> activeTimes = new LinkedList<Long>();
- private final Deque<Long> idleTimes = new LinkedList<Long>();
- private final Deque<Long> waitTimes = new LinkedList<Long>();
+ 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 Object maxBorrowWaitTimeMillisLock = new Object();
private volatile long maxBorrowWaitTimeMillis = 0;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic