You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2011/05/11 15:56:24 UTC
svn commit: r1101876 - in /commons/proper/pool/trunk/src: changes/changes.xml
java/org/apache/commons/pool2/impl/GenericKeyedObjectPoolFactory.java
java/org/apache/commons/pool2/impl/GenericObjectPoolFactory.java
Author: markt
Date: Wed May 11 13:56:24 2011
New Revision: 1101876
URL: http://svn.apache.org/viewvc?rev=1101876&view=rev
Log:
Make PoolFcatory attributes private.
Modified:
commons/proper/pool/trunk/src/changes/changes.xml
commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPoolFactory.java
commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPoolFactory.java
Modified: commons/proper/pool/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/changes/changes.xml?rev=1101876&r1=1101875&r2=1101876&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/changes/changes.xml (original)
+++ commons/proper/pool/trunk/src/changes/changes.xml Wed May 11 13:56:24 2011
@@ -22,7 +22,7 @@
<body>
<release version="2.0" description="This is an APIs update and maintenance release">
<action dev="simonetripodi" type="update" date="2011-04-28" issue="POOL-83">
- Support Java 1.5 Generics
+ Support Java 1.5 Generics.
</action>
<action dev="simonetripodi" type="update" date="2011-04-28" issue="POOL-186">
Developer documentation and examples have to be updated once the 2.0 repackaging has been done
@@ -32,6 +32,10 @@
LinkedBlockingQueue implementation from Apache Harmony (originally by Doug
Lea and the JSR-166 expert group).
</action>
+ <action dev="markt" type="update">
+ Make deprecated PoolFactory attributes private, requiring that access is
+ via the provided getters.
+ </action>
</release>
<release version="1.5.6" date="2011-04-03" description="This is a patch release, including bugfixes only.">
<action dev="markt" type="fix" issue="POOL-179" due-to="Axel Grossmann">
Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPoolFactory.java?rev=1101876&r1=1101875&r2=1101876&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPoolFactory.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericKeyedObjectPoolFactory.java Wed May 11 13:56:24 2011
@@ -367,93 +367,79 @@ public class GenericKeyedObjectPoolFacto
return _lifo;
}
- //--- protected attributes - deprecated, use getters to access these properties
+ //--- private attributes - use getters to access these properties
/**
* The {@link GenericKeyedObjectPool#getMaxIdle() maxIdle} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getMaxIdle()}.
*/
- protected int _maxIdle = GenericKeyedObjectPool.DEFAULT_MAX_IDLE;
+ private int _maxIdle = GenericKeyedObjectPool.DEFAULT_MAX_IDLE;
/**
* The {@link GenericKeyedObjectPool#getMaxActive() maxActive} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getMaxActive()}.
*/
- protected int _maxActive = GenericKeyedObjectPool.DEFAULT_MAX_ACTIVE;
+ private int _maxActive = GenericKeyedObjectPool.DEFAULT_MAX_ACTIVE;
/**
* The {@link GenericKeyedObjectPool#getMaxTotal() maxTotal} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getMaxTotal()}.
*/
- protected int _maxTotal = GenericKeyedObjectPool.DEFAULT_MAX_TOTAL;
+ private int _maxTotal = GenericKeyedObjectPool.DEFAULT_MAX_TOTAL;
/**
* The {@link GenericKeyedObjectPool#getMinIdle() minIdle} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getMinIdle()}.
*/
- protected int _minIdle = GenericKeyedObjectPool.DEFAULT_MIN_IDLE;
+ private int _minIdle = GenericKeyedObjectPool.DEFAULT_MIN_IDLE;
/**
* The {@link GenericKeyedObjectPool#getMaxWait() maxWait} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getMaxWait()}.
*/
- protected long _maxWait = GenericKeyedObjectPool.DEFAULT_MAX_WAIT;
+ private long _maxWait = GenericKeyedObjectPool.DEFAULT_MAX_WAIT;
/**
* The {@link GenericKeyedObjectPool#getWhenExhaustedAction() whenExhaustedAction} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getWhenExhaustedAction()}.
*/
- protected byte _whenExhaustedAction = GenericKeyedObjectPool.DEFAULT_WHEN_EXHAUSTED_ACTION;
+ private byte _whenExhaustedAction = GenericKeyedObjectPool.DEFAULT_WHEN_EXHAUSTED_ACTION;
/**
* The {@link GenericKeyedObjectPool#getTestOnBorrow() testOnBorrow} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getTestOnBorrow()}.
*/
- protected boolean _testOnBorrow = GenericKeyedObjectPool.DEFAULT_TEST_ON_BORROW;
+ private boolean _testOnBorrow = GenericKeyedObjectPool.DEFAULT_TEST_ON_BORROW;
/**
* The {@link GenericKeyedObjectPool#getTestOnReturn() testOnReturn} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getTestOnReturn()}.
*/
- protected boolean _testOnReturn = GenericKeyedObjectPool.DEFAULT_TEST_ON_RETURN;
+ private boolean _testOnReturn = GenericKeyedObjectPool.DEFAULT_TEST_ON_RETURN;
/**
* The {@link GenericKeyedObjectPool#getTestWhileIdle() testWhileIdle} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getTestWhileIdle()}.
*/
- protected boolean _testWhileIdle = GenericKeyedObjectPool.DEFAULT_TEST_WHILE_IDLE;
+ private boolean _testWhileIdle = GenericKeyedObjectPool.DEFAULT_TEST_WHILE_IDLE;
/**
* The {@link GenericKeyedObjectPool#getTimeBetweenEvictionRunsMillis() timeBetweenEvictionRunsMillis} setting for
* pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getTimeBetweenEvictionRunsMillis()}.
*/
- protected long _timeBetweenEvictionRunsMillis = GenericKeyedObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS;
+ private long _timeBetweenEvictionRunsMillis = GenericKeyedObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS;
/**
* The {@link GenericKeyedObjectPool#getNumTestsPerEvictionRun() numTestsPerEvictionRun} setting for
* pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getNumTestsPerEvictionRun()}.
*/
- protected int _numTestsPerEvictionRun = GenericKeyedObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN;
+ private int _numTestsPerEvictionRun = GenericKeyedObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN;
/**
* The {@link GenericKeyedObjectPool#getMinEvictableIdleTimeMillis() minEvictableIdleTimeMillis} setting for
* pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getMinEvictableIdleTimeMillis()}.
*/
- protected long _minEvictableIdleTimeMillis = GenericKeyedObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS;
+ private long _minEvictableIdleTimeMillis = GenericKeyedObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS;
/**
* The {@link KeyedPoolableObjectFactory} used by pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getFactory()}.
*/
- protected KeyedPoolableObjectFactory<K,V> _factory = null;
+ private KeyedPoolableObjectFactory<K,V> _factory = null;
/**
* The {@link GenericKeyedObjectPool#getLifo() lifo} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getLifo()}.
*/
- protected boolean _lifo = GenericKeyedObjectPool.DEFAULT_LIFO;
+ private boolean _lifo = GenericKeyedObjectPool.DEFAULT_LIFO;
}
Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPoolFactory.java?rev=1101876&r1=1101875&r2=1101876&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPoolFactory.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPoolFactory.java Wed May 11 13:56:24 2011
@@ -355,91 +355,77 @@ public class GenericObjectPoolFactory<T>
/**
* The {@link GenericObjectPool#getMaxIdle() maxIdle} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getMaxIdle()}.
*/
- protected int _maxIdle = GenericObjectPool.DEFAULT_MAX_IDLE;
+ private int _maxIdle = GenericObjectPool.DEFAULT_MAX_IDLE;
/**
* The {@link GenericObjectPool#getMinIdle() minIdle} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getMinIdle()}.
*/
- protected int _minIdle = GenericObjectPool.DEFAULT_MIN_IDLE;
+ private int _minIdle = GenericObjectPool.DEFAULT_MIN_IDLE;
/**
* The {@link GenericObjectPool#getMaxActive() maxActive} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getMaxActive()}.
*/
- protected int _maxActive = GenericObjectPool.DEFAULT_MAX_ACTIVE;
+ private int _maxActive = GenericObjectPool.DEFAULT_MAX_ACTIVE;
/**
* The {@link GenericObjectPool#getMaxWait() maxWait} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getMaxWait()}.
*/
- protected long _maxWait = GenericObjectPool.DEFAULT_MAX_WAIT;
+ private long _maxWait = GenericObjectPool.DEFAULT_MAX_WAIT;
/**
* The {@link GenericObjectPool#getWhenExhaustedAction() whenExhaustedAction} setting for pools
* created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getWhenExhaustedAction()}.
*/
- protected byte _whenExhaustedAction = GenericObjectPool.DEFAULT_WHEN_EXHAUSTED_ACTION;
+ private byte _whenExhaustedAction = GenericObjectPool.DEFAULT_WHEN_EXHAUSTED_ACTION;
/**
* The {@link GenericObjectPool#getTestOnBorrow() testOnBorrow} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getTestOnBorrow()}.
*/
- protected boolean _testOnBorrow = GenericObjectPool.DEFAULT_TEST_ON_BORROW;
+ private boolean _testOnBorrow = GenericObjectPool.DEFAULT_TEST_ON_BORROW;
/**
* The {@link GenericObjectPool#getTestOnReturn() testOnReturn} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getTestOnReturn()}.
*/
- protected boolean _testOnReturn = GenericObjectPool.DEFAULT_TEST_ON_RETURN;
+ private boolean _testOnReturn = GenericObjectPool.DEFAULT_TEST_ON_RETURN;
/**
* The {@link GenericObjectPool#getTestWhileIdle() testWhileIdle} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getTestWhileIdle()}.
*/
- protected boolean _testWhileIdle = GenericObjectPool.DEFAULT_TEST_WHILE_IDLE;
+ private boolean _testWhileIdle = GenericObjectPool.DEFAULT_TEST_WHILE_IDLE;
/**
* The {@link GenericObjectPool#getTimeBetweenEvictionRunsMillis() timeBetweenEvictionRunsMillis}
* setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getTimeBetweenEvictionRunsMillis()}.
*/
- protected long _timeBetweenEvictionRunsMillis = GenericObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS;
+ private long _timeBetweenEvictionRunsMillis = GenericObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS;
/**
* The {@link GenericObjectPool#getNumTestsPerEvictionRun() numTestsPerEvictionRun} setting
* for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getNumTestsPerEvictionRun()}.
*/
- protected int _numTestsPerEvictionRun = GenericObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN;
+ private int _numTestsPerEvictionRun = GenericObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN;
/**
* The {@link GenericObjectPool#getMinEvictableIdleTimeMillis() minEvictableIdleTimeMillis}
* setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getMinEvictableIdleTimeMillis()}.
*/
- protected long _minEvictableIdleTimeMillis = GenericObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS;
+ private long _minEvictableIdleTimeMillis = GenericObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS;
/**
* The {@link GenericObjectPool#getSoftMinEvictableIdleTimeMillis() softMinEvictableIdleTimeMillis}
* setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getSoftMinEvictableIdleTimeMillis()}.
*/
- protected long _softMinEvictableIdleTimeMillis = GenericObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS;
+ private long _softMinEvictableIdleTimeMillis = GenericObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS;
/**
* The {@link GenericObjectPool#getLifo() lifo} setting for pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getLifo()}.
*/
- protected boolean _lifo = GenericObjectPool.DEFAULT_LIFO;
+ private boolean _lifo = GenericObjectPool.DEFAULT_LIFO;
/**
* The {@link PoolableObjectFactory} used by pools created by this factory.
- * @deprecated to be removed in pool 2.0. Use {@link #getFactory()}.
*/
- protected PoolableObjectFactory<T> _factory = null;
+ private PoolableObjectFactory<T> _factory = null;
}