Skip to content

Commit 2867ea3

Browse files
committed
Javadoc: Empty Javadoc line before the 1st tag.
1 parent 00f75e8 commit 2867ea3

11 files changed

+56
-0
lines changed

src/main/java/org/apache/commons/pool3/KeyedObjectPool.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ default List<K> getKeys() {
220220
* Gets the total number of instances currently borrowed from this pool but
221221
* not yet returned. Returns a negative value if this information is not
222222
* available.
223+
*
223224
* @return the total number of instances currently borrowed from this pool but
224225
* not yet returned.
225226
*/
@@ -239,6 +240,7 @@ default List<K> getKeys() {
239240
/**
240241
* Gets the total number of instances currently idle in this pool.
241242
* Returns a negative value if this information is not available.
243+
*
242244
* @return the total number of instances currently idle in this pool.
243245
*/
244246
int getNumIdle();

src/main/java/org/apache/commons/pool3/ObjectPool.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ default void addObjects(final int count) throws E {
148148
/**
149149
* Gets the number of instances currently borrowed from this pool. Returns
150150
* a negative value if this information is not available.
151+
*
151152
* @return the number of instances currently borrowed from this pool.
152153
*/
153154
int getNumActive();
@@ -157,6 +158,7 @@ default void addObjects(final int count) throws E {
157158
* considered an approximation of the number of objects that can be
158159
* {@link #borrowObject borrowed} without creating any new instances.
159160
* Returns a negative value if this information is not available.
161+
*
160162
* @return the number of instances currently idle in this pool.
161163
*/
162164
int getNumIdle();

src/main/java/org/apache/commons/pool3/impl/BaseGenericObjectPool.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ final class EvictionIterator implements Iterator<PooledObject<T>> {
7373

7474
/**
7575
* Constructs an EvictionIterator for the provided idle instance deque.
76+
*
7677
* @param idleObjects underlying deque.
7778
*/
7879
EvictionIterator(final Deque<PooledObject<T>> idleObjects) {
@@ -87,6 +88,7 @@ final class EvictionIterator implements Iterator<PooledObject<T>> {
8788

8889
/**
8990
* Gets the idle object deque referenced by this iterator.
91+
*
9092
* @return the idle object deque
9193
*/
9294
public Deque<PooledObject<T>> getIdleObjects() {
@@ -460,6 +462,7 @@ String appendStats(final String string) {
460462

461463
/**
462464
* Verifies that the pool is open.
465+
*
463466
* @throws IllegalStateException if the pool is closed.
464467
*/
465468
final void assertOpen() throws IllegalStateException {
@@ -489,6 +492,7 @@ protected E cast(final Throwable throwable) {
489492

490493
/**
491494
* Creates a list of pooled objects to remove based on their state.
495+
*
492496
* @param abandonedConfig The abandoned configuration.
493497
* @param allObjects PooledObject instances to consider.
494498
* @return a list of pooled objects to remove based on their state.
@@ -511,6 +515,7 @@ ArrayList<PooledObject<T>> createRemoveList(final AbandonedConfig abandonedConfi
511515
/**
512516
* Tries to ensure that the configured minimum number of idle instances are
513517
* available in the pool.
518+
*
514519
* @throws E if an error occurs creating idle instances
515520
*/
516521
abstract void ensureMinIdle() throws E;
@@ -544,6 +549,7 @@ public final boolean getBlockWhenExhausted() {
544549
/**
545550
* Gets the total number of objects successfully borrowed from this pool over the
546551
* lifetime of the pool.
552+
*
547553
* @return the borrowed object count
548554
*/
549555
public final long getBorrowedCount() {
@@ -553,6 +559,7 @@ public final long getBorrowedCount() {
553559
/**
554560
* Gets the total number of objects created for this pool over the lifetime of
555561
* the pool.
562+
*
556563
* @return the created object count
557564
*/
558565
public final long getCreatedCount() {
@@ -565,6 +572,7 @@ public final long getCreatedCount() {
565572
* deregistered when no longer used by calling the {@link #close()} method.
566573
* This method is provided to assist with identifying code that creates but
567574
* does not close it thereby creating a memory leak.
575+
*
568576
* @return pool creation stack trace
569577
*/
570578
public final String getCreationStackTrace() {
@@ -575,6 +583,7 @@ public final String getCreationStackTrace() {
575583
* Gets the total number of objects destroyed by this pool as a result of failing
576584
* validation during {@code borrowObject()} over the lifetime of the
577585
* pool.
586+
*
578587
* @return validation destroyed object count
579588
*/
580589
public final long getDestroyedByBorrowValidationCount() {
@@ -584,6 +593,7 @@ public final long getDestroyedByBorrowValidationCount() {
584593
/**
585594
* Gets the total number of objects destroyed by the evictor associated with this
586595
* pool over the lifetime of the pool.
596+
*
587597
* @return the evictor destroyed object count
588598
*/
589599
public final long getDestroyedByEvictorCount() {
@@ -593,6 +603,7 @@ public final long getDestroyedByEvictorCount() {
593603
/**
594604
* Gets the total number of objects destroyed by this pool over the lifetime of
595605
* the pool.
606+
*
596607
* @return the destroyed object count
597608
*/
598609
public final long getDestroyedCount() {
@@ -662,6 +673,7 @@ public final boolean getFairness() {
662673
* Gets the name under which the pool has been registered with the
663674
* platform MBean server or {@code null} if the pool has not been
664675
* registered.
676+
*
665677
* @return the JMX name
666678
*/
667679
public final ObjectName getJmxName() {
@@ -700,6 +712,7 @@ public boolean getLogAbandoned() {
700712

701713
/**
702714
* Gets the maximum time a thread has waited to borrow objects from the pool.
715+
*
703716
* @return maximum wait time in milliseconds since the pool was created
704717
*/
705718
public final long getMaxBorrowWaitTimeMillis() {
@@ -760,6 +773,7 @@ public final long getMaxWaitMillis() {
760773
/**
761774
* Gets the mean time objects are active for based on the last {@link
762775
* #MEAN_TIMING_STATS_CACHE_SIZE} objects returned to the pool.
776+
*
763777
* @return mean time an object has been checked out from the pool among
764778
* recently returned objects
765779
*/
@@ -770,6 +784,7 @@ public final Duration getMeanActiveDuration() {
770784
/**
771785
* Gets the mean time objects are active for based on the last {@link
772786
* #MEAN_TIMING_STATS_CACHE_SIZE} objects returned to the pool.
787+
*
773788
* @return mean time an object has been checked out from the pool among
774789
* recently returned objects
775790
*/
@@ -792,6 +807,7 @@ public final Duration getMeanBorrowWaitDuration() {
792807
/**
793808
* Gets the mean time threads wait to borrow an object based on the last {@link
794809
* #MEAN_TIMING_STATS_CACHE_SIZE} objects borrowed from the pool.
810+
*
795811
* @return mean time in milliseconds that a recently served thread has had
796812
* to wait to borrow an object from the pool
797813
*/
@@ -802,6 +818,7 @@ public final long getMeanBorrowWaitTimeMillis() {
802818
/**
803819
* Gets the mean time objects are idle for based on the last {@link
804820
* #MEAN_TIMING_STATS_CACHE_SIZE} objects borrowed from the pool.
821+
*
805822
* @return mean time an object has been idle in the pool among recently
806823
* borrowed objects
807824
*/
@@ -887,6 +904,7 @@ public final long getMinEvictableIdleTimeMillis() {
887904

888905
/**
889906
* Gets the number of instances currently idle in this pool.
907+
*
890908
* @return count of instances available for checkout from the pool
891909
*/
892910
public abstract int getNumIdle();
@@ -974,6 +992,7 @@ public Duration getRemoveAbandonedTimeoutDuration() {
974992
* Gets the total number of objects returned to this pool over the lifetime of
975993
* the pool. This excludes attempts to return the same object multiple
976994
* times.
995+
*
977996
* @return the returned object count
978997
*/
979998
public final long getReturnedCount() {
@@ -1002,6 +1021,7 @@ public final Duration getSoftMinEvictableIdleDuration() {
10021021

10031022
/**
10041023
* Gets the stack trace of an exception as a string.
1024+
*
10051025
* @param e exception to trace
10061026
* @return exception stack trace as a string
10071027
*/
@@ -1222,6 +1242,7 @@ final void jmxUnregister() {
12221242

12231243
/**
12241244
* Marks the object as returning to the pool.
1245+
*
12251246
* @param pooledObject instance to return to the keyed pool
12261247
*/
12271248
protected void markReturningState(final PooledObject<T> pooledObject) {

src/main/java/org/apache/commons/pool3/impl/BaseObjectPoolConfig.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,23 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon
3535

3636
/**
3737
* The default value for the {@code lifo} configuration attribute.
38+
*
3839
* @see GenericObjectPool#getLifo()
3940
* @see GenericKeyedObjectPool#getLifo()
4041
*/
4142
public static final boolean DEFAULT_LIFO = true;
4243

4344
/**
4445
* The default value for the {@code fairness} configuration attribute.
46+
*
4547
* @see GenericObjectPool#getFairness()
4648
* @see GenericKeyedObjectPool#getFairness()
4749
*/
4850
public static final boolean DEFAULT_FAIRNESS = false;
4951

5052
/**
5153
* The default value for the {@code maxWait} configuration attribute.
54+
*
5255
* @see GenericObjectPool#getMaxWaitDuration()
5356
* @see GenericKeyedObjectPool#getMaxWaitDuration()
5457
* @since 2.10.0
@@ -58,6 +61,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon
5861
/**
5962
* The default value for the {@code minEvictableIdleDuration}
6063
* configuration attribute.
64+
*
6165
* @see GenericObjectPool#getMinEvictableIdleDuration()
6266
* @see GenericKeyedObjectPool#getMinEvictableIdleDuration()
6367
* @since 2.11.0
@@ -67,6 +71,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon
6771
/**
6872
* The default value for the {@code softMinEvictableIdleTime}
6973
* configuration attribute.
74+
*
7075
* @see GenericObjectPool#getSoftMinEvictableIdleDuration()
7176
* @see GenericKeyedObjectPool#getSoftMinEvictableIdleDuration()
7277
* @since 2.11.0
@@ -76,6 +81,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon
7681
/**
7782
* The default value for {@code evictorShutdownTimeout} configuration
7883
* attribute.
84+
*
7985
* @see GenericObjectPool#getEvictorShutdownTimeoutDuration()
8086
* @see GenericKeyedObjectPool#getEvictorShutdownTimeoutDuration()
8187
* @since 2.10.0
@@ -85,13 +91,15 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon
8591
/**
8692
* The default value for the {@code numTestsPerEvictionRun} configuration
8793
* attribute.
94+
*
8895
* @see GenericObjectPool#getNumTestsPerEvictionRun()
8996
* @see GenericKeyedObjectPool#getNumTestsPerEvictionRun()
9097
*/
9198
public static final int DEFAULT_NUM_TESTS_PER_EVICTION_RUN = 3;
9299

93100
/**
94101
* The default value for the {@code testOnCreate} configuration attribute.
102+
*
95103
* @see GenericObjectPool#getTestOnCreate()
96104
* @see GenericKeyedObjectPool#getTestOnCreate()
97105
* @since 2.2
@@ -100,20 +108,23 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon
100108

101109
/**
102110
* The default value for the {@code testOnBorrow} configuration attribute.
111+
*
103112
* @see GenericObjectPool#getTestOnBorrow()
104113
* @see GenericKeyedObjectPool#getTestOnBorrow()
105114
*/
106115
public static final boolean DEFAULT_TEST_ON_BORROW = false;
107116

108117
/**
109118
* The default value for the {@code testOnReturn} configuration attribute.
119+
*
110120
* @see GenericObjectPool#getTestOnReturn()
111121
* @see GenericKeyedObjectPool#getTestOnReturn()
112122
*/
113123
public static final boolean DEFAULT_TEST_ON_RETURN = false;
114124

115125
/**
116126
* The default value for the {@code testWhileIdle} configuration attribute.
127+
*
117128
* @see GenericObjectPool#getTestWhileIdle()
118129
* @see GenericKeyedObjectPool#getTestWhileIdle()
119130
*/
@@ -122,6 +133,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon
122133
/**
123134
* The default value for the {@code timeBetweenEvictionRuns}
124135
* configuration attribute.
136+
*
125137
* @see GenericObjectPool#getDurationBetweenEvictionRuns()
126138
* @see GenericKeyedObjectPool#getDurationBetweenEvictionRuns()
127139
*/
@@ -130,6 +142,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon
130142
/**
131143
* The default value for the {@code blockWhenExhausted} configuration
132144
* attribute.
145+
*
133146
* @see GenericObjectPool#getBlockWhenExhausted()
134147
* @see GenericKeyedObjectPool#getBlockWhenExhausted()
135148
*/
@@ -144,6 +157,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon
144157
/**
145158
* The default value for the prefix used to name JMX enabled pools created
146159
* with a configuration instance.
160+
*
147161
* @see GenericObjectPool#getJmxName()
148162
* @see GenericKeyedObjectPool#getJmxName()
149163
*/
@@ -153,6 +167,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon
153167
* The default value for the base name to use to name JMX enabled pools
154168
* created with a configuration instance. The default is {@code null}
155169
* which means the pool will provide the base name to use.
170+
*
156171
* @see GenericObjectPool#getJmxName()
157172
* @see GenericKeyedObjectPool#getJmxName()
158173
*/
@@ -161,6 +176,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon
161176
/**
162177
* The default value for the {@code evictionPolicyClassName} configuration
163178
* attribute.
179+
*
164180
* @see GenericObjectPool#getEvictionPolicyClassName()
165181
* @see GenericKeyedObjectPool#getEvictionPolicyClassName()
166182
*/

src/main/java/org/apache/commons/pool3/impl/DefaultPooledObject.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ public synchronized boolean endEvictionTest(
138138

139139
/**
140140
* Gets the number of times this object has been borrowed.
141+
*
141142
* @return The number of times this object has been borrowed.
142143
* @since 2.1
143144
*/
@@ -194,6 +195,7 @@ public T getObject() {
194195

195196
/**
196197
* Gets the state of this object.
198+
*
197199
* @return state
198200
*/
199201
@Override

src/main/java/org/apache/commons/pool3/impl/EvictionTimer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public void run() {
9999
/**
100100
* Runnable that runs the referent of a weak reference. When the referent is no
101101
* no longer reachable, run is no-op.
102+
*
102103
* @param <R> The kind of Runnable.
103104
*/
104105
private static final class WeakRunner<R extends Runnable> implements Runnable {

src/main/java/org/apache/commons/pool3/impl/GenericKeyedObjectPool.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ private static final class ObjectDeque<S> {
127127

128128
/**
129129
* Constructs a new ObjectDeque with the given fairness policy.
130+
*
130131
* @param fairness true means client threads waiting to borrow / return instances
131132
* will be served as if waiting in a FIFO queue.
132133
*/
@@ -245,6 +246,7 @@ public String toString() {
245246
/**
246247
* Constructs a new {@code GenericKeyedObjectPool} using defaults from
247248
* {@link GenericKeyedObjectPoolConfig}.
249+
*
248250
* @param factory the factory to be used to create entries
249251
*/
250252
public GenericKeyedObjectPool(final KeyedPooledObjectFactory<K, T, E> factory) {
@@ -1707,6 +1709,7 @@ public void use(final T pooledObject) {
17071709

17081710
/**
17091711
* Whether there is at least one thread waiting on this deque, add an pool object.
1712+
*
17101713
* @param key pool key.
17111714
* @param idleObjects list of idle pool objects.
17121715
*/

0 commit comments

Comments
 (0)