Modified:
websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/GenericObjectPool.java.html
==============================================================================
---
websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/GenericObjectPool.java.html
(original)
+++
websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/GenericObjectPool.java.html
Sat Feb 8 20:08:04 2025
@@ -246,8 +246,8 @@ public class GenericObjectPool<T>
* <p>
* If there are no idle instances available in the pool, behavior depends
on
* the {@link #getMaxTotal() maxTotal}, (if applicable)
- * {@link #getBlockWhenExhausted()} and the value passed in to the
- * {@code borrowMaxWaitMillis} parameter. If the number of instances
+ * {@link #getBlockWhenExhausted()} and the value passed in the
+ * {@code maxWaitDuration} parameter. If the number of instances
* checked out from the pool is less than {@code maxTotal,} a new
* instance is created, activated and (if applicable) validated and
returned
* to the caller. If validation fails, a {@code NoSuchElementException}
@@ -261,7 +261,7 @@ public class GenericObjectPool<T>
* {@code NoSuchElementException} (if
* {@link #getBlockWhenExhausted()} is false). The length of time that this
* method will block when {@link #getBlockWhenExhausted()} is true is
- * determined by the value passed in to the {@code borrowMaxWaitMillis}
+ * determined by the value passed in to the {@code maxWaitDuration}
* parameter.
* </p>
* <p>
@@ -271,17 +271,17 @@ public class GenericObjectPool<T>
* available instances in request arrival order.
* </p>
*
- * @param borrowMaxWaitDuration The time to wait for an object to become
available, not null.
+ * @param maxWaitDuration The time to wait for an object to become
available, not null.
* @return object instance from the pool
* @throws NoSuchElementException if an instance cannot be returned
* @throws Exception if an object instance cannot be returned due to an
error
* @since 2.10.0
*/
- public T borrowObject(final Duration borrowMaxWaitDuration) throws
Exception {
+ public T borrowObject(final Duration maxWaitDuration) throws Exception {
<span class="fc" id="L281"> assertOpen();</span>
<span class="fc" id="L282"> final Instant startInstant =
Instant.now();</span>
-<span class="fc" id="L283"> final boolean negativeDuration =
borrowMaxWaitDuration.isNegative();</span>
-<span class="fc" id="L284"> Duration remainingWaitDuration =
borrowMaxWaitDuration;</span>
+<span class="fc" id="L283"> final boolean negativeDuration =
maxWaitDuration.isNegative();</span>
+<span class="fc" id="L284"> Duration remainingWaitDuration =
maxWaitDuration;</span>
<span class="fc" id="L285"> final AbandonedConfig ac =
this.abandonedConfig;</span>
<span class="pc bpc" id="L286" title="1 of 8 branches missed."> if (ac
!= null && ac.getRemoveAbandonedOnBorrow() && getNumIdle() <
2 && getNumActive() > getMaxTotal() - 3) {</span>
<span class="fc" id="L287"> removeAbandoned(ac);</span>
@@ -292,7 +292,7 @@ public class GenericObjectPool<T>
<span class="fc" id="L292"> final boolean blockWhenExhausted =
getBlockWhenExhausted();</span>
boolean create;
<span class="fc bfc" id="L294" title="All 2 branches covered."> while
(p == null) {</span>
-<span class="fc" id="L295"> remainingWaitDuration =
remainingWaitDuration.minus(durationSince(startInstant));</span>
+<span class="fc" id="L295"> remainingWaitDuration =
maxWaitDuration.minus(durationSince(startInstant));</span>
<span class="fc" id="L296"> create = false;</span>
<span class="fc" id="L297"> p = idleObjects.pollFirst();</span>
<span class="fc bfc" id="L298" title="All 2 branches covered."> if
(p == null) {</span>
@@ -303,11 +303,11 @@ public class GenericObjectPool<T>
}
<span class="fc bfc" id="L304" title="All 2 branches covered."> if
(blockWhenExhausted) {</span>
<span class="fc bfc" id="L305" title="All 2 branches covered.">
if (PooledObject.isNull(p)) {</span>
-<span class="fc bfc" id="L306" title="All 2 branches covered.">
p = negativeDuration ? idleObjects.takeFirst() :
idleObjects.pollFirst(remainingWaitDuration);</span>
+<span class="fc" id="L306"> remainingWaitDuration =
maxWaitDuration.minus(durationSince(startInstant));</span>
+<span class="fc bfc" id="L307" title="All 2 branches covered.">
p = negativeDuration ? idleObjects.takeFirst() :
idleObjects.pollFirst(remainingWaitDuration);</span>
}
-<span class="fc bfc" id="L308" title="All 2 branches covered.">
if (PooledObject.isNull(p)) {</span>
-<span class="fc" id="L309"> throw new
NoSuchElementException(appendStats(</span>
- "Timeout waiting for idle object,
borrowMaxWaitDuration=" + remainingWaitDuration));
+<span class="fc bfc" id="L309" title="All 2 branches covered.">
if (PooledObject.isNull(p)) {</span>
+<span class="fc" id="L310"> throw new
NoSuchElementException(appendStats("Timeout waiting for idle object,
maxWaitDuration=" + remainingWaitDuration));</span>
}
<span class="fc bfc" id="L312" title="All 2 branches covered."> }
else if (PooledObject.isNull(p)) {</span>
<span class="fc" id="L313"> throw new
NoSuchElementException(appendStats("Pool exhausted"));</span>
@@ -326,45 +326,39 @@ public class GenericObjectPool<T>
<span class="fc" id="L326"> }</span>
<span class="fc" id="L327"> p = null;</span>
<span class="fc bfc" id="L328" title="All 2 branches covered.">
if (create) {</span>
-<span class="fc" id="L329"> final
NoSuchElementException nsee = new NoSuchElementException(</span>
-<span class="fc" id="L330">
appendStats("Unable to activate object"));</span>
-<span class="fc" id="L331"> nsee.initCause(e);</span>
-<span class="fc" id="L332"> throw nsee;</span>
+<span class="fc" id="L329"> final
NoSuchElementException nsee = new
NoSuchElementException(appendStats("Unable to activate
object"));</span>
+<span class="fc" id="L330"> nsee.initCause(e);</span>
+<span class="fc" id="L331"> throw nsee;</span>
}
-<span class="fc" id="L334"> }</span>
-<span class="fc bfc" id="L335" title="All 4 branches covered.">
if (!PooledObject.isNull(p) && getTestOnBorrow()) {</span>
-<span class="fc" id="L336"> boolean validate = false;</span>
-<span class="fc" id="L337"> Throwable validationThrowable =
null;</span>
+<span class="fc" id="L333"> }</span>
+<span class="fc bfc" id="L334" title="All 4 branches covered.">
if (!PooledObject.isNull(p) && getTestOnBorrow()) {</span>
+<span class="fc" id="L335"> boolean validate = false;</span>
+<span class="fc" id="L336"> Throwable validationThrowable =
null;</span>
try {
-<span class="fc" id="L339"> validate =
factory.validateObject(p);</span>
-<span class="fc" id="L340"> } catch (final Throwable t)
{</span>
-<span class="fc" id="L341">
PoolUtils.checkRethrow(t);</span>
-<span class="fc" id="L342"> validationThrowable =
t;</span>
-<span class="fc" id="L343"> }</span>
-<span class="fc bfc" id="L344" title="All 2 branches covered.">
if (!validate) {</span>
+<span class="fc" id="L338"> validate =
factory.validateObject(p);</span>
+<span class="fc" id="L339"> } catch (final Throwable t)
{</span>
+<span class="fc" id="L340">
PoolUtils.checkRethrow(t);</span>
+<span class="fc" id="L341"> validationThrowable =
t;</span>
+<span class="fc" id="L342"> }</span>
+<span class="fc bfc" id="L343" title="All 2 branches covered.">
if (!validate) {</span>
try {
-<span class="fc" id="L346"> destroy(p,
DestroyMode.NORMAL);</span>
-<span class="fc" id="L347">
destroyedByBorrowValidationCount.incrementAndGet();</span>
-<span class="fc" id="L348"> } catch (final Exception
ignored) {</span>
+<span class="fc" id="L345"> destroy(p,
DestroyMode.NORMAL);</span>
+<span class="fc" id="L346">
destroyedByBorrowValidationCount.incrementAndGet();</span>
+<span class="fc" id="L347"> } catch (final Exception
ignored) {</span>
// ignored - validation failure is more important
-<span class="fc" id="L350"> }</span>
-<span class="fc" id="L351"> p = null;</span>
-<span class="fc bfc" id="L352" title="All 2 branches covered.">
if (create) {</span>
-<span class="fc" id="L353"> final
NoSuchElementException nsee = new NoSuchElementException(</span>
-<span class="fc" id="L354">
appendStats("Unable to validate object"));</span>
-<span class="fc" id="L355">
nsee.initCause(validationThrowable);</span>
-<span class="fc" id="L356"> throw nsee;</span>
+<span class="fc" id="L349"> }</span>
+<span class="fc" id="L350"> p = null;</span>
+<span class="fc bfc" id="L351" title="All 2 branches covered.">
if (create) {</span>
+<span class="fc" id="L352"> final
NoSuchElementException nsee = new
NoSuchElementException(appendStats("Unable to validate
object"));</span>
+<span class="fc" id="L353">
nsee.initCause(validationThrowable);</span>
+<span class="fc" id="L354"> throw nsee;</span>
}
}
-<span class="fc" id="L359"> }</span>
+<span class="fc" id="L357"> }</span>
}
}
-<span class="fc" id="L362"> updateStatsBorrow(p,
durationSince(startInstant));</span>
-<span class="fc" id="L363"> return p.getObject();</span>
- }
-
- private Duration durationSince(final Instant startInstant) {
-<span class="fc" id="L367"> return Duration.between(startInstant,
Instant.now());</span>
+<span class="fc" id="L360"> updateStatsBorrow(p,
durationSince(startInstant));</span>
+<span class="fc" id="L361"> return p.getObject();</span>
}
/**
@@ -383,7 +377,7 @@ public class GenericObjectPool<T>
* If there are no idle instances available in the pool, behavior depends
on
* the {@link #getMaxTotal() maxTotal}, (if applicable)
* {@link #getBlockWhenExhausted()} and the value passed in to the
- * {@code borrowMaxWaitMillis} parameter. If the number of instances
+ * {@code maxWaitMillis} parameter. If the number of instances
* checked out from the pool is less than {@code maxTotal,} a new
* instance is created, activated and (if applicable) validated and
returned
* to the caller. If validation fails, a {@code NoSuchElementException}
@@ -397,7 +391,7 @@ public class GenericObjectPool<T>
* {@code NoSuchElementException} (if
* {@link #getBlockWhenExhausted()} is false). The length of time that this
* method will block when {@link #getBlockWhenExhausted()} is true is
- * determined by the value passed in to the {@code borrowMaxWaitMillis}
+ * determined by the value passed in to the {@code maxWaitMillis}
* parameter.
* </p>
* <p>
@@ -407,15 +401,15 @@ public class GenericObjectPool<T>
* available instances in request arrival order.
* </p>
*
- * @param borrowMaxWaitMillis The time to wait in milliseconds for an
object
+ * @param maxWaitMillis The time to wait in milliseconds for an object
* to become available
* @return object instance from the pool
* @throws NoSuchElementException if an instance cannot be returned
* @throws Exception if an object instance cannot be returned due to an
* error
*/
- public T borrowObject(final long borrowMaxWaitMillis) throws Exception {
-<span class="fc" id="L418"> return
borrowObject(Duration.ofMillis(borrowMaxWaitMillis));</span>
+ public T borrowObject(final long maxWaitMillis) throws Exception {
+<span class="fc" id="L412"> return
borrowObject(Duration.ofMillis(maxWaitMillis));</span>
}
/**
@@ -438,17 +432,17 @@ public class GenericObjectPool<T>
*/
@Override
public void clear() {
-<span class="fc" id="L441"> PooledObject<T> p =
idleObjects.poll();</span>
+<span class="fc" id="L435"> PooledObject<T> p =
idleObjects.poll();</span>
-<span class="fc bfc" id="L443" title="All 2 branches covered."> while
(p != null) {</span>
+<span class="fc bfc" id="L437" title="All 2 branches covered."> while
(p != null) {</span>
try {
-<span class="fc" id="L445"> destroy(p,
DestroyMode.NORMAL);</span>
-<span class="fc" id="L446"> } catch (final Exception e) {</span>
-<span class="fc" id="L447"> swallowException(e);</span>
-<span class="fc" id="L448"> }</span>
-<span class="fc" id="L449"> p = idleObjects.poll();</span>
+<span class="fc" id="L439"> destroy(p,
DestroyMode.NORMAL);</span>
+<span class="fc" id="L440"> } catch (final Exception e) {</span>
+<span class="fc" id="L441"> swallowException(e);</span>
+<span class="fc" id="L442"> }</span>
+<span class="fc" id="L443"> p = idleObjects.poll();</span>
}
-<span class="fc" id="L451"> }</span>
+<span class="fc" id="L445"> }</span>
/**
* Closes the pool. Once the pool is closed, {@link #borrowObject()} will
@@ -461,29 +455,29 @@ public class GenericObjectPool<T>
*/
@Override
public void close() {
-<span class="fc bfc" id="L464" title="All 2 branches covered."> if
(isClosed()) {</span>
-<span class="fc" id="L465"> return;</span>
+<span class="fc bfc" id="L458" title="All 2 branches covered."> if
(isClosed()) {</span>
+<span class="fc" id="L459"> return;</span>
}
-<span class="fc" id="L468"> synchronized (closeLock) {</span>
-<span class="pc bpc" id="L469" title="1 of 2 branches missed."> if
(isClosed()) {</span>
-<span class="nc" id="L470"> return;</span>
+<span class="fc" id="L462"> synchronized (closeLock) {</span>
+<span class="pc bpc" id="L463" title="1 of 2 branches missed."> if
(isClosed()) {</span>
+<span class="nc" id="L464"> return;</span>
}
// Stop the evictor before the pool is closed since evict() calls
// assertOpen()
-<span class="fc" id="L475"> stopEvictor();</span>
+<span class="fc" id="L469"> stopEvictor();</span>
-<span class="fc" id="L477"> closed = true;</span>
+<span class="fc" id="L471"> closed = true;</span>
// This clear removes any idle objects
-<span class="fc" id="L479"> clear();</span>
+<span class="fc" id="L473"> clear();</span>
-<span class="fc" id="L481"> jmxUnregister();</span>
+<span class="fc" id="L475"> jmxUnregister();</span>
// Release any threads that were waiting for an object
-<span class="fc" id="L484">
idleObjects.interuptTakeWaiters();</span>
-<span class="fc" id="L485"> }</span>
-<span class="fc" id="L486"> }</span>
+<span class="fc" id="L478">
idleObjects.interuptTakeWaiters();</span>
+<span class="fc" id="L479"> }</span>
+<span class="fc" id="L480"> }</span>
/**
* Attempts to create a new wrapped pooled object.
@@ -500,88 +494,88 @@ public class GenericObjectPool<T>
* @throws Exception if the object factory's {@code makeObject} fails
*/
private PooledObject<T> create(final Duration maxWaitDuration)
throws Exception {
-<span class="fc" id="L503"> final Instant startInstant =
Instant.now();</span>
-<span class="fc bfc" id="L504" title="All 2 branches covered.">
Duration remainingWaitDuration = maxWaitDuration.isNegative() ? Duration.ZERO :
maxWaitDuration;</span>
-<span class="fc" id="L505"> int localMaxTotal = getMaxTotal();</span>
+<span class="fc" id="L497"> final Instant startInstant =
Instant.now();</span>
+<span class="fc bfc" id="L498" title="All 2 branches covered.">
Duration remainingWaitDuration = maxWaitDuration.isNegative() ? Duration.ZERO :
maxWaitDuration;</span>
+<span class="fc" id="L499"> int localMaxTotal = getMaxTotal();</span>
// This simplifies the code later in this method
-<span class="fc bfc" id="L507" title="All 2 branches covered."> if
(localMaxTotal < 0) {</span>
-<span class="fc" id="L508"> localMaxTotal =
Integer.MAX_VALUE;</span>
+<span class="fc bfc" id="L501" title="All 2 branches covered."> if
(localMaxTotal < 0) {</span>
+<span class="fc" id="L502"> localMaxTotal =
Integer.MAX_VALUE;</span>
}
-<span class="fc" id="L510"> final Instant localStartInstant =
Instant.now();</span>
+<span class="fc" id="L504"> final Instant localStartInstant =
Instant.now();</span>
// Flag that indicates if create should:
// - TRUE: call the factory to create an object
// - FALSE: return null
// - null: loop and re-test the condition that determines whether to
// call the factory
-<span class="fc" id="L516"> Boolean create = null;</span>
-<span class="fc bfc" id="L517" title="All 2 branches covered."> while
(create == null) {</span>
+<span class="fc" id="L510"> Boolean create = null;</span>
+<span class="fc bfc" id="L511" title="All 2 branches covered."> while
(create == null) {</span>
// remainingWaitDuration handles spurious wakeup from wait().
-<span class="fc" id="L519"> remainingWaitDuration =
remainingWaitDuration.minus(durationSince(startInstant));</span>
-<span class="fc" id="L520"> synchronized (makeObjectCountLock)
{</span>
-<span class="fc" id="L521"> final long newCreateCount =
createCount.incrementAndGet();</span>
-<span class="fc bfc" id="L522" title="All 2 branches covered.">
if (newCreateCount > localMaxTotal) {</span>
+<span class="fc" id="L513"> remainingWaitDuration =
maxWaitDuration.minus(durationSince(startInstant));</span>
+<span class="fc" id="L514"> synchronized (makeObjectCountLock)
{</span>
+<span class="fc" id="L515"> final long newCreateCount =
createCount.incrementAndGet();</span>
+<span class="fc bfc" id="L516" title="All 2 branches covered.">
if (newCreateCount > localMaxTotal) {</span>
// The pool is currently at capacity or in the process of
// making enough new objects to take it to capacity.
-<span class="fc" id="L525">
createCount.decrementAndGet();</span>
-<span class="fc bfc" id="L526" title="All 2 branches covered.">
if (makeObjectCount == 0) {</span>
+<span class="fc" id="L519">
createCount.decrementAndGet();</span>
+<span class="fc bfc" id="L520" title="All 2 branches covered.">
if (makeObjectCount == 0) {</span>
// There are no makeObject() calls in progress so the
// pool is at capacity. Do not attempt to create a new
// object. Return and wait for an object to be returned
-<span class="fc" id="L530"> create =
Boolean.FALSE;</span>
+<span class="fc" id="L524"> create =
Boolean.FALSE;</span>
} else {
// There are makeObject() calls in progress that might
// bring the pool to capacity. Those calls might also
// fail so wait until they complete and then re-test if
// the pool is at capacity or not.
-<span class="fc" id="L536"> wait(makeObjectCountLock,
remainingWaitDuration);</span>
+<span class="fc" id="L530"> wait(makeObjectCountLock,
remainingWaitDuration);</span>
}
} else {
// The pool is not at capacity. Create a new object.
-<span class="fc" id="L540"> makeObjectCount++;</span>
-<span class="fc" id="L541"> create = Boolean.TRUE;</span>
+<span class="fc" id="L534"> makeObjectCount++;</span>
+<span class="fc" id="L535"> create = Boolean.TRUE;</span>
}
-<span class="fc" id="L543"> }</span>
+<span class="fc" id="L537"> }</span>
// Do not block more if remainingWaitDuration > 0.
-<span class="fc bfc" id="L545" title="All 4 branches covered."> if
(create == null && remainingWaitDuration.compareTo(Duration.ZERO) >
0 &&</span>
-<span class="pc bpc" id="L546" title="1 of 2 branches missed.">
durationSince(localStartInstant).compareTo(remainingWaitDuration) >= 0)
{</span>
-<span class="fc" id="L547"> create = Boolean.FALSE;</span>
+<span class="fc bfc" id="L539" title="All 4 branches covered."> if
(create == null && remainingWaitDuration.compareTo(Duration.ZERO) >
0 &&</span>
+<span class="pc bpc" id="L540" title="1 of 2 branches missed.">
durationSince(localStartInstant).compareTo(remainingWaitDuration) >= 0)
{</span>
+<span class="fc" id="L541"> create = Boolean.FALSE;</span>
}
}
-<span class="fc bfc" id="L551" title="All 2 branches covered."> if
(!create.booleanValue()) {</span>
-<span class="fc" id="L552"> return null;</span>
+<span class="fc bfc" id="L545" title="All 2 branches covered."> if
(!create.booleanValue()) {</span>
+<span class="fc" id="L546"> return null;</span>
}
final PooledObject<T> p;
try {
-<span class="fc" id="L557"> p = factory.makeObject();</span>
-<span class="fc bfc" id="L558" title="All 2 branches covered."> if
(PooledObject.isNull(p)) {</span>
-<span class="fc" id="L559">
createCount.decrementAndGet();</span>
-<span class="fc" id="L560"> throw new
NullPointerException(String.format("%s.makeObject() = null",
factory.getClass().getSimpleName()));</span>
- }
-<span class="fc bfc" id="L562" title="All 4 branches covered."> if
(getTestOnCreate() && !factory.validateObject(p)) {</span>
-<span class="fc" id="L563">
createCount.decrementAndGet();</span>
-<span class="fc" id="L564"> return null;</span>
- }
-<span class="fc" id="L566"> } catch (final Throwable e) {</span>
-<span class="fc" id="L567"> createCount.decrementAndGet();</span>
-<span class="fc" id="L568"> throw e;</span>
+<span class="fc" id="L551"> p = factory.makeObject();</span>
+<span class="fc bfc" id="L552" title="All 2 branches covered."> if
(PooledObject.isNull(p)) {</span>
+<span class="fc" id="L553">
createCount.decrementAndGet();</span>
+<span class="fc" id="L554"> throw new
NullPointerException(String.format("%s.makeObject() = null",
factory.getClass().getSimpleName()));</span>
+ }
+<span class="fc bfc" id="L556" title="All 4 branches covered."> if
(getTestOnCreate() && !factory.validateObject(p)) {</span>
+<span class="fc" id="L557">
createCount.decrementAndGet();</span>
+<span class="fc" id="L558"> return null;</span>
+ }
+<span class="fc" id="L560"> } catch (final Throwable e) {</span>
+<span class="fc" id="L561"> createCount.decrementAndGet();</span>
+<span class="fc" id="L562"> throw e;</span>
} finally {
-<span class="fc" id="L570"> synchronized (makeObjectCountLock)
{</span>
-<span class="fc" id="L571"> makeObjectCount--;</span>
-<span class="fc" id="L572">
makeObjectCountLock.notifyAll();</span>
-<span class="fc" id="L573"> }</span>
+<span class="fc" id="L564"> synchronized (makeObjectCountLock)
{</span>
+<span class="fc" id="L565"> makeObjectCount--;</span>
+<span class="fc" id="L566">
makeObjectCountLock.notifyAll();</span>
+<span class="fc" id="L567"> }</span>
}
-<span class="fc" id="L576"> final AbandonedConfig ac =
this.abandonedConfig;</span>
-<span class="fc bfc" id="L577" title="All 4 branches covered."> if (ac
!= null && ac.getLogAbandoned()) {</span>
-<span class="fc" id="L578"> p.setLogAbandoned(true);</span>
-<span class="fc" id="L579">
p.setRequireFullStackTrace(ac.getRequireFullStackTrace());</span>
+<span class="fc" id="L570"> final AbandonedConfig ac =
this.abandonedConfig;</span>
+<span class="fc bfc" id="L571" title="All 4 branches covered."> if (ac
!= null && ac.getLogAbandoned()) {</span>
+<span class="fc" id="L572"> p.setLogAbandoned(true);</span>
+<span class="fc" id="L573">
p.setRequireFullStackTrace(ac.getRequireFullStackTrace());</span>
}
-<span class="fc" id="L582"> createdCount.incrementAndGet();</span>
-<span class="fc" id="L583"> allObjects.put(new
IdentityWrapper<>(p.getObject()), p);</span>
-<span class="fc" id="L584"> return p;</span>
+<span class="fc" id="L576"> createdCount.incrementAndGet();</span>
+<span class="fc" id="L577"> allObjects.put(new
IdentityWrapper<>(p.getObject()), p);</span>
+<span class="fc" id="L578"> return p;</span>
}
/**
@@ -593,16 +587,20 @@ public class GenericObjectPool<T>
* cleanly
*/
private void destroy(final PooledObject<T> toDestroy, final
DestroyMode destroyMode) throws Exception {
-<span class="fc" id="L596"> toDestroy.invalidate();</span>
-<span class="fc" id="L597"> idleObjects.remove(toDestroy);</span>
-<span class="fc" id="L598"> allObjects.remove(new
IdentityWrapper<>(toDestroy.getObject()));</span>
+<span class="fc" id="L590"> toDestroy.invalidate();</span>
+<span class="fc" id="L591"> idleObjects.remove(toDestroy);</span>
+<span class="fc" id="L592"> allObjects.remove(new
IdentityWrapper<>(toDestroy.getObject()));</span>
try {
-<span class="fc" id="L600"> factory.destroyObject(toDestroy,
destroyMode);</span>
+<span class="fc" id="L594"> factory.destroyObject(toDestroy,
destroyMode);</span>
} finally {
-<span class="fc" id="L602"> destroyedCount.incrementAndGet();</span>
-<span class="fc" id="L603"> createCount.decrementAndGet();</span>
+<span class="fc" id="L596"> destroyedCount.incrementAndGet();</span>
+<span class="fc" id="L597"> createCount.decrementAndGet();</span>
}
-<span class="fc" id="L605"> }</span>
+<span class="fc" id="L599"> }</span>
+
+ private Duration durationSince(final Instant startInstant) {
+<span class="fc" id="L602"> return Duration.between(startInstant,
Instant.now());</span>
+ }
/**
* Tries to ensure that {@code idleCount} idle instances exist in the pool.
@@ -622,35 +620,35 @@ public class GenericObjectPool<T>
* @throws Exception if the factory's makeObject throws
*/
private void ensureIdle(final int idleCount, final boolean always) throws
Exception {
-<span class="fc bfc" id="L625" title="All 8 branches covered."> if
(idleCount < 1 || isClosed() || !always &&
!idleObjects.hasTakeWaiters()) {</span>
-<span class="fc" id="L626"> return;</span>
+<span class="fc bfc" id="L623" title="All 8 branches covered."> if
(idleCount < 1 || isClosed() || !always &&
!idleObjects.hasTakeWaiters()) {</span>
+<span class="fc" id="L624"> return;</span>
}
-<span class="fc bfc" id="L629" title="All 2 branches covered."> while
(idleObjects.size() < idleCount) {</span>
-<span class="fc" id="L630"> final PooledObject<T> p =
create(getMaxWaitDuration());</span>
-<span class="fc bfc" id="L631" title="All 2 branches covered."> if
(PooledObject.isNull(p)) {</span>
+<span class="fc bfc" id="L627" title="All 2 branches covered."> while
(idleObjects.size() < idleCount) {</span>
+<span class="fc" id="L628"> final PooledObject<T> p =
create(getMaxWaitDuration());</span>
+<span class="fc bfc" id="L629" title="All 2 branches covered."> if
(PooledObject.isNull(p)) {</span>
// Can't create objects, no reason to think another call to
// create will work. Give up.
-<span class="fc" id="L634"> break;</span>
+<span class="fc" id="L632"> break;</span>
}
-<span class="pc bpc" id="L636" title="1 of 2 branches missed."> if
(getLifo()) {</span>
-<span class="fc" id="L637"> idleObjects.addFirst(p);</span>
+<span class="pc bpc" id="L634" title="1 of 2 branches missed."> if
(getLifo()) {</span>
+<span class="fc" id="L635"> idleObjects.addFirst(p);</span>
} else {
-<span class="nc" id="L639"> idleObjects.addLast(p);</span>
+<span class="nc" id="L637"> idleObjects.addLast(p);</span>
}
-<span class="fc" id="L641"> }</span>
-<span class="pc bpc" id="L642" title="1 of 2 branches missed."> if
(isClosed()) {</span>
+<span class="fc" id="L639"> }</span>
+<span class="pc bpc" id="L640" title="1 of 2 branches missed."> if
(isClosed()) {</span>
// Pool closed while object was being added to idle objects.
// Make sure the returned object is destroyed rather than left
// in the idle object pool (which would effectively be a leak)
-<span class="nc" id="L646"> clear();</span>
+<span class="nc" id="L644"> clear();</span>
}
-<span class="fc" id="L648"> }</span>
+<span class="fc" id="L646"> }</span>
@Override
void ensureMinIdle() throws Exception {
-<span class="fc" id="L652"> ensureIdle(getMinIdle(), true);</span>
-<span class="fc" id="L653"> }</span>
+<span class="fc" id="L650"> ensureIdle(getMinIdle(), true);</span>
+<span class="fc" id="L651"> }</span>
/**
* {@inheritDoc}
@@ -661,45 +659,45 @@ public class GenericObjectPool<T>
*/
@Override
public void evict() throws Exception {
-<span class="fc" id="L664"> assertOpen();</span>
+<span class="fc" id="L662"> assertOpen();</span>
-<span class="fc bfc" id="L666" title="All 2 branches covered."> if
(!idleObjects.isEmpty()) {</span>
+<span class="fc bfc" id="L664" title="All 2 branches covered."> if
(!idleObjects.isEmpty()) {</span>
-<span class="fc" id="L668"> PooledObject<T> underTest =
null;</span>
-<span class="fc" id="L669"> final EvictionPolicy<T>
evictionPolicy = getEvictionPolicy();</span>
+<span class="fc" id="L666"> PooledObject<T> underTest =
null;</span>
+<span class="fc" id="L667"> final EvictionPolicy<T>
evictionPolicy = getEvictionPolicy();</span>
-<span class="fc" id="L671"> synchronized (evictionLock) {</span>
-<span class="fc" id="L672"> final EvictionConfig evictionConfig
= new EvictionConfig(</span>
-<span class="fc" id="L673">
getMinEvictableIdleDuration(),</span>
-<span class="fc" id="L674">
getSoftMinEvictableIdleDuration(),</span>
-<span class="fc" id="L675"> getMinIdle());</span>
+<span class="fc" id="L669"> synchronized (evictionLock) {</span>
+<span class="fc" id="L670"> final EvictionConfig evictionConfig
= new EvictionConfig(</span>
+<span class="fc" id="L671">
getMinEvictableIdleDuration(),</span>
+<span class="fc" id="L672">
getSoftMinEvictableIdleDuration(),</span>
+<span class="fc" id="L673"> getMinIdle());</span>
-<span class="fc" id="L677"> final boolean testWhileIdle =
getTestWhileIdle();</span>
+<span class="fc" id="L675"> final boolean testWhileIdle =
getTestWhileIdle();</span>
-<span class="fc bfc" id="L679" title="All 2 branches covered.">
for (int i = 0, m = getNumTests(); i < m; i++) {</span>
-<span class="fc bfc" id="L680" title="All 4 branches covered.">
if (evictionIterator == null || !evictionIterator.hasNext()) {</span>
-<span class="fc" id="L681"> evictionIterator = new
EvictionIterator(idleObjects);</span>
+<span class="fc bfc" id="L677" title="All 2 branches covered.">
for (int i = 0, m = getNumTests(); i < m; i++) {</span>
+<span class="fc bfc" id="L678" title="All 4 branches covered.">
if (evictionIterator == null || !evictionIterator.hasNext()) {</span>
+<span class="fc" id="L679"> evictionIterator = new
EvictionIterator(idleObjects);</span>
}
-<span class="pc bpc" id="L683" title="1 of 2 branches missed.">
if (!evictionIterator.hasNext()) {</span>
+<span class="fc bfc" id="L681" title="All 2 branches covered.">
if (!evictionIterator.hasNext()) {</span>
// Pool exhausted, nothing to do here
-<span class="nc" id="L685"> return;</span>
+<span class="fc" id="L683"> return;</span>
}
try {
-<span class="fc" id="L689"> underTest =
evictionIterator.next();</span>
-<span class="nc" id="L690"> } catch (final
NoSuchElementException nsee) {</span>
+<span class="fc" id="L687"> underTest =
evictionIterator.next();</span>
+<span class="nc" id="L688"> } catch (final
NoSuchElementException nsee) {</span>
// Object was borrowed in another thread
// Don't count this as an eviction test so reduce i;
-<span class="nc" id="L693"> i--;</span>
-<span class="nc" id="L694"> evictionIterator =
null;</span>
-<span class="nc" id="L695"> continue;</span>
-<span class="fc" id="L696"> }</span>
+<span class="nc" id="L691"> i--;</span>
+<span class="nc" id="L692"> evictionIterator =
null;</span>
+<span class="nc" id="L693"> continue;</span>
+<span class="fc" id="L694"> }</span>
-<span class="pc bpc" id="L698" title="1 of 2 branches missed.">
if (!underTest.startEvictionTest()) {</span>
+<span class="pc bpc" id="L696" title="1 of 2 branches missed.">
if (!underTest.startEvictionTest()) {</span>
// Object was borrowed in another thread
// Don't count this as an eviction test so reduce i;
-<span class="nc" id="L701"> i--;</span>
-<span class="nc" id="L702"> continue;</span>
+<span class="nc" id="L699"> i--;</span>
+<span class="nc" id="L700"> continue;</span>
}
// User provided eviction policy could throw all sorts of
@@ -707,70 +705,70 @@ public class GenericObjectPool<T>
// killing the eviction thread.
boolean evict;
try {
-<span class="fc" id="L710"> evict =
evictionPolicy.evict(evictionConfig, underTest,</span>
-<span class="fc" id="L711">
idleObjects.size());</span>
-<span class="nc" id="L712"> } catch (final Throwable t)
{</span>
+<span class="fc" id="L708"> evict =
evictionPolicy.evict(evictionConfig, underTest,</span>
+<span class="fc" id="L709">
idleObjects.size());</span>
+<span class="nc" id="L710"> } catch (final Throwable t)
{</span>
// Slightly convoluted as SwallowedExceptionListener
// uses Exception rather than Throwable
-<span class="nc" id="L715">
PoolUtils.checkRethrow(t);</span>
-<span class="nc" id="L716"> swallowException(new
Exception(t));</span>
+<span class="nc" id="L713">
PoolUtils.checkRethrow(t);</span>
+<span class="nc" id="L714"> swallowException(new
Exception(t));</span>
// Don't evict on error conditions
-<span class="nc" id="L718"> evict = false;</span>
-<span class="fc" id="L719"> }</span>
+<span class="nc" id="L716"> evict = false;</span>
+<span class="fc" id="L717"> }</span>
-<span class="fc bfc" id="L721" title="All 2 branches covered.">
if (evict) {</span>
-<span class="fc" id="L722"> destroy(underTest,
DestroyMode.NORMAL);</span>
-<span class="fc" id="L723">
destroyedByEvictorCount.incrementAndGet();</span>
+<span class="fc bfc" id="L719" title="All 2 branches covered.">
if (evict) {</span>
+<span class="fc" id="L720"> destroy(underTest,
DestroyMode.NORMAL);</span>
+<span class="fc" id="L721">
destroyedByEvictorCount.incrementAndGet();</span>
} else {
-<span class="fc bfc" id="L725" title="All 2 branches covered.">
if (testWhileIdle) {</span>
-<span class="fc" id="L726"> boolean active =
false;</span>
+<span class="fc bfc" id="L723" title="All 2 branches covered.">
if (testWhileIdle) {</span>
+<span class="fc" id="L724"> boolean active =
false;</span>
try {
-<span class="fc" id="L728">
factory.activateObject(underTest);</span>
-<span class="fc" id="L729"> active =
true;</span>
-<span class="fc" id="L730"> } catch (final
Exception e) {</span>
-<span class="fc" id="L731"> destroy(underTest,
DestroyMode.NORMAL);</span>
-<span class="fc" id="L732">
destroyedByEvictorCount.incrementAndGet();</span>
-<span class="fc" id="L733"> }</span>
-<span class="fc bfc" id="L734" title="All 2 branches covered.">
if (active) {</span>
-<span class="fc" id="L735"> boolean validate =
false;</span>
-<span class="fc" id="L736"> Throwable
validationThrowable = null;</span>
+<span class="fc" id="L726">
factory.activateObject(underTest);</span>
+<span class="fc" id="L727"> active =
true;</span>
+<span class="fc" id="L728"> } catch (final
Exception e) {</span>
+<span class="fc" id="L729"> destroy(underTest,
DestroyMode.NORMAL);</span>
+<span class="fc" id="L730">
destroyedByEvictorCount.incrementAndGet();</span>
+<span class="fc" id="L731"> }</span>
+<span class="fc bfc" id="L732" title="All 2 branches covered.">
if (active) {</span>
+<span class="fc" id="L733"> boolean validate =
false;</span>
+<span class="fc" id="L734"> Throwable
validationThrowable = null;</span>
try {
-<span class="fc" id="L738"> validate =
factory.validateObject(underTest);</span>
-<span class="fc" id="L739"> } catch (final
Throwable t) {</span>
-<span class="fc" id="L740">
PoolUtils.checkRethrow(t);</span>
-<span class="fc" id="L741">
validationThrowable = t;</span>
-<span class="fc" id="L742"> }</span>
-<span class="fc bfc" id="L743" title="All 2 branches covered.">
if (!validate) {</span>
-<span class="fc" id="L744">
destroy(underTest, DestroyMode.NORMAL);</span>
-<span class="fc" id="L745">
destroyedByEvictorCount.incrementAndGet();</span>
-<span class="fc bfc" id="L746" title="All 2 branches covered.">
if (validationThrowable != null) {</span>
-<span class="pc bpc" id="L747" title="1 of 2 branches missed.">
if (validationThrowable instanceof RuntimeException)
{</span>
-<span class="fc" id="L748"> throw
(RuntimeException) validationThrowable;</span>
+<span class="fc" id="L736"> validate =
factory.validateObject(underTest);</span>
+<span class="fc" id="L737"> } catch (final
Throwable t) {</span>
+<span class="fc" id="L738">
PoolUtils.checkRethrow(t);</span>
+<span class="fc" id="L739">
validationThrowable = t;</span>
+<span class="fc" id="L740"> }</span>
+<span class="fc bfc" id="L741" title="All 2 branches covered.">
if (!validate) {</span>
+<span class="fc" id="L742">
destroy(underTest, DestroyMode.NORMAL);</span>
+<span class="fc" id="L743">
destroyedByEvictorCount.incrementAndGet();</span>
+<span class="fc bfc" id="L744" title="All 2 branches covered.">
if (validationThrowable != null) {</span>
+<span class="pc bpc" id="L745" title="1 of 2 branches missed.">
if (validationThrowable instanceof RuntimeException)
{</span>
+<span class="fc" id="L746"> throw
(RuntimeException) validationThrowable;</span>
}
-<span class="nc" id="L750"> throw
(Error) validationThrowable;</span>
+<span class="nc" id="L748"> throw
(Error) validationThrowable;</span>
}
} else {
try {
-<span class="fc" id="L754">
factory.passivateObject(underTest);</span>
-<span class="nc" id="L755"> } catch (final
Exception e) {</span>
-<span class="nc" id="L756">
destroy(underTest, DestroyMode.NORMAL);</span>
-<span class="nc" id="L757">
destroyedByEvictorCount.incrementAndGet();</span>
-<span class="fc" id="L758"> }</span>
+<span class="fc" id="L752">
factory.passivateObject(underTest);</span>
+<span class="nc" id="L753"> } catch (final
Exception e) {</span>
+<span class="nc" id="L754">
destroy(underTest, DestroyMode.NORMAL);</span>
+<span class="nc" id="L755">
destroyedByEvictorCount.incrementAndGet();</span>
+<span class="fc" id="L756"> }</span>
}
}
}
-<span class="fc" id="L762">
underTest.endEvictionTest(idleObjects);</span>
+<span class="fc" id="L760">
underTest.endEvictionTest(idleObjects);</span>
// TODO - May need to add code here once additional
// states are used
}
}
-<span class="fc" id="L767"> }</span>
+<span class="fc" id="L765"> }</span>
}
-<span class="fc" id="L769"> final AbandonedConfig ac =
this.abandonedConfig;</span>
-<span class="pc bpc" id="L770" title="1 of 4 branches missed."> if (ac
!= null && ac.getRemoveAbandonedOnMaintenance()) {</span>
-<span class="fc" id="L771"> removeAbandoned(ac);</span>
+<span class="fc" id="L767"> final AbandonedConfig ac =
this.abandonedConfig;</span>
+<span class="pc bpc" id="L768" title="1 of 4 branches missed."> if (ac
!= null && ac.getRemoveAbandonedOnMaintenance()) {</span>
+<span class="fc" id="L769"> removeAbandoned(ac);</span>
}
-<span class="fc" id="L773"> }</span>
+<span class="fc" id="L771"> }</span>
/**
* Gets a reference to the factory used to create, destroy and validate
@@ -779,7 +777,7 @@ public class GenericObjectPool<T>
* @return the factory
*/
public PooledObjectFactory<T> getFactory() {
-<span class="nc" id="L782"> return factory;</span>
+<span class="nc" id="L780"> return factory;</span>
}
/**
@@ -791,17 +789,17 @@ public class GenericObjectPool<T>
@Override
public String getFactoryType() {
// Not thread safe. Accept that there may be multiple evaluations.
-<span class="pc bpc" id="L794" title="1 of 2 branches missed."> if
(factoryType == null) {</span>
-<span class="fc" id="L795"> final StringBuilder result = new
StringBuilder();</span>
-<span class="fc" id="L796">
result.append(factory.getClass().getName());</span>
-<span class="fc" id="L797"> result.append('<');</span>
-<span class="fc" id="L798"> final Class<?> pooledObjectType
=</span>
-<span class="fc" id="L799">
PoolImplUtils.getFactoryType(factory.getClass());</span>
-<span class="fc" id="L800">
result.append(pooledObjectType.getName());</span>
-<span class="fc" id="L801"> result.append('>');</span>
-<span class="fc" id="L802"> factoryType = result.toString();</span>
+<span class="pc bpc" id="L792" title="1 of 2 branches missed."> if
(factoryType == null) {</span>
+<span class="fc" id="L793"> final StringBuilder result = new
StringBuilder();</span>
+<span class="fc" id="L794">
result.append(factory.getClass().getName());</span>
+<span class="fc" id="L795"> result.append('<');</span>
+<span class="fc" id="L796"> final Class<?> pooledObjectType
=</span>
+<span class="fc" id="L797">
PoolImplUtils.getFactoryType(factory.getClass());</span>
+<span class="fc" id="L798">
result.append(pooledObjectType.getName());</span>
+<span class="fc" id="L799"> result.append('>');</span>
+<span class="fc" id="L800"> factoryType = result.toString();</span>
}
-<span class="fc" id="L804"> return factoryType;</span>
+<span class="fc" id="L802"> return factoryType;</span>
}
/**
@@ -819,7 +817,7 @@ public class GenericObjectPool<T>
*/
@Override
public int getMaxIdle() {
-<span class="fc" id="L822"> return maxIdle;</span>
+<span class="fc" id="L820"> return maxIdle;</span>
}
/**
@@ -840,18 +838,18 @@ public class GenericObjectPool<T>
*/
@Override
public int getMinIdle() {
-<span class="fc" id="L843"> final int maxIdleSave = getMaxIdle();</span>
-<span class="fc" id="L844"> return Math.min(this.minIdle,
maxIdleSave);</span>
+<span class="fc" id="L841"> final int maxIdleSave = getMaxIdle();</span>
+<span class="fc" id="L842"> return Math.min(this.minIdle,
maxIdleSave);</span>
}
@Override
public int getNumActive() {
-<span class="fc" id="L849"> return allObjects.size() -
idleObjects.size();</span>
+<span class="fc" id="L847"> return allObjects.size() -
idleObjects.size();</span>
}
@Override
public int getNumIdle() {
-<span class="fc" id="L854"> return idleObjects.size();</span>
+<span class="fc" id="L852"> return idleObjects.size();</span>
}
/**
@@ -861,12 +859,12 @@ public class GenericObjectPool<T>
* @return The number of objects to test for validity
*/
private int getNumTests() {
-<span class="fc" id="L864"> final int numTestsPerEvictionRun =
getNumTestsPerEvictionRun();</span>
-<span class="fc bfc" id="L865" title="All 2 branches covered."> if
(numTestsPerEvictionRun >= 0) {</span>
-<span class="fc" id="L866"> return Math.min(numTestsPerEvictionRun,
idleObjects.size());</span>
+<span class="fc" id="L862"> final int numTestsPerEvictionRun =
getNumTestsPerEvictionRun();</span>
+<span class="fc bfc" id="L863" title="All 2 branches covered."> if
(numTestsPerEvictionRun >= 0) {</span>
+<span class="fc" id="L864"> return Math.min(numTestsPerEvictionRun,
idleObjects.size());</span>
}
-<span class="fc" id="L868"> return (int) Math.ceil(idleObjects.size()
/</span>
-<span class="fc" id="L869"> Math.abs((double)
numTestsPerEvictionRun));</span>
+<span class="fc" id="L866"> return (int) Math.ceil(idleObjects.size()
/</span>
+<span class="fc" id="L867"> Math.abs((double)
numTestsPerEvictionRun));</span>
}
/**
@@ -879,22 +877,22 @@ public class GenericObjectPool<T>
*/
@Override
public int getNumWaiters() {
-<span class="nc bnc" id="L882" title="All 2 branches missed."> if
(getBlockWhenExhausted()) {</span>
-<span class="nc" id="L883"> return
idleObjects.getTakeQueueLength();</span>
+<span class="nc bnc" id="L880" title="All 2 branches missed."> if
(getBlockWhenExhausted()) {</span>
+<span class="nc" id="L881"> return
idleObjects.getTakeQueueLength();</span>
}
-<span class="nc" id="L885"> return 0;</span>
+<span class="nc" id="L883"> return 0;</span>
}
PooledObject<T> getPooledObject(final T obj) {
-<span class="fc" id="L889"> return allObjects.get(new
IdentityWrapper<>(obj));</span>
+<span class="fc" id="L887"> return allObjects.get(new
IdentityWrapper<>(obj));</span>
}
@Override
String getStatsString() {
// Simply listed in AB order.
-<span class="fc" id="L895"> return super.getStatsString() +</span>
-<span class="fc" id="L896"> String.format(",
createdCount=%,d, makeObjectCount=%,d, maxIdle=%,d, minIdle=%,d",</span>
-<span class="fc" id="L897"> createdCount.get(),
makeObjectCount, maxIdle, minIdle);</span>
+<span class="fc" id="L893"> return super.getStatsString() +</span>
+<span class="fc" id="L894"> String.format(",
createdCount=%,d, makeObjectCount=%,d, maxIdle=%,d, minIdle=%,d",</span>
+<span class="fc" id="L895"> createdCount.get(),
makeObjectCount, maxIdle, minIdle);</span>
}
/**
@@ -909,8 +907,8 @@ public class GenericObjectPool<T>
*/
@Override
public void invalidateObject(final T obj) throws Exception {
-<span class="fc" id="L912"> invalidateObject(obj,
DestroyMode.NORMAL);</span>
-<span class="fc" id="L913"> }</span>
+<span class="fc" id="L910"> invalidateObject(obj,
DestroyMode.NORMAL);</span>
+<span class="fc" id="L911"> }</span>
/**
* {@inheritDoc}
@@ -925,20 +923,20 @@ public class GenericObjectPool<T>
*/
@Override
public void invalidateObject(final T obj, final DestroyMode destroyMode)
throws Exception {
-<span class="fc" id="L928"> final PooledObject<T> p =
getPooledObject(obj);</span>
-<span class="fc bfc" id="L929" title="All 2 branches covered."> if (p
== null) {</span>
-<span class="pc bpc" id="L930" title="1 of 2 branches missed."> if
(isAbandonedConfig()) {</span>
-<span class="nc" id="L931"> return;</span>
- }
-<span class="fc" id="L933"> throw new
IllegalStateException("Invalidated object not currently part of this
pool");</span>
- }
-<span class="fc" id="L935"> synchronized (p) {</span>
-<span class="fc bfc" id="L936" title="All 2 branches covered."> if
(p.getState() != PooledObjectState.INVALID) {</span>
-<span class="fc" id="L937"> destroy(p, destroyMode);</span>
- }
-<span class="fc" id="L939"> }</span>
-<span class="fc" id="L940"> ensureIdle(1, false);</span>
-<span class="fc" id="L941"> }</span>
+<span class="fc" id="L926"> final PooledObject<T> p =
getPooledObject(obj);</span>
+<span class="fc bfc" id="L927" title="All 2 branches covered."> if (p
== null) {</span>
+<span class="pc bpc" id="L928" title="1 of 2 branches missed."> if
(isAbandonedConfig()) {</span>
+<span class="nc" id="L929"> return;</span>
+ }
+<span class="fc" id="L931"> throw new
IllegalStateException("Invalidated object not currently part of this
pool");</span>
+ }
+<span class="fc" id="L933"> synchronized (p) {</span>
+<span class="fc bfc" id="L934" title="All 2 branches covered."> if
(p.getState() != PooledObjectState.INVALID) {</span>
+<span class="fc" id="L935"> destroy(p, destroyMode);</span>
+ }
+<span class="fc" id="L937"> }</span>
+<span class="fc" id="L938"> ensureIdle(1, false);</span>
+<span class="fc" id="L939"> }</span>
/**
* Provides information on all the objects in the pool, both idle (waiting
@@ -954,7 +952,7 @@ public class GenericObjectPool<T>
*/
@Override
public Set<DefaultPooledObjectInfo> listAllObjects() {
-<span class="fc" id="L957"> return
allObjects.values().stream().map(DefaultPooledObjectInfo::new).collect(Collectors.toSet());</span>
+<span class="fc" id="L955"> return
allObjects.values().stream().map(DefaultPooledObjectInfo::new).collect(Collectors.toSet());</span>
}
/**
* Tries to ensure that {@link #getMinIdle()} idle instances are available
@@ -964,11 +962,11 @@ public class GenericObjectPool<T>
* @since 2.4
*/
public void preparePool() throws Exception {
-<span class="fc bfc" id="L967" title="All 2 branches covered."> if
(getMinIdle() < 1) {</span>
-<span class="fc" id="L968"> return;</span>
+<span class="fc bfc" id="L965" title="All 2 branches covered."> if
(getMinIdle() < 1) {</span>
+<span class="fc" id="L966"> return;</span>
}
-<span class="fc" id="L970"> ensureMinIdle();</span>
-<span class="fc" id="L971"> }</span>
+<span class="fc" id="L968"> ensureMinIdle();</span>
+<span class="fc" id="L969"> }</span>
/**
* Recovers abandoned objects which have been checked out but
@@ -979,19 +977,19 @@ public class GenericObjectPool<T>
@SuppressWarnings("resource") // PrintWriter is managed elsewhere
private void removeAbandoned(final AbandonedConfig abandonedConfig) {
// Generate a list of abandoned objects to remove
-<span class="fc" id="L982"> final
ArrayList<PooledObject<T>> remove =
createRemoveList(abandonedConfig, allObjects);</span>
+<span class="fc" id="L980"> final
ArrayList<PooledObject<T>> remove =
createRemoveList(abandonedConfig, allObjects);</span>
// Now remove the abandoned objects
-<span class="fc" id="L984"> remove.forEach(pooledObject -> {</span>
-<span class="fc bfc" id="L985" title="All 2 branches covered."> if
(abandonedConfig.getLogAbandoned()) {</span>
-<span class="fc" id="L986">
pooledObject.printStackTrace(abandonedConfig.getLogWriter());</span>
+<span class="fc" id="L982"> remove.forEach(pooledObject -> {</span>
+<span class="fc bfc" id="L983" title="All 2 branches covered."> if
(abandonedConfig.getLogAbandoned()) {</span>
+<span class="fc" id="L984">
pooledObject.printStackTrace(abandonedConfig.getLogWriter());</span>
}
try {
-<span class="fc" id="L989">
invalidateObject(pooledObject.getObject(), DestroyMode.ABANDONED);</span>
-<span class="nc" id="L990"> } catch (final Exception e) {</span>
-<span class="nc" id="L991"> swallowException(e);</span>
-<span class="fc" id="L992"> }</span>
-<span class="fc" id="L993"> });</span>
-<span class="fc" id="L994"> }</span>
+<span class="fc" id="L987">
invalidateObject(pooledObject.getObject(), DestroyMode.ABANDONED);</span>
+<span class="nc" id="L988"> } catch (final Exception e) {</span>
+<span class="nc" id="L989"> swallowException(e);</span>
+<span class="fc" id="L990"> }</span>
+<span class="fc" id="L991"> });</span>
+<span class="fc" id="L992"> }</span>
/**
* {@inheritDoc}
@@ -1012,85 +1010,85 @@ public class GenericObjectPool<T>
*/
@Override
public void returnObject(final T obj) {
-<span class="fc" id="L1015"> final PooledObject<T> p =
getPooledObject(obj);</span>
+<span class="fc" id="L1013"> final PooledObject<T> p =
getPooledObject(obj);</span>
-<span class="pc bpc" id="L1017" title="1 of 2 branches missed."> if (p
== null) {</span>
-<span class="nc bnc" id="L1018" title="All 2 branches missed."> if
(!isAbandonedConfig()) {</span>
-<span class="nc" id="L1019"> throw new
IllegalStateException(</span>
+<span class="pc bpc" id="L1015" title="1 of 2 branches missed."> if (p
== null) {</span>
+<span class="nc bnc" id="L1016" title="All 2 branches missed."> if
(!isAbandonedConfig()) {</span>
+<span class="nc" id="L1017"> throw new
IllegalStateException(</span>
"Returned object not currently part of this
pool");
}
-<span class="nc" id="L1022"> return; // Object was abandoned and
removed</span>
+<span class="nc" id="L1020"> return; // Object was abandoned and
removed</span>
}
-<span class="fc" id="L1025"> markReturningState(p);</span>
+<span class="fc" id="L1023"> markReturningState(p);</span>
-<span class="fc" id="L1027"> final Duration activeTime =
p.getActiveDuration();</span>
+<span class="fc" id="L1025"> final Duration activeTime =
p.getActiveDuration();</span>
-<span class="fc bfc" id="L1029" title="All 4 branches covered."> if
(getTestOnReturn() && !factory.validateObject(p)) {</span>
+<span class="fc bfc" id="L1027" title="All 4 branches covered."> if
(getTestOnReturn() && !factory.validateObject(p)) {</span>
try {
-<span class="fc" id="L1031"> destroy(p,
DestroyMode.NORMAL);</span>
-<span class="fc" id="L1032"> } catch (final Exception e) {</span>
-<span class="fc" id="L1033"> swallowException(e);</span>
-<span class="fc" id="L1034"> }</span>
+<span class="fc" id="L1029"> destroy(p,
DestroyMode.NORMAL);</span>
+<span class="fc" id="L1030"> } catch (final Exception e) {</span>
+<span class="fc" id="L1031"> swallowException(e);</span>
+<span class="fc" id="L1032"> }</span>
try {
-<span class="fc" id="L1036"> ensureIdle(1, false);</span>
-<span class="nc" id="L1037"> } catch (final Exception e) {</span>
-<span class="nc" id="L1038"> swallowException(e);</span>
-<span class="fc" id="L1039"> }</span>
-<span class="fc" id="L1040"> updateStatsReturn(activeTime);</span>
-<span class="fc" id="L1041"> return;</span>
+<span class="fc" id="L1034"> ensureIdle(1, false);</span>
+<span class="nc" id="L1035"> } catch (final Exception e) {</span>
+<span class="nc" id="L1036"> swallowException(e);</span>
+<span class="fc" id="L1037"> }</span>
+<span class="fc" id="L1038"> updateStatsReturn(activeTime);</span>
+<span class="fc" id="L1039"> return;</span>
}
try {
-<span class="fc" id="L1045"> factory.passivateObject(p);</span>
-<span class="fc" id="L1046"> } catch (final Exception e1) {</span>
-<span class="fc" id="L1047"> swallowException(e1);</span>
+<span class="fc" id="L1043"> factory.passivateObject(p);</span>
+<span class="fc" id="L1044"> } catch (final Exception e1) {</span>
+<span class="fc" id="L1045"> swallowException(e1);</span>
try {
-<span class="fc" id="L1049"> destroy(p,
DestroyMode.NORMAL);</span>
-<span class="fc" id="L1050"> } catch (final Exception e) {</span>
-<span class="fc" id="L1051"> swallowException(e);</span>
-<span class="fc" id="L1052"> }</span>
+<span class="fc" id="L1047"> destroy(p,
DestroyMode.NORMAL);</span>
+<span class="fc" id="L1048"> } catch (final Exception e) {</span>
+<span class="fc" id="L1049"> swallowException(e);</span>
+<span class="fc" id="L1050"> }</span>
try {
-<span class="fc" id="L1054"> ensureIdle(1, false);</span>
-<span class="nc" id="L1055"> } catch (final Exception e) {</span>
-<span class="nc" id="L1056"> swallowException(e);</span>
-<span class="fc" id="L1057"> }</span>
-<span class="fc" id="L1058"> updateStatsReturn(activeTime);</span>
-<span class="fc" id="L1059"> return;</span>
-<span class="fc" id="L1060"> }</span>
+<span class="fc" id="L1052"> ensureIdle(1, false);</span>
+<span class="nc" id="L1053"> } catch (final Exception e) {</span>
+<span class="nc" id="L1054"> swallowException(e);</span>
+<span class="fc" id="L1055"> }</span>
+<span class="fc" id="L1056"> updateStatsReturn(activeTime);</span>
+<span class="fc" id="L1057"> return;</span>
+<span class="fc" id="L1058"> }</span>
-<span class="pc bpc" id="L1062" title="1 of 2 branches missed."> if
(!p.deallocate()) {</span>
-<span class="nc" id="L1063"> throw new IllegalStateException(</span>
+<span class="pc bpc" id="L1060" title="1 of 2 branches missed."> if
(!p.deallocate()) {</span>
+<span class="nc" id="L1061"> throw new IllegalStateException(</span>
"Object has already been returned to this pool or is
invalid");
}
-<span class="fc" id="L1067"> final int maxIdleSave =
getMaxIdle();</span>
-<span class="fc bfc" id="L1068" title="All 6 branches covered."> if
(isClosed() || maxIdleSave > -1 && maxIdleSave <=
idleObjects.size()) {</span>
+<span class="fc" id="L1065"> final int maxIdleSave =
getMaxIdle();</span>
+<span class="fc bfc" id="L1066" title="All 6 branches covered."> if
(isClosed() || maxIdleSave > -1 && maxIdleSave <=
idleObjects.size()) {</span>
try {
-<span class="fc" id="L1070"> destroy(p,
DestroyMode.NORMAL);</span>
-<span class="nc" id="L1071"> } catch (final Exception e) {</span>
-<span class="nc" id="L1072"> swallowException(e);</span>
-<span class="fc" id="L1073"> }</span>
+<span class="fc" id="L1068"> destroy(p,
DestroyMode.NORMAL);</span>
+<span class="nc" id="L1069"> } catch (final Exception e) {</span>
+<span class="nc" id="L1070"> swallowException(e);</span>
+<span class="fc" id="L1071"> }</span>
try {
-<span class="fc" id="L1075"> ensureIdle(1, false);</span>
-<span class="nc" id="L1076"> } catch (final Exception e) {</span>
-<span class="nc" id="L1077"> swallowException(e);</span>
-<span class="pc" id="L1078"> }</span>
+<span class="fc" id="L1073"> ensureIdle(1, false);</span>
+<span class="nc" id="L1074"> } catch (final Exception e) {</span>
+<span class="nc" id="L1075"> swallowException(e);</span>
+<span class="pc" id="L1076"> }</span>
} else {
-<span class="fc bfc" id="L1080" title="All 2 branches covered."> if
(getLifo()) {</span>
-<span class="fc" id="L1081"> idleObjects.addFirst(p);</span>
+<span class="fc bfc" id="L1078" title="All 2 branches covered."> if
(getLifo()) {</span>
+<span class="fc" id="L1079"> idleObjects.addFirst(p);</span>
} else {
-<span class="fc" id="L1083"> idleObjects.addLast(p);</span>
+<span class="fc" id="L1081"> idleObjects.addLast(p);</span>
}
-<span class="pc bpc" id="L1085" title="1 of 2 branches missed."> if
(isClosed()) {</span>
+<span class="pc bpc" id="L1083" title="1 of 2 branches missed."> if
(isClosed()) {</span>
// Pool closed while object was being added to idle objects.
// Make sure the returned object is destroyed rather than left
// in the idle object pool (which would effectively be a leak)
-<span class="nc" id="L1089"> clear();</span>
+<span class="nc" id="L1087"> clear();</span>
}
}
-<span class="fc" id="L1092"> updateStatsReturn(activeTime);</span>
-<span class="fc" id="L1093"> }</span>
+<span class="fc" id="L1090"> updateStatsReturn(activeTime);</span>
+<span class="fc" id="L1091"> }</span>
/**
* Sets the base pool configuration.
@@ -1099,11 +1097,11 @@ public class GenericObjectPool<T>
* @see GenericObjectPoolConfig
*/
public void setConfig(final GenericObjectPoolConfig<T> conf) {
-<span class="fc" id="L1102"> super.setConfig(conf);</span>
-<span class="fc" id="L1103"> setMaxIdle(conf.getMaxIdle());</span>
-<span class="fc" id="L1104"> setMinIdle(conf.getMinIdle());</span>
-<span class="fc" id="L1105"> setMaxTotal(conf.getMaxTotal());</span>
-<span class="fc" id="L1106"> }</span>
+<span class="fc" id="L1100"> super.setConfig(conf);</span>
+<span class="fc" id="L1101"> setMaxIdle(conf.getMaxIdle());</span>
+<span class="fc" id="L1102"> setMinIdle(conf.getMinIdle());</span>
+<span class="fc" id="L1103"> setMaxTotal(conf.getMaxTotal());</span>
+<span class="fc" id="L1104"> }</span>
/**
* Sets the cap on the number of "idle" instances in the pool.
If maxIdle
@@ -1121,8 +1119,8 @@ public class GenericObjectPool<T>
* @see #getMaxIdle
*/
public void setMaxIdle(final int maxIdle) {
-<span class="fc" id="L1124"> this.maxIdle = maxIdle;</span>
-<span class="fc" id="L1125"> }</span>
+<span class="fc" id="L1122"> this.maxIdle = maxIdle;</span>
+<span class="fc" id="L1123"> }</span>
/**
* Sets the target for the minimum number of idle objects to maintain in
@@ -1142,40 +1140,40 @@ public class GenericObjectPool<T>
* @see #getDurationBetweenEvictionRuns()
*/
public void setMinIdle(final int minIdle) {
-<span class="fc" id="L1145"> this.minIdle = minIdle;</span>
-<span class="fc" id="L1146"> }</span>
+<span class="fc" id="L1143"> this.minIdle = minIdle;</span>
+<span class="fc" id="L1144"> }</span>
@Override
protected void toStringAppendFields(final StringBuilder builder) {
-<span class="fc" id="L1150"> super.toStringAppendFields(builder);</span>
-<span class="fc" id="L1151"> builder.append(",
factoryType=");</span>
-<span class="fc" id="L1152"> builder.append(factoryType);</span>
-<span class="fc" id="L1153"> builder.append(",
maxIdle=");</span>
-<span class="fc" id="L1154"> builder.append(maxIdle);</span>
-<span class="fc" id="L1155"> builder.append(",
minIdle=");</span>
-<span class="fc" id="L1156"> builder.append(minIdle);</span>
-<span class="fc" id="L1157"> builder.append(",
factory=");</span>
-<span class="fc" id="L1158"> builder.append(factory);</span>
-<span class="fc" id="L1159"> builder.append(",
allObjects=");</span>
-<span class="fc" id="L1160"> builder.append(allObjects);</span>
-<span class="fc" id="L1161"> builder.append(",
createCount=");</span>
-<span class="fc" id="L1162"> builder.append(createCount);</span>
-<span class="fc" id="L1163"> builder.append(",
idleObjects=");</span>
-<span class="fc" id="L1164"> builder.append(idleObjects);</span>
-<span class="fc" id="L1165"> builder.append(",
abandonedConfig=");</span>
-<span class="fc" id="L1166"> builder.append(abandonedConfig);</span>
-<span class="fc" id="L1167"> }</span>
+<span class="fc" id="L1148"> super.toStringAppendFields(builder);</span>
+<span class="fc" id="L1149"> builder.append(",
factoryType=");</span>
+<span class="fc" id="L1150"> builder.append(factoryType);</span>
+<span class="fc" id="L1151"> builder.append(",
maxIdle=");</span>
+<span class="fc" id="L1152"> builder.append(maxIdle);</span>
+<span class="fc" id="L1153"> builder.append(",
minIdle=");</span>
+<span class="fc" id="L1154"> builder.append(minIdle);</span>
+<span class="fc" id="L1155"> builder.append(",
factory=");</span>
+<span class="fc" id="L1156"> builder.append(factory);</span>
+<span class="fc" id="L1157"> builder.append(",
allObjects=");</span>
+<span class="fc" id="L1158"> builder.append(allObjects);</span>
+<span class="fc" id="L1159"> builder.append(",
createCount=");</span>
+<span class="fc" id="L1160"> builder.append(createCount);</span>
+<span class="fc" id="L1161"> builder.append(",
idleObjects=");</span>
+<span class="fc" id="L1162"> builder.append(idleObjects);</span>
+<span class="fc" id="L1163"> builder.append(",
abandonedConfig=");</span>
+<span class="fc" id="L1164"> builder.append(abandonedConfig);</span>
+<span class="fc" id="L1165"> }</span>
@Override
public void use(final T pooledObject) {
-<span class="fc" id="L1171"> final AbandonedConfig abandonedCfg =
this.abandonedConfig;</span>
-<span class="pc bpc" id="L1172" title="2 of 4 branches missed."> if
(abandonedCfg != null && abandonedCfg.getUseUsageTracking()) {</span>
-<span class="fc" id="L1173"> final PooledObject<T> po =
getPooledObject(pooledObject);</span>
-<span class="pc bpc" id="L1174" title="1 of 2 branches missed."> if
(po != null) {</span>
-<span class="fc" id="L1175"> po.use();</span>
+<span class="fc" id="L1169"> final AbandonedConfig abandonedCfg =
this.abandonedConfig;</span>
+<span class="pc bpc" id="L1170" title="2 of 4 branches missed."> if
(abandonedCfg != null && abandonedCfg.getUseUsageTracking()) {</span>
+<span class="fc" id="L1171"> final PooledObject<T> po =
getPooledObject(pooledObject);</span>
+<span class="pc bpc" id="L1172" title="1 of 2 branches missed."> if
(po != null) {</span>
+<span class="fc" id="L1173"> po.use();</span>
}
}
-<span class="fc" id="L1178"> }</span>
+<span class="fc" id="L1176"> }</span>
}
</pre><div class="footer"><span class="right">Created with <a
href="http://www.jacoco.org/jacoco">JaCoCo</a>
0.8.12.202403310830</span></div></body></html>
\ No newline at end of file
Modified:
websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/GenericObjectPoolConfig.html
==============================================================================
---
websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/GenericObjectPoolConfig.html
(original)
+++
websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/GenericObjectPoolConfig.html
Sat Feb 8 20:08:04 2025
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html
xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta
http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link
rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link
rel="shortcut icon" href="../jacoco-resources/report.gif"
type="image/gif"/><title>GenericObjectPoolConfig</title><script
type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body
onload="initialSort(['breadcrumb'])"><div class="breadcrumb"
id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html"
class="el_session">Sessions</a></span><a href="../index.html"
class="el_report">Apache Commons Pool</a> > <a href="index.html"
class="el_package">org.apache.commons.pool2.impl</a> > <span
class="el_class">GenericObjectPoolConfig</span></div><h1>GenericObjectPoolConfig</h1><table
class="coverage" cellsp
acing="0" id="coveragetable"><thead><tr><td class="sortable" id="a"
onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b"
onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2"
id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d"
onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e"
onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f"
onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g"
onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h"
onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i"
onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j"
onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k"
onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td
class="bar">9 of 73</td><td class="ctr2">87%</td><td class="bar">0 of
0</td><td class="ctr2">n/a</td><td class="ctr1">1
</td><td class="ctr2">9</td><td class="ctr1">3</td><td class="ctr2">24</td><td
class="ctr1">1</td><td class="ctr2">9</td></tr></tfoot><tbody><tr><td
id="a0"><a href="GenericObjectPoolConfig.java.html#L64"
class="el_method">clone()</a></td><td class="bar" id="b0"><img
src="../jacoco-resources/redbar.gif" width="34" height="10" title="9"
alt="9"/></td><td class="ctr2" id="c8">0%</td><td class="bar" id="d0"/><td
class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2"
id="g0">1</td><td class="ctr1" id="h0">3</td><td class="ctr2" id="i2">3</td><td
class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td
id="a8"><a href="GenericObjectPoolConfig.java.html#L150"
class="el_method">toStringAppendFields(StringBuilder)</a></td><td class="bar"
id="b1"><img src="../jacoco-resources/greenbar.gif" width="120" height="10"
title="31" alt="31"/></td><td class="ctr2" id="c0">100%</td><td class="bar"
id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0<
/td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td
class="ctr2" id="i0">8</td><td class="ctr1" id="j1">0</td><td class="ctr2"
id="k1">1</td></tr><tr><td id="a1"><a
href="GenericObjectPoolConfig.java.html#L31"
class="el_method">GenericObjectPoolConfig()</a></td><td class="bar"
id="b2"><img src="../jacoco-resources/greenbar.gif" width="46" height="10"
title="12" alt="12"/></td><td class="ctr2" id="c1">100%</td><td class="bar"
id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td
class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2"
id="i1">4</td><td class="ctr1" id="j2">0</td><td class="ctr2"
id="k2">1</td></tr><tr><td id="a5"><a
href="GenericObjectPoolConfig.java.html#L119"
class="el_method">setMaxIdle(int)</a></td><td class="bar" id="b3"><img
src="../jacoco-resources/greenbar.gif" width="15" height="10" title="4"
alt="4"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d3"/><td
class="ctr2" id="e3">n/a</td><td
class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1"
id="h3">0</td><td class="ctr2" id="i3">2</td><td class="ctr1" id="j3">0</td><td
class="ctr2" id="k3">1</td></tr><tr><td id="a6"><a
href="GenericObjectPoolConfig.java.html#L132"
class="el_method">setMaxTotal(int)</a></td><td class="bar" id="b4"><img
src="../jacoco-resources/greenbar.gif" width="15" height="10" title="4"
alt="4"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d4"/><td
class="ctr2" id="e4">n/a</td><td class="ctr1" id="f4">0</td><td class="ctr2"
id="g4">1</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i4">2</td><td
class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td
id="a7"><a href="GenericObjectPoolConfig.java.html#L145"
class="el_method">setMinIdle(int)</a></td><td class="bar" id="b5"><img
src="../jacoco-resources/greenbar.gif" width="15" height="10" title="4"
alt="4"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d5"/><td
class="ctr2" id="e
5">n/a</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g5">1</td><td
class="ctr1" id="h5">0</td><td class="ctr2" id="i5">2</td><td class="ctr1"
id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a2"><a
href="GenericObjectPoolConfig.java.html#L80"
class="el_method">getMaxIdle()</a></td><td class="bar" id="b6"><img
src="../jacoco-resources/greenbar.gif" width="11" height="10" title="3"
alt="3"/></td><td class="ctr2" id="c5">100%</td><td class="bar" id="d6"/><td
class="ctr2" id="e6">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2"
id="g6">1</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i6">1</td><td
class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td
id="a3"><a href="GenericObjectPoolConfig.java.html#L93"
class="el_method">getMaxTotal()</a></td><td class="bar" id="b7"><img
src="../jacoco-resources/greenbar.gif" width="11" height="10" title="3"
alt="3"/></td><td class="ctr2" id="c6">100%</td><td class="bar" id="d7"/><td
class="ctr2"
id="e7">n/a</td><td class="ctr1" id="f7">0</td><td class="ctr2"
id="g7">1</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i7">1</td><td
class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td
id="a4"><a href="GenericObjectPoolConfig.java.html#L106"
class="el_method">getMinIdle()</a></td><td class="bar" id="b8"><img
src="../jacoco-resources/greenbar.gif" width="11" height="10" title="3"
alt="3"/></td><td class="ctr2" id="c7">100%</td><td class="bar" id="d8"/><td
class="ctr2" id="e8">n/a</td><td class="ctr1" id="f8">0</td><td class="ctr2"
id="g8">1</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i8">1</td><td
class="ctr1" id="j8">0</td><td class="ctr2"
id="k8">1</td></tr></tbody></table><div class="footer"><span
class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a>
0.8.12.202403310830</span></div></body></html>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html
xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta
http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link
rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link
rel="shortcut icon" href="../jacoco-resources/report.gif"
type="image/gif"/><title>GenericObjectPoolConfig</title><script
type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body
onload="initialSort(['breadcrumb'])"><div class="breadcrumb"
id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html"
class="el_session">Sessions</a></span><a href="../index.html"
class="el_report">Apache Commons Pool</a> > <a href="index.html"
class="el_package">org.apache.commons.pool2.impl</a> > <span
class="el_class">GenericObjectPoolConfig</span></div><h1>GenericObjectPoolConfig</h1><table
class="coverage" cellsp
acing="0" id="coveragetable"><thead><tr><td class="sortable" id="a"
onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b"
onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2"
id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d"
onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e"
onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f"
onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g"
onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h"
onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i"
onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j"
onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k"
onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td
class="bar">9 of 73</td><td class="ctr2">87%</td><td class="bar">0 of
0</td><td class="ctr2">n/a</td><td class="ctr1">1
</td><td class="ctr2">9</td><td class="ctr1">3</td><td class="ctr2">25</td><td
class="ctr1">1</td><td class="ctr2">9</td></tr></tfoot><tbody><tr><td
id="a0"><a href="GenericObjectPoolConfig.java.html#L71"
class="el_method">clone()</a></td><td class="bar" id="b0"><img
src="../jacoco-resources/redbar.gif" width="34" height="10" title="9"
alt="9"/></td><td class="ctr2" id="c8">0%</td><td class="bar" id="d0"/><td
class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2"
id="g0">1</td><td class="ctr1" id="h0">3</td><td class="ctr2" id="i2">3</td><td
class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td
id="a8"><a href="GenericObjectPoolConfig.java.html#L157"
class="el_method">toStringAppendFields(StringBuilder)</a></td><td class="bar"
id="b1"><img src="../jacoco-resources/greenbar.gif" width="120" height="10"
title="31" alt="31"/></td><td class="ctr2" id="c0">100%</td><td class="bar"
id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0<
/td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td
class="ctr2" id="i0">8</td><td class="ctr1" id="j1">0</td><td class="ctr2"
id="k1">1</td></tr><tr><td id="a1"><a
href="GenericObjectPoolConfig.java.html#L54"
class="el_method">GenericObjectPoolConfig()</a></td><td class="bar"
id="b2"><img src="../jacoco-resources/greenbar.gif" width="46" height="10"
title="12" alt="12"/></td><td class="ctr2" id="c1">100%</td><td class="bar"
id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td
class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2"
id="i1">5</td><td class="ctr1" id="j2">0</td><td class="ctr2"
id="k2">1</td></tr><tr><td id="a5"><a
href="GenericObjectPoolConfig.java.html#L126"
class="el_method">setMaxIdle(int)</a></td><td class="bar" id="b3"><img
src="../jacoco-resources/greenbar.gif" width="15" height="10" title="4"
alt="4"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d3"/><td
class="ctr2" id="e3">n/a</td><td
class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1"
id="h3">0</td><td class="ctr2" id="i3">2</td><td class="ctr1" id="j3">0</td><td
class="ctr2" id="k3">1</td></tr><tr><td id="a6"><a
href="GenericObjectPoolConfig.java.html#L139"
class="el_method">setMaxTotal(int)</a></td><td class="bar" id="b4"><img
src="../jacoco-resources/greenbar.gif" width="15" height="10" title="4"
alt="4"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d4"/><td
class="ctr2" id="e4">n/a</td><td class="ctr1" id="f4">0</td><td class="ctr2"
id="g4">1</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i4">2</td><td
class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td
id="a7"><a href="GenericObjectPoolConfig.java.html#L152"
class="el_method">setMinIdle(int)</a></td><td class="bar" id="b5"><img
src="../jacoco-resources/greenbar.gif" width="15" height="10" title="4"
alt="4"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d5"/><td
class="ctr2" id="e
5">n/a</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g5">1</td><td
class="ctr1" id="h5">0</td><td class="ctr2" id="i5">2</td><td class="ctr1"
id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a2"><a
href="GenericObjectPoolConfig.java.html#L87"
class="el_method">getMaxIdle()</a></td><td class="bar" id="b6"><img
src="../jacoco-resources/greenbar.gif" width="11" height="10" title="3"
alt="3"/></td><td class="ctr2" id="c5">100%</td><td class="bar" id="d6"/><td
class="ctr2" id="e6">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2"
id="g6">1</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i6">1</td><td
class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td
id="a3"><a href="GenericObjectPoolConfig.java.html#L100"
class="el_method">getMaxTotal()</a></td><td class="bar" id="b7"><img
src="../jacoco-resources/greenbar.gif" width="11" height="10" title="3"
alt="3"/></td><td class="ctr2" id="c6">100%</td><td class="bar" id="d7"/><td
class="ctr2
" id="e7">n/a</td><td class="ctr1" id="f7">0</td><td class="ctr2"
id="g7">1</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i7">1</td><td
class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td
id="a4"><a href="GenericObjectPoolConfig.java.html#L113"
class="el_method">getMinIdle()</a></td><td class="bar" id="b8"><img
src="../jacoco-resources/greenbar.gif" width="11" height="10" title="3"
alt="3"/></td><td class="ctr2" id="c7">100%</td><td class="bar" id="d8"/><td
class="ctr2" id="e8">n/a</td><td class="ctr1" id="f8">0</td><td class="ctr2"
id="g8">1</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i8">1</td><td
class="ctr1" id="j8">0</td><td class="ctr2"
id="k8">1</td></tr></tbody></table><div class="footer"><span
class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a>
0.8.12.202403310830</span></div></body></html>
\ No newline at end of file