commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1028442 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/StackObjectPoolConfig.java
Date Thu, 28 Oct 2010 19:26:47 GMT
Author: simonetripodi
Date: Thu Oct 28 19:26:47 2010
New Revision: 1028442

URL: http://svn.apache.org/viewvc?rev=1028442&view=rev
Log:
added documentation that parameters are reset if out of range

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

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/StackObjectPoolConfig.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/StackObjectPoolConfig.java?rev=1028442&r1=1028441&r2=1028442&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/StackObjectPoolConfig.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/StackObjectPoolConfig.java
Thu Oct 28 19:26:47 2010
@@ -46,6 +46,19 @@ public class StackObjectPoolConfig {
      */
     private final int initIdleCapacity;
 
+    /**
+     * Creates a new StackObjectPoolConfig instance, resetting the parameters
+     * if they are out of range.
+     *
+     * If maxSleeping parameter is less than 0, the configuration instance takes
+     * the {@link #DEFAULT_MAX_SLEEPING} value.
+     *
+     * If initIdleCapacity parameter is less than 1, the configuration instance takes
+     * the {@link #DEFAULT_INIT_SLEEPING_CAPACITY} value.
+     *
+     * @param maxSleeping
+     * @param initIdleCapacity
+     */
     public StackObjectPoolConfig(final int maxSleeping, final int initIdleCapacity) {
         this.maxSleeping = (maxSleeping < 0 ? DEFAULT_MAX_SLEEPING : maxSleeping);
         this.initIdleCapacity = (initIdleCapacity < 1 ? DEFAULT_INIT_SLEEPING_CAPACITY
: initIdleCapacity);



Mime
View raw message