commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keiichi Fujino <kfuj...@apache.org>
Subject Re: svn commit: r1769582 - in /commons/proper/pool/trunk/src: changes/changes.xml main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
Date Tue, 15 Nov 2016 00:44:26 GMT
2016-11-14 18:44 GMT+09:00 <markt@apache.org>:

> Author: markt
> Date: Mon Nov 14 09:44:18 2016
> New Revision: 1769582
>
> URL: http://svn.apache.org/viewvc?rev=1769582&view=rev
> Log:
> Additional fix for POOL-315.
> Thanks to Keiichi Fujino
> Also review previous fix.
>
> Modified:
>     commons/proper/pool/trunk/src/changes/changes.xml
>     commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/
> BaseGenericObjectPool.java
>
> Modified: commons/proper/pool/trunk/src/changes/changes.xml
> URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/
> changes/changes.xml?rev=1769582&r1=1769581&r2=1769582&view=diff
> ============================================================
> ==================
> --- commons/proper/pool/trunk/src/changes/changes.xml (original)
> +++ commons/proper/pool/trunk/src/changes/changes.xml Mon Nov 14 09:44:18
> 2016
> @@ -71,7 +71,7 @@ The <action> type attribute can be add,u
>        Ensure that any class name used for evictionPolicyClassName
> represents a
>        class that implements EvictionPolicy.
>      </action>
> -    <action dev="markt" issue="POOL-315" type="fix">
> +    <action dev="markt" issue="POOL-315" type="fix"
> due-to="KeiichiFujino">
>        Add a configurable delay (default 10 seconds) to wait when shutting
> down
>        an Evictor to allow the associated thread time to complete and
> current
>        evictions and to terminate.
>
> Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/
> pool2/impl/BaseGenericObjectPool.java
> URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/
> main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java?
> rev=1769582&r1=1769581&r2=1769582&view=diff
> ============================================================
> ==================
> --- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
> (original)
> +++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
> Mon Nov 14 09:44:18 2016
> @@ -88,7 +88,7 @@ public abstract class BaseGenericObjectP
>      private volatile long softMinEvictableIdleTimeMillis =
>              BaseObjectPoolConfig.DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_
> MILLIS;
>      private volatile EvictionPolicy<T> evictionPolicy;
> -    private long evictorShutdownTimeoutMillis =
> +    private volatile long evictorShutdownTimeoutMillis =
>              BaseObjectPoolConfig.DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS;
>
>
> @@ -643,7 +643,7 @@ public abstract class BaseGenericObjectP
>       * @return  The timeout in milliseconds that will be used while
> waiting for
>       *          the Evictor to shut down.
>       */
> -    public long getEvictorShutdownTimeoutMillis() {
> +    public final long getEvictorShutdownTimeoutMillis() {
>          return evictorShutdownTimeoutMillis;
>      }
>
> @@ -656,7 +656,7 @@ public abstract class BaseGenericObjectP
>       *                                      will be used while waiting
> for the
>       *                                      Evictor to shut down.
>       */
> -    public void setEvictorShutdownTimeoutMillis(
> +    public final void setEvictorShutdownTimeoutMillis(
>              final long evictorShutdownTimeoutMillis) {
>          this.evictorShutdownTimeoutMillis = evictorShutdownTimeoutMillis;
>      }
> @@ -720,7 +720,7 @@ public abstract class BaseGenericObjectP
>      final void startEvictor(final long delay) {
>          synchronized (evictionLock) {
>              if (null != evictor) {
> -                EvictionTimer.cancel(evictor, 10, TimeUnit.SECONDS);
> +                EvictionTimer.cancel(evictor,
> evictorShutdownTimeoutMillis, TimeUnit.SECONDS);
>


Thanks for the fix.

JavaDoc(get/setEvictorShutdownTimeoutMillis) says
evictorShutdownTimeoutMillis is milliseconds.
So, will TimeUnit.SECONDS change to TimeUnit.MILLISECONDS?



>                  evictor = null;
>                  evictionIterator = null;
>              }
>
> --
> Keiichi.Fujino
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message