This is an automated email from the ASF dual-hosted git repository. tv pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-jcs.git
commit 396284d1a6726665bc2cbd48ee24fb34ad142be8 Author: Thomas Vandahl <[email protected]> AuthorDate: Tue Mar 17 18:31:53 2026 +0100 Change type of JDBCDiskCacheAttributes.ShrinkerInterval to Duration --- .../auxiliary/disk/jdbc/JDBCDiskCacheAttributes.java | 8 ++++---- .../src/test/test-conf/TestJDBCDiskCacheShrink.ccf | 2 +- src/site/xdoc/JDBCDiskCacheProperties.xml | 10 +++++----- src/site/xdoc/UpgradingFrom3x.xml | 20 +++++++++++--------- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCacheAttributes.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCacheAttributes.java index da388bb5..166fad77 100644 --- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCacheAttributes.java +++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCacheAttributes.java @@ -236,11 +236,11 @@ public class JDBCDiskCacheAttributes } /** - * @param shrinkerIntervalSecondsArg The shrinkerIntervalSeconds to set. + * @param shrinkerInterval The shrinkerInterval to set. */ - public void setShrinkerIntervalSeconds( final int shrinkerIntervalSecondsArg ) + public void setShrinkerInterval( final Duration shrinkerInterval ) { - this.shrinkerInterval = Duration.ofSeconds(shrinkerIntervalSecondsArg); + this.shrinkerInterval = shrinkerInterval; } /** @@ -303,7 +303,7 @@ public class JDBCDiskCacheAttributes buf.append( "\n TestBeforeInsert [" + isTestBeforeInsert() + "]" ); buf.append( "\n MaxActive [" + getMaxTotal() + "]" ); buf.append( "\n AllowRemoveAll [" + isAllowRemoveAll() + "]" ); - buf.append( "\n ShrinkerIntervalSeconds [" + getShrinkerInterval() + "]" ); + buf.append( "\n ShrinkerInterval [" + getShrinkerInterval() + "]" ); buf.append( "\n useDiskShrinker [" + isUseDiskShrinker() + "]" ); return buf.toString(); } diff --git a/commons-jcs4-core/src/test/test-conf/TestJDBCDiskCacheShrink.ccf b/commons-jcs4-core/src/test/test-conf/TestJDBCDiskCacheShrink.ccf index 33eeffda..a45401bf 100644 --- a/commons-jcs4-core/src/test/test-conf/TestJDBCDiskCacheShrink.ccf +++ b/commons-jcs4-core/src/test/test-conf/TestJDBCDiskCacheShrink.ccf @@ -54,7 +54,7 @@ jcs.auxiliary.JDBC.attributes.maxTotal=14 jcs.auxiliary.JDBC.attributes.allowRemoveAll=true jcs.auxiliary.JDBC.attributes.MaxPurgatorySize=9999 jcs.auxiliary.JDBC.attributes.UseDiskShrinker=true -jcs.auxiliary.JDBC.attributes.ShrinkerIntervalSeconds=1 +jcs.auxiliary.JDBC.attributes.ShrinkerInterval=PT1S jcs.auxiliary.JDBC.attributes.EventQueueType=POOLED jcs.auxiliary.JDBC.attributes.EventQueuePoolName=disk_cache_event_queue diff --git a/src/site/xdoc/JDBCDiskCacheProperties.xml b/src/site/xdoc/JDBCDiskCacheProperties.xml index 40d8ed45..dc0fb242 100644 --- a/src/site/xdoc/JDBCDiskCacheProperties.xml +++ b/src/site/xdoc/JDBCDiskCacheProperties.xml @@ -156,9 +156,9 @@ <tr> <td>ShrinkerInterval</td> - <td>How often should the disk shrinker run (in seconds).</td> + <td>Interval between disk shrinker runs.</td> <td>N</td> - <td>300</td> + <td>PT5M</td> </tr> </table> @@ -181,7 +181,7 @@ jcs.auxiliary.JDBC.attributes.maxActive=15 jcs.auxiliary.JDBC.attributes.allowRemoveAll=true jcs.auxiliary.JDBC.attributes.MaxPurgatorySize=10000000 jcs.auxiliary.JDBC.attributes.UseDiskShrinker=true -jcs.auxiliary.JDBC.attributes.ShrinkerInterval=300 +jcs.auxiliary.JDBC.attributes.ShrinkerInterval=PT5M ]]> </source> </subsection> @@ -249,9 +249,9 @@ jcs.auxiliary.JDBC.attributes.maxActive=15 jcs.auxiliary.JDBC.attributes.allowRemoveAll=true jcs.auxiliary.JDBC.attributes.MaxPurgatorySize=10000000 jcs.auxiliary.JDBC.attributes.UseDiskShrinker=true -jcs.auxiliary.JDBC.attributes.ShrinkerInterval=300 +jcs.auxiliary.JDBC.attributes.ShrinkerInterval=PT5M jcs.auxiliary.JDBC.attributes.EventQueueType=POOLED -jcs.auxiliary.JDBC.attributes.EventQueuePoolName=disk_cache_event_queueue +jcs.auxiliary.JDBC.attributes.EventQueuePoolName=disk_cache_event_queue ############################################################## ################## OPTIONAL THREAD POOL CONFIGURATION ######### diff --git a/src/site/xdoc/UpgradingFrom3x.xml b/src/site/xdoc/UpgradingFrom3x.xml index bc7c85bb..0bdd6953 100644 --- a/src/site/xdoc/UpgradingFrom3x.xml +++ b/src/site/xdoc/UpgradingFrom3x.xml @@ -134,15 +134,20 @@ java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] %3$s [%4$-7s] %5$s %n <th>New Property Name</th> </tr> <tr> - <td>Region configuration (cacheattributes)</td> + <td>Region configuration (CompositeCacheAttributes)</td> <td>DiskUsagePatternName</td> <td>DiskUsagePattern</td> </tr> <tr> - <td>Element configuration (elementattributes)</td> + <td>Element configuration (ElementAttributes)</td> <td>IdleTime</td> <td>MaxIdleTime</td> </tr> + <tr> + <td>JDBC configuration (JDBCDiskCacheAttributes)</td> + <td>ShrinkerIntervalSeconds</td> + <td>ShrinkerInterval</td> + </tr> </table> </p> <p> @@ -178,17 +183,14 @@ java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] %3$s [%4$-7s] %5$s %n <th>Default Value</th> </tr> <tr> - <td>Thread Pool Configuration (thread_pool)</td> + <td>Thread Pool Configuration (thread_pool, PoolConfiguration)</td> <td>keepAliveTime</td> <td>PT5M</td> </tr> <tr> - <td>Region configuration (cacheattributes)</td> - <td>DiskUsagePatternName</td> - </tr> - <tr> - <td>Element configuration (elementattributes)</td> - <td>IdleTime</td> + <td>JDBC Disk Cache configuration (JDBCDiskCacheAttributes)</td> + <td>ShrinkerInterval</td> + <td>PT5M</td> </tr> </table> </p>
