This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git
The following commit(s) were added to refs/heads/master by this push:
new 2867ea3c Javadoc: Empty Javadoc line before the 1st tag.
2867ea3c is described below
commit 2867ea3cc56fcd2b847034a6d42ec0f12ab82a0a
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Dec 31 18:03:36 2025 -0500
Javadoc: Empty Javadoc line before the 1st tag.
---
.../org/apache/commons/pool3/KeyedObjectPool.java | 2 ++
.../java/org/apache/commons/pool3/ObjectPool.java | 2 ++
.../commons/pool3/impl/BaseGenericObjectPool.java | 21 +++++++++++++++++++++
.../commons/pool3/impl/BaseObjectPoolConfig.java | 16 ++++++++++++++++
.../commons/pool3/impl/DefaultPooledObject.java | 2 ++
.../apache/commons/pool3/impl/EvictionTimer.java | 1 +
.../commons/pool3/impl/GenericKeyedObjectPool.java | 3 +++
.../pool3/impl/GenericKeyedObjectPoolConfig.java | 4 ++++
.../commons/pool3/impl/GenericObjectPoolConfig.java | 3 +++
.../commons/pool3/impl/LinkedBlockingDeque.java | 1 +
.../commons/pool3/proxy/CglibProxySource.java | 1 +
11 files changed, 56 insertions(+)
diff --git a/src/main/java/org/apache/commons/pool3/KeyedObjectPool.java
b/src/main/java/org/apache/commons/pool3/KeyedObjectPool.java
index ac1c7846..7cc7ed13 100644
--- a/src/main/java/org/apache/commons/pool3/KeyedObjectPool.java
+++ b/src/main/java/org/apache/commons/pool3/KeyedObjectPool.java
@@ -220,6 +220,7 @@ public interface KeyedObjectPool<K, V, E extends Exception>
extends Closeable {
* Gets the total number of instances currently borrowed from this pool but
* not yet returned. Returns a negative value if this information is not
* available.
+ *
* @return the total number of instances currently borrowed from this pool
but
* not yet returned.
*/
@@ -239,6 +240,7 @@ public interface KeyedObjectPool<K, V, E extends Exception>
extends Closeable {
/**
* Gets the total number of instances currently idle in this pool.
* Returns a negative value if this information is not available.
+ *
* @return the total number of instances currently idle in this pool.
*/
int getNumIdle();
diff --git a/src/main/java/org/apache/commons/pool3/ObjectPool.java
b/src/main/java/org/apache/commons/pool3/ObjectPool.java
index e16fcadf..92df52d6 100644
--- a/src/main/java/org/apache/commons/pool3/ObjectPool.java
+++ b/src/main/java/org/apache/commons/pool3/ObjectPool.java
@@ -148,6 +148,7 @@ public interface ObjectPool<T, E extends Exception> extends
Closeable {
/**
* Gets the number of instances currently borrowed from this pool. Returns
* a negative value if this information is not available.
+ *
* @return the number of instances currently borrowed from this pool.
*/
int getNumActive();
@@ -157,6 +158,7 @@ public interface ObjectPool<T, E extends Exception> extends
Closeable {
* considered an approximation of the number of objects that can be
* {@link #borrowObject borrowed} without creating any new instances.
* Returns a negative value if this information is not available.
+ *
* @return the number of instances currently idle in this pool.
*/
int getNumIdle();
diff --git
a/src/main/java/org/apache/commons/pool3/impl/BaseGenericObjectPool.java
b/src/main/java/org/apache/commons/pool3/impl/BaseGenericObjectPool.java
index e128d52a..8ffcf251 100644
--- a/src/main/java/org/apache/commons/pool3/impl/BaseGenericObjectPool.java
+++ b/src/main/java/org/apache/commons/pool3/impl/BaseGenericObjectPool.java
@@ -73,6 +73,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Constructs an EvictionIterator for the provided idle instance deque.
+ *
* @param idleObjects underlying deque.
*/
EvictionIterator(final Deque<PooledObject<T>> idleObjects) {
@@ -87,6 +88,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Gets the idle object deque referenced by this iterator.
+ *
* @return the idle object deque
*/
public Deque<PooledObject<T>> getIdleObjects() {
@@ -460,6 +462,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Verifies that the pool is open.
+ *
* @throws IllegalStateException if the pool is closed.
*/
final void assertOpen() throws IllegalStateException {
@@ -489,6 +492,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Creates a list of pooled objects to remove based on their state.
+ *
* @param abandonedConfig The abandoned configuration.
* @param allObjects PooledObject instances to consider.
* @return a list of pooled objects to remove based on their state.
@@ -511,6 +515,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Tries to ensure that the configured minimum number of idle instances are
* available in the pool.
+ *
* @throws E if an error occurs creating idle instances
*/
abstract void ensureMinIdle() throws E;
@@ -544,6 +549,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Gets the total number of objects successfully borrowed from this pool
over the
* lifetime of the pool.
+ *
* @return the borrowed object count
*/
public final long getBorrowedCount() {
@@ -553,6 +559,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Gets the total number of objects created for this pool over the
lifetime of
* the pool.
+ *
* @return the created object count
*/
public final long getCreatedCount() {
@@ -565,6 +572,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
* deregistered when no longer used by calling the {@link #close()} method.
* This method is provided to assist with identifying code that creates but
* does not close it thereby creating a memory leak.
+ *
* @return pool creation stack trace
*/
public final String getCreationStackTrace() {
@@ -575,6 +583,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
* Gets the total number of objects destroyed by this pool as a result of
failing
* validation during {@code borrowObject()} over the lifetime of the
* pool.
+ *
* @return validation destroyed object count
*/
public final long getDestroyedByBorrowValidationCount() {
@@ -584,6 +593,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Gets the total number of objects destroyed by the evictor associated
with this
* pool over the lifetime of the pool.
+ *
* @return the evictor destroyed object count
*/
public final long getDestroyedByEvictorCount() {
@@ -593,6 +603,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Gets the total number of objects destroyed by this pool over the
lifetime of
* the pool.
+ *
* @return the destroyed object count
*/
public final long getDestroyedCount() {
@@ -662,6 +673,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
* Gets the name under which the pool has been registered with the
* platform MBean server or {@code null} if the pool has not been
* registered.
+ *
* @return the JMX name
*/
public final ObjectName getJmxName() {
@@ -700,6 +712,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Gets the maximum time a thread has waited to borrow objects from the
pool.
+ *
* @return maximum wait time in milliseconds since the pool was created
*/
public final long getMaxBorrowWaitTimeMillis() {
@@ -760,6 +773,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Gets the mean time objects are active for based on the last {@link
* #MEAN_TIMING_STATS_CACHE_SIZE} objects returned to the pool.
+ *
* @return mean time an object has been checked out from the pool among
* recently returned objects
*/
@@ -770,6 +784,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Gets the mean time objects are active for based on the last {@link
* #MEAN_TIMING_STATS_CACHE_SIZE} objects returned to the pool.
+ *
* @return mean time an object has been checked out from the pool among
* recently returned objects
*/
@@ -792,6 +807,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Gets the mean time threads wait to borrow an object based on the last
{@link
* #MEAN_TIMING_STATS_CACHE_SIZE} objects borrowed from the pool.
+ *
* @return mean time in milliseconds that a recently served thread has had
* to wait to borrow an object from the pool
*/
@@ -802,6 +818,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Gets the mean time objects are idle for based on the last {@link
* #MEAN_TIMING_STATS_CACHE_SIZE} objects borrowed from the pool.
+ *
* @return mean time an object has been idle in the pool among recently
* borrowed objects
*/
@@ -887,6 +904,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Gets the number of instances currently idle in this pool.
+ *
* @return count of instances available for checkout from the pool
*/
public abstract int getNumIdle();
@@ -974,6 +992,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
* Gets the total number of objects returned to this pool over the
lifetime of
* the pool. This excludes attempts to return the same object multiple
* times.
+ *
* @return the returned object count
*/
public final long getReturnedCount() {
@@ -1002,6 +1021,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Gets the stack trace of an exception as a string.
+ *
* @param e exception to trace
* @return exception stack trace as a string
*/
@@ -1222,6 +1242,7 @@ public abstract class BaseGenericObjectPool<T, E extends
Exception> extends Base
/**
* Marks the object as returning to the pool.
+ *
* @param pooledObject instance to return to the keyed pool
*/
protected void markReturningState(final PooledObject<T> pooledObject) {
diff --git
a/src/main/java/org/apache/commons/pool3/impl/BaseObjectPoolConfig.java
b/src/main/java/org/apache/commons/pool3/impl/BaseObjectPoolConfig.java
index e47a0451..7e66b5a9 100644
--- a/src/main/java/org/apache/commons/pool3/impl/BaseObjectPoolConfig.java
+++ b/src/main/java/org/apache/commons/pool3/impl/BaseObjectPoolConfig.java
@@ -35,6 +35,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code lifo} configuration attribute.
+ *
* @see GenericObjectPool#getLifo()
* @see GenericKeyedObjectPool#getLifo()
*/
@@ -42,6 +43,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code fairness} configuration attribute.
+ *
* @see GenericObjectPool#getFairness()
* @see GenericKeyedObjectPool#getFairness()
*/
@@ -49,6 +51,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code maxWait} configuration attribute.
+ *
* @see GenericObjectPool#getMaxWaitDuration()
* @see GenericKeyedObjectPool#getMaxWaitDuration()
* @since 2.10.0
@@ -58,6 +61,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code minEvictableIdleDuration}
* configuration attribute.
+ *
* @see GenericObjectPool#getMinEvictableIdleDuration()
* @see GenericKeyedObjectPool#getMinEvictableIdleDuration()
* @since 2.11.0
@@ -67,6 +71,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code softMinEvictableIdleTime}
* configuration attribute.
+ *
* @see GenericObjectPool#getSoftMinEvictableIdleDuration()
* @see GenericKeyedObjectPool#getSoftMinEvictableIdleDuration()
* @since 2.11.0
@@ -76,6 +81,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for {@code evictorShutdownTimeout} configuration
* attribute.
+ *
* @see GenericObjectPool#getEvictorShutdownTimeoutDuration()
* @see GenericKeyedObjectPool#getEvictorShutdownTimeoutDuration()
* @since 2.10.0
@@ -85,6 +91,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code numTestsPerEvictionRun} configuration
* attribute.
+ *
* @see GenericObjectPool#getNumTestsPerEvictionRun()
* @see GenericKeyedObjectPool#getNumTestsPerEvictionRun()
*/
@@ -92,6 +99,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code testOnCreate} configuration attribute.
+ *
* @see GenericObjectPool#getTestOnCreate()
* @see GenericKeyedObjectPool#getTestOnCreate()
* @since 2.2
@@ -100,6 +108,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code testOnBorrow} configuration attribute.
+ *
* @see GenericObjectPool#getTestOnBorrow()
* @see GenericKeyedObjectPool#getTestOnBorrow()
*/
@@ -107,6 +116,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code testOnReturn} configuration attribute.
+ *
* @see GenericObjectPool#getTestOnReturn()
* @see GenericKeyedObjectPool#getTestOnReturn()
*/
@@ -114,6 +124,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code testWhileIdle} configuration attribute.
+ *
* @see GenericObjectPool#getTestWhileIdle()
* @see GenericKeyedObjectPool#getTestWhileIdle()
*/
@@ -122,6 +133,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code timeBetweenEvictionRuns}
* configuration attribute.
+ *
* @see GenericObjectPool#getDurationBetweenEvictionRuns()
* @see GenericKeyedObjectPool#getDurationBetweenEvictionRuns()
*/
@@ -130,6 +142,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code blockWhenExhausted} configuration
* attribute.
+ *
* @see GenericObjectPool#getBlockWhenExhausted()
* @see GenericKeyedObjectPool#getBlockWhenExhausted()
*/
@@ -144,6 +157,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the prefix used to name JMX enabled pools created
* with a configuration instance.
+ *
* @see GenericObjectPool#getJmxName()
* @see GenericKeyedObjectPool#getJmxName()
*/
@@ -153,6 +167,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
* The default value for the base name to use to name JMX enabled pools
* created with a configuration instance. The default is {@code null}
* which means the pool will provide the base name to use.
+ *
* @see GenericObjectPool#getJmxName()
* @see GenericKeyedObjectPool#getJmxName()
*/
@@ -161,6 +176,7 @@ public abstract class BaseObjectPoolConfig<T> extends
BaseObject implements Clon
/**
* The default value for the {@code evictionPolicyClassName} configuration
* attribute.
+ *
* @see GenericObjectPool#getEvictionPolicyClassName()
* @see GenericKeyedObjectPool#getEvictionPolicyClassName()
*/
diff --git
a/src/main/java/org/apache/commons/pool3/impl/DefaultPooledObject.java
b/src/main/java/org/apache/commons/pool3/impl/DefaultPooledObject.java
index 0f67bd42..41fc6171 100644
--- a/src/main/java/org/apache/commons/pool3/impl/DefaultPooledObject.java
+++ b/src/main/java/org/apache/commons/pool3/impl/DefaultPooledObject.java
@@ -138,6 +138,7 @@ public class DefaultPooledObject<T> implements
PooledObject<T> {
/**
* Gets the number of times this object has been borrowed.
+ *
* @return The number of times this object has been borrowed.
* @since 2.1
*/
@@ -194,6 +195,7 @@ public class DefaultPooledObject<T> implements
PooledObject<T> {
/**
* Gets the state of this object.
+ *
* @return state
*/
@Override
diff --git a/src/main/java/org/apache/commons/pool3/impl/EvictionTimer.java
b/src/main/java/org/apache/commons/pool3/impl/EvictionTimer.java
index c48bb780..42746428 100644
--- a/src/main/java/org/apache/commons/pool3/impl/EvictionTimer.java
+++ b/src/main/java/org/apache/commons/pool3/impl/EvictionTimer.java
@@ -99,6 +99,7 @@ final class EvictionTimer {
/**
* Runnable that runs the referent of a weak reference. When the referent
is no
* no longer reachable, run is no-op.
+ *
* @param <R> The kind of Runnable.
*/
private static final class WeakRunner<R extends Runnable> implements
Runnable {
diff --git
a/src/main/java/org/apache/commons/pool3/impl/GenericKeyedObjectPool.java
b/src/main/java/org/apache/commons/pool3/impl/GenericKeyedObjectPool.java
index 5c0f3d07..d7e414ca 100644
--- a/src/main/java/org/apache/commons/pool3/impl/GenericKeyedObjectPool.java
+++ b/src/main/java/org/apache/commons/pool3/impl/GenericKeyedObjectPool.java
@@ -127,6 +127,7 @@ public class GenericKeyedObjectPool<K, T, E extends
Exception> extends BaseGener
/**
* Constructs a new ObjectDeque with the given fairness policy.
+ *
* @param fairness true means client threads waiting to borrow /
return instances
* will be served as if waiting in a FIFO queue.
*/
@@ -245,6 +246,7 @@ public class GenericKeyedObjectPool<K, T, E extends
Exception> extends BaseGener
/**
* Constructs a new {@code GenericKeyedObjectPool} using defaults from
* {@link GenericKeyedObjectPoolConfig}.
+ *
* @param factory the factory to be used to create entries
*/
public GenericKeyedObjectPool(final KeyedPooledObjectFactory<K, T, E>
factory) {
@@ -1707,6 +1709,7 @@ public class GenericKeyedObjectPool<K, T, E extends
Exception> extends BaseGener
/**
* Whether there is at least one thread waiting on this deque, add an pool
object.
+ *
* @param key pool key.
* @param idleObjects list of idle pool objects.
*/
diff --git
a/src/main/java/org/apache/commons/pool3/impl/GenericKeyedObjectPoolConfig.java
b/src/main/java/org/apache/commons/pool3/impl/GenericKeyedObjectPoolConfig.java
index 3e88b0fd..9572b237 100644
---
a/src/main/java/org/apache/commons/pool3/impl/GenericKeyedObjectPoolConfig.java
+++
b/src/main/java/org/apache/commons/pool3/impl/GenericKeyedObjectPoolConfig.java
@@ -32,24 +32,28 @@ public class GenericKeyedObjectPoolConfig<T> extends
BaseObjectPoolConfig<T> {
/**
* The default value for the {@code maxTotalPerKey} configuration
attribute.
+ *
* @see GenericKeyedObjectPool#getMaxTotalPerKey()
*/
public static final int DEFAULT_MAX_TOTAL_PER_KEY = 8;
/**
* The default value for the {@code maxTotal} configuration attribute.
+ *
* @see GenericKeyedObjectPool#getMaxTotal()
*/
public static final int DEFAULT_MAX_TOTAL = -1;
/**
* The default value for the {@code minIdlePerKey} configuration attribute.
+ *
* @see GenericKeyedObjectPool#getMinIdlePerKey()
*/
public static final int DEFAULT_MIN_IDLE_PER_KEY = 0;
/**
* The default value for the {@code maxIdlePerKey} configuration attribute.
+ *
* @see GenericKeyedObjectPool#getMaxIdlePerKey()
*/
public static final int DEFAULT_MAX_IDLE_PER_KEY = 8;
diff --git
a/src/main/java/org/apache/commons/pool3/impl/GenericObjectPoolConfig.java
b/src/main/java/org/apache/commons/pool3/impl/GenericObjectPoolConfig.java
index 72437bf4..5b45f108 100644
--- a/src/main/java/org/apache/commons/pool3/impl/GenericObjectPoolConfig.java
+++ b/src/main/java/org/apache/commons/pool3/impl/GenericObjectPoolConfig.java
@@ -32,18 +32,21 @@ public class GenericObjectPoolConfig<T> extends
BaseObjectPoolConfig<T> {
/**
* The default value for the {@code maxTotal} configuration attribute.
+ *
* @see GenericObjectPool#getMaxTotal()
*/
public static final int DEFAULT_MAX_TOTAL = 8;
/**
* The default value for the {@code maxIdle} configuration attribute.
+ *
* @see GenericObjectPool#getMaxIdle()
*/
public static final int DEFAULT_MAX_IDLE = 8;
/**
* The default value for the {@code minIdle} configuration attribute.
+ *
* @see GenericObjectPool#getMinIdle()
*/
public static final int DEFAULT_MIN_IDLE = 0;
diff --git
a/src/main/java/org/apache/commons/pool3/impl/LinkedBlockingDeque.java
b/src/main/java/org/apache/commons/pool3/impl/LinkedBlockingDeque.java
index 200a89a5..8a586de9 100644
--- a/src/main/java/org/apache/commons/pool3/impl/LinkedBlockingDeque.java
+++ b/src/main/java/org/apache/commons/pool3/impl/LinkedBlockingDeque.java
@@ -329,6 +329,7 @@ final class LinkedBlockingDeque<E> extends AbstractQueue<E>
/**
* Creates a {@code LinkedBlockingDeque} with a capacity of
* {@link Integer#MAX_VALUE} and the given fairness policy.
+ *
* @param fairness true means threads waiting on the deque should be served
* as if waiting in a FIFO request queue
*/
diff --git a/src/main/java/org/apache/commons/pool3/proxy/CglibProxySource.java
b/src/main/java/org/apache/commons/pool3/proxy/CglibProxySource.java
index 4bb9fde0..d57fe479 100644
--- a/src/main/java/org/apache/commons/pool3/proxy/CglibProxySource.java
+++ b/src/main/java/org/apache/commons/pool3/proxy/CglibProxySource.java
@@ -90,6 +90,7 @@ public class CglibProxySource<T> extends
AbstractProxySource<T> {
* <p>
* For additional features, use a {@link #builder()}.
* </p>
+ *
* @param superclass The class to proxy
*/
public CglibProxySource(final Class<? extends T> superclass) {