Author: psteitz
Date: Sun Apr 18 18:57:40 2010
New Revision: 935388
URL: http://svn.apache.org/viewvc?rev=935388&view=rev
Log:
Javadoc only.
Modified:
commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolUtils.java
commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
Modified:
commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolUtils.java
URL:
http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolUtils.java?rev=935388&r1=935387&r2=935388&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolUtils.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolUtils.java
Sun Apr 18 18:57:40 2010
@@ -1335,10 +1335,27 @@ public final class PoolUtils {
}
}
+ /**
+ * Timer task that adds objects to the pool until the number of idle
+ * instances reaches the configured minIdle. Note that this is not the
+ * same as the pool's minIdle setting.
+ *
+ */
private static class ObjectPoolMinIdleTimerTask extends TimerTask {
+
+ /** Minimum number of idle instances. Not the same as
pool.getMinIdle(). */
private final int minIdle;
+
+ /** Object pool */
private final ObjectPool pool;
+ /**
+ * Create a new ObjectPoolMinIdleTimerTask for the given pool with the
given minIdle setting.
+ *
+ * @param pool object pool
+ * @param minIdle number of idle instances to maintain
+ * @throws IllegalArgumentException if the pool is null
+ */
ObjectPoolMinIdleTimerTask(final ObjectPool pool, final int minIdle)
throws IllegalArgumentException {
if (pool == null) {
throw new IllegalArgumentException("pool must not be null.");
@@ -1347,6 +1364,9 @@ public final class PoolUtils {
this.minIdle = minIdle;
}
+ /**
+ * {...@inheritdoc}
+ */
public void run() {
boolean success = false;
try {
@@ -1366,6 +1386,9 @@ public final class PoolUtils {
}
}
+ /**
+ * {...@inheritdoc}
+ */
public String toString() {
final StringBuffer sb = new StringBuffer();
sb.append("ObjectPoolMinIdleTimerTask");
Modified:
commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
URL:
http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java?rev=935388&r1=935387&r2=935388&view=diff
==============================================================================
---
commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
(original)
+++
commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
Sun Apr 18 18:57:40 2010
@@ -1808,7 +1808,7 @@ public class GenericObjectPool extends B
/** object timestamp pair allocated to this latch */
private ObjectTimestampPair _pair;
- /** Wheter or not this latch may create an object instance */
+ /** Whether or not this latch may create an object instance */
private boolean _mayCreate = false;
/**