You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tv...@apache.org on 2026/02/17 17:57:17 UTC

(commons-jcs) branch master updated (a313d146 -> b90a23b7)

This is an automated email from the ASF dual-hosted git repository.

tv pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jcs.git


    from a313d146 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-jcs.git
     new f4a9dd0d Fix JCS-222 Typo "waterfal" Method
     new b58165f4 More records
     new f77df1a1 Rework cache event logging
     new 768e3b84 Fix typo in class name
     new a9cc9861 Remove unused exceptions
     new 15df71a9 Remove duplicate code
     new 328e5399 Fix typo in class name
     new b44423a4 Add package info to jcache
     new d7ab40ac Document changes
     new 04625419 Update site, move documentation to Maven standard location.
     new 8954ba19 Fix SpotBugs and PMD complaints
     new b90a23b7 Make site build work again.

The 12 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 commons-jcs4-core/src/main/java/module-info.java   |   2 +-
 .../apache/commons/jcs4/access/CacheAccess.java    |  12 +-
 .../access/exception/ConfigurationException.java   |  43 -----
 .../access/exception/InvalidGroupException.java    |  46 -----
 .../access/exception/InvalidHandleException.java   |  48 -----
 .../access/exception/ObjectExistsException.java    |  52 ------
 .../access/exception/ObjectNotFoundException.java  |  50 -----
 .../jcs4/auxiliary/AbstractAuxiliaryCache.java     | 131 +++----------
 .../AbstractAuxiliaryCacheEventLogging.java        |  31 +++-
 .../auxiliary/AbstractAuxiliaryCacheMonitor.java   |   2 +-
 .../auxiliary/AbstractCacheEventLogSupport.java    | 162 +++++++++++++++++
 .../commons/jcs4/auxiliary/AuxiliaryCache.java     |  10 +-
 .../jcs4/auxiliary/disk/AbstractDiskCache.java     | 202 ++++-----------------
 .../jcs4/auxiliary/disk/PurgatoryElement.java      |  16 +-
 .../jcs4/auxiliary/disk/block/BlockDiskCache.java  |  40 ++--
 .../disk/block/BlockDiskCacheFactory.java          |   5 +-
 .../jcs4/auxiliary/disk/indexed/IndexedDisk.java   |   1 -
 .../auxiliary/disk/indexed/IndexedDiskCache.java   |  53 +++---
 .../jcs4/auxiliary/disk/jdbc/JDBCDiskCache.java    |  28 +--
 .../lateral/socket/tcp/LateralTCPCache.java        |  60 +++---
 .../lateral/socket/tcp/LateralTCPCacheFactory.java |   3 +-
 .../lateral/socket/tcp/LateralTCPCacheNoWait.java  |  14 +-
 .../socket/tcp/LateralTCPCacheNoWaitFacade.java    |  50 +----
 .../remote/AbstractRemoteAuxiliaryCache.java       |  99 ++++------
 .../remote/AbstractRemoteCacheListener.java        |   2 +-
 .../remote/AbstractRemoteCacheNoWaitFacade.java    |  33 +---
 .../commons/jcs4/auxiliary/remote/RemoteCache.java |  19 +-
 .../jcs4/auxiliary/remote/RemoteCacheManager.java  |   3 +-
 .../jcs4/auxiliary/remote/RemoteCacheNoWait.java   |  21 ---
 .../auxiliary/remote/RemoteCacheNoWaitFacade.java  |  16 +-
 .../remote/http/client/RemoteHttpCache.java        |  22 +--
 .../remote/http/client/RemoteHttpCacheClient.java  |  12 +-
 .../http/client/RemoteHttpCacheDispatcher.java     |  18 +-
 .../remote/http/client/RemoteHttpCacheMonitor.java |   3 +-
 .../http/server/AbstractRemoteCacheService.java    | 120 +++---------
 .../remote/http/server/RemoteHttpCacheService.java |   2 +-
 .../remote/http/server/RemoteHttpCacheServlet.java |  47 ++---
 .../auxiliary/remote/server/RemoteCacheServer.java | 109 ++++++-----
 .../remote/server/RemoteCacheServerFactory.java    |  37 ++--
 .../remote/util/RemoteCacheRequestFactory.java     |  54 ++----
 .../auxiliary/remote/value/RemoteCacheRequest.java | 183 +++++++------------
 .../remote/value/RemoteCacheResponse.java          |  80 +++-----
 .../jcs4/engine/behavior/ICacheService.java        |  12 +-
 .../jcs4/engine/control/CompositeCache.java        |   3 +-
 .../jcs4/engine/control/CompositeCacheManager.java |   3 +-
 .../commons/jcs4/engine/logging/CacheEvent.java    | 142 ++++-----------
 .../logging/CacheEventLoggerDebugLogger.java       |  34 +---
 .../jcs4/engine/logging/behavior/ICacheEvent.java  |  37 +---
 .../engine/logging/behavior/ICacheEventLogger.java | 108 +++++++----
 .../jcs4/engine/memory/AbstractMemoryCache.java    |   2 +-
 .../jcs4/engine/memory/behavior/IMemoryCache.java  |   2 +-
 .../jcs4/engine/memory/lru/LHMLRUMemoryCache.java  |   7 +-
 .../engine/memory/shrinking/ShrinkerThread.java    |   3 +-
 .../memory/soft/SoftReferenceMemoryCache.java      |   4 +-
 .../jcs4/io/ObjectInputStreamClassLoaderAware.java |   1 +
 .../main/java/org/apache/commons/jcs4/log/Log.java |   2 +-
 .../commons/jcs4/utils/config/OptionConverter.java |   2 +-
 .../commons/jcs4/access/CacheAccessUnitTest.java   |   3 +-
 .../AuxiliaryCacheConfiguratorUnitTest.java        |   1 -
 .../commons/jcs4/auxiliary/MockAuxiliaryCache.java |  16 --
 .../jcs4/auxiliary/MockCacheEventLogger.java       |  33 +++-
 .../auxiliary/disk/AbstractDiskCacheUnitTest.java  |  12 +-
 .../tcp/LateralTCPDiscoveryListenerUnitTest.java   |   2 +-
 .../auxiliary/remote/MockRemoteCacheClient.java    |  11 --
 .../auxiliary/remote/RemoteCacheClientTester.java  |   3 +-
 .../http/client/RemoteHttpCacheClientUnitTest.java |  25 ++-
 .../server/RemoteHttpCacheServletUnitTest.java     |   2 +-
 .../util/RemoteCacheRequestFactoryUnitTest.java    |  24 +--
 .../CompositeCacheConfiguratorUnitTest.java        |   6 +-
 .../control/CompositeCacheDiskUsageUnitTest.java   |  17 --
 .../CacheEventLoggerDebugLoggerUnitTest.java       |  21 ++-
 .../jcs4/engine/logging/MockCacheEventLogger.java  |  95 ----------
 .../jcs4/engine/memory/MockMemoryCache.java        |   2 +-
 commons-jcs4-jcache-extras/pom.xml                 |  34 ++--
 commons-jcs4-jcache-openjpa/pom.xml                |  12 ++
 commons-jcs4-jcache/pom.xml                        |  13 ++
 .../commons/jcs4/jcache/JCSCachingManager.java     |   4 +-
 .../commons/jcs4/jcache/cdi}/package-info.java     |   4 +-
 .../commons/jcs4/jcache/jmx}/package-info.java     |   4 +-
 ...aultSubsitutor.java => DefaultSubstitutor.java} |   2 +-
 .../commons/jcs4/jcache/lang/Lang3Substitutor.java |   2 +-
 .../lang/{Subsitutor.java => Substitutor.java}     |  12 +-
 .../commons/jcs4/jcache/lang}/package-info.java    |   4 +-
 .../apache/commons/jcs4/jcache}/package-info.java  |   4 +-
 .../commons/jcs4/jcache/proxy}/package-info.java   |   4 +-
 .../jcs4/jcache/serialization}/package-info.java   |   4 +-
 .../commons/jcs4/jcache/thread}/package-info.java  |   4 +-
 pom.xml                                            |  18 --
 src/changes/changes.xml                            |   3 +
 {xdocs => src/site/fml}/faq.fml                    |   0
 src/site/site.xml                                  |  11 +-
 {xdocs => src/site/xdoc}/BasicJCSConfiguration.xml |  13 --
 {xdocs => src/site/xdoc}/BlockDiskCache.xml        |   1 -
 {xdocs => src/site/xdoc}/CacheEventLogging.xml     |   1 -
 {xdocs => src/site/xdoc}/ElementAttributes.xml     |   0
 {xdocs => src/site/xdoc}/ElementEventHandling.xml  |   0
 {xdocs => src/site/xdoc}/ElementSerializers.xml    |   3 -
 {xdocs => src/site/xdoc}/IndexedDiskAuxCache.xml   |   4 -
 .../site/xdoc}/IndexedDiskCacheProperties.xml      |   2 -
 {xdocs => src/site/xdoc}/JCSPlugins.xml            |  21 +--
 {xdocs => src/site/xdoc}/JCSShortDescription.xml   |   0
 {xdocs => src/site/xdoc}/JCSandJCACHE.xml          |   0
 {xdocs => src/site/xdoc}/JCSvsEHCache.xml          |   0
 {xdocs => src/site/xdoc}/JDBCDiskCache.xml         |   5 -
 .../site/xdoc}/JDBCDiskCacheProperties.xml         |   2 -
 {xdocs => src/site/xdoc}/LateralTCPAuxCache.xml    |   2 -
 {xdocs => src/site/xdoc}/LateralTCPProperties.xml  |   1 -
 {xdocs => src/site/xdoc}/LateralUDPDiscovery.xml   |   2 -
 {xdocs => src/site/xdoc}/LocalCacheConfig.xml      |  10 +-
 .../site/xdoc}/MySQLDiskCacheProperties.xml        |   2 -
 {xdocs => src/site/xdoc}/ProjectHistory.xml        |   0
 {xdocs => src/site/xdoc}/RegionProperties.xml      |   0
 {xdocs => src/site/xdoc}/RemoteAuxCache.xml        |  12 --
 {xdocs => src/site/xdoc}/RemoteCacheProperties.xml |   1 -
 .../site/xdoc}/RemoteHttpCacheProperties.xml       |   1 -
 {xdocs => src/site/xdoc}/UpgradingFrom13.xml       |   0
 {xdocs => src/site/xdoc}/UpgradingFrom2x.xml       |   0
 {xdocs => src/site/xdoc}/UpgradingFrom3x.xml       |   4 +-
 {xdocs => src/site/xdoc}/UsingJCSBasicWeb.xml      |  12 --
 {xdocs => src/site/xdoc}/download_jcs.xml          |   0
 {xdocs => src/site/xdoc}/getting_started/intro.xml |   1 -
 {xdocs => src/site/xdoc}/index.xml                 |   0
 {xdocs => src/site/xdoc}/issue-tracking.xml        |   0
 {xdocs => src/site/xdoc}/mail-lists.xml            |   0
 124 files changed, 948 insertions(+), 1867 deletions(-)
 delete mode 100644 commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/ConfigurationException.java
 delete mode 100644 commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/InvalidGroupException.java
 delete mode 100644 commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/InvalidHandleException.java
 delete mode 100644 commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/ObjectExistsException.java
 delete mode 100644 commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/ObjectNotFoundException.java
 create mode 100644 commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractCacheEventLogSupport.java
 delete mode 100644 commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/logging/MockCacheEventLogger.java
 copy {commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote => commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/cdi}/package-info.java (87%)
 copy {commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote => commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/jmx}/package-info.java (88%)
 rename commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/{DefaultSubsitutor.java => DefaultSubstitutor.java} (95%)
 rename commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/{Subsitutor.java => Substitutor.java} (84%)
 copy {commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine => commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang}/package-info.java (89%)
 copy {commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote => commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache}/package-info.java (88%)
 copy {commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary => commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/proxy}/package-info.java (90%)
 copy {commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote => commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/serialization}/package-info.java (87%)
 copy {commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote => commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/thread}/package-info.java (87%)
 rename {xdocs => src/site/fml}/faq.fml (100%)
 rename {xdocs => src/site/xdoc}/BasicJCSConfiguration.xml (90%)
 rename {xdocs => src/site/xdoc}/BlockDiskCache.xml (97%)
 rename {xdocs => src/site/xdoc}/CacheEventLogging.xml (96%)
 rename {xdocs => src/site/xdoc}/ElementAttributes.xml (100%)
 rename {xdocs => src/site/xdoc}/ElementEventHandling.xml (100%)
 rename {xdocs => src/site/xdoc}/ElementSerializers.xml (95%)
 rename {xdocs => src/site/xdoc}/IndexedDiskAuxCache.xml (97%)
 rename {xdocs => src/site/xdoc}/IndexedDiskCacheProperties.xml (96%)
 rename {xdocs => src/site/xdoc}/JCSPlugins.xml (77%)
 rename {xdocs => src/site/xdoc}/JCSShortDescription.xml (100%)
 rename {xdocs => src/site/xdoc}/JCSandJCACHE.xml (100%)
 rename {xdocs => src/site/xdoc}/JCSvsEHCache.xml (100%)
 rename {xdocs => src/site/xdoc}/JDBCDiskCache.xml (95%)
 rename {xdocs => src/site/xdoc}/JDBCDiskCacheProperties.xml (97%)
 rename {xdocs => src/site/xdoc}/LateralTCPAuxCache.xml (97%)
 rename {xdocs => src/site/xdoc}/LateralTCPProperties.xml (98%)
 rename {xdocs => src/site/xdoc}/LateralUDPDiscovery.xml (95%)
 rename {xdocs => src/site/xdoc}/LocalCacheConfig.xml (93%)
 rename {xdocs => src/site/xdoc}/MySQLDiskCacheProperties.xml (96%)
 rename {xdocs => src/site/xdoc}/ProjectHistory.xml (100%)
 rename {xdocs => src/site/xdoc}/RegionProperties.xml (100%)
 rename {xdocs => src/site/xdoc}/RemoteAuxCache.xml (95%)
 rename {xdocs => src/site/xdoc}/RemoteCacheProperties.xml (98%)
 rename {xdocs => src/site/xdoc}/RemoteHttpCacheProperties.xml (97%)
 rename {xdocs => src/site/xdoc}/UpgradingFrom13.xml (100%)
 rename {xdocs => src/site/xdoc}/UpgradingFrom2x.xml (100%)
 rename {xdocs => src/site/xdoc}/UpgradingFrom3x.xml (96%)
 rename {xdocs => src/site/xdoc}/UsingJCSBasicWeb.xml (96%)
 rename {xdocs => src/site/xdoc}/download_jcs.xml (100%)
 rename {xdocs => src/site/xdoc}/getting_started/intro.xml (99%)
 rename {xdocs => src/site/xdoc}/index.xml (100%)
 rename {xdocs => src/site/xdoc}/issue-tracking.xml (100%)
 rename {xdocs => src/site/xdoc}/mail-lists.xml (100%)


(commons-jcs) 03/12: Rework cache event logging

Posted by tv...@apache.org.
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 f77df1a1fdf9d61dd2947f9e825631fd0deddf2d
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Mon Feb 16 21:29:42 2026 +0100

    Rework cache event logging
---
 .../jcs4/auxiliary/AbstractAuxiliaryCache.java     | 122 +---------------
 .../AbstractAuxiliaryCacheEventLogging.java        |  31 ++--
 .../auxiliary/AbstractCacheEventLogSupport.java    | 162 +++++++++++++++++++++
 .../jcs4/auxiliary/disk/AbstractDiskCache.java     | 143 +++---------------
 .../jcs4/auxiliary/disk/indexed/IndexedDisk.java   |   1 -
 .../auxiliary/disk/indexed/IndexedDiskCache.java   |   8 +-
 .../jcs4/auxiliary/disk/jdbc/JDBCDiskCache.java    |  12 +-
 .../lateral/socket/tcp/LateralTCPCacheFactory.java |   3 +-
 .../lateral/socket/tcp/LateralTCPCacheNoWait.java  |  14 +-
 .../socket/tcp/LateralTCPCacheNoWaitFacade.java    |  17 +--
 .../remote/AbstractRemoteAuxiliaryCache.java       |  22 +--
 .../remote/AbstractRemoteCacheNoWaitFacade.java    |  11 --
 .../commons/jcs4/auxiliary/remote/RemoteCache.java |   7 +-
 .../jcs4/auxiliary/remote/RemoteCacheManager.java  |   3 +-
 .../jcs4/auxiliary/remote/RemoteCacheNoWait.java   |  11 --
 .../auxiliary/remote/RemoteCacheNoWaitFacade.java  |  16 +-
 .../remote/http/client/RemoteHttpCache.java        |   7 +-
 .../http/server/AbstractRemoteCacheService.java    |  95 ++++--------
 .../remote/http/server/RemoteHttpCacheService.java |   9 ++
 .../auxiliary/remote/server/RemoteCacheServer.java |  91 ++++++------
 .../remote/server/RemoteCacheServerFactory.java    |  19 ++-
 .../commons/jcs4/engine/logging/CacheEvent.java    | 142 +++++-------------
 .../logging/CacheEventLoggerDebugLogger.java       |  34 +----
 .../jcs4/engine/logging/behavior/ICacheEvent.java  |  37 +----
 .../engine/logging/behavior/ICacheEventLogger.java | 108 +++++++++-----
 .../jcs4/io/ObjectInputStreamClassLoaderAware.java |   1 +
 .../AuxiliaryCacheConfiguratorUnitTest.java        |   1 -
 .../commons/jcs4/auxiliary/MockAuxiliaryCache.java |   7 -
 .../jcs4/auxiliary/MockCacheEventLogger.java       |  33 ++++-
 .../tcp/LateralTCPDiscoveryListenerUnitTest.java   |   2 +-
 .../auxiliary/remote/MockRemoteCacheClient.java    |  11 --
 .../CompositeCacheConfiguratorUnitTest.java        |   6 +-
 .../control/CompositeCacheDiskUsageUnitTest.java   |   7 -
 .../CacheEventLoggerDebugLoggerUnitTest.java       |  21 +--
 .../jcs4/engine/logging/MockCacheEventLogger.java  |  95 ------------
 35 files changed, 503 insertions(+), 806 deletions(-)

diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCache.java
index 6332f170..71234d4e 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCache.java
@@ -28,71 +28,21 @@ import java.util.stream.Collectors;
 
 import org.apache.commons.jcs4.engine.behavior.ICacheElement;
 import org.apache.commons.jcs4.engine.behavior.IElementSerializer;
-import org.apache.commons.jcs4.engine.logging.CacheEvent;
-import org.apache.commons.jcs4.engine.logging.behavior.ICacheEvent;
-import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger;
 import org.apache.commons.jcs4.engine.match.KeyMatcherPatternImpl;
 import org.apache.commons.jcs4.engine.match.behavior.IKeyMatcher;
 import org.apache.commons.jcs4.utils.serialization.StandardSerializer;
 
 /** This holds convenience methods used by most auxiliary caches. */
 public abstract class AbstractAuxiliaryCache<K, V>
+    extends AbstractCacheEventLogSupport<K, V>
     implements AuxiliaryCache<K, V>
 {
-    /** An optional event logger */
-    private ICacheEventLogger cacheEventLogger;
-
     /** The serializer. Uses a standard serializer by default. */
     private IElementSerializer elementSerializer = new StandardSerializer();
 
     /** Key matcher used by the getMatching API */
     private IKeyMatcher<K> keyMatcher = new KeyMatcherPatternImpl<>();
 
-    /**
-     * Logs an event if an event logger is configured.
-     *
-     * @param item
-     * @param eventName
-     * @return ICacheEvent
-     */
-    protected ICacheEvent<K> createICacheEvent( final ICacheElement<K, V> item, final String eventName )
-    {
-        if ( cacheEventLogger == null )
-        {
-            return new CacheEvent<>();
-        }
-        final String diskLocation = getEventLoggingExtraInfo();
-        String regionName = null;
-        K key = null;
-        if ( item != null )
-        {
-            regionName = item.cacheName();
-            key = item.key();
-        }
-        return cacheEventLogger.createICacheEvent( getAuxiliaryCacheAttributes().getName(), regionName, eventName,
-                                                   diskLocation, key );
-    }
-
-    /**
-     * Logs an event if an event logger is configured.
-     *
-     * @param regionName
-     * @param key
-     * @param eventName
-     * @return ICacheEvent
-     */
-    protected <T> ICacheEvent<T> createICacheEvent( final String regionName, final T key, final String eventName )
-    {
-        if ( cacheEventLogger == null )
-        {
-            return new CacheEvent<>();
-        }
-        final String diskLocation = getEventLoggingExtraInfo();
-        return cacheEventLogger.createICacheEvent( getAuxiliaryCacheAttributes().getName(), regionName, eventName,
-                                                   diskLocation, key );
-
-    }
-
     /**
      * Gets the item from the cache.
      *
@@ -103,16 +53,6 @@ public abstract class AbstractAuxiliaryCache<K, V>
     @Override
     public abstract ICacheElement<K, V> get( K key ) throws IOException;
 
-    /**
-     * Allows it to be injected.
-     *
-     * @return cacheEventLogger
-     */
-    public ICacheEventLogger getCacheEventLogger()
-    {
-        return this.cacheEventLogger;
-    }
-
     /**
      * Allows it to be injected.
      *
@@ -123,13 +63,6 @@ public abstract class AbstractAuxiliaryCache<K, V>
         return this.elementSerializer;
     }
 
-    /**
-     * Gets the extra info for the event log.
-     *
-     * @return IP, or disk location, etc.
-     */
-    public abstract String getEventLoggingExtraInfo();
-
     /**
      * Returns the key matcher used by get matching.
      *
@@ -140,49 +73,6 @@ public abstract class AbstractAuxiliaryCache<K, V>
         return this.keyMatcher;
     }
 
-    /**
-     * Logs an event if an event logger is configured.
-     *
-     * @param source
-     * @param eventName
-     * @param optionalDetails
-     */
-    protected void logApplicationEvent( final String source, final String eventName, final String optionalDetails )
-    {
-        if ( cacheEventLogger != null )
-        {
-            cacheEventLogger.logApplicationEvent( source, eventName, optionalDetails );
-        }
-    }
-
-    /**
-     * Logs an event if an event logger is configured.
-     *
-     * @param source
-     * @param eventName
-     * @param errorMessage
-     */
-    protected void logError( final String source, final String eventName, final String errorMessage )
-    {
-        if ( cacheEventLogger != null )
-        {
-            cacheEventLogger.logError( source, eventName, errorMessage );
-        }
-    }
-
-    /**
-     * Logs an event if an event logger is configured.
-     *
-     * @param cacheEvent
-     */
-    protected <T> void logICacheEvent( final ICacheEvent<T> cacheEvent )
-    {
-        if ( cacheEventLogger != null )
-        {
-            cacheEventLogger.logICacheEvent( cacheEvent );
-        }
-    }
-
     /**
      * Gets multiple items from the cache based on the given set of keys.
      *
@@ -214,16 +104,6 @@ public abstract class AbstractAuxiliaryCache<K, V>
         return new HashMap<>();
     }
 
-    /**
-     * Allows it to be injected.
-     *
-     * @param cacheEventLogger
-     */
-    public void setCacheEventLogger( final ICacheEventLogger cacheEventLogger )
-    {
-        this.cacheEventLogger = cacheEventLogger;
-    }
-
     /**
      * Allows you to inject a custom serializer. A good example would be a compressing standard
      * serializer.
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCacheEventLogging.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCacheEventLogging.java
index 06f50e5c..a0c2203e 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCacheEventLogging.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCacheEventLogging.java
@@ -26,7 +26,7 @@ import java.util.Set;
 
 import org.apache.commons.jcs4.engine.behavior.ICacheElement;
 import org.apache.commons.jcs4.engine.logging.behavior.ICacheEvent;
-import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 
 /**
  * All ICacheEvents are defined as final. Children must implement process events. These are wrapped
@@ -58,7 +58,8 @@ public abstract class AbstractAuxiliaryCacheEventLogging<K, V>
     protected final void disposeWithEventLogging()
         throws IOException
     {
-        final ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), "none", ICacheEventLogger.DISPOSE_EVENT );
+        final ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), "none",
+                CacheEventType.DISPOSE_EVENT, this::getEventLoggingExtraInfo);
         try
         {
             processDispose();
@@ -115,7 +116,8 @@ public abstract class AbstractAuxiliaryCacheEventLogging<K, V>
     protected final Map<K, ICacheElement<K, V>> getMatchingWithEventLogging( final String pattern )
         throws IOException
     {
-        final ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), pattern, ICacheEventLogger.GETMATCHING_EVENT );
+        final ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), pattern,
+                CacheEventType.GETMATCHING_EVENT, this::getEventLoggingExtraInfo);
         try
         {
             return processGetMatching( pattern );
@@ -152,8 +154,8 @@ public abstract class AbstractAuxiliaryCacheEventLogging<K, V>
     protected final Map<K, ICacheElement<K, V>> getMultipleWithEventLogging(final Set<K> keys )
         throws IOException
     {
-        final ICacheEvent<Serializable> cacheEvent = createICacheEvent( getCacheName(), (Serializable) keys,
-                                                    ICacheEventLogger.GETMULTIPLE_EVENT );
+        final ICacheEvent<Serializable> cacheEvent = createICacheEvent( getCacheName(),
+                (Serializable) keys, CacheEventType.GETMULTIPLE_EVENT, this::getEventLoggingExtraInfo);
         try
         {
             return processGetMultiple( keys );
@@ -174,7 +176,8 @@ public abstract class AbstractAuxiliaryCacheEventLogging<K, V>
     protected final ICacheElement<K, V> getWithEventLogging( final K key )
         throws IOException
     {
-        final ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), key, ICacheEventLogger.GET_EVENT );
+        final ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), key,
+                CacheEventType.GET_EVENT, this::getEventLoggingExtraInfo);
         try
         {
             return processGet( key );
@@ -275,7 +278,8 @@ public abstract class AbstractAuxiliaryCacheEventLogging<K, V>
     protected final void removeAllWithEventLogging()
         throws IOException
     {
-        final ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), "all", ICacheEventLogger.REMOVEALL_EVENT );
+        final ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), "all",
+                CacheEventType.REMOVEALL_EVENT, this::getEventLoggingExtraInfo);
         try
         {
             processRemoveAll();
@@ -296,7 +300,8 @@ public abstract class AbstractAuxiliaryCacheEventLogging<K, V>
     protected final boolean removeWithEventLogging( final K key )
         throws IOException
     {
-        final ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), key, ICacheEventLogger.REMOVE_EVENT );
+        final ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), key,
+                CacheEventType.REMOVE_EVENT, this::getEventLoggingExtraInfo);
         try
         {
             return processRemove( key );
@@ -329,7 +334,8 @@ public abstract class AbstractAuxiliaryCacheEventLogging<K, V>
     protected final void updateWithEventLogging( final ICacheElement<K, V> cacheElement )
         throws IOException
     {
-        final ICacheEvent<K> cacheEvent = createICacheEvent( cacheElement, ICacheEventLogger.UPDATE_EVENT );
+        final ICacheEvent<K> cacheEvent = createICacheEvent( cacheElement,
+                CacheEventType.UPDATE_EVENT, this::getEventLoggingExtraInfo);
         try
         {
             processUpdate( cacheElement );
@@ -339,4 +345,11 @@ public abstract class AbstractAuxiliaryCacheEventLogging<K, V>
             logICacheEvent( cacheEvent );
         }
     }
+
+    /**
+     * Gets the extra info for the event log.
+     *
+     * @return disk location
+     */
+    public abstract String getEventLoggingExtraInfo();
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractCacheEventLogSupport.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractCacheEventLogSupport.java
new file mode 100644
index 00000000..c803c973
--- /dev/null
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractCacheEventLogSupport.java
@@ -0,0 +1,162 @@
+package org.apache.commons.jcs4.auxiliary;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Optional;
+import java.util.function.Supplier;
+
+import org.apache.commons.jcs4.engine.behavior.ICacheElement;
+import org.apache.commons.jcs4.engine.logging.CacheEvent;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEvent;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
+
+public abstract class AbstractCacheEventLogSupport<K, V>
+{
+    /** An optional event logger */
+    private Optional<ICacheEventLogger> cacheEventLogger = Optional.empty();
+
+    /**
+     * Creates an event.
+     *
+     * @param source e.g. RemoteCacheServer
+     * @param region the name of the region
+     * @param eventType e.g. update, get, put, remove
+     * @param optionalDetails any extra message
+     * @param key the cache key
+     * @return ICacheEvent
+     */
+    protected <T> ICacheEvent<T> createICacheEvent(final String source, final String region,
+            final CacheEventType eventType, final String optionalDetails, final T key)
+    {
+        if (getCacheEventLogger().isEmpty())
+        {
+            return new CacheEvent<>();
+        }
+
+        return getCacheEventLogger().get().createICacheEvent(
+                source, region, eventType, optionalDetails, key);
+    }
+
+    /**
+     * Logs an event if an event logger is configured.
+     *
+     * @param item
+     * @param eventType
+     * @param eventLoggingExtraInfo
+     * @return ICacheEvent
+     */
+    protected ICacheEvent<K> createICacheEvent(final ICacheElement<K, V> item,
+            final CacheEventType eventType, Supplier<String> eventLoggingExtraInfo)
+    {
+        if (getCacheEventLogger().isEmpty())
+        {
+            return new CacheEvent<>();
+        }
+        String regionName = item == null ? null : item.cacheName();
+        K key = item == null ? null : item.key();
+
+        return createICacheEvent(getAuxiliaryCacheAttributes().getName(), regionName,
+                eventType, eventLoggingExtraInfo.get(), key);
+    }
+
+    /**
+     * Logs an event if an event logger is configured.
+     *
+     * @param regionName
+     * @param key
+     * @param eventType
+     * @param eventLoggingExtraInfo
+     * @return ICacheEvent
+     */
+    protected <T> ICacheEvent<T> createICacheEvent(final String regionName, final T key,
+            final CacheEventType eventType, Supplier<String> eventLoggingExtraInfo)
+    {
+        if (getCacheEventLogger().isEmpty())
+        {
+            return new CacheEvent<>();
+        }
+
+        return createICacheEvent(getAuxiliaryCacheAttributes().getName(), regionName,
+                eventType, eventLoggingExtraInfo.get(), key);
+    }
+
+    /**
+     * Allows it to be injected.
+     *
+     * @return cacheEventLogger
+     */
+    public Optional<ICacheEventLogger> getCacheEventLogger()
+    {
+        return cacheEventLogger;
+    }
+
+    /**
+     * Gets the extra info for the event log.
+     *
+     * @return IP, or disk location, etc.
+     */
+    public abstract AuxiliaryCacheAttributes getAuxiliaryCacheAttributes();
+
+    /**
+     * Logs an event if an event logger is configured.
+     *
+     * @param source
+     * @param eventType
+     * @param optionalDetails
+     */
+    protected void logApplicationEvent(final String source, final CacheEventType eventType, final String optionalDetails)
+    {
+        getCacheEventLogger().ifPresent(logger -> logger.logApplicationEvent( source, eventType, optionalDetails));
+    }
+
+    /**
+     * Logs an event if an event logger is configured.
+     *
+     * @param source
+     * @param eventType
+     * @param errorMessage
+     */
+    protected void logError(final String source, final CacheEventType eventType, final String errorMessage)
+    {
+        getCacheEventLogger().ifPresent(logger -> logger.logError( source, eventType, errorMessage));
+    }
+
+    /**
+     * Logs an event if an event logger is configured.
+     *
+     * @param cacheEvent
+     */
+    protected <T> void logICacheEvent(final ICacheEvent<T> cacheEvent)
+    {
+        getCacheEventLogger().ifPresent(logger -> logger.logICacheEvent( cacheEvent ));
+    }
+
+    /**
+     * Allows it to be injected.
+     *
+     * @param cacheEventLogger
+     */
+    public void setCacheEventLogger(final ICacheEventLogger cacheEventLogger)
+    {
+        this.cacheEventLogger = Optional.ofNullable(cacheEventLogger);
+    }
+
+}
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/AbstractDiskCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/AbstractDiskCache.java
index 3273782b..3a88e335 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/AbstractDiskCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/AbstractDiskCache.java
@@ -26,6 +26,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.commons.jcs4.auxiliary.AbstractAuxiliaryCacheEventLogging;
@@ -91,7 +92,7 @@ public abstract class AbstractDiskCache<K, V>
         {
             if (alive.get())
             {
-                doDispose();
+                disposeWithEventLogging();
             }
         }
 
@@ -135,7 +136,7 @@ public abstract class AbstractDiskCache<K, V>
                             // If the element is still eligible, spool it.
                             if ( pe.isSpoolable() )
                             {
-                                doUpdate( element );
+                                updateWithEventLogging( element );
                             }
                         }
                         finally
@@ -151,7 +152,7 @@ public abstract class AbstractDiskCache<K, V>
                 else
                 {
                     // call the child's implementation
-                    doUpdate( element );
+                    updateWithEventLogging( element );
                 }
             }
             else
@@ -176,7 +177,7 @@ public abstract class AbstractDiskCache<K, V>
         public void handleRemove( final String cacheName, final K key )
             throws IOException
         {
-            if (alive.get() && doRemove( key ) )
+            if (alive.get() && removeWithEventLogging(key))
             {
                 log.debug( "Element removed, key: " + key );
             }
@@ -193,7 +194,7 @@ public abstract class AbstractDiskCache<K, V>
         {
             if (alive.get())
             {
-                doRemoveAll();
+                removeAllWithEventLogging();
             }
         }
 
@@ -242,7 +243,7 @@ public abstract class AbstractDiskCache<K, V>
     private final String cacheName;
 
     /** DEBUG: Keeps a count of the number of purgatory hits for debug messages */
-    private int purgHits;
+    private final AtomicInteger purgHits = new AtomicInteger();
 
     /**
      * We lock here, so that we cannot get an update after a remove all. an individual removal locks
@@ -296,109 +297,11 @@ public abstract class AbstractDiskCache<K, V>
 
         // Invoke any implementation specific disposal code
         // need to handle the disposal first.
-        doDispose();
+        disposeWithEventLogging();
 
         alive.set(false);
     }
 
-    /**
-     * Dispose of the persistent store. Note that disposal of purgatory and setting alive to false
-     * does NOT need to be done by this method.
-     *
-     * Before the event logging layer, the subclasses implemented the do* methods. Now the do*
-     * methods call the *EventLogging method on the super. The *WithEventLogging methods call the
-     * abstract process* methods. The children implement the process methods.
-     *
-     * @throws IOException
-     */
-    protected final void doDispose()
-        throws IOException
-    {
-        super.disposeWithEventLogging();
-    }
-
-    /**
-     * Gets a value from the persistent store.
-     *
-     * Before the event logging layer, the subclasses implemented the do* methods. Now the do*
-     * methods call the *EventLogging method on the super. The *WithEventLogging methods call the
-     * abstract process* methods. The children implement the process methods.
-     *
-     * @param key Key to locate value for.
-     * @return An object matching key, or null.
-     * @throws IOException
-     */
-    protected final ICacheElement<K, V> doGet( final K key )
-        throws IOException
-    {
-        return super.getWithEventLogging( key );
-    }
-
-    /**
-     * Gets a value from the persistent store.
-     *
-     * Before the event logging layer, the subclasses implemented the do* methods. Now the do*
-     * methods call the *EventLogging method on the super. The *WithEventLogging methods call the
-     * abstract process* methods. The children implement the process methods.
-     *
-     * @param pattern Used to match keys.
-     * @return A map of matches.
-     * @throws IOException
-     */
-    protected final Map<K, ICacheElement<K, V>> doGetMatching( final String pattern )
-        throws IOException
-    {
-        return super.getMatchingWithEventLogging( pattern );
-    }
-
-    /**
-     * Remove an object from the persistent store if found.
-     *
-     * Before the event logging layer, the subclasses implemented the do* methods. Now the do*
-     * methods call the *EventLogging method on the super. The *WithEventLogging methods call the
-     * abstract process* methods. The children implement the process methods.
-     *
-     * @param key Key of object to remove.
-     * @return whether or no the item was present when removed
-     * @throws IOException
-     */
-    protected final boolean doRemove( final K key )
-        throws IOException
-    {
-        return super.removeWithEventLogging( key );
-    }
-
-    /**
-     * Remove all objects from the persistent store.
-     *
-     * Before the event logging layer, the subclasses implemented the do* methods. Now the do*
-     * methods call the *EventLogging method on the super. The *WithEventLogging methods call the
-     * abstract process* methods. The children implement the process methods.
-     *
-     * @throws IOException
-     */
-    protected final void doRemoveAll()
-        throws IOException
-    {
-        super.removeAllWithEventLogging();
-    }
-
-    /**
-     * Add a cache element to the persistent store.
-     *
-     * Before the event logging layer, the subclasses implemented the do* methods. Now the do*
-     * methods call the *EventLogging method on the super. The *WithEventLogging methods call the
-     * abstract process* methods. The children implement the process methods.
-     *
-     * @param cacheElement
-     * @throws IOException
-     */
-    protected final void doUpdate( final ICacheElement<K, V> cacheElement )
-        throws IOException
-    {
-        super.updateWithEventLogging( cacheElement );
-    }
-
     /**
      * Check to see if the item is in purgatory. If so, return it. If not, check to see if we have
      * it on disk.
@@ -422,11 +325,11 @@ public abstract class AbstractDiskCache<K, V>
         // If the element was found in purgatory
         if ( pe != null )
         {
-            purgHits++;
+            int p = purgHits.incrementAndGet();
 
-            if ( purgHits % 100 == 0 )
+            if ( p % 100 == 0 )
             {
-                log.debug( "Purgatory hits = {0}", purgHits );
+                log.debug( "Purgatory hits = {0}", p );
             }
 
             // Since the element will go back to the memory cache, we could set
@@ -452,7 +355,7 @@ public abstract class AbstractDiskCache<K, V>
         // it from the cache.
         try
         {
-            return doGet( key );
+            return getWithEventLogging( key );
         }
         catch (final IOException e)
         {
@@ -536,23 +439,13 @@ public abstract class AbstractDiskCache<K, V>
         final Map<K, ICacheElement<K, V>> result = processGetMultiple( matchingKeys );
 
         // Get the keys from disk
-        final Map<K, ICacheElement<K, V>> diskMatches = doGetMatching( pattern );
+        final Map<K, ICacheElement<K, V>> diskMatches = getMatchingWithEventLogging( pattern );
 
         result.putAll( diskMatches );
 
         return result;
     }
 
-    /**
-     * Size cannot be determined without knowledge of the cache implementation, so subclasses will
-     * need to implement this method.
-     *
-     * @return the number of items.
-     * @see ICache#getSize
-     */
-    @Override
-    public abstract int getSize();
-
     /**
      * Returns semi-structured data.
      *
@@ -563,7 +456,7 @@ public abstract class AbstractDiskCache<K, V>
     {
         final IStats stats = new Stats("Abstract Disk Cache");
 
-        stats.addStatElement("Purgatory Hits", Integer.valueOf(purgHits));
+        stats.addStatElement("Purgatory Hits", purgHits);
         stats.addStatElement("Purgatory Size", Integer.valueOf(purgatory.size()));
 
         // get the stats from the event queue too
@@ -660,19 +553,21 @@ public abstract class AbstractDiskCache<K, V>
                 pe.setSpoolable( false );
 
                 // Remove from persistent store immediately
-                present = doRemove( key );
+                present = removeWithEventLogging( key );
             }
         }
         else
         {
             // Remove from persistent store immediately
-            present = doRemove( key );
+            present = removeWithEventLogging( key );
         }
 
         return present;
     }
 
     /**
+     * Remove all objects from the persistent store.
+     *
      * @throws IOException
      * @see org.apache.commons.jcs4.engine.behavior.ICache#removeAll
      */
@@ -686,7 +581,7 @@ public abstract class AbstractDiskCache<K, V>
             initPurgatory();
 
             // Remove all from persistent store immediately
-            doRemoveAll();
+            removeAllWithEventLogging();
         }
         else
         {
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDisk.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDisk.java
index 955d5bc5..4540cf9a 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDisk.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDisk.java
@@ -274,7 +274,6 @@ public class IndexedDisk implements AutoCloseable
     /**
      * Serializes the object and write it out to the given position.
      * <p>
-     * TODO: make this take a ded as well.
      * @param obj
      * @param pos
      * @throws IOException
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDiskCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDiskCache.java
index 936f47a0..1336e83d 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDiskCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDiskCache.java
@@ -44,7 +44,7 @@ import org.apache.commons.jcs4.engine.behavior.IElementSerializer;
 import org.apache.commons.jcs4.engine.control.group.GroupAttrName;
 import org.apache.commons.jcs4.engine.control.group.GroupId;
 import org.apache.commons.jcs4.engine.logging.behavior.ICacheEvent;
-import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 import org.apache.commons.jcs4.engine.stats.Stats;
 import org.apache.commons.jcs4.engine.stats.behavior.IStats;
 import org.apache.commons.jcs4.log.Log;
@@ -1221,7 +1221,8 @@ public class IndexedDiskCache<K, V> extends AbstractDiskCache<K, V>
     @Override
     public void processDispose()
     {
-        final ICacheEvent<String> cacheEvent = createICacheEvent(getCacheName(), "none", ICacheEventLogger.DISPOSE_EVENT);
+        final ICacheEvent<String> cacheEvent = createICacheEvent(getCacheName(), "none",
+                CacheEventType.DISPOSE_EVENT, this::getDiskLocation);
         try
         {
             final Thread t = new Thread(this::disposeInternal, "IndexedDiskCache-DisposalThread");
@@ -1387,7 +1388,8 @@ public class IndexedDiskCache<K, V> extends AbstractDiskCache<K, V>
     public void processRemoveAll()
     {
         final ICacheEvent<String> cacheEvent =
-                createICacheEvent(getCacheName(), "all", ICacheEventLogger.REMOVEALL_EVENT);
+                createICacheEvent(getCacheName(), "all", CacheEventType.REMOVEALL_EVENT,
+                        this::getDiskLocation);
         try
         {
             reset();
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCache.java
index b4eee0c4..7f1cb6e6 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCache.java
@@ -39,7 +39,7 @@ import org.apache.commons.jcs4.auxiliary.disk.jdbc.dsfactory.DataSourceFactory;
 import org.apache.commons.jcs4.engine.behavior.ICache;
 import org.apache.commons.jcs4.engine.behavior.ICacheElement;
 import org.apache.commons.jcs4.engine.logging.behavior.ICacheEvent;
-import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 import org.apache.commons.jcs4.engine.stats.behavior.IStats;
 import org.apache.commons.jcs4.log.Log;
 
@@ -206,8 +206,9 @@ public class JDBCDiskCache<K, V>
                     setAlive(false);
                 }
 
-                logApplicationEvent( getAuxiliaryCacheAttributes().getName(), "deleteExpired",
-                                     "Deleted expired elements.  URL: " + getDiskLocation() );
+                logApplicationEvent( getAuxiliaryCacheAttributes().getName(),
+                        CacheEventType.DELETEEXPIRED_EVENT,
+                        "Deleted expired elements.  URL: " + getDiskLocation() );
             }
             else
             {
@@ -216,7 +217,7 @@ public class JDBCDiskCache<K, V>
         }
         catch ( final SQLException e )
         {
-            logError( getAuxiliaryCacheAttributes().getName(), "deleteExpired",
+            logError( getAuxiliaryCacheAttributes().getName(), CacheEventType.DELETEEXPIRED_EVENT,
                     e.getMessage() + " URL: " + getDiskLocation() );
             log.error( "Problem removing expired elements from the table.", e );
             reset();
@@ -511,7 +512,8 @@ public class JDBCDiskCache<K, V>
     @Override
     public void processDispose()
     {
-        final ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), null, ICacheEventLogger.DISPOSE_EVENT );
+        final ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), null,
+                CacheEventType.DISPOSE_EVENT, this::getDiskLocation);
 
         try
         {
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java
index c83ad167..fd3ff536 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java
@@ -257,7 +257,8 @@ public class LateralTCPCacheFactory
         {
             // One can be used for all regions
             final LateralTCPDiscoveryListener discoveryListener =
-                    getDiscoveryListener(lac, cacheMgr, lcnwf.getCacheEventLogger(),
+                    getDiscoveryListener(lac, cacheMgr,
+                    lcnwf.getCacheEventLogger().orElse(null),
                     lcnwf.getElementSerializer(), lcnwf.getKeyMatcher());
             discoveryListener.addNoWaitFacade( lac.getCacheName(), lcnwf );
 
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheNoWait.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheNoWait.java
index e8f58788..d86e4b24 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheNoWait.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheNoWait.java
@@ -79,8 +79,9 @@ public class LateralTCPCacheNoWait<K, V>
     {
         this.cache = cache;
         this.identityKey = cache.getCacheName();
-        setCacheEventLogger(cache.getCacheEventLogger());
+        setCacheEventLogger(cache.getCacheEventLogger().orElse(null));
         setElementSerializer(cache.getElementSerializer());
+        setKeyMatcher(cache.getKeyMatcher());
 
         log.debug( "Constructing LateralTCPCacheNoWait, LateralTCPCache = [{0}]", cache );
 
@@ -197,17 +198,6 @@ public class LateralTCPCacheNoWait<K, V>
         return cache.getCacheType();
     }
 
-    /**
-     * this won't be called since we don't do ICache logging here.
-     *
-     * @return String
-     */
-    @Override
-    public String getEventLoggingExtraInfo()
-    {
-        return "Lateral Cache No Wait";
-    }
-
     /**
      * The identifying key to this no wait
      *
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheNoWaitFacade.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheNoWaitFacade.java
index 4de74cbe..7f00eac8 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheNoWaitFacade.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheNoWaitFacade.java
@@ -94,7 +94,7 @@ public class LateralTCPCacheNoWaitFacade<K, V>
      * @param noWait
      * @return true if it wasn't already contained
      */
-    public synchronized boolean addNoWait( final LateralTCPCacheNoWait<K, V> noWait )
+    public boolean addNoWait( final LateralTCPCacheNoWait<K, V> noWait )
     {
         if ( noWait == null )
         {
@@ -201,17 +201,6 @@ public class LateralTCPCacheNoWaitFacade<K, V>
         return CacheType.LATERAL_CACHE;
     }
 
-    /**
-     * this won't be called since we don't do ICache logging here.
-     *
-     * @return String
-     */
-    @Override
-    public String getEventLoggingExtraInfo()
-    {
-        return "Lateral Cache No Wait";
-    }
-
     /**
      * Return the keys in this cache.
      *
@@ -381,7 +370,7 @@ public class LateralTCPCacheNoWaitFacade<K, V>
      * @param noWait
      * @return true if it was already in the array
      */
-    public synchronized boolean removeNoWait( final LateralTCPCacheNoWait<K, V> noWait )
+    public boolean removeNoWait( final LateralTCPCacheNoWait<K, V> noWait )
     {
         if (noWait == null)
         {
@@ -399,7 +388,7 @@ public class LateralTCPCacheNoWaitFacade<K, V>
      * @return true if it was already in the array
      * @since 3.1
      */
-    public synchronized boolean removeNoWait(final String tcpServer)
+    public boolean removeNoWait(final String tcpServer)
     {
         if (tcpServer == null)
         {
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteAuxiliaryCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteAuxiliaryCache.java
index be8fb1a3..df3a6c72 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteAuxiliaryCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteAuxiliaryCache.java
@@ -42,7 +42,7 @@ import org.apache.commons.jcs4.engine.behavior.ICacheElement;
 import org.apache.commons.jcs4.engine.behavior.ICacheElementSerialized;
 import org.apache.commons.jcs4.engine.behavior.ICacheServiceNonLocal;
 import org.apache.commons.jcs4.engine.behavior.IZombie;
-import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 import org.apache.commons.jcs4.engine.stats.Stats;
 import org.apache.commons.jcs4.engine.stats.behavior.IStats;
 import org.apache.commons.jcs4.log.Log;
@@ -137,8 +137,8 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
             {
                 try
                 {
-                    handleException( e, "Problem propagating events from Zombie Queue to new Remote Service.",
-                                     "fixCache" );
+                    handleException(e, "Problem propagating events from Zombie Queue to new Remote Service.",
+                            CacheEventType.FIXCACHE_EVENT );
                 }
                 catch ( final IOException e1 )
                 {
@@ -359,10 +359,10 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
      *
      * @param ex
      * @param msg
-     * @param eventName
+     * @param eventType
      * @throws IOException
      */
-    protected abstract void handleException( Exception ex, String msg, String eventName )
+    protected abstract void handleException( Exception ex, String msg, CacheEventType eventType )
         throws IOException;
 
     /**
@@ -385,7 +385,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
         catch ( final IOException ex )
         {
             log.error( "Couldn't dispose", ex );
-            handleException( ex, "Failed to dispose [" + cacheName + "]", ICacheEventLogger.DISPOSE_EVENT );
+            handleException( ex, "Failed to dispose [" + cacheName + "]", CacheEventType.DISPOSE_EVENT );
         }
     }
 
@@ -431,7 +431,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
         }
         catch ( final IOException | ClassNotFoundException ex )
         {
-            handleException( ex, "Failed to get [" + key + "] from [" + cacheName + "]", ICacheEventLogger.GET_EVENT );
+            handleException( ex, "Failed to get [" + key + "] from [" + cacheName + "]", CacheEventType.GET_EVENT );
         }
         return retVal;
     }
@@ -481,7 +481,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
         catch ( final IOException | ClassNotFoundException ex )
         {
             handleException( ex, "Failed to getMatching [" + pattern + "] from [" + cacheName + "]",
-                             ICacheEventLogger.GET_EVENT );
+                    CacheEventType.GET_EVENT );
         }
         return results;
     }
@@ -507,7 +507,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
             }
             catch ( final IOException ex )
             {
-                handleException( ex, "Failed to remove " + key + " from " + cacheName, ICacheEventLogger.REMOVE_EVENT );
+                handleException( ex, "Failed to remove " + key + " from " + cacheName, CacheEventType.REMOVE_EVENT );
             }
             return true;
         }
@@ -532,7 +532,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
             }
             catch ( final IOException ex )
             {
-                handleException( ex, "Failed to remove all from " + cacheName, ICacheEventLogger.REMOVEALL_EVENT );
+                handleException( ex, "Failed to remove all from " + cacheName, CacheEventType.REMOVEALL_EVENT );
             }
         }
     }
@@ -565,7 +565,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
             {
                 // event queue will wait and retry
                 handleException( ex, "Failed to put [" + ce.key() + "] to " + ce.cacheName(),
-                                 ICacheEventLogger.UPDATE_EVENT );
+                        CacheEventType.UPDATE_EVENT );
             }
         }
         else
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java
index 4ece672a..6691e101 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java
@@ -136,17 +136,6 @@ public abstract class AbstractRemoteCacheNoWaitFacade<K, V>
         return CacheType.REMOTE_CACHE;
     }
 
-    /**
-     * This typically returns end point info.
-     *
-     * @return the name
-     */
-    @Override
-    public String getEventLoggingExtraInfo()
-    {
-        return "Remote Cache No Wait Facade";
-    }
-
     /**
      * Return the keys in this cache.
      *
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCache.java
index 344d9599..8a2b8406 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCache.java
@@ -26,6 +26,7 @@ import org.apache.commons.jcs4.auxiliary.remote.behavior.IRemoteCacheListener;
 import org.apache.commons.jcs4.auxiliary.remote.server.behavior.RemoteType;
 import org.apache.commons.jcs4.engine.ZombieCacheServiceNonLocal;
 import org.apache.commons.jcs4.engine.behavior.ICacheServiceNonLocal;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 import org.apache.commons.jcs4.engine.stats.Stats;
 import org.apache.commons.jcs4.engine.stats.behavior.IStats;
 import org.apache.commons.jcs4.log.Log;
@@ -137,16 +138,16 @@ public class RemoteCache<K, V>
      *
      * @param ex
      * @param msg
-     * @param eventName
+     * @param eventType
      * @throws IOException
      */
     @Override
-    protected void handleException( final Exception ex, final String msg, final String eventName )
+    protected void handleException( final Exception ex, final String msg, final CacheEventType eventType )
         throws IOException
     {
         final String message = "Disabling remote cache due to error: " + msg;
 
-        logError( cacheName, "", message );
+        logError( cacheName, eventType, message );
         log.error( message, ex );
 
         // we should not switch if the existing is a zombie.
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheManager.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheManager.java
index f76169e9..c82b48f1 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheManager.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheManager.java
@@ -36,6 +36,7 @@ import org.apache.commons.jcs4.engine.behavior.ICacheServiceNonLocal;
 import org.apache.commons.jcs4.engine.behavior.ICompositeCacheManager;
 import org.apache.commons.jcs4.engine.behavior.IElementSerializer;
 import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 import org.apache.commons.jcs4.engine.match.behavior.IKeyMatcher;
 import org.apache.commons.jcs4.log.Log;
 
@@ -194,7 +195,7 @@ public class RemoteCacheManager
             final String msg = "Remote connection to " + registry + " resumed.";
             if ( cacheEventLogger != null )
             {
-                cacheEventLogger.logApplicationEvent( "RemoteCacheManager", "fix", msg );
+                cacheEventLogger.logApplicationEvent( "RemoteCacheManager", CacheEventType.FIXCACHE_EVENT, msg );
             }
             log.info( msg );
         }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheNoWait.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheNoWait.java
index fee9b067..839b69a4 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheNoWait.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheNoWait.java
@@ -226,17 +226,6 @@ public class RemoteCacheNoWait<K, V>
         return CacheType.REMOTE_CACHE;
     }
 
-    /**
-     * this won't be called since we don't do ICache logging here.
-     *
-     * @return String
-     */
-    @Override
-    public String getEventLoggingExtraInfo()
-    {
-        return "Remote Cache No Wait";
-    }
-
     /**
      * Return the keys in this cache.
      *
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheNoWaitFacade.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheNoWaitFacade.java
index b6d737c0..2a567a26 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheNoWaitFacade.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheNoWaitFacade.java
@@ -31,6 +31,7 @@ import org.apache.commons.jcs4.engine.CacheStatus;
 import org.apache.commons.jcs4.engine.behavior.ICache;
 import org.apache.commons.jcs4.engine.behavior.IElementSerializer;
 import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 import org.apache.commons.jcs4.log.Log;
 
 /**
@@ -261,11 +262,8 @@ public class RemoteCacheNoWaitFacade<K, V>
                 runner.setDaemon( true );
                 runner.start();
 
-                if ( getCacheEventLogger() != null )
-                {
-                    getCacheEventLogger().logApplicationEvent( "RemoteCacheNoWaitFacade", "InitiatedFailover",
-                                                               rcnw + " was in error." );
-                }
+                logApplicationEvent("RemoteCacheNoWaitFacade", CacheEventType.INITIATEDFAILOVER_EVENT,
+                        rcnw + " was in error." );
             }
             else
             {
@@ -383,12 +381,8 @@ public class RemoteCacheNoWaitFacade<K, V>
                         + "failoverNoWait [" + failoverNoWait + "]";
                 log.info( message );
 
-                if (getCacheEventLogger() != null)
-                {
-                    getCacheEventLogger().logApplicationEvent(
-                            "RemoteCacheFailoverRunner", "RestoredPrimary",
-                            message );
-                }
+                logApplicationEvent("RemoteCacheFailoverRunner", CacheEventType.RESTOREDPRIMARY_EVENT,
+                            message);
                 return true;
             }
         }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCache.java
index b0874be8..4180bef2 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCache.java
@@ -25,6 +25,7 @@ import org.apache.commons.jcs4.auxiliary.remote.AbstractRemoteAuxiliaryCache;
 import org.apache.commons.jcs4.auxiliary.remote.behavior.IRemoteCacheListener;
 import org.apache.commons.jcs4.engine.ZombieCacheServiceNonLocal;
 import org.apache.commons.jcs4.engine.behavior.ICacheServiceNonLocal;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 import org.apache.commons.jcs4.log.Log;
 
 /**
@@ -84,18 +85,18 @@ public class RemoteHttpCache<K, V>
      *
      * @param ex
      * @param msg
-     * @param eventName
+     * @param eventType
      * @throws IOException
      */
     @Override
-    protected void handleException( final Exception ex, final String msg, final String eventName )
+    protected void handleException( final Exception ex, final String msg, final CacheEventType eventType )
         throws IOException
     {
         // we should not switch if the existing is a zombie.
         if ( !( getRemoteCacheService() instanceof ZombieCacheServiceNonLocal))
         {
             final String message = "Disabling remote cache due to error: " + msg;
-            logError( cacheName, "", message );
+            logError( cacheName, eventType, message );
             log.error( message, ex );
 
             setRemoteCacheService( new ZombieCacheServiceNonLocal<>( getRemoteCacheAttributes().getZombieQueueMaxSize() ) );
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/AbstractRemoteCacheService.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/AbstractRemoteCacheService.java
index 5b1e3886..c68598d0 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/AbstractRemoteCacheService.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/AbstractRemoteCacheService.java
@@ -23,14 +23,16 @@ import java.io.IOException;
 import java.io.Serializable;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.commons.jcs4.auxiliary.AbstractCacheEventLogSupport;
 import org.apache.commons.jcs4.engine.behavior.ICacheElement;
 import org.apache.commons.jcs4.engine.behavior.ICacheServiceNonLocal;
 import org.apache.commons.jcs4.engine.behavior.ICompositeCacheManager;
 import org.apache.commons.jcs4.engine.control.CompositeCache;
-import org.apache.commons.jcs4.engine.logging.CacheEvent;
 import org.apache.commons.jcs4.engine.logging.behavior.ICacheEvent;
 import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 import org.apache.commons.jcs4.log.Log;
 
 /**
@@ -38,6 +40,7 @@ import org.apache.commons.jcs4.log.Log;
  * much of the RMI server to use this as well. I'm starting with the HTTP service.
  */
 public abstract class AbstractRemoteCacheService<K, V>
+    extends AbstractCacheEventLogSupport<K, V>
     implements ICacheServiceNonLocal<K, V>
 {
     /** The interval at which we will log updates. */
@@ -46,9 +49,6 @@ public abstract class AbstractRemoteCacheService<K, V>
     /** Log instance */
     private static final Log log = Log.getLog( AbstractRemoteCacheService.class );
 
-    /** An optional event logger */
-    private transient ICacheEventLogger cacheEventLogger;
-
     /** The central hub */
     private ICompositeCacheManager cacheManager;
 
@@ -56,7 +56,7 @@ public abstract class AbstractRemoteCacheService<K, V>
     private String eventLogSourceName = "AbstractRemoteCacheService";
 
     /** Number of puts into the cache. */
-    private int puts;
+    private AtomicInteger puts = new AtomicInteger();
 
     /**
      * Creates the super with the needed items.
@@ -67,7 +67,7 @@ public abstract class AbstractRemoteCacheService<K, V>
     public AbstractRemoteCacheService( final ICompositeCacheManager cacheManager, final ICacheEventLogger cacheEventLogger )
     {
         this.cacheManager = cacheManager;
-        this.cacheEventLogger = cacheEventLogger;
+        setCacheEventLogger(cacheEventLogger);
     }
 
     /**
@@ -75,18 +75,14 @@ public abstract class AbstractRemoteCacheService<K, V>
      *
      * @param item
      * @param requesterId
-     * @param eventName
+     * @param eventType
      * @return ICacheEvent
      */
-    protected ICacheEvent<ICacheElement<K, V>> createICacheEvent( final ICacheElement<K, V> item, final long requesterId, final String eventName )
+    protected ICacheEvent<ICacheElement<K, V>> createICacheEvent( final ICacheElement<K, V> item, final long requesterId, final CacheEventType eventType )
     {
-        if ( cacheEventLogger == null )
-        {
-            return new CacheEvent<>();
-        }
         final String ipAddress = getExtraInfoForRequesterId( requesterId );
-        return cacheEventLogger.createICacheEvent( getEventLogSourceName(), item.cacheName(), eventName, ipAddress,
-                                                   item );
+        return createICacheEvent( getEventLogSourceName(), item.cacheName(),
+                eventType, ipAddress, item );
     }
 
     /**
@@ -95,17 +91,14 @@ public abstract class AbstractRemoteCacheService<K, V>
      * @param cacheName
      * @param key
      * @param requesterId
-     * @param eventName
+     * @param eventType
      * @return ICacheEvent
      */
-    protected <T> ICacheEvent<T> createICacheEvent( final String cacheName, final T key, final long requesterId, final String eventName )
+    protected <T> ICacheEvent<T> createICacheEvent( final String cacheName, final T key, final long requesterId, final CacheEventType eventType )
     {
-        if ( cacheEventLogger == null )
-        {
-            return new CacheEvent<>();
-        }
         final String ipAddress = getExtraInfoForRequesterId( requesterId );
-        return cacheEventLogger.createICacheEvent( getEventLogSourceName(), cacheName, eventName, ipAddress, key );
+        return createICacheEvent( getEventLogSourceName(), cacheName,
+                eventType, ipAddress, key );
     }
 
     /**
@@ -131,7 +124,8 @@ public abstract class AbstractRemoteCacheService<K, V>
     public void dispose( final String cacheName, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "none", requesterId, ICacheEventLogger.DISPOSE_EVENT );
+        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "none", requesterId,
+                CacheEventType.DISPOSE_EVENT );
         try
         {
             processDispose( cacheName, requesterId );
@@ -176,7 +170,7 @@ public abstract class AbstractRemoteCacheService<K, V>
         throws IOException
     {
         ICacheElement<K, V> element = null;
-        final ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId, ICacheEventLogger.GET_EVENT );
+        final ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId, CacheEventType.GET_EVENT );
         try
         {
             element = processGet( cacheName, key, requesterId );
@@ -254,7 +248,7 @@ public abstract class AbstractRemoteCacheService<K, V>
         throws IOException
     {
         final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, pattern, requesterId,
-                                                    ICacheEventLogger.GETMATCHING_EVENT );
+                                                    CacheEventType.GETMATCHING_EVENT );
         try
         {
             return processGetMatching( cacheName, pattern, requesterId );
@@ -298,7 +292,7 @@ public abstract class AbstractRemoteCacheService<K, V>
         throws IOException
     {
         final ICacheEvent<Serializable> cacheEvent = createICacheEvent( cacheName, (Serializable) keys, requesterId,
-                                                    ICacheEventLogger.GETMULTIPLE_EVENT );
+                                                    CacheEventType.GETMULTIPLE_EVENT );
         try
         {
             return processGetMultiple( cacheName, keys, requesterId );
@@ -309,34 +303,6 @@ public abstract class AbstractRemoteCacheService<K, V>
         }
     }
 
-    /**
-     * Logs an event if an event logger is configured.
-     *
-     * @param source
-     * @param eventName
-     * @param optionalDetails
-     */
-    protected void logApplicationEvent( final String source, final String eventName, final String optionalDetails )
-    {
-        if ( cacheEventLogger != null )
-        {
-            cacheEventLogger.logApplicationEvent( source, eventName, optionalDetails );
-        }
-    }
-
-    /**
-     * Logs an event if an event logger is configured.
-     *
-     * @param cacheEvent
-     */
-    protected <T> void logICacheEvent( final ICacheEvent<T> cacheEvent )
-    {
-        if ( cacheEventLogger != null )
-        {
-            cacheEventLogger.logICacheEvent( cacheEvent );
-        }
-    }
-
     /**
      * Log some details.
      *
@@ -346,11 +312,10 @@ public abstract class AbstractRemoteCacheService<K, V>
     {
         if ( log.isInfoEnabled() )
         {
-            // not thread safe, but it doesn't have to be accurate
-            puts++;
-            if ( puts % logInterval == 0 )
+            int p = puts.incrementAndGet();
+            if ( p % logInterval == 0 )
             {
-                log.info( "puts = {0}", puts );
+                log.info( "puts = {0}", p );
             }
         }
 
@@ -477,7 +442,7 @@ public abstract class AbstractRemoteCacheService<K, V>
     public void remove( final String cacheName, final K key, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId, ICacheEventLogger.REMOVE_EVENT );
+        final ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId, CacheEventType.REMOVE_EVENT );
         try
         {
             processRemove( cacheName, key, requesterId );
@@ -514,7 +479,7 @@ public abstract class AbstractRemoteCacheService<K, V>
     public void removeAll( final String cacheName, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "all", requesterId, ICacheEventLogger.REMOVEALL_EVENT );
+        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "all", requesterId, CacheEventType.REMOVEALL_EVENT );
         try
         {
             processRemoveAll( cacheName, requesterId );
@@ -525,16 +490,6 @@ public abstract class AbstractRemoteCacheService<K, V>
         }
     }
 
-    /**
-     * Allows it to be injected.
-     *
-     * @param cacheEventLogger
-     */
-    public void setCacheEventLogger( final ICacheEventLogger cacheEventLogger )
-    {
-        this.cacheEventLogger = cacheEventLogger;
-    }
-
     /**
      * @param cacheManager the cacheManager to set
      */
@@ -573,7 +528,7 @@ public abstract class AbstractRemoteCacheService<K, V>
     public void update( final ICacheElement<K, V> item, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<ICacheElement<K, V>> cacheEvent = createICacheEvent( item, requesterId, ICacheEventLogger.UPDATE_EVENT );
+        final ICacheEvent<ICacheElement<K, V>> cacheEvent = createICacheEvent( item, requesterId, CacheEventType.UPDATE_EVENT );
         try
         {
             logUpdateInfo( item );
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheService.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheService.java
index 639c62fb..ebb6fb2f 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheService.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheService.java
@@ -257,4 +257,13 @@ public class RemoteHttpCacheService<K, V>
     {
         //nothing.
     }
+
+    /**
+     * @return the RemoteHttpCacheServerAttributes
+     */
+    @Override
+    public RemoteHttpCacheServerAttributes getAuxiliaryCacheAttributes()
+    {
+        return remoteHttpCacheServerAttributes;
+    }
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServer.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServer.java
index 317aec9c..0266afa7 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServer.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServer.java
@@ -34,6 +34,7 @@ import java.util.Properties;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.atomic.AtomicLongArray;
 
 import org.apache.commons.jcs4.access.exception.CacheException;
 import org.apache.commons.jcs4.auxiliary.remote.behavior.IRemoteCacheListener;
@@ -50,6 +51,7 @@ import org.apache.commons.jcs4.engine.control.CompositeCacheManager;
 import org.apache.commons.jcs4.engine.logging.CacheEvent;
 import org.apache.commons.jcs4.engine.logging.behavior.ICacheEvent;
 import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 import org.apache.commons.jcs4.engine.stats.behavior.ICacheStats;
 import org.apache.commons.jcs4.log.Log;
 import org.apache.commons.jcs4.utils.timing.ElapsedTimer;
@@ -133,7 +135,7 @@ public class RemoteCacheServer<K, V>
     private final ConcurrentMap<Long, String> idIPMap = new ConcurrentHashMap<>();
 
     /** Used to get the next listener id. */
-    private final int[] listenerId = new int[1];
+    private final AtomicLongArray listenerId = new AtomicLongArray(1);
 
     /** Configuration settings. */
     // package protected for access by unit test code
@@ -253,14 +255,16 @@ public class RemoteCacheServer<K, V>
                     // in case it needs synchronization
                     final String message = "Adding vm listener under new id = [" + listenerIdB + "], listenerAddress ["
                         + listenerAddress + "]";
-                    logApplicationEvent( "RemoteCacheServer", "addCacheListener", message );
+                    logApplicationEvent( "RemoteCacheServer",
+                            CacheEventType.ADDCACHELISTENER_EVENT, message );
                     log.info( message );
                 }
                 else
                 {
                     final String message = "Adding listener under existing id = [" + id + "], listenerAddress ["
                         + listenerAddress + "]";
-                    logApplicationEvent( "RemoteCacheServer", "addCacheListener", message );
+                    logApplicationEvent( "RemoteCacheServer",
+                            CacheEventType.ADDCACHELISTENER_EVENT, message );
                     log.info( message );
                     // should confirm the host is the same as we have on
                     // record, just in case a client has made a mistake.
@@ -280,8 +284,8 @@ public class RemoteCacheServer<K, V>
 
                 if ( cacheEventLogger != null )
                 {
-                    cacheEventLogger.logError( "RemoteCacheServer", "addCacheListener", message + " - "
-                        + ioe.getMessage() );
+                    cacheEventLogger.logError( "RemoteCacheServer",
+                            CacheEventType.ADDCACHELISTENER_EVENT, message + " - " + ioe.getMessage() );
                 }
             }
 
@@ -300,18 +304,18 @@ public class RemoteCacheServer<K, V>
      *
      * @param item
      * @param requesterId
-     * @param eventName
+     * @param eventType
      * @return ICacheEvent
      */
-    private ICacheEvent<ICacheElement<K, V>> createICacheEvent( final ICacheElement<K, V> item, final long requesterId, final String eventName )
+    private ICacheEvent<ICacheElement<K, V>> createICacheEvent( final ICacheElement<K, V> item, final long requesterId, final CacheEventType eventType)
     {
         if ( cacheEventLogger == null )
         {
             return new CacheEvent<>();
         }
         final String ipAddress = getExtraInfoForRequesterId( requesterId );
-        return cacheEventLogger
-            .createICacheEvent( "RemoteCacheServer", item.cacheName(), eventName, ipAddress, item );
+        return cacheEventLogger.createICacheEvent( "RemoteCacheServer", item.cacheName(),
+                eventType, ipAddress, item );
     }
 
     /**
@@ -320,17 +324,18 @@ public class RemoteCacheServer<K, V>
      * @param cacheName
      * @param key
      * @param requesterId
-     * @param eventName
+     * @param eventType
      * @return ICacheEvent
      */
-    private <T> ICacheEvent<T> createICacheEvent( final String cacheName, final T key, final long requesterId, final String eventName )
+    private <T> ICacheEvent<T> createICacheEvent( final String cacheName, final T key, final long requesterId, final CacheEventType eventType )
     {
         if ( cacheEventLogger == null )
         {
             return new CacheEvent<>();
         }
         final String ipAddress = getExtraInfoForRequesterId( requesterId );
-        return cacheEventLogger.createICacheEvent( "RemoteCacheServer", cacheName, eventName, ipAddress, key );
+        return cacheEventLogger.createICacheEvent( "RemoteCacheServer", cacheName, eventType,
+                ipAddress, key );
     }
 
     /**
@@ -356,7 +361,8 @@ public class RemoteCacheServer<K, V>
     public void dispose( final String cacheName, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "none", requesterId, ICacheEventLogger.DISPOSE_EVENT );
+        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "none",
+                requesterId, CacheEventType.DISPOSE_EVENT );
         try
         {
             processDispose( cacheName, requesterId );
@@ -401,7 +407,8 @@ public class RemoteCacheServer<K, V>
         throws IOException
     {
         ICacheElement<K, V> element = null;
-        final ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId, ICacheEventLogger.GET_EVENT );
+        final ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId,
+                CacheEventType.GET_EVENT );
         try
         {
             element = processGet( cacheName, key, requesterId );
@@ -570,8 +577,8 @@ public class RemoteCacheServer<K, V>
     public Map<K, ICacheElement<K, V>> getMatching( final String cacheName, final String pattern, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, pattern, requesterId,
-                                                    ICacheEventLogger.GETMATCHING_EVENT );
+        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, pattern,
+                requesterId, CacheEventType.GETMATCHING_EVENT );
         try
         {
             return processGetMatching( cacheName, pattern, requesterId );
@@ -653,8 +660,8 @@ public class RemoteCacheServer<K, V>
     public Map<K, ICacheElement<K, V>> getMultiple( final String cacheName, final Set<K> keys, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<Serializable> cacheEvent = createICacheEvent( cacheName, (Serializable) keys, requesterId,
-                                                    ICacheEventLogger.GETMULTIPLE_EVENT );
+        final ICacheEvent<Serializable> cacheEvent = createICacheEvent( cacheName,
+                (Serializable) keys, requesterId, CacheEventType.GETMULTIPLE_EVENT );
         try
         {
             return processGetMultiple( cacheName, keys, requesterId );
@@ -786,14 +793,14 @@ public class RemoteCacheServer<K, V>
      * Logs an event if an event logger is configured.
      *
      * @param source
-     * @param eventName
+     * @param eventType
      * @param optionalDetails
      */
-    protected void logApplicationEvent( final String source, final String eventName, final String optionalDetails )
+    protected void logApplicationEvent( final String source, final CacheEventType eventType, final String optionalDetails )
     {
         if ( cacheEventLogger != null )
         {
-            cacheEventLogger.logApplicationEvent( source, eventName, optionalDetails );
+            cacheEventLogger.logApplicationEvent( source, eventType, optionalDetails );
         }
     }
 
@@ -836,28 +843,14 @@ public class RemoteCacheServer<K, V>
      */
     private long nextListenerId()
     {
-        long id = 0;
-        if ( listenerId[0] == Integer.MAX_VALUE )
+        if (listenerId.compareAndSet(0, Long.MAX_VALUE, 0))
         {
-            synchronized ( listenerId )
-            {
-                id = listenerId[0];
-                listenerId[0] = 0;
-                // TODO: record & check if the generated id is currently being
-                // used by a valid listener. Currently if the id wraps after
-                // Long.MAX_VALUE,
-                // we just assume it won't collide with an existing listener who
-                // is live.
-            }
+            return listenerId.get(0);
         }
         else
         {
-            synchronized ( listenerId )
-            {
-                id = ++listenerId[0];
-            }
+            return listenerId.incrementAndGet(0);
         }
-        return id;
     }
 
     /**
@@ -956,8 +949,8 @@ public class RemoteCacheServer<K, V>
 
             if ( cacheEventLogger != null )
             {
-                cacheEventLogger.logError( "RemoteCacheServer", ICacheEventLogger.GETMATCHING_EVENT, e.getMessage()
-                    + cacheName + " pattern: " + pattern );
+                cacheEventLogger.logError( "RemoteCacheServer", CacheEventType.GETMATCHING_EVENT,
+                        e.getMessage() + cacheName + " pattern: " + pattern );
             }
         }
 
@@ -1182,8 +1175,8 @@ public class RemoteCacheServer<K, V>
         {
             if ( cacheEventLogger != null )
             {
-                cacheEventLogger.logError( "RemoteCacheServer", ICacheEventLogger.UPDATE_EVENT, e.getMessage()
-                    + " REGION: " + item.cacheName() + " ITEM: " + item );
+                cacheEventLogger.logError( "RemoteCacheServer", CacheEventType.UPDATE_EVENT,
+                        e.getMessage() + " REGION: " + item.cacheName() + " ITEM: " + item );
             }
 
             log.error( "Trouble in Update. requesterId [{0}]", requesterId, e );
@@ -1258,7 +1251,8 @@ public class RemoteCacheServer<K, V>
     public void remove( final String cacheName, final K key, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId, ICacheEventLogger.REMOVE_EVENT );
+        final ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId,
+                CacheEventType.REMOVE_EVENT );
         try
         {
             processRemove( cacheName, key, requesterId );
@@ -1295,7 +1289,8 @@ public class RemoteCacheServer<K, V>
     public void removeAll( final String cacheName, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "all", requesterId, ICacheEventLogger.REMOVEALL_EVENT );
+        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "all", requesterId,
+                CacheEventType.REMOVEALL_EVENT );
         try
         {
             processRemoveAll( cacheName, requesterId );
@@ -1349,7 +1344,8 @@ public class RemoteCacheServer<K, V>
     public void removeCacheListener( final String cacheName, final long listenerId )
     {
         final String message = "Removing listener for cache region = [" + cacheName + "] and listenerId [" + listenerId + "]";
-        logApplicationEvent( "RemoteCacheServer", "removeCacheListener", message );
+        logApplicationEvent( "RemoteCacheServer", CacheEventType.REMOVECACHELISTENER_EVENT,
+                message );
         log.info( message );
 
         final boolean isClusterListener = isRequestFromCluster( listenerId );
@@ -1429,7 +1425,7 @@ public class RemoteCacheServer<K, V>
         {
             for (final String cacheName : cacheListenersMap.keySet())
             {
-                for (int i = 0; i <= listenerId[0]; i++)
+                for (long i = 0; i <= listenerId.get(0); i++)
                 {
                     removeCacheListener( cacheName, i );
                 }
@@ -1477,7 +1473,8 @@ public class RemoteCacheServer<K, V>
     public void update( final ICacheElement<K, V> item, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<ICacheElement<K, V>> cacheEvent = createICacheEvent( item, requesterId, ICacheEventLogger.UPDATE_EVENT );
+        final ICacheEvent<ICacheElement<K, V>> cacheEvent = createICacheEvent( item,
+                requesterId, CacheEventType.UPDATE_EVENT );
         try
         {
             processUpdate( item, requesterId );
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServerFactory.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServerFactory.java
index 65dd896d..e68b1269 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServerFactory.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServerFactory.java
@@ -40,6 +40,7 @@ import org.apache.commons.jcs4.auxiliary.remote.RemoteUtils;
 import org.apache.commons.jcs4.auxiliary.remote.behavior.IRemoteCacheConstants;
 import org.apache.commons.jcs4.engine.behavior.ICacheServiceAdmin;
 import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 import org.apache.commons.jcs4.log.Log;
 import org.apache.commons.jcs4.utils.config.OptionConverter;
 import org.apache.commons.jcs4.utils.config.PropertySetter;
@@ -167,7 +168,8 @@ public class RemoteCacheServerFactory
             final String message = "RMI registry looks fine.  Found [" + obj + "] in registry [" + namingURL + "]";
             if ( cacheEventLogger != null )
             {
-                cacheEventLogger.logApplicationEvent( "RegistryKeepAliveRunner", "Naming.lookup", message );
+                cacheEventLogger.logApplicationEvent( "RegistryKeepAliveRunner",
+                        CacheEventType.NAMINGLOOKUP_EVENT, message );
             }
             log.debug( message );
         }
@@ -179,7 +181,8 @@ public class RemoteCacheServerFactory
             log.error( message, ex );
             if ( cacheEventLogger != null )
             {
-                cacheEventLogger.logError( "RegistryKeepAliveRunner", "Naming.lookup", message + ":" + ex.getMessage() );
+                cacheEventLogger.logError( "RegistryKeepAliveRunner",
+                        CacheEventType.NAMINGLOOKUP_EVENT, message + ":" + ex.getMessage() );
             }
 
             registry = RemoteUtils.createRegistry(registryPort);
@@ -188,12 +191,14 @@ public class RemoteCacheServerFactory
             {
                 if (registry != null)
                 {
-                    cacheEventLogger.logApplicationEvent( "RegistryKeepAliveRunner", "createRegistry",
+                    cacheEventLogger.logApplicationEvent( "RegistryKeepAliveRunner",
+                            CacheEventType.CREATEREGISTRY_EVENT,
                             "Successfully created registry [" + serviceName + "]." );
                 }
                 else
                 {
-                    cacheEventLogger.logError( "RegistryKeepAliveRunner", "createRegistry",
+                    cacheEventLogger.logError( "RegistryKeepAliveRunner",
+                            CacheEventType.CREATEREGISTRY_EVENT,
                             "Could not start registry [" + serviceName + "]." );
                 }
             }
@@ -206,7 +211,8 @@ public class RemoteCacheServerFactory
             final String message = "Successfully rebound server to registry [" + serviceName + "].";
             if ( cacheEventLogger != null )
             {
-                cacheEventLogger.logApplicationEvent( "RegistryKeepAliveRunner", "registerServer", message );
+                cacheEventLogger.logApplicationEvent( "RegistryKeepAliveRunner",
+                        CacheEventType.REGISTERSERVER_EVENT, message );
             }
             log.info( message );
         }
@@ -216,7 +222,8 @@ public class RemoteCacheServerFactory
             log.error( message, e );
             if ( cacheEventLogger != null )
             {
-                cacheEventLogger.logError( "RegistryKeepAliveRunner", "registerServer", message + ":"
+                cacheEventLogger.logError( "RegistryKeepAliveRunner",
+                        CacheEventType.REGISTERSERVER_EVENT, message + ":"
                     + e.getMessage() );
             }
         }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/CacheEvent.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/CacheEvent.java
index ae66ca12..63156df4 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/CacheEvent.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/CacheEvent.java
@@ -22,130 +22,53 @@ package org.apache.commons.jcs4.engine.logging;
 import java.util.Date;
 
 import org.apache.commons.jcs4.engine.logging.behavior.ICacheEvent;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 
 /** It's returned from create and passed into log. */
-public class CacheEvent<K>
-    implements ICacheEvent<K>
-{
-    /** Don't change. */
-    private static final long serialVersionUID = -5913139566421714330L;
-
-    /** The time at which this object was created. */
-    private final long createTime = System.currentTimeMillis();
-
-    /** The auxiliary or other source of the event. */
-    private String source;
-
-    /** The cache region */
-    private String region;
-
-    /** The event name: update, get, remove, etc. */
-    private String eventName;
-
-    /** Disk location, ip, etc. */
-    private String optionalDetails;
-
-    /** The key that was put or retrieved. */
-    private K key;
-
-    /**
-     * The time at which this object was created.
-     *
-     * @return the createTime
-     */
-    public long getCreateTime()
-    {
-        return createTime;
-    }
-
-    /**
-     * @return the eventName
-     */
-    @Override
-	public String getEventName()
-    {
-        return eventName;
-    }
-
-    /**
-     * @return the key
-     */
-    @Override
-	public K getKey()
-    {
-        return key;
-    }
-
-    /**
-     * @return the optionalDetails
-     */
-    @Override
-	public String getOptionalDetails()
-    {
-        return optionalDetails;
-    }
+public record CacheEvent<K>(
+        /** The time at which this object was created. */
+        long createTime,
 
-    /**
-     * @return the region
-     */
-    @Override
-	public String getRegion()
-    {
-        return region;
-    }
+        /** The auxiliary or other source of the event. */
+        String source,
 
-    /**
-     * @return the source
-     */
-    @Override
-	public String getSource()
-    {
-        return source;
-    }
+        /** The cache region */
+        String region,
 
-    /**
-     * @param eventName the eventName to set
-     */
-    @Override
-	public void setEventName( final String eventName )
-    {
-        this.eventName = eventName;
-    }
+        /** The event type: update, get, remove, etc. */
+        CacheEventType eventType,
 
-    /**
-     * @param key the key to set
-     */
-    @Override
-	public void setKey( final K key )
-    {
-        this.key = key;
-    }
+        /** Disk location, ip, etc. */
+        String optionalDetails,
 
-    /**
-     * @param optionalDetails the optionalDetails to set
-     */
-    @Override
-	public void setOptionalDetails( final String optionalDetails )
-    {
-        this.optionalDetails = optionalDetails;
-    }
+        /** The key that was put or retrieved. */
+        K key
+) implements ICacheEvent<K>
+{
+    /** Don't change. */
+    private static final long serialVersionUID = -5913139566421714330L;
 
     /**
-     * @param region the region to set
+     * Default Constructor
      */
-    @Override
-	public void setRegion( final String region )
+    public CacheEvent()
     {
-        this.region = region;
+        this(System.currentTimeMillis(), null, null, null, null, null);
     }
 
     /**
-     * @param source the source to set
+     * Constructor
+     *
+     * @param source
+     * @param region
+     * @param eventType
+     * @param optionalDetails
+     * @param key
      */
-    @Override
-	public void setSource( final String source )
+    public CacheEvent(final String source, final String region, CacheEventType eventType,
+            String optionalDetails, K key)
     {
-        this.source = source;
+        this(System.currentTimeMillis(), source, region, eventType, optionalDetails, key);
     }
 
     /**
@@ -155,7 +78,8 @@ public class CacheEvent<K>
     public String toString()
     {
     	final StringBuilder sb = new StringBuilder();
-    	sb.append("CacheEvent: ").append(eventName).append(" Created: ").append(new Date(createTime));
+    	sb.append("CacheEvent: ").append(eventType)
+    	  .append(" Created: ").append(new Date(createTime));
     	if (source != null)
     	{
         	sb.append(" Source: ").append(source);
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/CacheEventLoggerDebugLogger.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/CacheEventLoggerDebugLogger.java
index 2dde83f4..2140a1d3 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/CacheEventLoggerDebugLogger.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/CacheEventLoggerDebugLogger.java
@@ -38,46 +38,24 @@ public class CacheEventLoggerDebugLogger
 
     /**
      * @param source
-     * @param region
-     * @param eventName
+     * @param eventType
      * @param optionalDetails
-     * @param key
-     * @return ICacheEvent
      */
     @Override
-    public <T> ICacheEvent<T> createICacheEvent( final String source, final String region, final String eventName,
-            final String optionalDetails, final T key )
+    public void logApplicationEvent( final String source, final CacheEventType eventType, final String optionalDetails )
     {
-        final ICacheEvent<T> event = new CacheEvent<>();
-        event.setSource( source );
-        event.setRegion( region );
-        event.setEventName( eventName );
-        event.setOptionalDetails( optionalDetails );
-        event.setKey( key );
-
-        return event;
-    }
-
-    /**
-     * @param source
-     * @param eventName
-     * @param optionalDetails
-     */
-    @Override
-    public void logApplicationEvent( final String source, final String eventName, final String optionalDetails )
-    {
-        log.debug( "{0} | {1} | {2}", source, eventName, optionalDetails );
+        log.debug( "{0} | {1} | {2}", source, eventType, optionalDetails );
     }
 
     /**
      * @param source
-     * @param eventName
+     * @param eventType
      * @param errorMessage
      */
     @Override
-    public void logError( final String source, final String eventName, final String errorMessage )
+    public void logError( final String source, final CacheEventType eventType, final String errorMessage )
     {
-        log.debug( "{0} | {1} | {2}", source, eventName, errorMessage );
+        log.debug( "{0} | {1} | {2}", source, eventType, errorMessage );
     }
 
     /**
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/behavior/ICacheEvent.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/behavior/ICacheEvent.java
index 2148f6b4..b958f6e4 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/behavior/ICacheEvent.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/behavior/ICacheEvent.java
@@ -21,6 +21,8 @@ package org.apache.commons.jcs4.engine.logging.behavior;
 
 import java.io.Serializable;
 
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
+
 /** Defines the common fields required by a cache event. */
 public interface ICacheEvent<K>
     extends Serializable
@@ -28,50 +30,25 @@ public interface ICacheEvent<K>
     /**
      * @return the eventName
      */
-    String getEventName();
+    CacheEventType eventType();
 
     /**
      * @return the key
      */
-    K getKey();
+    K key();
 
     /**
      * @return the optionalDetails
      */
-    String getOptionalDetails();
+    String optionalDetails();
 
     /**
      * @return the region
      */
-    String getRegion();
+    String region();
 
     /**
      * @return the source
      */
-    String getSource();
-
-    /**
-     * @param eventName the eventName to set
-     */
-    void setEventName( String eventName );
-
-    /**
-     * @param key the key to set
-     */
-    void setKey( K key );
-
-    /**
-     * @param optionalDetails the optionalDetails to set
-     */
-    void setOptionalDetails( String optionalDetails );
-
-    /**
-     * @param region the region to set
-     */
-    void setRegion( String region );
-
-    /**
-     * @param source the source to set
-     */
-    void setSource( String source );
+    String source();
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/behavior/ICacheEventLogger.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/behavior/ICacheEventLogger.java
index 303fe711..09731240 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/behavior/ICacheEventLogger.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/behavior/ICacheEventLogger.java
@@ -1,5 +1,7 @@
 package org.apache.commons.jcs4.engine.logging.behavior;
 
+import org.apache.commons.jcs4.engine.logging.CacheEvent;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -28,65 +30,105 @@ package org.apache.commons.jcs4.engine.logging.behavior;
  */
 public interface ICacheEventLogger
 {
-	// TODO: Use enum
-    /** ICache update */
-    String UPDATE_EVENT = "update";
+    public enum CacheEventType
+    {
+        /** ICache update */
+        UPDATE_EVENT("update"),
+
+        /** ICache get */
+        GET_EVENT("get"),
+
+        /** ICache getMultiple */
+        GETMULTIPLE_EVENT("getMultiple"),
+
+        /** ICache getMatching */
+        GETMATCHING_EVENT("getMatching"),
+
+        /** ICache remove */
+        REMOVE_EVENT("remove"),
+
+        /** ICache removeAll */
+        REMOVEALL_EVENT("removeAll"),
+
+        /** ICache dispose */
+        DISPOSE_EVENT("dispose"),
+
+        /** RemoteAuxiliaryCache fixCache */
+        FIXCACHE_EVENT("fixCache"),
+
+        /** JDBCDiskCache deleteExpired */
+        DELETEEXPIRED_EVENT("deleteExpired"),
+
+        /** RemoteCacheServer addCacheListener */
+        ADDCACHELISTENER_EVENT("addCacheListener"),
+
+        /** RemoteCacheServer removeCacheListener */
+        REMOVECACHELISTENER_EVENT("removeCacheListener"),
+
+        /** RemoteCacheNoWait InitiatedFailover */
+        INITIATEDFAILOVER_EVENT("InitiatedFailover"),
+
+        /** RemoteCacheNoWait RestoredPrimary */
+        RESTOREDPRIMARY_EVENT("RestoredPrimary"),
 
-    /** ICache get */
-    String GET_EVENT = "get";
+        /** RemoteCacheServerFactory Naming.lookup */
+        NAMINGLOOKUP_EVENT("Naming.lookup"),
 
-    /** ICache getMultiple */
-    String GETMULTIPLE_EVENT = "getMultiple";
+        /** RemoteCacheServerFactory createRegistry */
+        CREATEREGISTRY_EVENT("createRegistry"),
 
-    /** ICache getMatching */
-    String GETMATCHING_EVENT = "getMatching";
+        /** RemoteCacheServerFactory registerServer */
+        REGISTERSERVER_EVENT("registerServer"),
 
-    /** ICache remove */
-    String REMOVE_EVENT = "remove";
+        /** ICache enqueue. The time in the queue. */
+        ENQUEUE_EVENT("enqueue");
 
-    /** ICache removeAll */
-    String REMOVEALL_EVENT = "removeAll";
+        public final String label;
 
-    /** ICache dispose */
-    String DISPOSE_EVENT = "dispose";
+        private CacheEventType(String label)
+        {
+            this.label = label;
+        }
+    }
 
-    /** ICache enqueue. The time in the queue. */
-    //String ENQUEUE_EVENT = "enqueue";
     /**
      * Creates an event.
      *
-     * @param source   e.g. RemoteCacheServer
-     * @param region   the name of the region
-     * @param eventName   e.g. update, get, put, remove
-     * @param optionalDetails   any extra message
-     * @param key   the cache key
+     * @param source e.g. RemoteCacheServer
+     * @param region the name of the region
+     * @param eventType e.g. update, get, put, remove
+     * @param optionalDetails any extra message
+     * @param key the cache key
      * @return ICacheEvent
      */
-    <T> ICacheEvent<T> createICacheEvent( String source, String region,
-            String eventName, String optionalDetails, T key );
+    default <T> ICacheEvent<T> createICacheEvent( String source, String region,
+            CacheEventType eventType, String optionalDetails, T key )
+    {
+        return new CacheEvent<>(source, region, eventType, optionalDetails, key);
+    }
 
     /**
      * Logs an event. These are internal application events that do not correspond to ICache calls.
      *
-     * @param source   e.g. RemoteCacheServer
-     * @param eventName   e.g. update, get, put, remove
-     * @param optionalDetails   any extra message
+     * @param source e.g. RemoteCacheServer
+     * @param eventType e.g. update, get, put, remove
+     * @param optionalDetails any extra message
      */
-    void logApplicationEvent( String source, String eventName, String optionalDetails );
+    default void logApplicationEvent( String source, CacheEventType eventType, String optionalDetails ) {}
 
     /**
      * Logs an error.
      *
-     * @param source   e.g. RemoteCacheServer
-     * @param eventName   e.g. update, get, put, remove
-     * @param errorMessage   any error message
+     * @param source e.g. RemoteCacheServer
+     * @param eventType e.g. update, get, put, remove
+     * @param errorMessage any error message
      */
-    void logError( String source, String eventName, String errorMessage );
+    default void logError( String source, CacheEventType eventType, String errorMessage ) {}
 
     /**
      * Logs an event.
      *
      * @param event   the event created in createICacheEvent
      */
-    <T> void logICacheEvent( ICacheEvent<T> event );
+    default <T> void logICacheEvent( ICacheEvent<T> event ) {}
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/io/ObjectInputStreamClassLoaderAware.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/io/ObjectInputStreamClassLoaderAware.java
index 00bef68d..6a9f37f3 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/io/ObjectInputStreamClassLoaderAware.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/io/ObjectInputStreamClassLoaderAware.java
@@ -57,6 +57,7 @@ public class ObjectInputStreamClassLoaderAware extends ObjectInputStream
         return Class.forName(desc.getName(), false, classLoader);
     }
 
+    @SuppressWarnings("deprecation")
     @Override
     protected Class<?> resolveProxyClass(final String[] interfaces) throws IOException, ClassNotFoundException
     {
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/AuxiliaryCacheConfiguratorUnitTest.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/AuxiliaryCacheConfiguratorUnitTest.java
index d9f90c24..5914476f 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/AuxiliaryCacheConfiguratorUnitTest.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/AuxiliaryCacheConfiguratorUnitTest.java
@@ -28,7 +28,6 @@ import java.util.Properties;
 
 import org.apache.commons.jcs4.engine.behavior.IElementSerializer;
 import org.apache.commons.jcs4.engine.control.MockElementSerializer;
-import org.apache.commons.jcs4.engine.logging.MockCacheEventLogger;
 import org.apache.commons.jcs4.utils.serialization.StandardSerializer;
 import org.junit.jupiter.api.Test;
 
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockAuxiliaryCache.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockAuxiliaryCache.java
index aaf9602d..42f188c9 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockAuxiliaryCache.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockAuxiliaryCache.java
@@ -94,13 +94,6 @@ public class MockAuxiliaryCache<K, V>
         return cacheType;
     }
 
-    /** @return null */
-    @Override
-    public String getEventLoggingExtraInfo()
-    {
-        return null;
-    }
-
     /**
      * Return the keys in this cache.
      *
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockCacheEventLogger.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockCacheEventLogger.java
index ce56c3a8..75709f37 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockCacheEventLogger.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockCacheEventLogger.java
@@ -48,40 +48,43 @@ public class MockCacheEventLogger
     /** List of messages */
     public List<String> errorMessages = new ArrayList<>();
 
+    /** for configurator test */
+    private String testProperty;
+
     /**
      * @param source
      * @param region
-     * @param eventName
+     * @param eventType
      * @param optionalDetails
      * @param key
      * @return ICacheEvent
      */
     @Override
     public <T> ICacheEvent<T> createICacheEvent( final String source, final String region,
-            final String eventName, final String optionalDetails, final T key )
+            final CacheEventType eventType, final String optionalDetails, final T key )
     {
         startICacheEventCalls++;
-        return new CacheEvent<>();
+        return new CacheEvent<>(source, region, eventType, optionalDetails, key);
     }
 
     /**
      * @param source
-     * @param eventName
+     * @param eventType
      * @param optionalDetails
      */
     @Override
-    public void logApplicationEvent( final String source, final String eventName, final String optionalDetails )
+    public void logApplicationEvent( final String source, final CacheEventType eventType, final String optionalDetails )
     {
         applicationEventCalls++;
     }
 
     /**
      * @param source
-     * @param eventName
+     * @param eventType
      * @param errorMessage
      */
     @Override
-    public void logError( final String source, final String eventName, final String errorMessage )
+    public void logError( final String source, final CacheEventType eventType, final String errorMessage )
     {
         errorEventCalls++;
         errorMessages.add( errorMessage );
@@ -95,4 +98,20 @@ public class MockCacheEventLogger
     {
         endICacheEventCalls++;
     }
+
+    /**
+     * @return the testProperty
+     */
+    public String getTestProperty()
+    {
+        return testProperty;
+    }
+
+    /**
+     * @param testProperty the testProperty to set
+     */
+    public void setTestProperty(String testProperty)
+    {
+        this.testProperty = testProperty;
+    }
 }
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java
index 7f779916..da1cb77a 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java
@@ -25,11 +25,11 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.commons.jcs4.auxiliary.MockCacheEventLogger;
 import org.apache.commons.jcs4.engine.ZombieCacheServiceNonLocal;
 import org.apache.commons.jcs4.engine.behavior.IElementSerializer;
 import org.apache.commons.jcs4.engine.control.CompositeCacheManager;
 import org.apache.commons.jcs4.engine.control.MockKeyMatcher;
-import org.apache.commons.jcs4.engine.logging.MockCacheEventLogger;
 import org.apache.commons.jcs4.engine.match.behavior.IKeyMatcher;
 import org.apache.commons.jcs4.utils.discovery.DiscoveredService;
 import org.apache.commons.jcs4.utils.serialization.StandardSerializer;
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/MockRemoteCacheClient.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/MockRemoteCacheClient.java
index 5d2d7925..0f93e219 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/MockRemoteCacheClient.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/MockRemoteCacheClient.java
@@ -125,17 +125,6 @@ public class MockRemoteCacheClient<K, V>
         return CacheType.REMOTE_CACHE;
     }
 
-    /**
-     * Nothing important
-     *
-     * @return null
-     */
-    @Override
-    public String getEventLoggingExtraInfo()
-    {
-        return null;
-    }
-
     /**
      * @return null
      */
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/control/CompositeCacheConfiguratorUnitTest.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/control/CompositeCacheConfiguratorUnitTest.java
index 07db90d3..0a2e71a9 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/control/CompositeCacheConfiguratorUnitTest.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/control/CompositeCacheConfiguratorUnitTest.java
@@ -29,7 +29,7 @@ import org.apache.commons.jcs4.auxiliary.AuxiliaryCacheConfigurator;
 import org.apache.commons.jcs4.auxiliary.MockAuxiliaryCache;
 import org.apache.commons.jcs4.auxiliary.MockAuxiliaryCacheAttributes;
 import org.apache.commons.jcs4.auxiliary.MockAuxiliaryCacheFactory;
-import org.apache.commons.jcs4.engine.logging.MockCacheEventLogger;
+import org.apache.commons.jcs4.auxiliary.MockCacheEventLogger;
 import org.junit.jupiter.api.Test;
 
 /** Tests for the configurator. */
@@ -71,8 +71,8 @@ class CompositeCacheConfiguratorUnitTest
         assertEquals(MockAuxiliaryCache.class, result.getClass(), "Should have MockAuxiliaryCache.");
         assertNotNull( manager.getRegisteredAuxiliaryFactory(auxName), "Should have a factory." );
         assertEquals(MockAuxiliaryCacheFactory.class, manager.getRegisteredAuxiliaryFactory(auxName).getClass(), "Should have MockAuxiliaryCacheFactory.");
-        assertNotNull( result.getCacheEventLogger(), "Should have an event logger." );
-        assertEquals(MockCacheEventLogger.class, result.getCacheEventLogger().getClass(), "Should have a MockCacheEventLogger.");
+        assertNotNull( result.getCacheEventLogger().get(), "Should have an event logger." );
+        assertEquals(MockCacheEventLogger.class, result.getCacheEventLogger().get().getClass(), "Should have a MockCacheEventLogger.");
         assertNotNull( result.getKeyMatcher(), "Should have a key matcher." );
         assertEquals(MockKeyMatcher.class, result.getKeyMatcher().getClass(), "Should have a MockKeyMatcher.");
     }
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/control/CompositeCacheDiskUsageUnitTest.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/control/CompositeCacheDiskUsageUnitTest.java
index 37f6eb6e..e0e1d285 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/control/CompositeCacheDiskUsageUnitTest.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/control/CompositeCacheDiskUsageUnitTest.java
@@ -116,13 +116,6 @@ class CompositeCacheDiskUsageUnitTest
             return cacheType;
         }
 
-        /** @return null */
-        @Override
-        public String getEventLoggingExtraInfo()
-        {
-            return null;
-        }
-
         /**
          * @return null
          * @throws IOException
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/logging/CacheEventLoggerDebugLoggerUnitTest.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/logging/CacheEventLoggerDebugLoggerUnitTest.java
index 9d832ce9..aa68f956 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/logging/CacheEventLoggerDebugLoggerUnitTest.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/logging/CacheEventLoggerDebugLoggerUnitTest.java
@@ -25,6 +25,7 @@ import java.io.StringWriter;
 
 import org.apache.commons.jcs4.TestLogConfigurationUtil;
 import org.apache.commons.jcs4.engine.logging.behavior.ICacheEvent;
+import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEventType;
 import org.junit.jupiter.api.Test;
 
 /** Tests for the debug implementation */
@@ -39,7 +40,7 @@ class CacheEventLoggerDebugLoggerUnitTest
         final String logCategoryName = "testLogApplicationEvent_normal";
 
         final String source = "mySource";
-        final String eventName = "MyEventName";
+        final CacheEventType eventType = CacheEventType.ENQUEUE_EVENT;
         final String optionalDetails = "SomeExtraData";
 
         final StringWriter stringWriter = new StringWriter();
@@ -49,12 +50,12 @@ class CacheEventLoggerDebugLoggerUnitTest
         logger.setLogCategoryName( logCategoryName );
 
         // DO WORK
-        logger.logApplicationEvent( source, eventName, optionalDetails );
+        logger.logApplicationEvent( source, eventType, optionalDetails );
 
         // VERIFY
         final String result = stringWriter.toString();
         assertTrue( result.indexOf( source ) != -1, "An event with the source should have been logged:" + result );
-        assertTrue( result.indexOf( eventName ) != -1,
+        assertTrue( result.indexOf( eventType.toString() ) != -1,
                     "An event with the event name should have been logged:" + result );
         assertTrue( result.indexOf( optionalDetails ) != -1,
                     "An event with the optionalDetails should have been logged:" + result );
@@ -68,7 +69,7 @@ class CacheEventLoggerDebugLoggerUnitTest
         final String logCategoryName = "testLogApplicationEvent_normal";
 
         final String source = "mySource";
-        final String eventName = "MyEventName";
+        final CacheEventType eventType = CacheEventType.ENQUEUE_EVENT;
         final String errorMessage = "SomeExtraData";
 
         final StringWriter stringWriter = new StringWriter();
@@ -78,12 +79,12 @@ class CacheEventLoggerDebugLoggerUnitTest
         logger.setLogCategoryName( logCategoryName );
 
         // DO WORK
-        logger.logError( source, eventName, errorMessage );
+        logger.logError( source, eventType, errorMessage );
 
         // VERIFY
         final String result = stringWriter.toString();
         assertTrue( result.indexOf( source ) != -1, "An event with the source should have been logged:" + result );
-        assertTrue( result.indexOf( eventName ) != -1,
+        assertTrue( result.indexOf( eventType.toString() ) != -1,
                     "An event with the event name should have been logged:" + result );
         assertTrue( result.indexOf( errorMessage ) != -1,
                     "An event with the errorMessage should have been logged:" + result );
@@ -98,7 +99,7 @@ class CacheEventLoggerDebugLoggerUnitTest
 
         final String source = "mySource";
         final String region = "my region";
-        final String eventName = "MyEventName";
+        final CacheEventType eventType = CacheEventType.ENQUEUE_EVENT;
         final String optionalDetails = "SomeExtraData";
         final String key = "my key";
 
@@ -108,7 +109,7 @@ class CacheEventLoggerDebugLoggerUnitTest
         final CacheEventLoggerDebugLogger logger = new CacheEventLoggerDebugLogger();
         logger.setLogCategoryName( logCategoryName );
 
-        final ICacheEvent<String> event = logger.createICacheEvent( source, region, eventName, optionalDetails, key );
+        final ICacheEvent<String> event = logger.createICacheEvent( source, region, eventType, optionalDetails, key );
 
         // DO WORK
         logger.logICacheEvent( event );
@@ -117,8 +118,8 @@ class CacheEventLoggerDebugLoggerUnitTest
         final String result = stringWriter.toString();
         assertTrue( result.indexOf( source ) != -1, "An event with the source should have been logged:" + result );
         assertTrue( result.indexOf( region ) != -1, "An event with the region should have been logged:" + result );
-        assertTrue( result.indexOf( eventName ) != -1,
-                    "An event with the event name should have been logged:" + result );
+        assertTrue( result.indexOf( eventType.toString() ) != -1,
+                    "An event with the event type should have been logged:" + result );
         assertTrue( result.indexOf( optionalDetails ) != -1,
                     "An event with the optionalDetails should have been logged:" + result );
         assertTrue( result.indexOf( key ) != -1, "An event with the key should have been logged:" + result );
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/logging/MockCacheEventLogger.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/logging/MockCacheEventLogger.java
deleted file mode 100644
index 33840a24..00000000
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/logging/MockCacheEventLogger.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.apache.commons.jcs4.engine.logging;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.commons.jcs4.engine.logging.behavior.ICacheEvent;
-import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger;
-
-/**
- * For testing the configurator.
- */
-public class MockCacheEventLogger
-    implements ICacheEventLogger
-{
-    /** Test property */
-    private String testProperty;
-
-    /**
-     * @param source
-     * @param region
-     * @param eventName
-     * @param optionalDetails
-     * @param key
-     * @return ICacheEvent
-     */
-    @Override
-    public <T> ICacheEvent<T> createICacheEvent( final String source, final String region, final String eventName, final String optionalDetails,
-                                          final T key )
-    {
-        return new CacheEvent<>();
-    }
-
-    /**
-     * @return testProperty
-     */
-    public String getTestProperty()
-    {
-        return testProperty;
-    }
-
-    /**
-     * @param source
-     * @param eventName
-     * @param optionalDetails
-     */
-    @Override
-    public void logApplicationEvent( final String source, final String eventName, final String optionalDetails )
-    {
-        // TODO Auto-generated method stub
-    }
-
-    /**
-     * @param source
-     * @param eventName
-     * @param errorMessage
-     */
-    @Override
-    public void logError( final String source, final String eventName, final String errorMessage )
-    {
-        // TODO Auto-generated method stub
-    }
-
-    /**
-     * @param event
-     */
-    @Override
-    public <T> void logICacheEvent( final ICacheEvent<T> event )
-    {
-        // TODO Auto-generated method stub
-    }
-
-    /**
-     * @param testProperty
-     */
-    public void setTestProperty( final String testProperty )
-    {
-        this.testProperty = testProperty;
-    }
-}


(commons-jcs) 12/12: Make site build work again.

Posted by tv...@apache.org.
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 b90a23b7656ef4cb9459a17cad20a7107576d453
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Tue Feb 17 18:57:02 2026 +0100

    Make site build work again.
---
 commons-jcs4-core/src/main/java/module-info.java |  2 +-
 commons-jcs4-jcache-extras/pom.xml               | 34 +++++++++---------------
 commons-jcs4-jcache-openjpa/pom.xml              | 12 +++++++++
 commons-jcs4-jcache/pom.xml                      | 13 +++++++++
 pom.xml                                          | 18 -------------
 5 files changed, 39 insertions(+), 40 deletions(-)

diff --git a/commons-jcs4-core/src/main/java/module-info.java b/commons-jcs4-core/src/main/java/module-info.java
index 43881c5a..a6311d9d 100644
--- a/commons-jcs4-core/src/main/java/module-info.java
+++ b/commons-jcs4-core/src/main/java/module-info.java
@@ -100,7 +100,7 @@ module org.apache.commons.jcs4.core {
     requires transitive java.naming;
 
     // Optional dependencies for remote HTTP caching
-    requires static transitive jakarta.servlet;
+    requires static jakarta.servlet;
 
     // Optional dependencies for JDBC disk cache
     requires static org.apache.commons.dbcp2;
diff --git a/commons-jcs4-jcache-extras/pom.xml b/commons-jcs4-jcache-extras/pom.xml
index 8c6ce281..4d48f836 100644
--- a/commons-jcs4-jcache-extras/pom.xml
+++ b/commons-jcs4-jcache-extras/pom.xml
@@ -102,31 +102,23 @@
       </plugin>
     </plugins>
   </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <legacyMode>true</legacyMode>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
   <properties>
     <commons.module.name>org.apache.commons.jcs4.jcache.extras</commons.module.name>
     <!-- project.build.outputTimestamp is managed by Maven plugins, see https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
     <project.build.outputTimestamp>2022-01-01T00:00:00Z</project.build.outputTimestamp>
     <tomcat.version>11.0.12</tomcat.version>
   </properties>
-  <profiles>
-    <profile>
-      <id>java17</id>
-      <activation>
-        <jdk>[17,)</jdk>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-              <argLine>
-                --add-opens java.base/java.io=ALL-UNNAMED                     
-              </argLine>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
 </project>
diff --git a/commons-jcs4-jcache-openjpa/pom.xml b/commons-jcs4-jcache-openjpa/pom.xml
index af291d79..f57ff87d 100644
--- a/commons-jcs4-jcache-openjpa/pom.xml
+++ b/commons-jcs4-jcache-openjpa/pom.xml
@@ -94,6 +94,18 @@
     </plugins>
   </build>
   
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <legacyMode>true</legacyMode>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
   <properties>
     <commons.module.name>org.apache.commons.jcs4.jcache.openjpa</commons.module.name>
     <!-- project.build.outputTimestamp is managed by Maven plugins, see https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
diff --git a/commons-jcs4-jcache/pom.xml b/commons-jcs4-jcache/pom.xml
index 125dbeed..fe5c98ff 100644
--- a/commons-jcs4-jcache/pom.xml
+++ b/commons-jcs4-jcache/pom.xml
@@ -121,6 +121,19 @@
       </plugin>
     </plugins>
   </build>
+  
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <legacyMode>true</legacyMode>
+          <failOnWarnings>false</failOnWarnings>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
 
   <properties>
     <commons.module.name>org.apache.commons.jcs4.jcache</commons.module.name>
diff --git a/pom.xml b/pom.xml
index 601f27d1..e943049a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -430,7 +430,6 @@
           -->
           <inputExcludes combine.children="append">
             <inputExclude>.java-version</inputExclude>
-            <inputExclude>**/zipcodes.txt</inputExclude>
             <inputExclude>**/.gitignore</inputExclude>
             <inputExclude>**/derby.log</inputExclude>
             <inputExclude>**/META-INF/services/javax.*</inputExclude>
@@ -484,23 +483,6 @@
         </plugins>
       </build>
     </profile>
-    <profile>
-      <id>javaNinePlus</id>
-      <activation>
-        <jdk>[9,)</jdk>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-              <argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
   </profiles>
   <properties>
     <!-- Default configuration for compiler source and target JVM -->


(commons-jcs) 08/12: Add package info to jcache

Posted by tv...@apache.org.
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 b44423a4fe2b16f67ecc23cb482e634117311a09
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Tue Feb 17 14:52:31 2026 +0100

    Add package info to jcache
---
 .../commons/jcs4/jcache/cdi/package-info.java       | 21 +++++++++++++++++++++
 .../commons/jcs4/jcache/jmx/package-info.java       | 21 +++++++++++++++++++++
 .../commons/jcs4/jcache/lang/package-info.java      | 21 +++++++++++++++++++++
 .../apache/commons/jcs4/jcache/package-info.java    | 21 +++++++++++++++++++++
 .../commons/jcs4/jcache/proxy/package-info.java     | 21 +++++++++++++++++++++
 .../jcs4/jcache/serialization/package-info.java     | 21 +++++++++++++++++++++
 .../commons/jcs4/jcache/thread/package-info.java    | 21 +++++++++++++++++++++
 7 files changed, 147 insertions(+)

diff --git a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/cdi/package-info.java b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/cdi/package-info.java
new file mode 100644
index 00000000..078a4516
--- /dev/null
+++ b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/cdi/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Contains the JCS classes for Contexts and Dependency Injection.
+ */
+package org.apache.commons.jcs4.jcache.cdi;
diff --git a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/jmx/package-info.java b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/jmx/package-info.java
new file mode 100644
index 00000000..fad78e74
--- /dev/null
+++ b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/jmx/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Contains the JCache implementation classes for JMX integration
+ */
+package org.apache.commons.jcs4.jcache.jmx;
diff --git a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/package-info.java b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/package-info.java
new file mode 100644
index 00000000..fa41cdda
--- /dev/null
+++ b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Contains some classes borrowed from commons-lang
+ */
+package org.apache.commons.jcs4.jcache.lang;
diff --git a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/package-info.java b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/package-info.java
new file mode 100644
index 00000000..fae578e2
--- /dev/null
+++ b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Contains the JCache implementation classes for commons-jcs
+ */
+package org.apache.commons.jcs4.jcache;
diff --git a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/proxy/package-info.java b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/proxy/package-info.java
new file mode 100644
index 00000000..c26c7291
--- /dev/null
+++ b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/proxy/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Contains some proxy classes for JCache
+ */
+package org.apache.commons.jcs4.jcache.proxy;
diff --git a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/serialization/package-info.java b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/serialization/package-info.java
new file mode 100644
index 00000000..c98b7639
--- /dev/null
+++ b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/serialization/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Contains the JCache implementation classes for serialization
+ */
+package org.apache.commons.jcs4.jcache.serialization;
diff --git a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/thread/package-info.java b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/thread/package-info.java
new file mode 100644
index 00000000..571a8794
--- /dev/null
+++ b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/thread/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Contains the JCache implementation classes for thread handling
+ */
+package org.apache.commons.jcs4.jcache.thread;


(commons-jcs) 02/12: More records

Posted by tv...@apache.org.
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 b58165f42c9f69573d4bf0742029562a320245f4
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Mon Feb 16 16:19:47 2026 +0100

    More records
---
 .../remote/http/client/RemoteHttpCacheClient.java  |  12 +-
 .../http/client/RemoteHttpCacheDispatcher.java     |  18 +-
 .../remote/http/server/RemoteHttpCacheServlet.java |  47 +++---
 .../remote/util/RemoteCacheRequestFactory.java     |  54 ++----
 .../auxiliary/remote/value/RemoteCacheRequest.java | 183 ++++++++-------------
 .../remote/value/RemoteCacheResponse.java          |  80 +++------
 .../http/client/RemoteHttpCacheClientUnitTest.java |  25 ++-
 .../server/RemoteHttpCacheServletUnitTest.java     |   2 +-
 .../util/RemoteCacheRequestFactoryUnitTest.java    |  24 +--
 9 files changed, 172 insertions(+), 273 deletions(-)

diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheClient.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheClient.java
index c4ee4048..026645b9 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheClient.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheClient.java
@@ -133,7 +133,7 @@ public class RemoteHttpCacheClient<K, V>
 
         if ( remoteHttpCacheResponse != null)
         {
-            return remoteHttpCacheResponse.getPayload();
+            return remoteHttpCacheResponse.payload();
         }
 
         return null;
@@ -160,9 +160,9 @@ public class RemoteHttpCacheClient<K, V>
 
         final RemoteCacheResponse<Set<K>> remoteHttpCacheResponse = getRemoteDispatcher().dispatchRequest( remoteHttpCacheRequest );
 
-        if ( remoteHttpCacheResponse != null && remoteHttpCacheResponse.getPayload() != null )
+        if ( remoteHttpCacheResponse != null && remoteHttpCacheResponse.payload() != null )
         {
-            return remoteHttpCacheResponse.getPayload();
+            return remoteHttpCacheResponse.payload();
         }
 
         return Collections.emptySet();
@@ -213,7 +213,7 @@ public class RemoteHttpCacheClient<K, V>
 
         log.debug( "GetMatching [{0}] = {1}", pattern, remoteHttpCacheResponse );
 
-        return remoteHttpCacheResponse.getPayload();
+        return remoteHttpCacheResponse.payload();
     }
 
     /**
@@ -261,7 +261,7 @@ public class RemoteHttpCacheClient<K, V>
 
         log.debug( "GetMultiple [{0}] = {1}", keys, remoteHttpCacheResponse );
 
-        return remoteHttpCacheResponse.getPayload();
+        return remoteHttpCacheResponse.payload();
     }
 
     /**
@@ -318,7 +318,7 @@ public class RemoteHttpCacheClient<K, V>
 
         if ( remoteHttpCacheResponse != null )
         {
-            return remoteHttpCacheResponse.isSuccess();
+            return remoteHttpCacheResponse.success();
         }
 
         return false;
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheDispatcher.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheDispatcher.java
index 8865bdc2..f19e8400 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheDispatcher.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheDispatcher.java
@@ -149,28 +149,30 @@ public class RemoteHttpCacheDispatcher
         final RequestBuilder builder = RequestBuilder.post( url ).setCharset( DEFAULT_ENCODING );
 
         if ( getRemoteHttpCacheAttributes().isIncludeCacheNameAsParameter()
-            && remoteCacheRequest.getCacheName() != null )
+            && remoteCacheRequest.cacheName() != null )
         {
-            builder.addParameter( PARAMETER_CACHE_NAME, remoteCacheRequest.getCacheName() );
+            builder.addParameter( PARAMETER_CACHE_NAME, remoteCacheRequest.cacheName() );
         }
         if ( getRemoteHttpCacheAttributes().isIncludeKeysAndPatternsAsParameter() )
         {
             String keyValue = "";
-            switch ( remoteCacheRequest.getRequestType() )
+            switch ( remoteCacheRequest.requestType() )
             {
                 case GET:
                 case REMOVE:
+                    keyValue = remoteCacheRequest.key().toString();
+                    break;
                 case GET_KEYSET:
-                    keyValue = remoteCacheRequest.getKey().toString();
+                    keyValue = remoteCacheRequest.cacheName();
                     break;
                 case GET_MATCHING:
-                    keyValue = remoteCacheRequest.getPattern();
+                    keyValue = remoteCacheRequest.pattern();
                     break;
                 case GET_MULTIPLE:
-                    keyValue = remoteCacheRequest.getKeySet().toString();
+                    keyValue = remoteCacheRequest.keySet().toString();
                     break;
                 case UPDATE:
-                    keyValue = remoteCacheRequest.getCacheElement().key().toString();
+                    keyValue = remoteCacheRequest.cacheElement().key().toString();
                     break;
                 default:
                     break;
@@ -180,7 +182,7 @@ public class RemoteHttpCacheDispatcher
         if ( getRemoteHttpCacheAttributes().isIncludeRequestTypeasAsParameter() )
         {
             builder.addParameter( PARAMETER_REQUEST_TYPE,
-                remoteCacheRequest.getRequestType().toString() );
+                remoteCacheRequest.requestType().toString() );
         }
 
         builder.setEntity(new ByteArrayEntity( requestAsByteArray ));
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheServlet.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheServlet.java
index 18d528d5..cc7a969d 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheServlet.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheServlet.java
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.Serializable;
-import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
@@ -190,65 +189,60 @@ public class RemoteHttpCacheServlet
      */
     protected RemoteCacheResponse<Object> processRequest( final RemoteCacheRequest<Serializable, Serializable> request )
     {
-        final RemoteCacheResponse<Object> response = new RemoteCacheResponse<>();
+        RemoteCacheResponse<Object> response;
 
         if ( request == null )
         {
             final String message = "The request is null. Cannot process";
             log.warn( message );
-            response.setSuccess( false );
-            response.setErrorMessage( message );
+            response = new RemoteCacheResponse<>(false, message);
         }
         else
         {
             try
             {
-                switch ( request.getRequestType() )
+                switch ( request.requestType() )
                 {
                     case GET:
                         final ICacheElement<Serializable, Serializable> element =
-                            remoteCacheService.get( request.getCacheName(), request.getKey(), request.getRequesterId() );
-                        response.setPayload(element);
+                            remoteCacheService.get( request.cacheName(), request.key(), request.requesterId() );
+                        response = new RemoteCacheResponse<>(element);
                         break;
                     case GET_MULTIPLE:
                         final Map<Serializable, ICacheElement<Serializable, Serializable>> elementMap =
-                            remoteCacheService.getMultiple( request.getCacheName(), request.getKeySet(), request.getRequesterId() );
-                        if ( elementMap != null )
-                        {
-                            response.setPayload(new HashMap<>(elementMap));
-                        }
+                            remoteCacheService.getMultiple( request.cacheName(), request.keySet(), request.requesterId() );
+                        response = new RemoteCacheResponse<>(elementMap);
                         break;
                     case GET_MATCHING:
                         final Map<Serializable, ICacheElement<Serializable, Serializable>> elementMapMatching =
-                            remoteCacheService.getMatching( request.getCacheName(), request.getPattern(), request.getRequesterId() );
-                        if ( elementMapMatching != null )
-                        {
-                            response.setPayload(new HashMap<>(elementMapMatching));
-                        }
+                            remoteCacheService.getMatching( request.cacheName(), request.pattern(), request.requesterId() );
+                        response = new RemoteCacheResponse<>(elementMapMatching);
                         break;
                     case REMOVE:
-                        remoteCacheService.remove( request.getCacheName(), request.getKey(), request.getRequesterId() );
+                        remoteCacheService.remove( request.cacheName(), request.key(), request.requesterId() );
+                        response = new RemoteCacheResponse<>(true, "OK");
                         break;
                     case REMOVE_ALL:
-                        remoteCacheService.removeAll( request.getCacheName(), request.getRequesterId() );
+                        remoteCacheService.removeAll( request.cacheName(), request.requesterId() );
+                        response = new RemoteCacheResponse<>(true, "OK");
                         break;
                     case UPDATE:
-                        remoteCacheService.update( request.getCacheElement(), request.getRequesterId() );
+                        remoteCacheService.update( request.cacheElement(), request.requesterId() );
+                        response = new RemoteCacheResponse<>(true, "OK");
                         break;
                     case ALIVE_CHECK:
                     case DISPOSE:
-                        response.setSuccess( true );
+                        response = new RemoteCacheResponse<>(true, "OK");
                         // DO NOTHING
                         break;
                     case GET_KEYSET:
-                        final Set<Serializable> keys = remoteCacheService.getKeySet( request.getCacheName() );
-                        response.setPayload( keys );
+                        final Set<Serializable> keys = remoteCacheService.getKeySet( request.cacheName() );
+                        response = new RemoteCacheResponse<>(keys);
                         break;
                     default:
                         final String message = "Unknown event type.  Cannot process " + request;
                         log.warn( message );
-                        response.setSuccess( false );
-                        response.setErrorMessage( message );
+                        response = new RemoteCacheResponse<>(false, message);
                         break;
                 }
             }
@@ -256,8 +250,7 @@ public class RemoteHttpCacheServlet
             {
                 final String message = "Problem processing request. " + request + " Error: " + e.getMessage();
                 log.error( message, e );
-                response.setSuccess( false );
-                response.setErrorMessage( message );
+                response = new RemoteCacheResponse<>(false, message);
             }
         }
 
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/util/RemoteCacheRequestFactory.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/util/RemoteCacheRequestFactory.java
index 02490fb8..97d5bce3 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/util/RemoteCacheRequestFactory.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/util/RemoteCacheRequestFactory.java
@@ -44,7 +44,7 @@ public class RemoteCacheRequestFactory
     public static <K, V> RemoteCacheRequest<K, V> createAliveCheckRequest( final long requesterId )
     {
 
-        return createRequest(null, RemoteRequestType.ALIVE_CHECK, requesterId);
+        return new RemoteCacheRequest<>(null, RemoteRequestType.ALIVE_CHECK, requesterId);
     }
 
     /**
@@ -57,7 +57,7 @@ public class RemoteCacheRequestFactory
     public static <K, V> RemoteCacheRequest<K, V> createDisposeRequest( final String cacheName, final long requesterId )
     {
 
-        return createRequest(cacheName, RemoteRequestType.DISPOSE, requesterId);
+        return new RemoteCacheRequest<>(cacheName, RemoteRequestType.DISPOSE, requesterId);
     }
 
     /**
@@ -69,8 +69,8 @@ public class RemoteCacheRequestFactory
      */
     public static RemoteCacheRequest<String, String> createGetKeySetRequest( final String cacheName, final long requesterId )
     {
-        final RemoteCacheRequest<String, String> request = createRequest(cacheName, RemoteRequestType.GET_KEYSET, requesterId);
-        request.setKey( cacheName );
+        final RemoteCacheRequest<String, String> request =
+                new RemoteCacheRequest<>(cacheName, RemoteRequestType.GET_KEYSET, requesterId);
 
         return request;
     }
@@ -85,8 +85,8 @@ public class RemoteCacheRequestFactory
      */
     public static <K, V> RemoteCacheRequest<K, V> createGetMatchingRequest( final String cacheName, final String pattern, final long requesterId )
     {
-        final RemoteCacheRequest<K, V> request = createRequest(cacheName, RemoteRequestType.GET_MATCHING, requesterId);
-        request.setPattern( pattern );
+        final RemoteCacheRequest<K, V> request = new RemoteCacheRequest<>(cacheName,
+                RemoteRequestType.GET_MATCHING, requesterId, pattern);
 
         return request;
     }
@@ -101,8 +101,8 @@ public class RemoteCacheRequestFactory
      */
     public static <K, V> RemoteCacheRequest<K, V> createGetMultipleRequest( final String cacheName, final Set<K> keys, final long requesterId )
     {
-        final RemoteCacheRequest<K, V> request = createRequest(cacheName, RemoteRequestType.GET_MULTIPLE, requesterId);
-        request.setKeySet(keys);
+        final RemoteCacheRequest<K, V> request = new RemoteCacheRequest<>(cacheName,
+                RemoteRequestType.GET_MULTIPLE, requesterId, keys);
 
         return request;
     }
@@ -117,8 +117,8 @@ public class RemoteCacheRequestFactory
      */
     public static <K, V> RemoteCacheRequest<K, V> createGetRequest( final String cacheName, final K key, final long requesterId )
     {
-        final RemoteCacheRequest<K, V> request = createRequest(cacheName, RemoteRequestType.GET, requesterId);
-        request.setKey( key );
+        final RemoteCacheRequest<K, V> request = new RemoteCacheRequest<>(cacheName,
+                RemoteRequestType.GET, requesterId, key);
 
         return request;
     }
@@ -132,8 +132,7 @@ public class RemoteCacheRequestFactory
      */
     public static <K, V> RemoteCacheRequest<K, V> createRemoveAllRequest( final String cacheName, final long requesterId )
     {
-
-        return createRequest(cacheName, RemoteRequestType.REMOVE_ALL, requesterId);
+        return new RemoteCacheRequest<>(cacheName, RemoteRequestType.REMOVE_ALL, requesterId);
     }
 
     /**
@@ -146,27 +145,8 @@ public class RemoteCacheRequestFactory
      */
     public static <K, V> RemoteCacheRequest<K, V> createRemoveRequest( final String cacheName, final K key, final long requesterId )
     {
-        final RemoteCacheRequest<K, V> request = createRequest(cacheName, RemoteRequestType.REMOVE, requesterId);
-        request.setKey( key );
-
-        return request;
-    }
-
-    /**
-     * Create generic request
-     * @param cacheName cache name
-     * @param requestType type of request
-     * @param requesterId id of requester
-     * @return the request
-     */
-    private static <K, V> RemoteCacheRequest<K, V> createRequest(final String cacheName, final RemoteRequestType requestType, final long requesterId)
-    {
-        final RemoteCacheRequest<K, V> request = new RemoteCacheRequest<>();
-        request.setCacheName( cacheName );
-        request.setRequestType( requestType );
-        request.setRequesterId( requesterId );
-
-        log.debug( "Created: {0}", request );
+        final RemoteCacheRequest<K, V> request = new RemoteCacheRequest<>(cacheName,
+                RemoteRequestType.REMOVE, requesterId, key);
 
         return request;
     }
@@ -180,15 +160,15 @@ public class RemoteCacheRequestFactory
      */
     public static <K, V> RemoteCacheRequest<K, V> createUpdateRequest( final ICacheElement<K, V> cacheElement, final long requesterId )
     {
-        final RemoteCacheRequest<K, V> request = createRequest(null, RemoteRequestType.UPDATE, requesterId);
+        final RemoteCacheRequest<K, V> request;
         if ( cacheElement != null )
         {
-            request.setCacheName( cacheElement.cacheName() );
-            request.setCacheElement( cacheElement );
-            request.setKey( cacheElement.key() );
+            request = new RemoteCacheRequest<>(cacheElement.cacheName(),
+                    RemoteRequestType.UPDATE, requesterId, cacheElement);
         }
         else
         {
+            request = new RemoteCacheRequest<>(null, RemoteRequestType.UPDATE, requesterId);
             log.error( "Can't create a proper update request for a null cache element." );
         }
 
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/value/RemoteCacheRequest.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/value/RemoteCacheRequest.java
index fe78845d..1012a18e 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/value/RemoteCacheRequest.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/value/RemoteCacheRequest.java
@@ -30,143 +30,100 @@ import org.apache.commons.jcs4.engine.behavior.ICacheElement;
  * Rather than creating sub object types, I created on object that has values for all types of
  * requests.
  */
-public class RemoteCacheRequest<K, V>
-    implements Serializable
-{
-    /** Don't change. */
-    private static final long serialVersionUID = -8858447417390442569L;
-
-    /** The request type specifies the type of request: get, put, remove, . . */
-    private RemoteRequestType requestType;
-
-    /** Used to identify the source. Same as listener id on the client side. */
-    private long requesterId;
-
-    /** The name of the region */
-    private String cacheName;
-
-    /** The key, if this request has a key. */
-    private K key;
+public record RemoteCacheRequest<K, V>(
+        /** The name of the region */
+        String cacheName,
 
-    /** The keySet, if this request has a keySet. Only getMultiple requests. */
-    private Set<K> keySet;
+        /** The request type specifies the type of request: get, put, remove, . . */
+        RemoteRequestType requestType,
 
-    /** The pattern, if this request uses a pattern. Only getMatching requests. */
-    private String pattern;
-
-    /** The ICacheEleemnt, if this request contains a value. Only update requests will have this. */
-    private ICacheElement<K, V> cacheElement;
-
-    /**
-     * @return the cacheElement
-     */
-    public ICacheElement<K, V> getCacheElement()
-    {
-        return cacheElement;
-    }
+        /** Used to identify the source. Same as listener id on the client side. */
+        long requesterId,
 
-    /**
-     * @return the cacheName
-     */
-    public String getCacheName()
-    {
-        return cacheName;
-    }
+        /** The key, if this request has a key. */
+        K key,
 
-    /**
-     * @return the key
-     */
-    public K getKey()
-    {
-        return key;
-    }
+        /** The keySet, if this request has a keySet. Only getMultiple requests. */
+        Set<K> keySet,
 
-    /**
-     * @return the keySet
-     */
-    public Set<K> getKeySet()
-    {
-        return keySet;
-    }
+        /** The pattern, if this request uses a pattern. Only getMatching requests. */
+        String pattern,
 
-    /**
-     * @return the pattern
-     */
-    public String getPattern()
-    {
-        return pattern;
-    }
-
-    /**
-     * @return the requesterId
-     */
-    public long getRequesterId()
-    {
-        return requesterId;
-    }
-
-    /**
-     * @return the requestType
-     */
-    public RemoteRequestType getRequestType()
-    {
-        return requestType;
-    }
-
-    /**
-     * @param cacheElement the cacheElement to set
-     */
-    public void setCacheElement( final ICacheElement<K, V> cacheElement )
-    {
-        this.cacheElement = cacheElement;
-    }
+        /** The ICacheEleemnt, if this request contains a value. Only update requests will have this. */
+        ICacheElement<K, V> cacheElement
+) implements Serializable
+{
+    /** Don't change. */
+    private static final long serialVersionUID = -8858447417390442569L;
 
-    /**
-     * @param cacheName the cacheName to set
-     */
-    public void setCacheName( final String cacheName )
-    {
-        this.cacheName = cacheName;
-    }
 
     /**
-     * @param key the key to set
+     * Construct a RemoteCacheRequest
+     *
+     * @param cacheName the name of the region
+     * @param requestType the request type specifies the type of request: get, put, remove, ...
+     * @param requesterId used to identify the source. Same as listener id on the client side.
      */
-    public void setKey( final K key )
+    public RemoteCacheRequest(final String cacheName, final RemoteRequestType requestType,
+            final long requesterId)
     {
-        this.key = key;
+        this(cacheName, requestType, requesterId, null, null, null, null);
     }
 
     /**
-     * @param keySet the keySet to set
+     * Construct a RemoteCacheRequest with key
+     *
+     * @param cacheName the name of the region
+     * @param requestType the request type specifies the type of request: get, put, remove, ...
+     * @param requesterId used to identify the source. Same as listener id on the client side.
+     * @param key the key
      */
-    public void setKeySet( final Set<K> keySet )
+    public RemoteCacheRequest(final String cacheName, final RemoteRequestType requestType,
+            final long requesterId, final K key)
     {
-        this.keySet = keySet;
+        this(cacheName, requestType, requesterId, key, null, null, null);
     }
 
     /**
-     * @param pattern the pattern to set
+     * Construct a RemoteCacheRequest with KeySet
+     *
+     * @param cacheName the name of the region
+     * @param requestType the request type specifies the type of request: get, put, remove, ...
+     * @param requesterId used to identify the source. Same as listener id on the client side.
+     * @param keySet the KeySet
      */
-    public void setPattern( final String pattern )
+    public RemoteCacheRequest(final String cacheName, final RemoteRequestType requestType,
+            final long requesterId, final Set<K> keySet)
     {
-        this.pattern = pattern;
+        this(cacheName, requestType, requesterId, null, keySet, null, null);
     }
 
     /**
-     * @param requesterId the requesterId to set
+     * Construct a RemoteCacheRequest with Pattern
+     *
+     * @param cacheName the name of the region
+     * @param requestType the request type specifies the type of request: get, put, remove, ...
+     * @param requesterId used to identify the source. Same as listener id on the client side.
+     * @param pattern the Pattern
      */
-    public void setRequesterId( final long requesterId )
+    public RemoteCacheRequest(final String cacheName, final RemoteRequestType requestType,
+            final long requesterId, final String pattern)
     {
-        this.requesterId = requesterId;
+        this(cacheName, requestType, requesterId, null, null, pattern, null);
     }
 
     /**
-     * @param requestType the requestType to set
+     * Construct a RemoteCacheRequest with CacheElement
+     *
+     * @param cacheName the name of the region
+     * @param requestType the request type specifies the type of request: get, put, remove, ...
+     * @param requesterId used to identify the source. Same as listener id on the client side.
+     * @param cacheElement the CacheElement
      */
-    public void setRequestType( final RemoteRequestType requestType )
+    public RemoteCacheRequest(final String cacheName, final RemoteRequestType requestType,
+            final long requesterId, final ICacheElement<K, V> cacheElement)
     {
-        this.requestType = requestType;
+        this(cacheName, requestType, requesterId, cacheElement.key(), null, null, cacheElement);
     }
 
     /** @return string */
@@ -175,13 +132,13 @@ public class RemoteCacheRequest<K, V>
     {
         final StringBuilder buf = new StringBuilder();
         buf.append( "\nRemoteHttpCacheRequest" );
-        buf.append( "\n requesterId [" + getRequesterId() + "]" );
-        buf.append( "\n requestType [" + getRequestType() + "]" );
-        buf.append( "\n cacheName [" + getCacheName() + "]" );
-        buf.append( "\n key [" + getKey() + "]" );
-        buf.append( "\n keySet [" + getKeySet() + "]" );
-        buf.append( "\n pattern [" + getPattern() + "]" );
-        buf.append( "\n cacheElement [" + getCacheElement() + "]" );
+        buf.append( "\n requesterId [" + requesterId() + "]" );
+        buf.append( "\n requestType [" + requestType() + "]" );
+        buf.append( "\n cacheName [" + cacheName() + "]" );
+        buf.append( "\n key [" + key() + "]" );
+        buf.append( "\n keySet [" + keySet() + "]" );
+        buf.append( "\n pattern [" + pattern() + "]" );
+        buf.append( "\n cacheElement [" + cacheElement() + "]" );
         return buf.toString();
     }
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/value/RemoteCacheResponse.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/value/RemoteCacheResponse.java
index b787b311..a260d0fd 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/value/RemoteCacheResponse.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/value/RemoteCacheResponse.java
@@ -25,70 +25,40 @@ import java.io.Serializable;
  * This is the response wrapper. The servlet wraps all different type of responses in one of these
  * objects.
  */
-public class RemoteCacheResponse<T>
-    implements Serializable
+public record RemoteCacheResponse<T>(
+        /**
+         * The payload. Typically a key / ICacheElement&lt;K, V&gt; map. A normal get will return a map with one
+         * record.
+         */
+        T payload,
+
+        /** Was the event processed without error */
+        boolean success,
+
+        /** Simple error messaging */
+        String errorMessage
+) implements Serializable
 {
     /** Don't change. */
     private static final long serialVersionUID = -8858447417390442568L;
 
-    /** Was the event processed without error */
-    private boolean success = true;
-
-    /** Simple error messaging */
-    private String errorMessage;
-
-    /**
-     * The payload. Typically a key / ICacheElement&lt;K, V&gt; map. A normal get will return a map with one
-     * record.
-     */
-    private T payload;
-
-    /**
-     * @return the errorMessage
-     */
-    public String getErrorMessage()
-    {
-        return errorMessage;
-    }
-
-    /**
-     * @return the payload
-     */
-    public T getPayload()
-    {
-        return payload;
-    }
-
-    /**
-     * @return the success
-     */
-    public boolean isSuccess()
-    {
-        return success;
-    }
-
-    /**
-     * @param errorMessage the errorMessage to set
-     */
-    public void setErrorMessage( final String errorMessage )
-    {
-        this.errorMessage = errorMessage;
-    }
-
     /**
-     * @param payload the payload to set
+     * Construct error message object
+     * @param succcess
+     * @param errorMessage
      */
-    public void setPayload( final T payload )
+    public RemoteCacheResponse(final boolean success, final String errorMessage)
     {
-        this.payload = payload;
+        this(null, success, errorMessage);
     }
 
     /**
-     * @param success the success to set
+     * Construct payload object
+     * @param payload
      */
-    public void setSuccess( final boolean success )
+    public RemoteCacheResponse(final T payload)
     {
-        this.success = success;
+        this(payload, true, "OK");
     }
 
     /** @return string */
@@ -97,9 +67,9 @@ public class RemoteCacheResponse<T>
     {
         final StringBuilder buf = new StringBuilder();
         buf.append( "\nRemoteHttpCacheResponse" );
-        buf.append( "\n success [" + isSuccess() + "]" );
-        buf.append( "\n payload [" + getPayload() + "]" );
-        buf.append( "\n errorMessage [" + getErrorMessage() + "]" );
+        buf.append( "\n success [" + success() + "]" );
+        buf.append( "\n payload [" + payload() + "]" );
+        buf.append( "\n errorMessage [" + errorMessage() + "]" );
         return buf.toString();
     }
 }
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheClientUnitTest.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheClientUnitTest.java
index dbfdcad3..a34e65c9 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheClientUnitTest.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheClientUnitTest.java
@@ -60,7 +60,7 @@ class RemoteHttpCacheClientUnitTest
 
         // VERIFY
         assertEquals( RemoteRequestType.DISPOSE, mockDispatcher.lastRemoteCacheRequest
-            .getRequestType(), "Wrong type." );
+            .requestType(), "Wrong type." );
     }
 
     /**
@@ -84,8 +84,7 @@ class RemoteHttpCacheClientUnitTest
 
         final ICacheElement<String, String> expected = new CacheElement<>( cacheName, key, "value" );
         final RemoteCacheResponse<ICacheElement<String, String>> remoteHttpCacheResponse =
-            new RemoteCacheResponse<>();
-        remoteHttpCacheResponse.setPayload( expected );
+            new RemoteCacheResponse<>(expected);
 
         mockDispatcher.setupRemoteCacheResponse = remoteHttpCacheResponse;
 
@@ -95,7 +94,7 @@ class RemoteHttpCacheClientUnitTest
         // VERIFY
         assertEquals( expected, result, "Wrong result." );
         assertEquals( RemoteRequestType.GET, mockDispatcher.lastRemoteCacheRequest
-            .getRequestType(), "Wrong type." );
+            .requestType(), "Wrong type." );
     }
 
     /**
@@ -125,7 +124,7 @@ class RemoteHttpCacheClientUnitTest
         // VERIFY
         assertNull( result, "Wrong result." );
         assertEquals( RemoteRequestType.GET, mockDispatcher.lastRemoteCacheRequest
-            .getRequestType(), "Wrong type." );
+            .requestType(), "Wrong type." );
     }
 
     /**
@@ -151,8 +150,7 @@ class RemoteHttpCacheClientUnitTest
         final Map<String, ICacheElement<String, String>> expectedMap = new HashMap<>();
         expectedMap.put( "key", expected );
         final RemoteCacheResponse<Map<String, ICacheElement<String, String>>> remoteHttpCacheResponse =
-            new RemoteCacheResponse<>();
-        remoteHttpCacheResponse.setPayload( expectedMap );
+            new RemoteCacheResponse<>(expectedMap);
 
         mockDispatcher.setupRemoteCacheResponse = remoteHttpCacheResponse;
 
@@ -162,7 +160,7 @@ class RemoteHttpCacheClientUnitTest
         // VERIFY
         assertEquals( expected, result.get( "key" ), "Wrong result." );
         assertEquals( RemoteRequestType.GET_MATCHING,
-                      mockDispatcher.lastRemoteCacheRequest.getRequestType(),
+                      mockDispatcher.lastRemoteCacheRequest.requestType(),
                       "Wrong type." );
     }
 
@@ -189,8 +187,7 @@ class RemoteHttpCacheClientUnitTest
         final Map<String, ICacheElement<String, String>> expectedMap = new HashMap<>();
         expectedMap.put( "key", expected );
         final RemoteCacheResponse<Map<String, ICacheElement<String, String>>> remoteHttpCacheResponse =
-            new RemoteCacheResponse<>();
-        remoteHttpCacheResponse.setPayload( expectedMap );
+            new RemoteCacheResponse<>(expectedMap);
 
         mockDispatcher.setupRemoteCacheResponse = remoteHttpCacheResponse;
 
@@ -200,7 +197,7 @@ class RemoteHttpCacheClientUnitTest
         // VERIFY
         assertEquals( expected, result.get( "key" ), "Wrong result." );
         assertEquals( RemoteRequestType.GET_MULTIPLE,
-                      mockDispatcher.lastRemoteCacheRequest.getRequestType(),
+                      mockDispatcher.lastRemoteCacheRequest.requestType(),
                       "Wrong type." );
     }
 
@@ -228,7 +225,7 @@ class RemoteHttpCacheClientUnitTest
 
         // VERIFY
         assertEquals( RemoteRequestType.REMOVE, mockDispatcher.lastRemoteCacheRequest
-            .getRequestType(), "Wrong type." );
+            .requestType(), "Wrong type." );
     }
 
     /**
@@ -254,7 +251,7 @@ class RemoteHttpCacheClientUnitTest
 
         // VERIFY
         assertEquals( RemoteRequestType.REMOVE_ALL, mockDispatcher.lastRemoteCacheRequest
-            .getRequestType(), "Wrong type." );
+            .requestType(), "Wrong type." );
     }
 
     /**
@@ -282,6 +279,6 @@ class RemoteHttpCacheClientUnitTest
 
         // VERIFY
         assertEquals( RemoteRequestType.UPDATE, mockDispatcher.lastRemoteCacheRequest
-            .getRequestType(), "Wrong type." );
+            .requestType(), "Wrong type." );
     }
 }
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheServletUnitTest.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheServletUnitTest.java
index 92e6a4c6..b4088764 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheServletUnitTest.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheServletUnitTest.java
@@ -125,7 +125,7 @@ class RemoteHttpCacheServletUnitTest
 
         // VERIFY
         assertNotNull( result, "Should have a result." );
-        assertTrue( result.getErrorMessage().indexOf( "The request is null" ) != -1,
+        assertTrue( result.errorMessage().indexOf( "The request is null" ) != -1,
                     "Should have 'The request is null' in the errorMessage" );
         assertTrue( result.toString().indexOf( "The request is null" ) != -1,
                     "Should have 'The request is null' in the toString" );
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/util/RemoteCacheRequestFactoryUnitTest.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/util/RemoteCacheRequestFactoryUnitTest.java
index a0f3ecc0..880e705e 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/util/RemoteCacheRequestFactoryUnitTest.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/util/RemoteCacheRequestFactoryUnitTest.java
@@ -49,8 +49,8 @@ class RemoteCacheRequestFactoryUnitTest
 
         // VERIFY
         assertNotNull( result, "Should have a result" );
-        assertEquals( cacheName, result.getCacheName(), "Wrong cacheName" );
-        assertEquals( RemoteRequestType.GET_MATCHING, result.getRequestType(), "Wrong type" );
+        assertEquals( cacheName, result.cacheName(), "Wrong cacheName" );
+        assertEquals( RemoteRequestType.GET_MATCHING, result.requestType(), "Wrong type" );
     }
 
     /** Simple test */
@@ -68,8 +68,8 @@ class RemoteCacheRequestFactoryUnitTest
 
         // VERIFY
         assertNotNull( result, "Should have a result" );
-        assertEquals( cacheName, result.getCacheName(), "Wrong cacheName" );
-        assertEquals( RemoteRequestType.GET_MULTIPLE, result.getRequestType(), "Wrong type" );
+        assertEquals( cacheName, result.cacheName(), "Wrong cacheName" );
+        assertEquals( RemoteRequestType.GET_MULTIPLE, result.requestType(), "Wrong type" );
     }
 
     /** Simple test */
@@ -87,8 +87,8 @@ class RemoteCacheRequestFactoryUnitTest
 
         // VERIFY
         assertNotNull( result, "Should have a result" );
-        assertEquals( cacheName, result.getCacheName(), "Wrong cacheName" );
-        assertEquals( RemoteRequestType.GET, result.getRequestType(), "Wrong type" );
+        assertEquals( cacheName, result.cacheName(), "Wrong cacheName" );
+        assertEquals( RemoteRequestType.GET, result.requestType(), "Wrong type" );
     }
 
     /** Simple test */
@@ -105,8 +105,8 @@ class RemoteCacheRequestFactoryUnitTest
 
         // VERIFY
         assertNotNull( result, "Should have a result" );
-        assertEquals( cacheName, result.getCacheName(), "Wrong cacheName" );
-        assertEquals( RemoteRequestType.REMOVE_ALL, result.getRequestType(), "Wrong type" );
+        assertEquals( cacheName, result.cacheName(), "Wrong cacheName" );
+        assertEquals( RemoteRequestType.REMOVE_ALL, result.requestType(), "Wrong type" );
     }
 
     /** Simple test */
@@ -124,8 +124,8 @@ class RemoteCacheRequestFactoryUnitTest
 
         // VERIFY
         assertNotNull( result, "Should have a result" );
-        assertEquals( cacheName, result.getCacheName(), "Wrong cacheName" );
-        assertEquals( RemoteRequestType.REMOVE, result.getRequestType(), "Wrong type" );
+        assertEquals( cacheName, result.cacheName(), "Wrong cacheName" );
+        assertEquals( RemoteRequestType.REMOVE, result.requestType(), "Wrong type" );
     }
 
     /** Simple test */
@@ -146,7 +146,7 @@ class RemoteCacheRequestFactoryUnitTest
 
         // VERIFY
         assertNotNull( result, "Should have a result" );
-        assertEquals( cacheName, result.getCacheName(), "Wrong cacheName" );
-        assertEquals( RemoteRequestType.UPDATE, result.getRequestType(), "Wrong type" );
+        assertEquals( cacheName, result.cacheName(), "Wrong cacheName" );
+        assertEquals( RemoteRequestType.UPDATE, result.requestType(), "Wrong type" );
     }
 }


(commons-jcs) 10/12: Update site, move documentation to Maven standard location.

Posted by tv...@apache.org.
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 046254190dbce0d7ffec3ac32c616b417dd58986
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Tue Feb 17 18:56:03 2026 +0100

    Update site, move documentation to Maven standard location.
---
 {xdocs => src/site/fml}/faq.fml                     |  0
 src/site/site.xml                                   | 11 +++++------
 {xdocs => src/site/xdoc}/BasicJCSConfiguration.xml  | 13 -------------
 {xdocs => src/site/xdoc}/BlockDiskCache.xml         |  1 -
 {xdocs => src/site/xdoc}/CacheEventLogging.xml      |  1 -
 {xdocs => src/site/xdoc}/ElementAttributes.xml      |  0
 {xdocs => src/site/xdoc}/ElementEventHandling.xml   |  0
 {xdocs => src/site/xdoc}/ElementSerializers.xml     |  3 ---
 {xdocs => src/site/xdoc}/IndexedDiskAuxCache.xml    |  4 ----
 .../site/xdoc}/IndexedDiskCacheProperties.xml       |  2 --
 {xdocs => src/site/xdoc}/JCSPlugins.xml             | 21 ++++++---------------
 {xdocs => src/site/xdoc}/JCSShortDescription.xml    |  0
 {xdocs => src/site/xdoc}/JCSandJCACHE.xml           |  0
 {xdocs => src/site/xdoc}/JCSvsEHCache.xml           |  0
 {xdocs => src/site/xdoc}/JDBCDiskCache.xml          |  5 -----
 .../site/xdoc}/JDBCDiskCacheProperties.xml          |  2 --
 {xdocs => src/site/xdoc}/LateralTCPAuxCache.xml     |  2 --
 {xdocs => src/site/xdoc}/LateralTCPProperties.xml   |  1 -
 {xdocs => src/site/xdoc}/LateralUDPDiscovery.xml    |  2 --
 {xdocs => src/site/xdoc}/LocalCacheConfig.xml       | 10 +---------
 .../site/xdoc}/MySQLDiskCacheProperties.xml         |  2 --
 {xdocs => src/site/xdoc}/ProjectHistory.xml         |  0
 {xdocs => src/site/xdoc}/RegionProperties.xml       |  0
 {xdocs => src/site/xdoc}/RemoteAuxCache.xml         | 12 ------------
 {xdocs => src/site/xdoc}/RemoteCacheProperties.xml  |  1 -
 .../site/xdoc}/RemoteHttpCacheProperties.xml        |  1 -
 {xdocs => src/site/xdoc}/UpgradingFrom13.xml        |  0
 {xdocs => src/site/xdoc}/UpgradingFrom2x.xml        |  0
 {xdocs => src/site/xdoc}/UpgradingFrom3x.xml        |  4 ++--
 {xdocs => src/site/xdoc}/UsingJCSBasicWeb.xml       | 12 ------------
 {xdocs => src/site/xdoc}/download_jcs.xml           |  0
 {xdocs => src/site/xdoc}/getting_started/intro.xml  |  1 -
 {xdocs => src/site/xdoc}/index.xml                  |  0
 {xdocs => src/site/xdoc}/issue-tracking.xml         |  0
 {xdocs => src/site/xdoc}/mail-lists.xml             |  0
 35 files changed, 14 insertions(+), 97 deletions(-)

diff --git a/xdocs/faq.fml b/src/site/fml/faq.fml
similarity index 100%
rename from xdocs/faq.fml
rename to src/site/fml/faq.fml
diff --git a/src/site/site.xml b/src/site/site.xml
index ada2fa3c..9a3df6ea 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -15,11 +15,10 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<project name="JCS">
-  <bannerRight>
-    <name>Commons JCS&#8482;</name>
-    <href>/index.html</href>
-  </bannerRight>
+<site xmlns="http://maven.apache.org/SITE/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd"
+  name="JCS">
+  <bannerRight name="Commons JCS&#8482;" href="/index.html" />
 
   <body>
     <menu name="JCS">
@@ -78,4 +77,4 @@
 
   </body>
 
-</project>
+</site>
diff --git a/xdocs/BasicJCSConfiguration.xml b/src/site/xdoc/BasicJCSConfiguration.xml
similarity index 90%
rename from xdocs/BasicJCSConfiguration.xml
rename to src/site/xdoc/BasicJCSConfiguration.xml
index 9357f193..6dfe109a 100644
--- a/xdocs/BasicJCSConfiguration.xml
+++ b/src/site/xdoc/BasicJCSConfiguration.xml
@@ -46,8 +46,6 @@
 
 jcs.default=
 jcs.default.cacheattributes.MaxObjects=1000
-jcs.default.cacheattributes.MemoryCacheName=
-    org.apache.commons.jcs4.engine.memory.lru.LRUMemoryCache
         ]]></source>
         <p>
           If you want to add memory shrinking then you can add these
@@ -70,8 +68,6 @@ jcs.default.elementattributes.IsEternal=false
         <source><![CDATA[
 jcs.auxiliary.DC=
     org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=
-    org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheAttributes
 jcs.auxiliary.DC.attributes.DiskPath=g:/dev/jcs/raf
         ]]></source>
         <p>
@@ -92,7 +88,6 @@ jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=3600
 jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=60
 jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=500
 jcs.region.testCache1.elementattributes.IsEternal=false
-
         ]]></source>
         <p>
           If you want to add a lateral cache for distribution (the <a
@@ -103,9 +98,6 @@ jcs.region.testCache1.elementattributes.IsEternal=false
         <source><![CDATA[
 jcs.auxiliary.LTCP=
     org.apache.commons.jcs4.auxiliary.lateral.LateralCacheFactory
-jcs.auxiliary.LTCP.attributes=
-    org.apache.commons.jcs4.auxiliary.lateral.LateralCacheAttributes
-jcs.auxiliary.LTCP.attributes.TransmissionTypeName=TCP
 jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1111
 jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110
 jcs.auxiliary.LTCP.attributes.PutOnlyMode=false
@@ -157,16 +149,11 @@ jcs.region.testCache1.elementattributes.IsEternal=false
 # AVAILABLE AUXILIARY CACHES
 jcs.auxiliary.DC=
     org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=
-    org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheAttributes
 jcs.auxiliary.DC.attributes.DiskPath=g:/dev/jcs/raf
 jcs.auxiliary.DC.attributes.maxKeySize=100000
 
 jcs.auxiliary.LTCP=
     org.apache.commons.jcs4.auxiliary.lateral.LateralCacheFactory
-jcs.auxiliary.LTCP.attributes=
-    org.apache.commons.jcs4.auxiliary.lateral.LateralCacheAttributes
-jcs.auxiliary.LTCP.attributes.TransmissionTypeName=TCP
 jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1111
 jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110
 jcs.auxiliary.LTCP.attributes.PutOnlyMode=false
diff --git a/xdocs/BlockDiskCache.xml b/src/site/xdoc/BlockDiskCache.xml
similarity index 97%
rename from xdocs/BlockDiskCache.xml
rename to src/site/xdoc/BlockDiskCache.xml
index 0d0eaaf1..05951233 100644
--- a/xdocs/BlockDiskCache.xml
+++ b/src/site/xdoc/BlockDiskCache.xml
@@ -71,7 +71,6 @@ jcs.default.cacheattributes.MaxObjects=0
 
 # Block Disk Cache
 jcs.auxiliary.blockDiskCache=org.apache.commons.jcs4.auxiliary.disk.block.BlockDiskCacheFactory
-jcs.auxiliary.blockDiskCache.attributes=org.apache.commons.jcs4.auxiliary.disk.block.BlockDiskCacheAttributes
 jcs.auxiliary.blockDiskCache.attributes.DiskPath=target/test-sandbox/block-disk-cache-huge
 jcs.auxiliary.blockDiskCache.attributes.MaxPurgatorySize=300000
 jcs.auxiliary.blockDiskCache.attributes.MaxKeySize=1000000
diff --git a/xdocs/CacheEventLogging.xml b/src/site/xdoc/CacheEventLogging.xml
similarity index 96%
rename from xdocs/CacheEventLogging.xml
rename to src/site/xdoc/CacheEventLogging.xml
index bc1af6d0..f0f55cea 100644
--- a/xdocs/CacheEventLogging.xml
+++ b/src/site/xdoc/CacheEventLogging.xml
@@ -39,7 +39,6 @@
 			<source><![CDATA[
 . . .
 jcs.auxiliary.RC=org.apache.commons.jcs4.auxiliary.remote.RemoteCacheFactory
-jcs.auxiliary.RC.attributes=org.apache.commons.jcs4.auxiliary.remote.RemoteCacheAttributes
 jcs.auxiliary.RC.attributes.FailoverServers=localhost:1101,localhost:1102
 jcs.auxiliary.RC.attributes.LocalPort=1201
 jcs.auxiliary.RC.attributes.RemoveUponRemotePut=false
diff --git a/xdocs/ElementAttributes.xml b/src/site/xdoc/ElementAttributes.xml
similarity index 100%
rename from xdocs/ElementAttributes.xml
rename to src/site/xdoc/ElementAttributes.xml
diff --git a/xdocs/ElementEventHandling.xml b/src/site/xdoc/ElementEventHandling.xml
similarity index 100%
rename from xdocs/ElementEventHandling.xml
rename to src/site/xdoc/ElementEventHandling.xml
diff --git a/xdocs/ElementSerializers.xml b/src/site/xdoc/ElementSerializers.xml
similarity index 95%
rename from xdocs/ElementSerializers.xml
rename to src/site/xdoc/ElementSerializers.xml
index f3a19770..fb5b7fee 100644
--- a/xdocs/ElementSerializers.xml
+++ b/src/site/xdoc/ElementSerializers.xml
@@ -61,7 +61,6 @@
                 <![CDATA[
 # Block Disk Cache
 jcs.auxiliary.blockDiskCache=org.apache.commons.jcs4.auxiliary.disk.block.BlockDiskCacheFactory
-jcs.auxiliary.blockDiskCache.attributes=org.apache.commons.jcs4.auxiliary.disk.block.BlockDiskCacheAttributes
 jcs.auxiliary.blockDiskCache.attributes.DiskPath=target/test-sandbox/block-disk-cache
 jcs.auxiliary.blockDiskCache.serializer=org.apache.commons.jcs4.utils.serialization.CompressingSerializer
                 ]]>
@@ -84,7 +83,6 @@ jcs.auxiliary.blockDiskCache.serializer=org.apache.commons.jcs4.utils.serializat
                 <![CDATA[
 # Block Disk Cache
 jcs.auxiliary.blockDiskCache2=org.apache.commons.jcs4.auxiliary.disk.block.BlockDiskCacheFactory
-jcs.auxiliary.blockDiskCache2.attributes=org.apache.commons.jcs4.auxiliary.disk.block.BlockDiskCacheAttributes
 jcs.auxiliary.blockDiskCache2.attributes.DiskPath=target/test-sandbox/block-disk-cache2
 jcs.auxiliary.blockDiskCache2.serializer=org.apache.commons.jcs4.utils.serialization.EncryptingSerializer
 jcs.auxiliary.blockDiskCache2.serializer.attributes.preSharedKey=my_secret
@@ -128,7 +126,6 @@ opens your.package to com.fasterxml.jackson.databind;
                 <![CDATA[
 # Block Disk Cache
 jcs.auxiliary.blockDiskCache3=org.apache.commons.jcs4.auxiliary.disk.block.BlockDiskCacheFactory
-jcs.auxiliary.blockDiskCache3.attributes=org.apache.commons.jcs4.auxiliary.disk.block.BlockDiskCacheAttributes
 jcs.auxiliary.blockDiskCache3.attributes.DiskPath=target/test-sandbox/block-disk-cache3
 jcs.auxiliary.blockDiskCache3.serializer=org.apache.commons.jcs4.utils.serialization.JSONSerializer
                 ]]>
diff --git a/xdocs/IndexedDiskAuxCache.xml b/src/site/xdoc/IndexedDiskAuxCache.xml
similarity index 97%
rename from xdocs/IndexedDiskAuxCache.xml
rename to src/site/xdoc/IndexedDiskAuxCache.xml
index 7eaeb897..a30f66de 100644
--- a/xdocs/IndexedDiskAuxCache.xml
+++ b/src/site/xdoc/IndexedDiskAuxCache.xml
@@ -123,8 +123,6 @@
 				<source><![CDATA[
 jcs.auxiliary.DC=
     org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=
-    org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheAttributes
 jcs.auxiliary.DC.attributes.DiskPath=g:\dev\jakarta-turbine-stratum\raf
 jcs.auxiliary.DC.attributes.MaxKeySize=100000
 ]]></source>
@@ -211,7 +209,6 @@ jcs.region.myRegion1.cacheattributes.MaxObjects=1000
 ##### AUXILIARY CACHES
 # Indexed Disk Cache
 jcs.auxiliary.DC=org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheAttributes
 jcs.auxiliary.DC.attributes.DiskPath=target/test-sandbox/indexed-disk-cache
 jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000
 jcs.auxiliary.DC.attributes.MaxKeySize=10000
@@ -263,7 +260,6 @@ jcs.default.elementattributes.MaxIdleTime=1800
 # the single model or define a different auxiliary for each region and use the Pooled type.
 # SINGLE is generally best unless you have a huge # of regions.
 jcs.auxiliary.DC2=org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC2.attributes=org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheAttributes
 jcs.auxiliary.DC2.attributes.DiskPath=target/test-sandbox/raf
 jcs.auxiliary.DC2.attributes.MaxPurgatorySize=10000
 jcs.auxiliary.DC2.attributes.MaxKeySize=10000
diff --git a/xdocs/IndexedDiskCacheProperties.xml b/src/site/xdoc/IndexedDiskCacheProperties.xml
similarity index 96%
rename from xdocs/IndexedDiskCacheProperties.xml
rename to src/site/xdoc/IndexedDiskCacheProperties.xml
index 5d9dab9a..e1fbb067 100644
--- a/xdocs/IndexedDiskCacheProperties.xml
+++ b/src/site/xdoc/IndexedDiskCacheProperties.xml
@@ -85,7 +85,6 @@
 				<source>
 					<![CDATA[
 jcs.auxiliary.DC=org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheAttributes
 jcs.auxiliary.DC.attributes.DiskPath=target/test-sandbox/indexed-disk-cache
 jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000
 jcs.auxiliary.DC.attributes.MaxKeySize=10000
@@ -131,7 +130,6 @@ jcs.auxiliary.DC.attributes.ClearDiskOnStartup=false
 				<source>
 					<![CDATA[
 jcs.auxiliary.DC=org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheAttributes
 jcs.auxiliary.DC.attributes.DiskPath=target/test-sandbox/indexed-disk-cache
 jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000
 jcs.auxiliary.DC.attributes.MaxKeySize=10000
diff --git a/xdocs/JCSPlugins.xml b/src/site/xdoc/JCSPlugins.xml
similarity index 77%
rename from xdocs/JCSPlugins.xml
rename to src/site/xdoc/JCSPlugins.xml
index 4fa0c13c..6c398299 100644
--- a/xdocs/JCSPlugins.xml
+++ b/src/site/xdoc/JCSPlugins.xml
@@ -34,8 +34,8 @@
 		</section>
 		<section name="Memory Plugins">
 			<p> Currently, JCS provides five memory management options: (1)
-				LRUMemoryCache, (2) LHMLRUMemoryCache, (3) MRUMemoryCache, (5)
-				FIFOMemoryCache, and (5) ARCMemoryCache. All memory caches restrict
+				LRUMemoryCache, (2) LHMLRUMemoryCache, (3) MRUMemoryCache, (4)
+				FIFOMemoryCache, and (5) SoftReferenceMemoryCache. All memory caches restrict
 				the number of items that can be stored in memory per region. If a
 				disk cache is configured for the region, the items will be spooled
 				to disk when the memory capacity is reached. JCS enforces
@@ -46,28 +46,19 @@
 			<p> The LRUMemoryCache is the currently recommended plugin. Upon
 				misconfiguration it is used as the default. The LRUMemoryCache
 				removes the least recently used items when the cache is full.</p>
-			<p> The ARCMemoryCache is currently experimental. It implements an
-				adaptive replacement caching algorithm that combines an LRU and an
-				LFU that adapt to usage patterns.</p>
 		</section>
 		<section name="Disk Plugins">
-			<p> JCS provides several disk swap options: indexed disk, HSQL, JISP,
-				and Berkeley DB JE. The IndexedDiskCache is the recommended disk
+			<p> JCS provides several disk swap options: Indexed Disk, Block Disk,
+                HSQL, and MySQL. The IndexedDiskCache is the recommended disk
 				cache. It maintains the cached data on disk and the keys in memory
 				for the fastest possible lookup times. Writing to disk is done
 				asynchronously. Items are typically put in purgatory and queued for
 				background disk writing. While in purgatory, the items remain
 				available.</p>
-			<p> In addition, JCS provides a disk auxiliary that uses the Berkeley
-				DB Java Edition for disk storage. JCS can effectively function as an
-				expiration manager and distribution mechanism on top of a Berkeley
-				DB JE.</p>
 		</section>
 		<section name="Lateral Plugins">
-			<p> JCS provides two recommended lateral distribution options: TCP
-				socket server distribution and JGroups (or JavaGroups). There are
-				also several other experimental lateral distribution auxiliaries
-				using servlets, UDP, and xmlrpc.</p>
+			<p> JCS provides a TCP socket server distribution as the recommended lateral 
+                distribution options.</p>
 		</section>
 		<section name="Remote Plugins">
 			<p> JCS provides both an RMI and HTTP remote servers to manage
diff --git a/xdocs/JCSShortDescription.xml b/src/site/xdoc/JCSShortDescription.xml
similarity index 100%
rename from xdocs/JCSShortDescription.xml
rename to src/site/xdoc/JCSShortDescription.xml
diff --git a/xdocs/JCSandJCACHE.xml b/src/site/xdoc/JCSandJCACHE.xml
similarity index 100%
rename from xdocs/JCSandJCACHE.xml
rename to src/site/xdoc/JCSandJCACHE.xml
diff --git a/xdocs/JCSvsEHCache.xml b/src/site/xdoc/JCSvsEHCache.xml
similarity index 100%
rename from xdocs/JCSvsEHCache.xml
rename to src/site/xdoc/JCSvsEHCache.xml
diff --git a/xdocs/JDBCDiskCache.xml b/src/site/xdoc/JDBCDiskCache.xml
similarity index 95%
rename from xdocs/JDBCDiskCache.xml
rename to src/site/xdoc/JDBCDiskCache.xml
index 5f24e50f..eb073da1 100644
--- a/xdocs/JDBCDiskCache.xml
+++ b/src/site/xdoc/JDBCDiskCache.xml
@@ -53,7 +53,6 @@ jcs.default.elementattributes.MaxIdleTime=14400
 ################## AUXILIARY CACHES AVAILABLE ################
 # MYSQL disk cache used for flight options
 jcs.auxiliary.MYSQL=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.MYSQL.attributes=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
 jcs.auxiliary.MYSQL.attributes.userName=myUsername
 jcs.auxiliary.MYSQL.attributes.password=myPassword
 jcs.auxiliary.MYSQL.attributes.url=jdbc:mysql://localhost:3306/YOURDBNAME?autoReconnect=true
@@ -106,7 +105,6 @@ jcs.region.testCache1.cacheattributes.MaxObjects=10000
 # ################# AUXILIARY CACHES AVAILABLE ################
 # JDBC disk cache
 jcs.auxiliary.JDBC_0=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.JDBC_0.attributes=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
 jcs.auxiliary.JDBC_0.attributes.tableName=JCS_STORE_0
 jcs.auxiliary.JDBC_0.attributes.testBeforeInsert=false
 jcs.auxiliary.JDBC_0.attributes.allowRemoveAll=true
@@ -116,7 +114,6 @@ jcs.auxiliary.JDBC_0.attributes.EventQueueType=POOLED
 jcs.auxiliary.JDBC_0.attributes.EventQueuePoolName=disk_cache_event_queue
 
 jcs.auxiliary.JDBC_1=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.JDBC_1.attributes=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
 jcs.auxiliary.JDBC_1.attributes.tableName=JCS_STORE_1
 jcs.auxiliary.JDBC_1.attributes.testBeforeInsert=false
 jcs.auxiliary.JDBC_1.attributes.allowRemoveAll=true
@@ -173,7 +170,6 @@ jcs.region.testCache1.cacheattributes.MaxObjects=10000
 # ################# AUXILIARY CACHES AVAILABLE ################
 # JDBC disk cache
 jcs.auxiliary.JDBC_0=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.JDBC_0.attributes=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
 jcs.auxiliary.JDBC_0.attributes.tableName=JCS_STORE_0
 jcs.auxiliary.JDBC_0.attributes.testBeforeInsert=false
 jcs.auxiliary.JDBC_0.attributes.allowRemoveAll=true
@@ -183,7 +179,6 @@ jcs.auxiliary.JDBC_0.attributes.EventQueueType=POOLED
 jcs.auxiliary.JDBC_0.attributes.EventQueuePoolName=disk_cache_event_queue
 
 jcs.auxiliary.JDBC_1=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.JDBC_1.attributes=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
 jcs.auxiliary.JDBC_1.attributes.tableName=JCS_STORE_1
 jcs.auxiliary.JDBC_1.attributes.testBeforeInsert=false
 jcs.auxiliary.JDBC_1.attributes.allowRemoveAll=true
diff --git a/xdocs/JDBCDiskCacheProperties.xml b/src/site/xdoc/JDBCDiskCacheProperties.xml
similarity index 97%
rename from xdocs/JDBCDiskCacheProperties.xml
rename to src/site/xdoc/JDBCDiskCacheProperties.xml
index 591f6ea2..5f9396dd 100644
--- a/xdocs/JDBCDiskCacheProperties.xml
+++ b/src/site/xdoc/JDBCDiskCacheProperties.xml
@@ -171,7 +171,6 @@
 ################## AUXILIARY CACHES AVAILABLE ################
 # JDBC disk cache
 jcs.auxiliary.JDBC=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.JDBC.attributes=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
 jcs.auxiliary.JDBC.attributes.userName=sa
 jcs.auxiliary.JDBC.attributes.password=
 jcs.auxiliary.JDBC.attributes.url=jdbc:hsqldb:
@@ -239,7 +238,6 @@ jcs.auxiliary.JDBC.attributes.ShrinkerInterval=300
 ################## AUXILIARY CACHES AVAILABLE ################
 # JDBC disk cache
 jcs.auxiliary.JDBC=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.JDBC.attributes=org.apache.commons.jcs4.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
 jcs.auxiliary.JDBC.attributes.userName=sa
 jcs.auxiliary.JDBC.attributes.password=
 jcs.auxiliary.JDBC.attributes.url=jdbc:hsqldb:
diff --git a/xdocs/LateralTCPAuxCache.xml b/src/site/xdoc/LateralTCPAuxCache.xml
similarity index 97%
rename from xdocs/LateralTCPAuxCache.xml
rename to src/site/xdoc/LateralTCPAuxCache.xml
index feab5d66..6236c89d 100644
--- a/xdocs/LateralTCPAuxCache.xml
+++ b/src/site/xdoc/LateralTCPAuxCache.xml
@@ -69,7 +69,6 @@
         </p>
         <source><![CDATA[
 jcs.auxiliary.LTCP=org.apache.commons.jcs4.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
-jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs4.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
 jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1111,localhost:1112
 jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110
 jcs.auxiliary.LTCP.attributes.AllowGet=true
@@ -102,7 +101,6 @@ jcs.auxiliary.LTCP.attributes.AllowGet=true
         </p>
         <source><![CDATA[
 jcs.auxiliary.LTCP=org.apache.commons.jcs4.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
-jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs4.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
 #jcs.auxiliary.LTCP.attributes.TcpServers=
 jcs.auxiliary.LTCP.attributes.TcpListenerPort=1118
 jcs.auxiliary.LTCP.attributes.UdpDiscoveryAddr=228.5.6.8
diff --git a/xdocs/LateralTCPProperties.xml b/src/site/xdoc/LateralTCPProperties.xml
similarity index 98%
rename from xdocs/LateralTCPProperties.xml
rename to src/site/xdoc/LateralTCPProperties.xml
index 3571b1de..04ffd8c3 100644
--- a/xdocs/LateralTCPProperties.xml
+++ b/src/site/xdoc/LateralTCPProperties.xml
@@ -148,7 +148,6 @@
 			<subsection name="Example Configuration">
 				<source><![CDATA[
 jcs.auxiliary.LTCP=org.apache.commons.jcs4.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
-jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs4.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
 #jcs.auxiliary.LTCP.attributes.TcpServers=
 jcs.auxiliary.LTCP.attributes.TcpListenerPort=1118
 jcs.auxiliary.LTCP.attributes.UdpDiscoveryAddr=228.5.6.8
diff --git a/xdocs/LateralUDPDiscovery.xml b/src/site/xdoc/LateralUDPDiscovery.xml
similarity index 95%
rename from xdocs/LateralUDPDiscovery.xml
rename to src/site/xdoc/LateralUDPDiscovery.xml
index 63ae06d8..46788409 100644
--- a/xdocs/LateralUDPDiscovery.xml
+++ b/src/site/xdoc/LateralUDPDiscovery.xml
@@ -70,7 +70,6 @@
         </p>
         <source><![CDATA[
 jcs.auxiliary.LTCP=org.apache.commons.jcs4.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
-jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs4.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
 jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110
 jcs.auxiliary.LTCP.attributes.PutOnlyMode=true
 jcs.auxiliary.LTCP.attributes.UdpDiscoveryAddr=228.5.6.8
@@ -93,7 +92,6 @@ jcs.auxiliary.LTCP.attributes.UdpTTL=4
         </p>
         <source><![CDATA[
 jcs.auxiliary.LTCP=org.apache.commons.jcs4.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
-jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs4.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
 jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110
 jcs.auxiliary.LTCP.attributes.PutOnlyMode=true
 jcs.auxiliary.LTCP.attributes.UdpDiscoveryInterface=en0
diff --git a/xdocs/LocalCacheConfig.xml b/src/site/xdoc/LocalCacheConfig.xml
similarity index 93%
rename from xdocs/LocalCacheConfig.xml
rename to src/site/xdoc/LocalCacheConfig.xml
index 01fdaf5f..969deec2 100644
--- a/xdocs/LocalCacheConfig.xml
+++ b/src/site/xdoc/LocalCacheConfig.xml
@@ -75,8 +75,6 @@
 
 # sets the default aux value for any non configured caches
 jcs.default=DC,RFailover
-jcs.default.cacheattributes=
-    org.apache.commons.jcs4.engine.CompositeCacheAttributes
 jcs.default.cacheattributes.MaxObjects=1000
         ]]></source>
         <p>
@@ -99,8 +97,6 @@ jcs.default.cacheattributes.MaxObjects=1000
         </p>
         <source><![CDATA[
 jcs.region.testCache=DC,RFailover
-jcs.region.testCache.cacheattributes=
-    org.apache.commons.jcs4.engine.CompositeCacheAttributes
 jcs.region.testCache.cacheattributes.MaxObjects=1000
         ]]></source>
         <p>
@@ -135,9 +131,7 @@ jcs.region.testCache.cacheattributes.MaxObjects=1000
         </p>
         <source><![CDATA[
 jcs.auxiliary.DC=
-    org.apache.commons.jcs4.auxiliary.disk.DiskCacheFactory
-jcs.auxiliary.DC.attributes=
-    org.apache.commons.jcs4.auxiliary.disk.DiskCacheAttributes
+    org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheFactory
 jcs.auxiliary.DC.attributes.DiskPath=c:/dev/cache/raf
         ]]></source>
         <p>
@@ -153,8 +147,6 @@ jcs.auxiliary.DC.attributes.DiskPath=c:/dev/cache/raf
         <source><![CDATA[
 jcs.auxiliary.RFailover=
     org.apache.commons.jcs4.auxiliary.remote.RemoteCacheFactory
-jcs.auxiliary.RFailover.attributes=
-    org.apache.commons.jcs4.auxiliary.remote.RemoteCacheAttributes
 jcs.auxiliary.RFailover.attributes.RemoteTypeName=LOCAL
 jcs.auxiliary.RFailover.attributes.FailoverServers=
     localhost:1102,localhost:1101
diff --git a/xdocs/MySQLDiskCacheProperties.xml b/src/site/xdoc/MySQLDiskCacheProperties.xml
similarity index 96%
rename from xdocs/MySQLDiskCacheProperties.xml
rename to src/site/xdoc/MySQLDiskCacheProperties.xml
index 5926cc21..37f12406 100644
--- a/xdocs/MySQLDiskCacheProperties.xml
+++ b/src/site/xdoc/MySQLDiskCacheProperties.xml
@@ -93,7 +93,6 @@
 ################## AUXILIARY CACHES AVAILABLE ################
 # MYSQL disk cache
 jcs.auxiliary.MYSQL=org.apache.commons.jcs4.auxiliary.disk.jdbc.mysql.MySQLDiskCacheFactory
-jcs.auxiliary.MYSQL.attributes=org.apache.commons.jcs4.auxiliary.disk.jdbc.mysql.MySQLDiskCacheAttributes
 jcs.auxiliary.MYSQL.attributes.userName=sa
 jcs.auxiliary.MYSQL.attributes.password=
 jcs.auxiliary.MYSQL.attributes.url=jdbc:hsqldb:target/cache_hsql_db
@@ -161,7 +160,6 @@ jcs.auxiliary.MYSQL.attributes.balkDuringOptimization=true
 ################## AUXILIARY CACHES AVAILABLE ################
 # MYSQL disk cache
 jcs.auxiliary.MYSQL=org.apache.commons.jcs4.auxiliary.disk.jdbc.mysql.MySQLDiskCacheFactory
-jcs.auxiliary.MYSQL.attributes=org.apache.commons.jcs4.auxiliary.disk.jdbc.mysql.MySQLDiskCacheAttributes
 jcs.auxiliary.MYSQL.attributes.userName=sa
 jcs.auxiliary.MYSQL.attributes.password=
 jcs.auxiliary.MYSQL.attributes.url=jdbc:hsqldb:target/cache_hsql_db
diff --git a/xdocs/ProjectHistory.xml b/src/site/xdoc/ProjectHistory.xml
similarity index 100%
rename from xdocs/ProjectHistory.xml
rename to src/site/xdoc/ProjectHistory.xml
diff --git a/xdocs/RegionProperties.xml b/src/site/xdoc/RegionProperties.xml
similarity index 100%
rename from xdocs/RegionProperties.xml
rename to src/site/xdoc/RegionProperties.xml
diff --git a/xdocs/RemoteAuxCache.xml b/src/site/xdoc/RemoteAuxCache.xml
similarity index 95%
rename from xdocs/RemoteAuxCache.xml
rename to src/site/xdoc/RemoteAuxCache.xml
index d1a00e71..3e11ed62 100644
--- a/xdocs/RemoteAuxCache.xml
+++ b/src/site/xdoc/RemoteAuxCache.xml
@@ -151,8 +151,6 @@
 # Remote RMI Cache set up to failover
 jcs.auxiliary.RFailover=
     org.apache.commons.jcs4.auxiliary.remote.RemoteCacheFactory
-jcs.auxiliary.RFailover.attributes=
-    org.apache.commons.jcs4.auxiliary.remote.RemoteCacheAttributes
 jcs.auxiliary.RFailover.attributes.FailoverServers=
     localhost:1102,localhost:1103
 jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true
@@ -167,11 +165,7 @@ jcs.auxiliary.RFailover.attributes.GetOnly=false
 					<![CDATA[
 #Regions preconfigured for caching
 jcs.region.testCache1=DC,RFailover
-jcs.region.testCache1.cacheattributes=
-    org.apache.commons.jcs4.engine.CompositeCacheAttributes
 jcs.region.testCache1.cacheattributes.MaxObjects=1000
-jcs.region.testCache1.cacheattributes.MemoryCacheName=
-    org.apache.commons.jcs4.engine.memory.lru.LRUMemoryCache
         ]]>
 				</source>
 			</subsection>
@@ -248,14 +242,10 @@ jcs.remotecache.serverattributes.AllowClusterGet=true
 					<![CDATA[
 # sets the default aux value for any non configured caches
 jcs.default=DC,RCluster1
-jcs.default.cacheattributes=
-    org.apache.commons.jcs4.engine.CompositeCacheAttributes
 jcs.default.cacheattributes.MaxObjects=1000
 
 jcs.auxiliary.RCluster1=
     org.apache.commons.jcs4.auxiliary.remote.RemoteCacheFactory
-jcs.auxiliary.RCluster1.attributes=
-    org.apache.commons.jcs4.auxiliary.remote.RemoteCacheAttributes
 jcs.auxiliary.RCluster1.attributes.RemoteTypeName=CLUSTER
 jcs.auxiliary.RCluster1.attributes.RemoveUponRemotePut=false
 jcs.auxiliary.RCluster1.attributes.ClusterServers=localhost:1103
@@ -305,8 +295,6 @@ jcs.auxiliary.RCluster1.attributes.GetOnly=false
 	# Remote RMI Cache set up to failover
 	jcs.auxiliary.RFailover=
 	    org.apache.commons.jcs4.auxiliary.remote.RemoteCacheFactory
-	jcs.auxiliary.RFailover.attributes=
-	    org.apache.commons.jcs4.auxiliary.remote.RemoteCacheAttributes
 	jcs.auxiliary.RFailover.attributes.FailoverServers=
 	    localhost:1102,localhost:1103
 	jcs.auxiliary.RC.attributes.RemoveUponRemotePut=true
diff --git a/xdocs/RemoteCacheProperties.xml b/src/site/xdoc/RemoteCacheProperties.xml
similarity index 98%
rename from xdocs/RemoteCacheProperties.xml
rename to src/site/xdoc/RemoteCacheProperties.xml
index 2e53498a..a495b632 100644
--- a/xdocs/RemoteCacheProperties.xml
+++ b/src/site/xdoc/RemoteCacheProperties.xml
@@ -151,7 +151,6 @@
 					<![CDATA[
 # This remote client does not receive
 jcs.auxiliary.RC=org.apache.commons.jcs4.auxiliary.remote.RemoteCacheFactory
-jcs.auxiliary.RC.attributes=org.apache.commons.jcs4.auxiliary.remote.RemoteCacheAttributes
 jcs.auxiliary.RC.attributes.FailoverServers=localhost:1101,localhost:1102
 jcs.auxiliary.RC.attributes.LocalPort=1201
 jcs.auxiliary.RC.attributes.RemoveUponRemotePut=false
diff --git a/xdocs/RemoteHttpCacheProperties.xml b/src/site/xdoc/RemoteHttpCacheProperties.xml
similarity index 97%
rename from xdocs/RemoteHttpCacheProperties.xml
rename to src/site/xdoc/RemoteHttpCacheProperties.xml
index efcdbe0d..be44daa7 100644
--- a/xdocs/RemoteHttpCacheProperties.xml
+++ b/src/site/xdoc/RemoteHttpCacheProperties.xml
@@ -101,7 +101,6 @@
 					<![CDATA[
 # This remote client does not receive
 jcs.auxiliary.RC=org.apache.commons.jcs4.auxiliary.remote.http.client.RemoteCacheFactory
-jcs.auxiliary.RC.attributes=org.apache.commons.jcs4.auxiliary.remote.RemoteCacheAttributes
 jcs.auxiliary.RC.attributes.FailoverServers=localhost:1101,localhost:1102
 jcs.auxiliary.RC.attributes.LocalPort=1201
 jcs.auxiliary.RC.attributes.RemoveUponRemotePut=false
diff --git a/xdocs/UpgradingFrom13.xml b/src/site/xdoc/UpgradingFrom13.xml
similarity index 100%
rename from xdocs/UpgradingFrom13.xml
rename to src/site/xdoc/UpgradingFrom13.xml
diff --git a/xdocs/UpgradingFrom2x.xml b/src/site/xdoc/UpgradingFrom2x.xml
similarity index 100%
rename from xdocs/UpgradingFrom2x.xml
rename to src/site/xdoc/UpgradingFrom2x.xml
diff --git a/xdocs/UpgradingFrom3x.xml b/src/site/xdoc/UpgradingFrom3x.xml
similarity index 96%
rename from xdocs/UpgradingFrom3x.xml
rename to src/site/xdoc/UpgradingFrom3x.xml
index 2fd40476..3c8f21ef 100644
--- a/xdocs/UpgradingFrom3x.xml
+++ b/src/site/xdoc/UpgradingFrom3x.xml
@@ -70,11 +70,11 @@ import org.apache.commons.jcs4.*;
           Here again, change all package names in configuration entries
           from e.g.
         <source><![CDATA[
-jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
+jcs.auxiliary.blockDiskCache=org.apache.commons.jcs3.auxiliary.disk.block.BlockDiskCacheFactory
 ]]></source>
           to
         <source><![CDATA[
-jcs.default.cacheattributes=org.apache.commons.jcs4.engine.CompositeCacheAttributes
+jcs.auxiliary.blockDiskCache=org.apache.commons.jcs4.auxiliary.disk.block.BlockDiskCacheFactory
 ]]></source>
         </p>
       </subsection>
diff --git a/xdocs/UsingJCSBasicWeb.xml b/src/site/xdoc/UsingJCSBasicWeb.xml
similarity index 96%
rename from xdocs/UsingJCSBasicWeb.xml
rename to src/site/xdoc/UsingJCSBasicWeb.xml
index 2f7faf1d..a831b7cc 100644
--- a/xdocs/UsingJCSBasicWeb.xml
+++ b/src/site/xdoc/UsingJCSBasicWeb.xml
@@ -362,11 +362,7 @@ public class BookVObjManager
 
 # sets the default aux value for any non configured caches
 jcs.default=DC,RFailover
-jcs.default.cacheattributes=
-    org.apache.commons.jcs4.engine.CompositeCacheAttributes
 jcs.default.cacheattributes.MaxObjects=1000
-jcs.default.cacheattributes.MemoryCacheName=
-    org.apache.commons.jcs4.engine.memory.lru.LRUMemoryCache
 jcs.default.elementattributes.IsEternal=false
 jcs.default.elementattributes.MaxLife=3600
 jcs.default.elementattributes.MaxIdleTime=1800
@@ -376,11 +372,7 @@ jcs.default.elementattributes.MaxIdleTime=1800
 
 # Regions preconfigured for caching
 jcs.region.bookCache=DC,RFailover
-jcs.region.bookCache.cacheattributes=
-    org.apache.commons.jcs4.engine.CompositeCacheAttributes
 jcs.region.bookCache.cacheattributes.MaxObjects=1200
-jcs.region.bookCache.cacheattributes.MemoryCacheName=
-    org.apache.commons.jcs4.engine.memory.lru.LRUMemoryCache
 jcs.region.bookCache.elementattributes.IsEternal=false
 jcs.region.bookCache.elementattributes.MaxLife=7200
 jcs.region.bookCache.elementattributes.MaxIdleTime=1800
@@ -393,8 +385,6 @@ jcs.region.bookCache.elementattributes.IsLateral=true
 # Primary Disk Cache -- faster than the rest because of memory key storage
 jcs.auxiliary.DC=
     org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=
-    org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheAttributes
 jcs.auxiliary.DC.attributes.DiskPath=/usr/opt/bookstore/raf
 jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000
 jcs.auxiliary.DC.attributes.MaxKeySize=10000
@@ -403,8 +393,6 @@ jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000
 # Remote RMI Cache set up to failover
 jcs.auxiliary.RFailover=
     org.apache.commons.jcs4.auxiliary.remote.RemoteCacheFactory
-jcs.auxiliary.RFailover.attributes=
-    org.apache.commons.jcs4.auxiliary.remote.RemoteCacheAttributes
 jcs.auxiliary.RFailover.attributes.RemoteTypeName=LOCAL
 jcs.auxiliary.RFailover.attributes.FailoverServers=scriptserver:1102
 jcs.auxiliary.RFailover.attributes.GetOnly=false
diff --git a/xdocs/download_jcs.xml b/src/site/xdoc/download_jcs.xml
similarity index 100%
rename from xdocs/download_jcs.xml
rename to src/site/xdoc/download_jcs.xml
diff --git a/xdocs/getting_started/intro.xml b/src/site/xdoc/getting_started/intro.xml
similarity index 99%
rename from xdocs/getting_started/intro.xml
rename to src/site/xdoc/getting_started/intro.xml
index 74c27fc8..277f323c 100644
--- a/xdocs/getting_started/intro.xml
+++ b/src/site/xdoc/getting_started/intro.xml
@@ -167,7 +167,6 @@ jcs.region.testCache1.elementattributes.IsEternal=false
 
 # AVAILABLE AUXILIARY CACHES
 jcs.auxiliary.DC=org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheAttributes
 jcs.auxiliary.DC.attributes.DiskPath=${user.dir}/jcs_swap
 jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000000
 jcs.auxiliary.DC.attributes.MaxKeySize=1000000
diff --git a/xdocs/index.xml b/src/site/xdoc/index.xml
similarity index 100%
rename from xdocs/index.xml
rename to src/site/xdoc/index.xml
diff --git a/xdocs/issue-tracking.xml b/src/site/xdoc/issue-tracking.xml
similarity index 100%
rename from xdocs/issue-tracking.xml
rename to src/site/xdoc/issue-tracking.xml
diff --git a/xdocs/mail-lists.xml b/src/site/xdoc/mail-lists.xml
similarity index 100%
rename from xdocs/mail-lists.xml
rename to src/site/xdoc/mail-lists.xml


(commons-jcs) 01/12: Fix JCS-222 Typo "waterfal" Method

Posted by tv...@apache.org.
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 f4a9dd0ddabe2e12b5acd9ba7046e0302b150e1e
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Mon Feb 16 16:18:08 2026 +0100

    Fix JCS-222 Typo "waterfal" Method
---
 .../java/org/apache/commons/jcs4/engine/memory/AbstractMemoryCache.java | 2 +-
 .../org/apache/commons/jcs4/engine/memory/behavior/IMemoryCache.java    | 2 +-
 .../org/apache/commons/jcs4/engine/memory/lru/LHMLRUMemoryCache.java    | 2 +-
 .../org/apache/commons/jcs4/engine/memory/shrinking/ShrinkerThread.java | 2 +-
 .../commons/jcs4/engine/memory/soft/SoftReferenceMemoryCache.java       | 2 +-
 .../java/org/apache/commons/jcs4/engine/memory/MockMemoryCache.java     | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/AbstractMemoryCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/AbstractMemoryCache.java
index f8a29f0b..1639d939 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/AbstractMemoryCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/AbstractMemoryCache.java
@@ -496,7 +496,7 @@ public abstract class AbstractMemoryCache<K, V>
      * @param ce the item
      */
     @Override
-    public void waterfal( final ICacheElement<K, V> ce )
+    public void waterfall( final ICacheElement<K, V> ce )
     {
         this.cache.spoolToDisk( ce );
     }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/behavior/IMemoryCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/behavior/IMemoryCache.java
index 6bce255f..0ff3df3d 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/behavior/IMemoryCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/behavior/IMemoryCache.java
@@ -182,6 +182,6 @@ public interface IMemoryCache<K, V>
      * @throws IOException
      *                Description of the Exception
      */
-    void waterfal( ICacheElement<K, V> ce ) // FIXME: Correct typo before 4.0, see JCS-222
+    void waterfall( ICacheElement<K, V> ce )
         throws IOException;
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/lru/LHMLRUMemoryCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/lru/LHMLRUMemoryCache.java
index 987a7fa2..805fc2a4 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/lru/LHMLRUMemoryCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/lru/LHMLRUMemoryCache.java
@@ -74,7 +74,7 @@ public class LHMLRUMemoryCache<K, V>
             log.debug( "LHMLRU max size: {0}. Spooling element, key: {1}",
                     () -> getCacheAttributes().maxObjects(), element::key);
 
-            waterfal( element );
+            waterfall( element );
 
             log.debug( "LHMLRU size: {0}", () -> map.size() );
             return true;
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/shrinking/ShrinkerThread.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/shrinking/ShrinkerThread.java
index b4f812a6..4773d78a 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/shrinking/ShrinkerThread.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/shrinking/ShrinkerThread.java
@@ -167,7 +167,7 @@ public class ShrinkerThread<K, V>
                             spoolCount++;
 
                             memCache.remove( key );
-                            memCache.waterfal( cacheElement );
+                            memCache.waterfall( cacheElement );
                         }
                     }
                     else
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/soft/SoftReferenceMemoryCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/soft/SoftReferenceMemoryCache.java
index 55b6a708..3783ef46 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/soft/SoftReferenceMemoryCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/soft/SoftReferenceMemoryCache.java
@@ -202,7 +202,7 @@ public class SoftReferenceMemoryCache<K, V> extends AbstractMemoryCache<K, V>
         for (int cursize = startsize; cursize > max; cursize--)
         {
             final ICacheElement<K, V> ce = strongReferences.poll();
-            waterfal(ce);
+            waterfall(ce);
         }
     }
 
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/memory/MockMemoryCache.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/memory/MockMemoryCache.java
index 6ca76c59..db86d540 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/memory/MockMemoryCache.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/memory/MockMemoryCache.java
@@ -239,7 +239,7 @@ public class MockMemoryCache<K, V>
      * @throws IOException
      */
     @Override
-    public void waterfal( final ICacheElement<K, V> ce )
+    public void waterfall( final ICacheElement<K, V> ce )
         throws IOException
     {
         waterfallCallCount++;


(commons-jcs) 11/12: Fix SpotBugs and PMD complaints

Posted by tv...@apache.org.
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 8954ba19a3dcf588f2c073047011dcd563928e82
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Tue Feb 17 18:56:40 2026 +0100

    Fix SpotBugs and PMD complaints
---
 .../auxiliary/AbstractAuxiliaryCacheMonitor.java     |  2 +-
 .../remote/AbstractRemoteCacheListener.java          |  2 +-
 .../auxiliary/remote/server/RemoteCacheServer.java   | 20 +++++++++-----------
 .../remote/server/RemoteCacheServerFactory.java      | 18 +++++++++++-------
 .../jcs4/engine/control/CompositeCacheManager.java   |  3 +--
 .../engine/logging/behavior/ICacheEventLogger.java   |  4 ++--
 .../jcs4/engine/memory/lru/LHMLRUMemoryCache.java    |  5 ++---
 .../jcs4/engine/memory/shrinking/ShrinkerThread.java |  1 -
 .../main/java/org/apache/commons/jcs4/log/Log.java   |  2 +-
 .../commons/jcs4/utils/config/OptionConverter.java   |  2 +-
 10 files changed, 29 insertions(+), 30 deletions(-)

diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCacheMonitor.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCacheMonitor.java
index bfddc4e4..b5b0bd04 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCacheMonitor.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCacheMonitor.java
@@ -170,7 +170,7 @@ public abstract class AbstractAuxiliaryCacheMonitor extends Thread
                 // run immediately and sleep here.
                 log.debug( "Cache monitor sleeping for {0} between runs.", idlePeriod );
 
-                Thread.sleep( idlePeriod );
+                sleep( idlePeriod );
             }
             catch ( final InterruptedException ex )
             {
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteCacheListener.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteCacheListener.java
index 4368366f..ea39f08a 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteCacheListener.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteCacheListener.java
@@ -41,7 +41,7 @@ public abstract class AbstractRemoteCacheListener<K, V>
     private static final Log log = Log.getLog( AbstractRemoteCacheListener.class );
 
     /** The cached name of the local host. The remote server gets this for logging purposes. */
-    private static String localHostName;
+    private String localHostName;
 
     /**
      * The cache manager used to put items in different regions. This is set lazily and should not
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServer.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServer.java
index 0266afa7..3d76988c 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServer.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServer.java
@@ -467,7 +467,7 @@ public class RemoteCacheServer<K, V>
         final List<ICacheEventQueue<K, V>> list = new ArrayList<>(cacheListeners.eventQMap.values());
 
         // Only return qualified event queues
-        list.removeIf(q -> (!q.isWorking() || q.getListenerId() == requesterId));
+        list.removeIf(q -> !q.isWorking() || q.getListenerId() == requesterId);
 
         return list;
     }
@@ -1421,21 +1421,19 @@ public class RemoteCacheServer<K, V>
     {
         log.info( "Received shutdown request. Shutting down server." );
 
-        synchronized (listenerId)
+        final long maxListenerId = listenerId.get(0);
+        for (final String cacheName : cacheListenersMap.keySet())
         {
-            for (final String cacheName : cacheListenersMap.keySet())
+            for (long i = 0; i <= maxListenerId; i++)
             {
-                for (long i = 0; i <= listenerId.get(0); i++)
-                {
-                    removeCacheListener( cacheName, i );
-                }
-
-                log.info( "Removing listener for cache [{0}]", cacheName );
+                removeCacheListener( cacheName, i );
             }
 
-            cacheListenersMap.clear();
-            clusterListenersMap.clear();
+            log.info( "Removing listener for cache [{0}]", cacheName );
         }
+
+        cacheListenersMap.clear();
+        clusterListenersMap.clear();
         RemoteCacheServerFactory.shutdownImpl( host, port );
         this.cacheManager.shutDown();
     }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServerFactory.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServerFactory.java
index e68b1269..fba068d0 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServerFactory.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/server/RemoteCacheServerFactory.java
@@ -29,6 +29,7 @@ import java.rmi.RemoteException;
 import java.rmi.registry.Registry;
 import java.rmi.server.RMISocketFactory;
 import java.rmi.server.UnicastRemoteObject;
+import java.util.Arrays;
 import java.util.Objects;
 import java.util.Properties;
 import java.util.concurrent.Executors;
@@ -51,7 +52,6 @@ import org.apache.commons.jcs4.utils.threadpool.DaemonThreadFactory;
  * requests to a running server.
  */
 public class RemoteCacheServerFactory
-    implements IRemoteCacheConstants
 {
     /** The logger */
     private static final Log log = Log.getLog( RemoteCacheServerFactory.class );
@@ -90,12 +90,13 @@ public class RemoteCacheServerFactory
     protected static RMISocketFactory configureObjectSpecificCustomFactory( final Properties props )
     {
         final RMISocketFactory customRMISocketFactory =
-            OptionConverter.instantiateByKey( props, CUSTOM_RMI_SOCKET_FACTORY_PROPERTY_PREFIX, null );
+            OptionConverter.instantiateByKey( props,
+                    IRemoteCacheConstants.CUSTOM_RMI_SOCKET_FACTORY_PROPERTY_PREFIX, null );
 
         if ( customRMISocketFactory != null )
         {
-            PropertySetter.setProperties( customRMISocketFactory, props, CUSTOM_RMI_SOCKET_FACTORY_PROPERTY_PREFIX
-                + "." );
+            PropertySetter.setProperties( customRMISocketFactory, props,
+                    IRemoteCacheConstants.CUSTOM_RMI_SOCKET_FACTORY_PROPERTY_PREFIX + "." );
             log.info( "Will use server specific custom socket factory. {0}",
                     customRMISocketFactory );
         }
@@ -119,7 +120,8 @@ public class RemoteCacheServerFactory
         final RemoteCacheServerAttributes rcsa = new RemoteCacheServerAttributes();
 
         // configure automatically
-        PropertySetter.setProperties( rcsa, prop, CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX + "." );
+        PropertySetter.setProperties( rcsa, prop,
+                IRemoteCacheConstants.CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX + "." );
 
         return rcsa;
     }
@@ -239,7 +241,9 @@ public class RemoteCacheServerFactory
      */
     private static ICacheServiceAdmin lookupCacheServiceAdmin(final Properties config, final int port) throws Exception
     {
-        final String remoteServiceName = config.getProperty( REMOTE_CACHE_SERVICE_NAME, REMOTE_CACHE_SERVICE_VAL ).trim();
+        final String remoteServiceName = config.getProperty(
+                IRemoteCacheConstants.REMOTE_CACHE_SERVICE_NAME,
+                IRemoteCacheConstants.REMOTE_CACHE_SERVICE_VAL ).trim();
         final String registry = RemoteUtils.getNamingURL("", port, remoteServiceName);
 
         log.debug( "looking up server {0}", registry );
@@ -300,7 +304,7 @@ public class RemoteCacheServerFactory
 
                 try
                 {
-                    log.debug( admin.getStatistics().toString() );
+                    log.debug(Arrays.deepToString(admin.getStatistics()));
                 }
                 catch ( final IOException es )
                 {
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/control/CompositeCacheManager.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/control/CompositeCacheManager.java
index c4283bd8..e7706fed 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/control/CompositeCacheManager.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/control/CompositeCacheManager.java
@@ -391,8 +391,7 @@ public class CompositeCacheManager
         final ElapsedTimer timer = new ElapsedTimer();
 
         // set default value list
-        this.defaultAuxValues = OptionConverter.findAndSubst( CompositeCacheManager.DEFAULT_REGION,
-                properties );
+        this.defaultAuxValues = OptionConverter.findAndSubst( DEFAULT_REGION, properties );
 
         log.info( "Setting default auxiliaries to \"{0}\"", this.defaultAuxValues );
 
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/behavior/ICacheEventLogger.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/behavior/ICacheEventLogger.java
index 09731240..cc4a4d2f 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/behavior/ICacheEventLogger.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/logging/behavior/ICacheEventLogger.java
@@ -30,7 +30,7 @@ import org.apache.commons.jcs4.engine.logging.CacheEvent;
  */
 public interface ICacheEventLogger
 {
-    public enum CacheEventType
+    enum CacheEventType
     {
         /** ICache update */
         UPDATE_EVENT("update"),
@@ -85,7 +85,7 @@ public interface ICacheEventLogger
 
         public final String label;
 
-        private CacheEventType(String label)
+        CacheEventType(String label)
         {
             this.label = label;
         }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/lru/LHMLRUMemoryCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/lru/LHMLRUMemoryCache.java
index 805fc2a4..fcd3eecb 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/lru/LHMLRUMemoryCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/lru/LHMLRUMemoryCache.java
@@ -40,8 +40,7 @@ public class LHMLRUMemoryCache<K, V>
     /**
      * Implements removeEldestEntry from {@link LinkedHashMap}.
      */
-    protected class LHMSpooler
-        extends java.util.LinkedHashMap<K, MemoryElementDescriptor<K, V>>
+    protected class LHMSpooler extends LinkedHashMap<K, MemoryElementDescriptor<K, V>>
     {
         /** Don't change. */
         private static final long serialVersionUID = -1255907868906762484L;
@@ -76,7 +75,7 @@ public class LHMLRUMemoryCache<K, V>
 
             waterfall( element );
 
-            log.debug( "LHMLRU size: {0}", () -> map.size() );
+            log.debug( "LHMLRU size: {0}", map::size );
             return true;
         }
     }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/shrinking/ShrinkerThread.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/shrinking/ShrinkerThread.java
index 4773d78a..dc2a3d34 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/shrinking/ShrinkerThread.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/shrinking/ShrinkerThread.java
@@ -192,7 +192,6 @@ public class ShrinkerThread<K, V>
             // It is up to the IMemoryCache to return an array of keys
 
             // stop for now
-            return;
         }
     }
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/log/Log.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/log/Log.java
index a5ce5d94..024e7cde 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/log/Log.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/log/Log.java
@@ -383,6 +383,6 @@ public interface Log
      */
     static Log getLog(final Class<?> clazz)
     {
-        return Log.getLog(clazz.getName());
+        return getLog(clazz.getName());
     }
 }
\ No newline at end of file
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/utils/config/OptionConverter.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/utils/config/OptionConverter.java
index 403e4c9c..315f48f2 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/utils/config/OptionConverter.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/utils/config/OptionConverter.java
@@ -159,7 +159,7 @@ public class OptionConverter
             return defaultValue;
         }
         // Trim className to avoid trailing spaces that cause problems.
-        return OptionConverter.instantiateByClassName( className.trim(), defaultValue );
+        return instantiateByClassName( className.trim(), defaultValue );
     }
 
     /**


(commons-jcs) 07/12: Fix typo in class name

Posted by tv...@apache.org.
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 328e5399de6d952c2329494401e20bbe8fdaed9f
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Tue Feb 17 14:52:11 2026 +0100

    Fix typo in class name
---
 .../main/java/org/apache/commons/jcs4/jcache/JCSCachingManager.java   | 4 ++--
 .../java/org/apache/commons/jcs4/jcache/lang/Lang3Substitutor.java    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/JCSCachingManager.java b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/JCSCachingManager.java
index 6980a43a..c5bd2823 100644
--- a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/JCSCachingManager.java
+++ b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/JCSCachingManager.java
@@ -42,7 +42,7 @@ import org.apache.commons.jcs4.engine.behavior.IElementAttributes;
 import org.apache.commons.jcs4.engine.control.CompositeCache;
 import org.apache.commons.jcs4.engine.control.CompositeCacheConfigurator;
 import org.apache.commons.jcs4.engine.control.CompositeCacheManager;
-import org.apache.commons.jcs4.jcache.lang.Subsitutor;
+import org.apache.commons.jcs4.jcache.lang.Substitutor;
 import org.apache.commons.jcs4.jcache.proxy.ClassLoaderAwareCache;
 
 public class JCSCachingManager implements CacheManager
@@ -73,7 +73,7 @@ public class JCSCachingManager implements CacheManager
             };
         }
     }
-    private static final Subsitutor SUBSTITUTOR = Subsitutor.Helper.INSTANCE;
+    private static final Substitutor SUBSTITUTOR = Substitutor.Helper.INSTANCE;
 
     private static final String DEFAULT_CONFIG =
         """
diff --git a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/Lang3Substitutor.java b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/Lang3Substitutor.java
index 54c441c5..dedb7a86 100644
--- a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/Lang3Substitutor.java
+++ b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/Lang3Substitutor.java
@@ -24,7 +24,7 @@ import java.util.Map;
 
 import org.apache.commons.text.StringSubstitutor;
 
-public class Lang3Substitutor implements Subsitutor
+public class Lang3Substitutor implements Substitutor
 {
     private static final StringSubstitutor SUBSTITUTOR = new StringSubstitutor(new HashMap<String, Object>()
     {


(commons-jcs) 05/12: Remove unused exceptions

Posted by tv...@apache.org.
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 a9cc9861c9c9e6a0b0c4e6c87f5b5d9b40970b12
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Tue Feb 17 14:50:34 2026 +0100

    Remove unused exceptions
---
 .../access/exception/ConfigurationException.java   | 43 ------------------
 .../access/exception/InvalidGroupException.java    | 46 -------------------
 .../access/exception/InvalidHandleException.java   | 48 --------------------
 .../access/exception/ObjectExistsException.java    | 52 ----------------------
 .../access/exception/ObjectNotFoundException.java  | 50 ---------------------
 5 files changed, 239 deletions(-)

diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/ConfigurationException.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/ConfigurationException.java
deleted file mode 100644
index 7e3155e1..00000000
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/ConfigurationException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.apache.commons.jcs4.access.exception;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/** Thrown if there is some severe configuration problem that makes the cache nonfunctional. */
-public class ConfigurationException
-    extends CacheException
-{
-    /** Don't change. */
-    private static final long serialVersionUID = 6881044536186097055L;
-
-    /** Constructor for the ConfigurationException object */
-    public ConfigurationException()
-    {
-    }
-
-    /**
-     * Constructor for the ConfigurationException object.
-     *
-     * @param message
-     */
-    public ConfigurationException( final String message )
-    {
-        super( message );
-    }
-}
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/InvalidGroupException.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/InvalidGroupException.java
deleted file mode 100644
index 4e6d080e..00000000
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/InvalidGroupException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.apache.commons.jcs4.access.exception;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * InvalidGroupException
- */
-public class InvalidGroupException
-    extends CacheException
-{
-    /** Don't change. */
-    private static final long serialVersionUID = -5219807114008843480L;
-
-    /** Constructor for the InvalidGroupException object */
-    public InvalidGroupException()
-    {
-    }
-
-    /**
-     * Constructor for the InvalidGroupException object
-     *
-     * @param message
-     */
-    public InvalidGroupException( final String message )
-    {
-        super( message );
-    }
-
-}
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/InvalidHandleException.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/InvalidHandleException.java
deleted file mode 100644
index 020847bc..00000000
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/InvalidHandleException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.apache.commons.jcs4.access.exception;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * InvalidHandleException is not used.
- */
-public class InvalidHandleException
-    extends CacheException
-{
-    /** Don't change. */
-    private static final long serialVersionUID = -5947822454839845924L;
-
-    /** Constructor for the InvalidHandleException object */
-    public InvalidHandleException()
-    {
-        // nothing
-
-    }
-
-    /**
-     * Constructor for the InvalidHandleException object.
-     *
-     * @param message
-     */
-    public InvalidHandleException( final String message )
-    {
-        super( message );
-    }
-
-}
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/ObjectExistsException.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/ObjectExistsException.java
deleted file mode 100644
index 7b541946..00000000
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/ObjectExistsException.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.commons.jcs4.access.exception;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * The putSafe method on the JCS convenience class throws this exception if the object is already
- * present in the cache.
- * <p>
- * I'm removing this exception from normal use.
- * <p>
- * The overhead of throwing exceptions and the cumbersomeness of coding around exceptions warrants
- * removal. Exceptions like this don't make sense to throw in the course of normal operations to
- * signify a normal and expected condition. Returning null if an object isn't found is sufficient.
- */
-public class ObjectExistsException
-    extends CacheException
-{
-    /** Don't change. */
-    private static final long serialVersionUID = -3779745827993383872L;
-
-    /** Constructor for the ObjectExistsException object */
-    public ObjectExistsException()
-    {
-    }
-
-    /**
-     * Constructor for the ObjectExistsException object
-     * @param message
-     */
-    public ObjectExistsException( final String message )
-    {
-        super( message );
-    }
-
-}
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/ObjectNotFoundException.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/ObjectNotFoundException.java
deleted file mode 100644
index 37210318..00000000
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/exception/ObjectNotFoundException.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.commons.jcs4.access.exception;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * ObjectNotFoundException
- * <p>
- * TODO see if we can remove this.
- * <p>
- * This is thrown from the composite cache if you as for the element attributes and the element does
- * not exist.
- */
-public class ObjectNotFoundException
-    extends CacheException
-{
-    /** Don't change. */
-    private static final long serialVersionUID = 5684353421076546842L;
-
-    /** Constructor for the ObjectNotFoundException object */
-    public ObjectNotFoundException()
-    {
-    }
-
-    /**
-     * Constructor for the ObjectNotFoundException object
-     * @param message
-     */
-    public ObjectNotFoundException( final String message )
-    {
-        super( message );
-    }
-
-}


(commons-jcs) 09/12: Document changes

Posted by tv...@apache.org.
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 d7ab40acc69dc7756aa2e310815acc3ef66937a7
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Tue Feb 17 14:52:43 2026 +0100

    Document changes
---
 src/changes/changes.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 43d45202..abcc84e9 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -40,6 +40,9 @@
             <action dev="tv" type="fix" issue="JCS-243" due-to="Henrik Hiltunen">
                fix ICacheServiceAdmin not extending Remote
             </action>
+            <action dev="tv" type="fix" issue="JCS-222" due-to="Arturo Bernal">
+               fix typo "waterfal" method
+            </action>
             <!-- ADD -->
             <action type="add" dev="ggregory" due-to="Gary Gregory">
                Add Maven property project.build.outputTimestamp for build reproducibility.


(commons-jcs) 06/12: Remove duplicate code

Posted by tv...@apache.org.
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 15df71a9c813b9c74096290f7b5395cd6f211cf6
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Tue Feb 17 14:51:52 2026 +0100

    Remove duplicate code
---
 .../apache/commons/jcs4/access/CacheAccess.java    | 12 +--
 .../jcs4/auxiliary/AbstractAuxiliaryCache.java     | 35 +++++++++
 .../AbstractAuxiliaryCacheEventLogging.java        |  2 +-
 .../auxiliary/AbstractCacheEventLogSupport.java    |  8 +-
 .../commons/jcs4/auxiliary/AuxiliaryCache.java     | 10 ++-
 .../jcs4/auxiliary/disk/AbstractDiskCache.java     | 59 +++++----------
 .../jcs4/auxiliary/disk/PurgatoryElement.java      | 16 ++--
 .../jcs4/auxiliary/disk/block/BlockDiskCache.java  | 40 +++++-----
 .../disk/block/BlockDiskCacheFactory.java          |  5 +-
 .../auxiliary/disk/indexed/IndexedDiskCache.java   | 49 ++++++-------
 .../jcs4/auxiliary/disk/jdbc/JDBCDiskCache.java    | 20 ++---
 .../lateral/socket/tcp/LateralTCPCache.java        | 60 ++++++---------
 .../socket/tcp/LateralTCPCacheNoWaitFacade.java    | 33 +--------
 .../remote/AbstractRemoteAuxiliaryCache.java       | 85 +++++++---------------
 .../remote/AbstractRemoteCacheNoWaitFacade.java    | 22 +-----
 .../commons/jcs4/auxiliary/remote/RemoteCache.java | 14 ++--
 .../jcs4/auxiliary/remote/RemoteCacheNoWait.java   | 10 ---
 .../remote/http/client/RemoteHttpCache.java        | 17 +----
 .../remote/http/client/RemoteHttpCacheMonitor.java |  3 +-
 .../http/server/AbstractRemoteCacheService.java    | 57 ++++-----------
 .../remote/http/server/RemoteHttpCacheService.java | 11 +--
 .../remote/value/RemoteCacheResponse.java          |  2 +-
 .../jcs4/engine/behavior/ICacheService.java        | 12 +--
 .../jcs4/engine/control/CompositeCache.java        |  3 +-
 .../memory/soft/SoftReferenceMemoryCache.java      |  2 +-
 .../commons/jcs4/access/CacheAccessUnitTest.java   |  3 +-
 .../commons/jcs4/auxiliary/MockAuxiliaryCache.java |  9 ---
 .../auxiliary/disk/AbstractDiskCacheUnitTest.java  | 12 +--
 .../auxiliary/remote/RemoteCacheClientTester.java  |  3 +-
 .../control/CompositeCacheDiskUsageUnitTest.java   | 10 ---
 30 files changed, 215 insertions(+), 409 deletions(-)

diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/CacheAccess.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/CacheAccess.java
index e8965c61..bb641b03 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/CacheAccess.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/access/CacheAccess.java
@@ -30,8 +30,6 @@ import java.util.stream.Collectors;
 import org.apache.commons.jcs4.access.behavior.ICacheAccess;
 import org.apache.commons.jcs4.access.exception.CacheException;
 import org.apache.commons.jcs4.access.exception.InvalidArgumentException;
-import org.apache.commons.jcs4.access.exception.InvalidHandleException;
-import org.apache.commons.jcs4.access.exception.ObjectExistsException;
 import org.apache.commons.jcs4.engine.CacheElement;
 import org.apache.commons.jcs4.engine.behavior.ICacheElement;
 import org.apache.commons.jcs4.engine.behavior.IElementAttributes;
@@ -278,15 +276,14 @@ public class CacheAccess<K, V>
      *
      * @param key Key object will be stored with
      * @param value Object to store
-     * @throws CacheException and ObjectExistsException is thrown if the item is already in the
-     *                cache.
+     * @throws CacheException is thrown if the item is already in the cache.
      */
     @Override
     public void putSafe( final K key, final V value )
     {
         if ( getCacheControl().get( key ) != null )
         {
-            throw new ObjectExistsException( "putSafe failed.  Object exists in the cache for key [" + key
+            throw new CacheException( "putSafe failed.  Object exists in the cache for key [" + key
                 + "].  Remove first or use a non-safe put to override the value." );
         }
         put( key, value );
@@ -309,7 +306,7 @@ public class CacheAccess<K, V>
      *
      * @param name Key of object to reset attributes for
      * @param attr New attributes for the object
-     * @throws InvalidHandleException if the item does not exist.
+     * @throws CacheException if the item does not exist.
      */
     @Override
     public void resetElementAttributes( final K name, final IElementAttributes attr )
@@ -318,14 +315,13 @@ public class CacheAccess<K, V>
 
         if ( element == null )
         {
-            throw new InvalidHandleException( "Object for name [" + name + "] is not in the cache" );
+            throw new CacheException( "Object for name [" + name + "] is not in the cache" );
         }
 
         // Although it will work currently, don't assume pass by reference here,
         // i.e. don't do this:
         // element.setElementAttributes( attr );
         // Another reason to call put is to force the changes to be distributed.
-
         put( element.key(), element.value(), attr );
     }
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCache.java
index 71234d4e..46c4b97a 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCache.java
@@ -43,6 +43,9 @@ public abstract class AbstractAuxiliaryCache<K, V>
     /** Key matcher used by the getMatching API */
     private IKeyMatcher<K> keyMatcher = new KeyMatcherPatternImpl<>();
 
+    /** Cache configuration */
+    private AuxiliaryCacheAttributes auxiliaryCacheAttributes;
+
     /**
      * Gets the item from the cache.
      *
@@ -73,6 +76,28 @@ public abstract class AbstractAuxiliaryCache<K, V>
         return this.keyMatcher;
     }
 
+    /**
+     * Returns the cache configuration.
+     *
+     * @return cache configuration
+     */
+    @Override
+    public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
+    {
+        return auxiliaryCacheAttributes;
+    }
+
+    /**
+     * Gets the extra info for the event log.
+     *
+     * @return the eventLogSourceName
+     */
+    @Override
+    protected String getEventLogSourceName()
+    {
+        return getAuxiliaryCacheAttributes().getName();
+    }
+
     /**
      * Gets multiple items from the cache based on the given set of keys.
      *
@@ -133,4 +158,14 @@ public abstract class AbstractAuxiliaryCache<K, V>
             this.keyMatcher = keyMatcher;
         }
     }
+
+    /**
+     * Set the cache configuration
+     *
+     * @param auxiliaryCacheAttributes the auxiliaryCacheAttributes to set
+     */
+    public void setAuxiliaryCacheAttributes(AuxiliaryCacheAttributes auxiliaryCacheAttributes)
+    {
+        this.auxiliaryCacheAttributes = auxiliaryCacheAttributes;
+    }
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCacheEventLogging.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCacheEventLogging.java
index a0c2203e..096833d4 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCacheEventLogging.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractAuxiliaryCacheEventLogging.java
@@ -351,5 +351,5 @@ public abstract class AbstractAuxiliaryCacheEventLogging<K, V>
      *
      * @return disk location
      */
-    public abstract String getEventLoggingExtraInfo();
+    protected abstract String getEventLoggingExtraInfo();
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractCacheEventLogSupport.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractCacheEventLogSupport.java
index c803c973..1f7666a6 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractCacheEventLogSupport.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AbstractCacheEventLogSupport.java
@@ -73,7 +73,7 @@ public abstract class AbstractCacheEventLogSupport<K, V>
         String regionName = item == null ? null : item.cacheName();
         K key = item == null ? null : item.key();
 
-        return createICacheEvent(getAuxiliaryCacheAttributes().getName(), regionName,
+        return createICacheEvent(getEventLogSourceName(), regionName,
                 eventType, eventLoggingExtraInfo.get(), key);
     }
 
@@ -94,7 +94,7 @@ public abstract class AbstractCacheEventLogSupport<K, V>
             return new CacheEvent<>();
         }
 
-        return createICacheEvent(getAuxiliaryCacheAttributes().getName(), regionName,
+        return createICacheEvent(getEventLogSourceName(), regionName,
                 eventType, eventLoggingExtraInfo.get(), key);
     }
 
@@ -111,9 +111,9 @@ public abstract class AbstractCacheEventLogSupport<K, V>
     /**
      * Gets the extra info for the event log.
      *
-     * @return IP, or disk location, etc.
+     * @return the eventLogSourceName
      */
-    public abstract AuxiliaryCacheAttributes getAuxiliaryCacheAttributes();
+    protected abstract String getEventLogSourceName();
 
     /**
      * Logs an event if an event logger is configured.
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AuxiliaryCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AuxiliaryCache.java
index 02362eae..e6f730ae 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AuxiliaryCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AuxiliaryCache.java
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.util.Set;
 
 import org.apache.commons.jcs4.engine.behavior.ICache;
-import org.apache.commons.jcs4.engine.stats.behavior.IStats;
 
 /**
  * Tag interface for auxiliary caches. Currently this provides no additional methods over what is in
@@ -54,8 +53,13 @@ public interface AuxiliaryCache<K, V>
     Set<K> getKeySet() throws IOException;
 
     /**
-     * @return the historical and statistical data for a region's auxiliary cache.
+     * Returns the cache name.
+     *
+     * @return usually the region name.
      */
     @Override
-    IStats getStatistics();
+    default String getCacheName()
+    {
+        return getAuxiliaryCacheAttributes().getCacheName();
+    }
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/AbstractDiskCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/AbstractDiskCache.java
index 3a88e335..ed760c6f 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/AbstractDiskCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/AbstractDiskCache.java
@@ -31,6 +31,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.commons.jcs4.auxiliary.AbstractAuxiliaryCacheEventLogging;
 import org.apache.commons.jcs4.auxiliary.AuxiliaryCache;
+import org.apache.commons.jcs4.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.commons.jcs4.auxiliary.disk.behavior.IDiskCacheAttributes;
 import org.apache.commons.jcs4.engine.CacheEventQueueFactory;
 import org.apache.commons.jcs4.engine.CacheInfo;
@@ -214,9 +215,6 @@ public abstract class AbstractDiskCache<K, V>
     /** The logger */
     private static final Log log = Log.getLog( AbstractDiskCache.class );
 
-    /** Generic disk cache attributes */
-    private final IDiskCacheAttributes diskCacheAttributes;
-
     /**
      * Map where elements are stored between being added to this cache and actually spooled to disk.
      * This allows puts to the disk cache to return quickly, and the more expensive operation of
@@ -239,9 +237,6 @@ public abstract class AbstractDiskCache<K, V>
      */
     private final AtomicBoolean alive = new AtomicBoolean();
 
-    /** Every cache will have a name, subclasses must set this when they are initialized. */
-    private final String cacheName;
-
     /** DEBUG: Keeps a count of the number of purgatory hits for debug messages */
     private final AtomicInteger purgHits = new AtomicInteger();
 
@@ -257,17 +252,16 @@ public abstract class AbstractDiskCache<K, V>
      *
      * @param attr
      */
-    protected AbstractDiskCache( final IDiskCacheAttributes attr )
+    protected AbstractDiskCache(final AuxiliaryCacheAttributes attr)
     {
-        this.diskCacheAttributes = attr;
-        this.cacheName = attr.getCacheName();
+        setAuxiliaryCacheAttributes(attr);
 
         // create queue
         final CacheEventQueueFactory<K, V> fact = new CacheEventQueueFactory<>();
         this.cacheEventQueue = fact.createCacheEventQueue(
-                new MyCacheListener(), CacheInfo.INSTANCE.listenerId(), cacheName,
-                   diskCacheAttributes.getEventQueuePoolName(),
-                   diskCacheAttributes.getEventQueueType() );
+                new MyCacheListener(), CacheInfo.INSTANCE.listenerId(), getCacheName(),
+                   attr.getEventQueuePoolName(),
+                   attr.getEventQueueType() );
 
         // create purgatory
         initPurgatory();
@@ -293,7 +287,8 @@ public abstract class AbstractDiskCache<K, V>
         log.info( "In dispose, destroying event queue." );
 
         // wait for dispose and then quit if not done.
-        cacheEventQueue.destroy(this.diskCacheAttributes.getShutdownSpoolTimeLimit());
+        int spoolTimeLimit = getAuxiliaryCacheAttributes().getShutdownSpoolTimeLimit();
+        cacheEventQueue.destroy(spoolTimeLimit);
 
         // Invoke any implementation specific disposal code
         // need to handle the disposal first.
@@ -346,7 +341,7 @@ public abstract class AbstractDiskCache<K, V>
             // will allow the memory size = 0 setting to work well.
 
             log.debug( "Found element in purgatory, cacheName: {0}, key: {1}",
-                    cacheName, key );
+                    getCacheName(), key );
 
             return pe.cacheElement();
         }
@@ -366,16 +361,6 @@ public abstract class AbstractDiskCache<K, V>
         return null;
     }
 
-    /**
-     * @return the region name.
-     * @see ICache#getCacheName
-     */
-    @Override
-    public String getCacheName()
-    {
-        return cacheName;
-    }
-
     /**
      * @see org.apache.commons.jcs4.engine.behavior.ICacheType#getCacheType
      * @return Always returns DISK_CACHE since subclasses should all be of that type.
@@ -387,21 +372,14 @@ public abstract class AbstractDiskCache<K, V>
     }
 
     /**
-     * This is used by the event logging.
-     *
-     * @return the location of the disk, either path or ip.
-     */
-    protected abstract String getDiskLocation();
-
-    /**
-     * Gets the extra info for the event log.
+     * Returns the cache configuration.
      *
-     * @return disk location
+     * @return cache configuration
      */
     @Override
-    public String getEventLoggingExtraInfo()
+    public IDiskCacheAttributes getAuxiliaryCacheAttributes()
     {
-        return getDiskLocation();
+        return (IDiskCacheAttributes) super.getAuxiliaryCacheAttributes();
     }
 
     /**
@@ -502,10 +480,10 @@ public abstract class AbstractDiskCache<K, V>
         {
             synchronized (this)
             {
-                if ( diskCacheAttributes.getMaxPurgatorySize() >= 0 )
+                int maxPurgatorySize = getAuxiliaryCacheAttributes().getMaxPurgatorySize();
+                if (maxPurgatorySize >= 0)
                 {
-                    purgatory = Collections.synchronizedMap(
-                            new LRUMap<>( diskCacheAttributes.getMaxPurgatorySize()));
+                    purgatory = Collections.synchronizedMap(new LRUMap<>(maxPurgatorySize));
                 }
                 else
                 {
@@ -575,7 +553,8 @@ public abstract class AbstractDiskCache<K, V>
     public final void removeAll()
         throws IOException
     {
-        if ( this.diskCacheAttributes.isAllowRemoveAll() )
+        boolean allowRemoveAll = getAuxiliaryCacheAttributes().isAllowRemoveAll();
+        if (allowRemoveAll)
         {
             // Replace purgatory with a new empty hashtable
             initPurgatory();
@@ -614,7 +593,7 @@ public abstract class AbstractDiskCache<K, V>
         throws IOException
     {
         log.debug( "Putting element in purgatory, cacheName: {0}, key: {1}",
-                () -> cacheName, cacheElement::key);
+                this::getCacheName, cacheElement::key);
 
         try
         {
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/PurgatoryElement.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/PurgatoryElement.java
index 7cd67cd7..378eff36 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/PurgatoryElement.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/PurgatoryElement.java
@@ -52,8 +52,8 @@ public record PurgatoryElement<K, V>(
     }
 
     /**
-     * @return cacheElement.getCacheName();
-     * @see ICacheElement#getCacheName
+     * @return cacheElement.cacheName();
+     * @see ICacheElement#cacheName
      */
     @Override
     public String cacheName()
@@ -62,8 +62,8 @@ public record PurgatoryElement<K, V>(
     }
 
     /**
-     * @return cacheElement.getElementAttributes();
-     * @see ICacheElement#getElementAttributes
+     * @return cacheElement.elementAttributes();
+     * @see ICacheElement#elementAttributes
      */
     @Override
     public IElementAttributes elementAttributes()
@@ -72,8 +72,8 @@ public record PurgatoryElement<K, V>(
     }
 
     /**
-     * @return cacheElement.getKey();
-     * @see ICacheElement#getKey
+     * @return cacheElement.key();
+     * @see ICacheElement#key
      */
     @Override
     public K key()
@@ -82,8 +82,8 @@ public record PurgatoryElement<K, V>(
     }
 
     /**
-     * @return cacheElement.getVal();
-     * @see ICacheElement#getVal
+     * @return cacheElement.value();
+     * @see ICacheElement#value
      */
     @Override
     public V value()
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/block/BlockDiskCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/block/BlockDiskCache.java
index 08f1107d..a776cea4 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/block/BlockDiskCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/block/BlockDiskCache.java
@@ -33,7 +33,6 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import java.util.stream.Collectors;
 
-import org.apache.commons.jcs4.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.commons.jcs4.auxiliary.disk.AbstractDiskCache;
 import org.apache.commons.jcs4.engine.behavior.ICacheElement;
 import org.apache.commons.jcs4.engine.behavior.IElementSerializer;
@@ -64,9 +63,6 @@ public class BlockDiskCache<K, V>
     /** The data access object */
     private BlockDisk dataFile;
 
-    /** Attributes governing the behavior of the block disk cache. */
-    private final BlockDiskCacheAttributes blockDiskCacheAttributes;
-
     /** The root directory for keys and data. */
     private final File rootDirectory;
 
@@ -101,8 +97,6 @@ public class BlockDiskCache<K, V>
     {
         super( cacheAttributes );
         setElementSerializer( elementSerializer );
-
-        this.blockDiskCacheAttributes = cacheAttributes;
         this.logCacheName = "Region [" + getCacheName() + "] ";
 
         log.info("{0}: Constructing BlockDiskCache with attributes {1}", logCacheName, cacheAttributes );
@@ -115,10 +109,10 @@ public class BlockDiskCache<K, V>
 
         try
         {
-            if ( this.blockDiskCacheAttributes.getBlockSizeBytes() > 0 )
+            if ( cacheAttributes.getBlockSizeBytes() > 0 )
             {
                 this.dataFile = new BlockDisk( new File( rootDirectory, fileName + ".data" ),
-                                               this.blockDiskCacheAttributes.getBlockSizeBytes(),
+                                               cacheAttributes.getBlockSizeBytes(),
                                                getElementSerializer() );
             }
             else
@@ -127,7 +121,7 @@ public class BlockDiskCache<K, V>
                                                getElementSerializer() );
             }
 
-            keyStore = new BlockDiskKeyStore<>( this.blockDiskCacheAttributes, this );
+            keyStore = new BlockDiskKeyStore<>( cacheAttributes, this );
 
             final boolean alright = verifyDisk();
 
@@ -200,25 +194,25 @@ public class BlockDiskCache<K, V>
     }
 
     /**
-     * Returns the attributes.
+     * Gets the extra info for the event log.
      *
-     * @see org.apache.commons.jcs4.auxiliary.AuxiliaryCache#getAuxiliaryCacheAttributes()
+     * @return extra info for the event log
      */
     @Override
-    public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
+    protected String getEventLoggingExtraInfo()
     {
-        return this.blockDiskCacheAttributes;
+        return dataFile.getFilePath();
     }
 
     /**
-     * This is used by the event logging.
+     * Returns the cache configuration.
      *
-     * @return the location of the disk, either path or ip.
+     * @return cache configuration
      */
     @Override
-    protected String getDiskLocation()
+    public BlockDiskCacheAttributes getAuxiliaryCacheAttributes()
     {
-        return dataFile.getFilePath();
+        return (BlockDiskCacheAttributes) super.getAuxiliaryCacheAttributes();
     }
 
     /**
@@ -419,10 +413,11 @@ public class BlockDiskCache<K, V>
                 {
                     object = this.dataFile.read( ded );
                 }
-            } finally {
+            }
+            finally
+            {
                 storageLock.readLock().unlock();
             }
-
         }
         catch ( final IOException ioe )
         {
@@ -629,12 +624,11 @@ public class BlockDiskCache<K, V>
     {
         // add this region to the persistence thread.
         // TODO we might need to stagger this a bit.
-        if ( this.blockDiskCacheAttributes.getKeyPersistenceIntervalSeconds() > 0 )
+        long interval = getAuxiliaryCacheAttributes().getKeyPersistenceIntervalSeconds();
+        if ( interval > 0 )
         {
             future = scheduledExecutor.scheduleAtFixedRate(keyStore::saveKeys,
-                    this.blockDiskCacheAttributes.getKeyPersistenceIntervalSeconds(),
-                    this.blockDiskCacheAttributes.getKeyPersistenceIntervalSeconds(),
-                    TimeUnit.SECONDS);
+                    interval, interval, TimeUnit.SECONDS);
         }
     }
 
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/block/BlockDiskCacheFactory.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/block/BlockDiskCacheFactory.java
index 034bb1b0..c250e387 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/block/BlockDiskCacheFactory.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/block/BlockDiskCacheFactory.java
@@ -53,10 +53,9 @@ public class BlockDiskCacheFactory
             final ICompositeCacheManager cacheMgr, final ICacheEventLogger cacheEventLogger,
             final IElementSerializer elementSerializer, final IKeyMatcher<K> keyMatcher)
     {
-        final BlockDiskCacheAttributes idca = (BlockDiskCacheAttributes) iaca;
-        log.debug("Creating DiskCache for attributes = {0}", idca);
+        log.debug("Creating DiskCache for attributes = {0}", iaca);
 
-        final BlockDiskCache<K, V> cache = new BlockDiskCache<>( idca, elementSerializer );
+        final BlockDiskCache<K, V> cache = new BlockDiskCache<>((BlockDiskCacheAttributes)iaca, elementSerializer );
         cache.setCacheEventLogger(cacheEventLogger);
         cache.setKeyMatcher(keyMatcher);
 
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDiskCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDiskCache.java
index 1336e83d..c9fb8370 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDiskCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDiskCache.java
@@ -36,7 +36,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
-import org.apache.commons.jcs4.auxiliary.AuxiliaryCacheAttributes;
+import org.apache.commons.jcs4.auxiliary.AbstractAuxiliaryCacheEventLogging;
 import org.apache.commons.jcs4.auxiliary.disk.AbstractDiskCache;
 import org.apache.commons.jcs4.auxiliary.disk.behavior.IDiskCacheAttributes.DiskLimitType;
 import org.apache.commons.jcs4.engine.behavior.ICacheElement;
@@ -48,6 +48,7 @@ import org.apache.commons.jcs4.engine.logging.behavior.ICacheEventLogger.CacheEv
 import org.apache.commons.jcs4.engine.stats.Stats;
 import org.apache.commons.jcs4.engine.stats.behavior.IStats;
 import org.apache.commons.jcs4.log.Log;
+import org.apache.commons.jcs4.utils.serialization.StandardSerializer;
 import org.apache.commons.jcs4.utils.struct.AbstractLRUMap;
 import org.apache.commons.jcs4.utils.struct.LRUMap;
 import org.apache.commons.jcs4.utils.timing.ElapsedTimer;
@@ -264,9 +265,6 @@ public class IndexedDiskCache<K, V> extends AbstractDiskCache<K, V>
     /** RECYCLE BIN -- array of empty spots */
     private final ConcurrentSkipListSet<IndexedDiskElementDescriptor> recycle;
 
-    /** User configurable parameters */
-    private final IndexedDiskCacheAttributes cattr;
-
     /** How many slots have we recycled. */
     private int recycleCnt;
 
@@ -295,7 +293,7 @@ public class IndexedDiskCache<K, V> extends AbstractDiskCache<K, V>
      */
     public IndexedDiskCache(final IndexedDiskCacheAttributes cacheAttributes)
     {
-        this(cacheAttributes, null);
+        this(cacheAttributes, new StandardSerializer());
     }
 
     /**
@@ -309,10 +307,7 @@ public class IndexedDiskCache<K, V> extends AbstractDiskCache<K, V>
     public IndexedDiskCache(final IndexedDiskCacheAttributes cattr, final IElementSerializer elementSerializer)
     {
         super(cattr);
-
         setElementSerializer(elementSerializer);
-
-        this.cattr = cattr;
         this.maxKeySize = cattr.getMaxKeySize();
         this.isRealTimeOptimizationEnabled = cattr.getOptimizeAtRemoveCount() > 0;
         this.isShutdownOptimizationEnabled = cattr.isOptimizeOnShutdown();
@@ -651,13 +646,14 @@ public class IndexedDiskCache<K, V> extends AbstractDiskCache<K, V>
      */
     protected void doOptimizeRealTime()
     {
+        int optRemoveCount = getAuxiliaryCacheAttributes().getOptimizeAtRemoveCount();
         if (isRealTimeOptimizationEnabled && !isOptimizing
-            && removeCount++ >= cattr.getOptimizeAtRemoveCount())
+            && removeCount++ >= optRemoveCount)
         {
             isOptimizing = true;
 
             log.info("{0}: Optimizing file. removeCount [{1}] OptimizeAtRemoveCount [{2}]",
-                    logCacheName, removeCount, cattr.getOptimizeAtRemoveCount());
+                    logCacheName, removeCount, optRemoveCount);
 
             if (currentOptimizationThread == null)
             {
@@ -719,15 +715,6 @@ public class IndexedDiskCache<K, V> extends AbstractDiskCache<K, V>
         }
     }
 
-    /**
-     * @return the AuxiliaryCacheAttributes.
-     */
-    @Override
-    public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
-    {
-        return this.cattr;
-    }
-
     /**
      * Returns the number of bytes that are free. When an item is removed, its length is recorded.
      * When a spot is used form the recycle bin, the length of the item stored is recorded.
@@ -769,17 +756,27 @@ public class IndexedDiskCache<K, V> extends AbstractDiskCache<K, V>
     }
 
     /**
-     * This is used by the event logging.
-     * <p>
+     * Gets the extra info for the event log.
      *
-     * @return the location of the disk, either path or ip.
+     * @return extra info for the event log
      */
     @Override
-    protected String getDiskLocation()
+    protected String getEventLoggingExtraInfo()
     {
         return dataFile.getFilePath();
     }
 
+    /**
+     * Returns the cache configuration.
+     *
+     * @return cache configuration
+     */
+    @Override
+    public IndexedDiskCacheAttributes getAuxiliaryCacheAttributes()
+    {
+        return (IndexedDiskCacheAttributes) super.getAuxiliaryCacheAttributes();
+    }
+
     /**
      * Return the keys in this cache.
      * <p>
@@ -1222,7 +1219,7 @@ public class IndexedDiskCache<K, V> extends AbstractDiskCache<K, V>
     public void processDispose()
     {
         final ICacheEvent<String> cacheEvent = createICacheEvent(getCacheName(), "none",
-                CacheEventType.DISPOSE_EVENT, this::getDiskLocation);
+                CacheEventType.DISPOSE_EVENT, this::getEventLoggingExtraInfo);
         try
         {
             final Thread t = new Thread(this::disposeInternal, "IndexedDiskCache-DisposalThread");
@@ -1250,7 +1247,7 @@ public class IndexedDiskCache<K, V> extends AbstractDiskCache<K, V>
      *
      * @param key
      * @return ICacheElement&lt;K, V&gt; or null
-     * @see AbstractDiskCache#doGet
+     * @see AbstractAuxiliaryCacheEventLogging#getWithEventLogging
      */
     @Override
     protected ICacheElement<K, V> processGet(final K key)
@@ -1389,7 +1386,7 @@ public class IndexedDiskCache<K, V> extends AbstractDiskCache<K, V>
     {
         final ICacheEvent<String> cacheEvent =
                 createICacheEvent(getCacheName(), "all", CacheEventType.REMOVEALL_EVENT,
-                        this::getDiskLocation);
+                        this::getEventLoggingExtraInfo);
         try
         {
             reset();
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCache.java
index 7f1cb6e6..3a0d9708 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCache.java
@@ -32,7 +32,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 import javax.sql.DataSource;
 
-import org.apache.commons.jcs4.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.commons.jcs4.auxiliary.disk.AbstractDiskCache;
 import org.apache.commons.jcs4.auxiliary.disk.jdbc.TableState.TableStateType;
 import org.apache.commons.jcs4.auxiliary.disk.jdbc.dsfactory.DataSourceFactory;
@@ -208,7 +207,7 @@ public class JDBCDiskCache<K, V>
 
                 logApplicationEvent( getAuxiliaryCacheAttributes().getName(),
                         CacheEventType.DELETEEXPIRED_EVENT,
-                        "Deleted expired elements.  URL: " + getDiskLocation() );
+                        "Deleted expired elements.  URL: " + getEventLoggingExtraInfo() );
             }
             else
             {
@@ -218,7 +217,7 @@ public class JDBCDiskCache<K, V>
         catch ( final SQLException e )
         {
             logError( getAuxiliaryCacheAttributes().getName(), CacheEventType.DELETEEXPIRED_EVENT,
-                    e.getMessage() + " URL: " + getDiskLocation() );
+                    e.getMessage() + " URL: " + getEventLoggingExtraInfo() );
             log.error( "Problem removing expired elements from the table.", e );
             reset();
         }
@@ -263,15 +262,6 @@ public class JDBCDiskCache<K, V>
         return exists;
     }
 
-    /**
-     * @return the AuxiliaryCacheAttributes.
-     */
-    @Override
-    public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
-    {
-        return this.getJdbcDiskCacheAttributes();
-    }
-
     /**
      * Public so managers can access it.
      * @return the dsFactory
@@ -288,7 +278,7 @@ public class JDBCDiskCache<K, V>
      * @return the location of the disk, either path or ip.
      */
     @Override
-    protected String getDiskLocation()
+    protected String getEventLoggingExtraInfo()
     {
         return this.jdbcDiskCacheAttributes.getUrl();
     }
@@ -363,7 +353,7 @@ public class JDBCDiskCache<K, V>
         stats.addStatElement("Update Count", updateCount);
         stats.addStatElement("Get Count", getCount);
         stats.addStatElement("Get Matching Count", getMatchingCount);
-        stats.addStatElement("DB URL", getDiskLocation());
+        stats.addStatElement("DB URL", getEventLoggingExtraInfo());
 
         return stats;
     }
@@ -513,7 +503,7 @@ public class JDBCDiskCache<K, V>
     public void processDispose()
     {
         final ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), null,
-                CacheEventType.DISPOSE_EVENT, this::getDiskLocation);
+                CacheEventType.DISPOSE_EVENT, this::getEventLoggingExtraInfo);
 
         try
         {
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCache.java
index 45944de9..e6bc843a 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCache.java
@@ -46,12 +46,6 @@ public class LateralTCPCache<K, V>
     /** The logger. */
     private static final Log log = Log.getLog( LateralTCPCache.class );
 
-    /** Generalize this, use another interface */
-    private final ILateralTCPCacheAttributes lateralCacheAttributes;
-
-    /** The region name */
-    final String cacheName;
-
     /** Either http, socket.udp, or socket.tcp can set in config */
     private ICacheServiceNonLocal<K, V> lateralCacheService;
 
@@ -67,10 +61,9 @@ public class LateralTCPCache<K, V>
      */
     public LateralTCPCache( final ILateralTCPCacheAttributes cattr, final ICacheServiceNonLocal<K, V> lateral, final LateralCacheMonitor monitor )
     {
-        this.cacheName = cattr.getCacheName();
-        this.lateralCacheAttributes = cattr;
         this.lateralCacheService = lateral;
         this.monitor = monitor;
+        setAuxiliaryCacheAttributes(cattr);
     }
 
     /**
@@ -111,18 +104,7 @@ public class LateralTCPCache<K, V>
     @Override
     public ILateralTCPCacheAttributes getAuxiliaryCacheAttributes()
     {
-        return lateralCacheAttributes;
-    }
-
-    /**
-     * Gets the cacheName attribute of the LateralTCPCache object
-     *
-     * @return The cacheName value
-     */
-    @Override
-    public String getCacheName()
-    {
-        return cacheName;
+        return (ILateralTCPCacheAttributes) super.getAuxiliaryCacheAttributes();
     }
 
     /**
@@ -155,12 +137,12 @@ public class LateralTCPCache<K, V>
     {
         try
         {
-            return lateralCacheService.getKeySet( cacheName );
+            return lateralCacheService.getKeySet( getCacheName() );
         }
         catch ( final IOException ex )
         {
-            handleException( ex, "Failed to get key set from " + lateralCacheAttributes.getCacheName() + "@"
-                + lateralCacheAttributes );
+            handleException( ex, "Failed to get key set from " + getAuxiliaryCacheAttributes().getCacheName() + "@"
+                + getAuxiliaryCacheAttributes() );
         }
         return Collections.emptySet();
     }
@@ -210,7 +192,7 @@ public class LateralTCPCache<K, V>
     {
         log.error( "Disabling lateral cache due to error {0}", msg, ex );
 
-        lateralCacheService = new ZombieCacheServiceNonLocal<>( lateralCacheAttributes.getZombieQueueMaxSize() );
+        lateralCacheService = new ZombieCacheServiceNonLocal<>( getAuxiliaryCacheAttributes().getZombieQueueMaxSize() );
         // may want to flush if region specifies
         // Notify the cache monitor about the error, and kick off the recovery
         // process.
@@ -237,13 +219,13 @@ public class LateralTCPCache<K, V>
 
         try
         {
-            lateralCacheService.dispose( this.lateralCacheAttributes.getCacheName() );
+            lateralCacheService.dispose( this.getAuxiliaryCacheAttributes().getCacheName() );
             // Should remove connection
         }
         catch ( final IOException ex )
         {
             log.error( "Couldn't dispose", ex );
-            handleException( ex, "Failed to dispose " + lateralCacheAttributes.getCacheName() );
+            handleException( ex, "Failed to dispose " + getAuxiliaryCacheAttributes().getCacheName() );
         }
     }
 
@@ -260,16 +242,16 @@ public class LateralTCPCache<K, V>
     {
         ICacheElement<K, V> obj = null;
 
-        if ( !this.lateralCacheAttributes.getPutOnlyMode() )
+        if ( !this.getAuxiliaryCacheAttributes().getPutOnlyMode() )
         {
             try
             {
-                obj = lateralCacheService.get( cacheName, key );
+                obj = lateralCacheService.get( getCacheName(), key );
             }
             catch ( final Exception e )
             {
                 log.error( e );
-                handleException( e, "Failed to get [" + key + "] from " + lateralCacheAttributes.getCacheName() + "@" + lateralCacheAttributes );
+                handleException( e, "Failed to get [" + key + "] from " + getAuxiliaryCacheAttributes().getCacheName() + "@" + getAuxiliaryCacheAttributes() );
             }
         }
 
@@ -288,16 +270,16 @@ public class LateralTCPCache<K, V>
     {
         final Map<K, ICacheElement<K, V>> map = Collections.emptyMap();
 
-        if ( !this.lateralCacheAttributes.getPutOnlyMode() )
+        if ( !this.getAuxiliaryCacheAttributes().getPutOnlyMode() )
         {
             try
             {
-                return lateralCacheService.getMatching( cacheName, pattern );
+                return lateralCacheService.getMatching( getCacheName(), pattern );
             }
             catch ( final IOException e )
             {
                 log.error( e );
-                handleException( e, "Failed to getMatching [" + pattern + "] from " + lateralCacheAttributes.getCacheName() + "@" + lateralCacheAttributes );
+                handleException( e, "Failed to getMatching [" + pattern + "] from " + getAuxiliaryCacheAttributes().getCacheName() + "@" + getAuxiliaryCacheAttributes() );
             }
         }
 
@@ -320,11 +302,11 @@ public class LateralTCPCache<K, V>
 
         try
         {
-            lateralCacheService.remove( cacheName, key, CacheInfo.INSTANCE.listenerId());
+            lateralCacheService.remove( getCacheName(), key, CacheInfo.INSTANCE.listenerId());
         }
         catch ( final IOException ex )
         {
-            handleException( ex, "Failed to remove " + key + " from " + lateralCacheAttributes.getCacheName() + "@" + lateralCacheAttributes );
+            handleException( ex, "Failed to remove " + key + " from " + getAuxiliaryCacheAttributes().getCacheName() + "@" + getAuxiliaryCacheAttributes() );
         }
         return false;
     }
@@ -341,11 +323,11 @@ public class LateralTCPCache<K, V>
     {
         try
         {
-            lateralCacheService.removeAll( cacheName, CacheInfo.INSTANCE.listenerId());
+            lateralCacheService.removeAll( getCacheName(), CacheInfo.INSTANCE.listenerId());
         }
         catch ( final IOException ex )
         {
-            handleException( ex, "Failed to remove all from " + lateralCacheAttributes.getCacheName() + "@" + lateralCacheAttributes );
+            handleException( ex, "Failed to remove all from " + getAuxiliaryCacheAttributes().getCacheName() + "@" + getAuxiliaryCacheAttributes() );
         }
     }
 
@@ -370,7 +352,7 @@ public class LateralTCPCache<K, V>
         }
         catch ( final IOException ex )
         {
-            handleException( ex, "Failed to put [" + ce.key() + "] to " + ce.cacheName() + "@" + lateralCacheAttributes );
+            handleException( ex, "Failed to put [" + ce.key() + "] to " + ce.cacheName() + "@" + getAuxiliaryCacheAttributes() );
         }
     }
 
@@ -382,8 +364,8 @@ public class LateralTCPCache<K, V>
     {
         final StringBuilder buf = new StringBuilder();
         buf.append( "\n LateralTCPCache " );
-        buf.append( "\n Cache Name [" + lateralCacheAttributes.getCacheName() + "]" );
-        buf.append( "\n cattr =  [" + lateralCacheAttributes + "]" );
+        buf.append( "\n Cache Name [" + getCacheName() + "]" );
+        buf.append( "\n cattr =  [" + getAuxiliaryCacheAttributes() + "]" );
         return buf.toString();
     }
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheNoWaitFacade.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheNoWaitFacade.java
index 7f00eac8..121395bc 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheNoWaitFacade.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/lateral/socket/tcp/LateralTCPCacheNoWaitFacade.java
@@ -57,15 +57,9 @@ public class LateralTCPCacheNoWaitFacade<K, V>
      */
     private final ConcurrentHashMap<String, LateralTCPCacheNoWait<K, V>> noWaitMap;
 
-    /** The region name */
-    private final String cacheName;
-
     /** A cache listener */
     private ILateralCacheListener<K, V> listener;
 
-    /** User configurable attributes. */
-    private final ILateralTCPCacheAttributes lateralCacheAttributes;
-
     /** Disposed state of this facade */
     private final AtomicBoolean disposed = new AtomicBoolean();
 
@@ -84,8 +78,7 @@ public class LateralTCPCacheNoWaitFacade<K, V>
         this.listener = listener;
         this.noWaitMap = new ConcurrentHashMap<>();
         noWaits.forEach(noWait -> noWaitMap.put(noWait.getIdentityKey(), noWait));
-        this.cacheName = cattr.getCacheName();
-        this.lateralCacheAttributes = cattr;
+        setAuxiliaryCacheAttributes(cattr);
     }
 
     /**
@@ -170,26 +163,6 @@ public class LateralTCPCacheNoWaitFacade<K, V>
             .orElse(null);
     }
 
-    /**
-     * @return the AuxiliaryCacheAttributes.
-     */
-    @Override
-    public ILateralTCPCacheAttributes getAuxiliaryCacheAttributes()
-    {
-        return this.lateralCacheAttributes;
-    }
-
-    /**
-     * Gets the cacheName attribute of the LateralTCPCacheNoWaitFacade object.
-     *
-     * @return The cacheName value
-     */
-    @Override
-    public String getCacheName()
-    {
-        return cacheName;
-    }
-
     /**
      * Gets the cacheType attribute of the LateralTCPCacheNoWaitFacade object.
      *
@@ -406,12 +379,12 @@ public class LateralTCPCacheNoWaitFacade<K, V>
     }
 
     /**
-     * @return "LateralTCPCacheNoWaitFacade: " + cacheName;
+     * @return "LateralTCPCacheNoWaitFacade: " + getCacheName();
      */
     @Override
     public String toString()
     {
-        return "LateralTCPCacheNoWaitFacade: " + cacheName;
+        return "LateralTCPCacheNoWaitFacade: " + getCacheName();
     }
 
     /**
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteAuxiliaryCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteAuxiliaryCache.java
index df3a6c72..dce1e4c3 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteAuxiliaryCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteAuxiliaryCache.java
@@ -31,7 +31,6 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import org.apache.commons.jcs4.auxiliary.AbstractAuxiliaryCacheEventLogging;
-import org.apache.commons.jcs4.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.commons.jcs4.auxiliary.remote.behavior.IRemoteCacheAttributes;
 import org.apache.commons.jcs4.auxiliary.remote.behavior.IRemoteCacheClient;
 import org.apache.commons.jcs4.auxiliary.remote.behavior.IRemoteCacheListener;
@@ -63,15 +62,9 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
      */
     private ICacheServiceNonLocal<K, V> remoteCacheService;
 
-    /** The cacheName */
-    protected final String cacheName;
-
     /** The listener. This can be null. */
     private IRemoteCacheListener<K, V> remoteCacheListener;
 
-    /** The configuration values. TODO, we'll need a base here. */
-    private IRemoteCacheAttributes remoteCacheAttributes;
-
     /** A thread pool for gets if configured. */
     private ExecutorService pool;
 
@@ -88,26 +81,25 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
     public AbstractRemoteAuxiliaryCache( final IRemoteCacheAttributes cattr, final ICacheServiceNonLocal<K, V> remote,
                                          final IRemoteCacheListener<K, V> listener )
     {
-        this.setRemoteCacheAttributes( cattr );
-        this.cacheName = cattr.getCacheName();
+        this.setAuxiliaryCacheAttributes(cattr);
         this.setRemoteCacheService( remote );
         this.setRemoteCacheListener( listener );
 
         if ( log.isDebugEnabled() )
         {
             log.debug( "Construct> cacheName={0}", cattr::getCacheName);
-            log.debug( "irca = {0}", this::getRemoteCacheAttributes);
+            log.debug( "irca = {0}", this::getAuxiliaryCacheAttributes);
             log.debug( "remote = {0}", remote );
             log.debug( "listener = {0}", listener );
         }
 
         // use a pool if it is greater than 0
         log.debug( "GetTimeoutMillis() = {0}",
-                () -> getRemoteCacheAttributes().getGetTimeoutMillis() );
+                () -> getAuxiliaryCacheAttributes().getGetTimeoutMillis() );
 
-        if ( getRemoteCacheAttributes().getGetTimeoutMillis() > 0 )
+        if ( getAuxiliaryCacheAttributes().getGetTimeoutMillis() > 0 )
         {
-            pool = ThreadPoolManager.getInstance().getExecutorService( getRemoteCacheAttributes().getThreadPoolName() );
+            pool = ThreadPoolManager.getInstance().getExecutorService( getAuxiliaryCacheAttributes().getThreadPoolName() );
             log.debug( "Thread Pool = {0}", pool );
             usePoolForGet = true;
         }
@@ -156,20 +148,9 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
      * @return the AuxiliaryCacheAttributes.
      */
     @Override
-    public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
-    {
-        return getRemoteCacheAttributes();
-    }
-
-    /**
-     * Gets the cacheName attribute of the RemoteCache object.
-     *
-     * @return The cacheName value
-     */
-    @Override
-    public String getCacheName()
+    public IRemoteCacheAttributes getAuxiliaryCacheAttributes()
     {
-        return cacheName;
+        return (IRemoteCacheAttributes) super.getAuxiliaryCacheAttributes();
     }
 
     /**
@@ -191,7 +172,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
     public Set<K> getKeySet()
         throws IOException
     {
-        return getRemoteCacheService().getKeySet(cacheName);
+        return getRemoteCacheService().getKeySet(getCacheName());
     }
 
     /**
@@ -229,14 +210,6 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
         return -1;
     }
 
-    /**
-     * @return the remoteCacheAttributes
-     */
-    protected IRemoteCacheAttributes getRemoteCacheAttributes()
-    {
-        return remoteCacheAttributes;
-    }
-
     /**
      * @return the remoteCacheListener
      */
@@ -271,7 +244,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
     {
         final IStats stats = new Stats("AbstractRemoteAuxiliaryCache");
 
-        stats.addStatElement("Remote Type", this.getRemoteCacheAttributes().getRemoteTypeName() );
+        stats.addStatElement("Remote Type", this.getAuxiliaryCacheAttributes().getRemoteTypeName() );
 
 //      if ( this.getRemoteCacheAttributes().getRemoteType() == RemoteType.CLUSTER )
 //      {
@@ -314,11 +287,11 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
     public ICacheElement<K, V> getUsingPool( final K key )
         throws IOException
     {
-        final int timeout = getRemoteCacheAttributes().getGetTimeoutMillis();
+        final int timeout = getAuxiliaryCacheAttributes().getGetTimeoutMillis();
 
         try
         {
-            final Callable<ICacheElement<K, V>> command = () -> getRemoteCacheService().get( cacheName, key, getListenerId() );
+            final Callable<ICacheElement<K, V>> command = () -> getRemoteCacheService().get( getCacheName(), key, getListenerId() );
 
             // execute using the pool
             final Future<ICacheElement<K, V>> future = pool.submit(command);
@@ -385,7 +358,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
         catch ( final IOException ex )
         {
             log.error( "Couldn't dispose", ex );
-            handleException( ex, "Failed to dispose [" + cacheName + "]", CacheEventType.DISPOSE_EVENT );
+            handleException( ex, "Failed to dispose [" + getCacheName() + "]", CacheEventType.DISPOSE_EVENT );
         }
     }
 
@@ -415,7 +388,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
             }
             else
             {
-                retVal = getRemoteCacheService().get( cacheName, key, getListenerId() );
+                retVal = getRemoteCacheService().get( getCacheName(), key, getListenerId() );
             }
 
             // Eventually the instance of will not be necessary.
@@ -423,7 +396,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
             // clients are merely intra-remote cache communicators. Remote caches are assumed
             // to have no ability to deserialize the objects.
             if (retVal instanceof ICacheElementSerialized<K, V> serialized &&
-                    this.getRemoteCacheAttributes().getRemoteType() != RemoteType.CLUSTER)
+                    this.getAuxiliaryCacheAttributes().getRemoteType() != RemoteType.CLUSTER)
             {
                 retVal = SerializationConversionUtil.getDeSerializedCacheElement(serialized,
                         super.getElementSerializer() );
@@ -431,7 +404,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
         }
         catch ( final IOException | ClassNotFoundException ex )
         {
-            handleException( ex, "Failed to get [" + key + "] from [" + cacheName + "]", CacheEventType.GET_EVENT );
+            handleException( ex, "Failed to get [" + key + "] from [" + getCacheName() + "]", CacheEventType.GET_EVENT );
         }
         return retVal;
     }
@@ -450,7 +423,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
         final Map<K, ICacheElement<K, V>> results = new HashMap<>();
         try
         {
-            final Map<K, ICacheElement<K, V>> rawResults = getRemoteCacheService().getMatching( cacheName, pattern, getListenerId() );
+            final Map<K, ICacheElement<K, V>> rawResults = getRemoteCacheService().getMatching( getCacheName(), pattern, getListenerId() );
 
             // Eventually the instance of will not be necessary.
             if ( rawResults != null )
@@ -463,7 +436,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
                         // Never try to deserialize if you are a cluster client. Cluster
                         // clients are merely intra-remote cache communicators. Remote caches are assumed
                         // to have no ability to deserialize the objects.
-                        if ( this.getRemoteCacheAttributes().getRemoteType() != RemoteType.CLUSTER )
+                        if ( this.getAuxiliaryCacheAttributes().getRemoteType() != RemoteType.CLUSTER )
                         {
                             unwrappedResult = SerializationConversionUtil
                                 .getDeSerializedCacheElement(serialized,
@@ -480,7 +453,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
         }
         catch ( final IOException | ClassNotFoundException ex )
         {
-            handleException( ex, "Failed to getMatching [" + pattern + "] from [" + cacheName + "]",
+            handleException( ex, "Failed to getMatching [" + pattern + "] from [" + getCacheName() + "]",
                     CacheEventType.GET_EVENT );
         }
         return results;
@@ -498,16 +471,16 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
     protected boolean processRemove( final K key )
         throws IOException
     {
-        if ( !this.getRemoteCacheAttributes().getGetOnly() )
+        if ( !this.getAuxiliaryCacheAttributes().getGetOnly() )
         {
             log.debug( "remove> key={0}", key );
             try
             {
-                getRemoteCacheService().remove( cacheName, key, getListenerId() );
+                getRemoteCacheService().remove( getCacheName(), key, getListenerId() );
             }
             catch ( final IOException ex )
             {
-                handleException( ex, "Failed to remove " + key + " from " + cacheName, CacheEventType.REMOVE_EVENT );
+                handleException( ex, "Failed to remove " + key + " from " + getCacheName(), CacheEventType.REMOVE_EVENT );
             }
             return true;
         }
@@ -524,15 +497,15 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
     protected void processRemoveAll()
         throws IOException
     {
-        if ( !this.getRemoteCacheAttributes().getGetOnly() )
+        if ( !this.getAuxiliaryCacheAttributes().getGetOnly() )
         {
             try
             {
-                getRemoteCacheService().removeAll( cacheName, getListenerId() );
+                getRemoteCacheService().removeAll( getCacheName(), getListenerId() );
             }
             catch ( final IOException ex )
             {
-                handleException( ex, "Failed to remove all from " + cacheName, CacheEventType.REMOVEALL_EVENT );
+                handleException( ex, "Failed to remove all from " + getCacheName(), CacheEventType.REMOVEALL_EVENT );
             }
         }
     }
@@ -549,7 +522,7 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
     protected void processUpdate( final ICacheElement<K, V> ce )
         throws IOException
     {
-        if ( !getRemoteCacheAttributes().getGetOnly() )
+        if ( !getAuxiliaryCacheAttributes().getGetOnly() )
         {
             try
             {
@@ -598,14 +571,6 @@ public abstract class AbstractRemoteAuxiliaryCache<K, V>
         }
     }
 
-    /**
-     * @param remoteCacheAttributes the remoteCacheAttributes to set
-     */
-    protected void setRemoteCacheAttributes( final IRemoteCacheAttributes remoteCacheAttributes )
-    {
-        this.remoteCacheAttributes = remoteCacheAttributes;
-    }
-
     /**
      * @param remoteCacheListener the remoteCacheListener to set
      */
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java
index 6691e101..b50930d6 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java
@@ -48,9 +48,6 @@ public abstract class AbstractRemoteCacheNoWaitFacade<K, V>
     /** The connection to a remote server, or a zombie. */
     protected List<RemoteCacheNoWait<K, V>> noWaits;
 
-    /** Holds failover and cluster information */
-    private final RemoteCacheAttributes remoteCacheAttributes;
-
     /**
      * Constructs with the given remote cache, and fires events to any listeners.
      *
@@ -63,7 +60,7 @@ public abstract class AbstractRemoteCacheNoWaitFacade<K, V>
                                     final ICacheEventLogger cacheEventLogger, final IElementSerializer elementSerializer )
     {
         log.debug( "CONSTRUCTING NO WAIT FACADE" );
-        this.remoteCacheAttributes = (RemoteCacheAttributes)rca;
+        setAuxiliaryCacheAttributes(rca);
         setCacheEventLogger( cacheEventLogger );
         setElementSerializer( elementSerializer );
         this.noWaits = new ArrayList<>(noWaits);
@@ -111,18 +108,7 @@ public abstract class AbstractRemoteCacheNoWaitFacade<K, V>
     @Override
     public RemoteCacheAttributes getAuxiliaryCacheAttributes()
     {
-        return this.remoteCacheAttributes;
-    }
-
-    /**
-     * Gets the cacheName attribute of the RemoteCacheNoWaitFacade object.
-     *
-     * @return The cacheName value
-     */
-    @Override
-    public String getCacheName()
-    {
-        return remoteCacheAttributes.getCacheName();
+        return (RemoteCacheAttributes) super.getAuxiliaryCacheAttributes();
     }
 
     /**
@@ -303,8 +289,8 @@ public abstract class AbstractRemoteCacheNoWaitFacade<K, V>
     @Override
     public String toString()
     {
-        return "RemoteCacheNoWaitFacade: " + remoteCacheAttributes.getCacheName() +
-                ", rca = " + remoteCacheAttributes;
+        return "RemoteCacheNoWaitFacade: " + getCacheName() +
+                ", rca = " + getAuxiliaryCacheAttributes();
     }
 
     /**
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCache.java
index 8a2b8406..5fc6cdef 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCache.java
@@ -68,7 +68,7 @@ public class RemoteCache<K, V>
         super( cattr, remote, listener );
         this.monitor = monitor;
 
-        RemoteUtils.configureGlobalCustomSocketFactory( getRemoteCacheAttributes().getRmiSocketFactoryTimeoutMillis() );
+        RemoteUtils.configureGlobalCustomSocketFactory( getAuxiliaryCacheAttributes().getRmiSocketFactoryTimeoutMillis() );
     }
 
     /**
@@ -102,9 +102,9 @@ public class RemoteCache<K, V>
     protected String getIPAddressForService()
     {
         String ipAddress = "(null)";
-        if (getRemoteCacheAttributes().getRemoteLocation() != null)
+        if (getAuxiliaryCacheAttributes().getRemoteLocation() != null)
         {
-            ipAddress = getRemoteCacheAttributes().getRemoteLocation().toString();
+            ipAddress = getAuxiliaryCacheAttributes().getRemoteLocation().toString();
         }
         return ipAddress;
     }
@@ -118,7 +118,7 @@ public class RemoteCache<K, V>
         final IStats stats = new Stats("Remote Cache");
 
         stats.addStatElement("Remote Host:Port", getIPAddressForService() );
-        stats.addStatElement("Remote Type", getRemoteCacheAttributes().getRemoteTypeName() );
+        stats.addStatElement("Remote Type", getAuxiliaryCacheAttributes().getRemoteTypeName() );
 
 //      if ( this.getRemoteCacheAttributes().getRemoteType() == RemoteType.CLUSTER )
 //      {
@@ -147,14 +147,14 @@ public class RemoteCache<K, V>
     {
         final String message = "Disabling remote cache due to error: " + msg;
 
-        logError( cacheName, eventType, message );
+        logError( getCacheName(), eventType, message );
         log.error( message, ex );
 
         // we should not switch if the existing is a zombie.
         if (!(getRemoteCacheService() instanceof ZombieCacheServiceNonLocal))
         {
             // TODO make configurable
-            setRemoteCacheService( new ZombieCacheServiceNonLocal<>( getRemoteCacheAttributes().getZombieQueueMaxSize() ) );
+            setRemoteCacheService( new ZombieCacheServiceNonLocal<>( getAuxiliaryCacheAttributes().getZombieQueueMaxSize() ) );
         }
         // may want to flush if region specifies
         // Notify the cache monitor about the error, and kick off the recovery
@@ -196,6 +196,6 @@ public class RemoteCache<K, V>
     @Override
     public String toString()
     {
-        return "RemoteCache: " + cacheName + " attributes = " + getRemoteCacheAttributes();
+        return "RemoteCache: " + getCacheName() + " attributes = " + getAuxiliaryCacheAttributes();
     }
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheNoWait.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheNoWait.java
index 839b69a4..47b4ec07 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheNoWait.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheNoWait.java
@@ -27,7 +27,6 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.jcs4.auxiliary.AbstractAuxiliaryCache;
-import org.apache.commons.jcs4.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.commons.jcs4.auxiliary.remote.behavior.IRemoteCacheClient;
 import org.apache.commons.jcs4.engine.CacheAdaptor;
 import org.apache.commons.jcs4.engine.CacheEventQueueFactory;
@@ -185,15 +184,6 @@ public class RemoteCacheNoWait<K, V>
         return null;
     }
 
-    /**
-     * @return the AuxiliaryCacheAttributes.
-     */
-    @Override
-    public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
-    {
-        return remoteCacheClient.getAuxiliaryCacheAttributes();
-    }
-
     /**
      * This is for testing only. It allows you to take a look at the event queue.
      *
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCache.java
index 4180bef2..7ee84ae1 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCache.java
@@ -40,9 +40,6 @@ public class RemoteHttpCache<K, V>
     /** For error notifications */
     private final RemoteHttpCacheMonitor monitor;
 
-    /** Keep the child copy here for the restore process. */
-    private final RemoteHttpCacheAttributes remoteHttpCacheAttributes;
-
     /**
      * Constructor for the RemoteCache object. This object communicates with a remote cache server.
      * One of these exists for each region. This also holds a reference to a listener. The same
@@ -58,8 +55,6 @@ public class RemoteHttpCache<K, V>
                             final IRemoteCacheListener<K, V> listener, final RemoteHttpCacheMonitor monitor )
     {
         super( remoteHttpCacheAttributes, remote, listener );
-
-        this.remoteHttpCacheAttributes = remoteHttpCacheAttributes;
         this.monitor = monitor;
     }
 
@@ -72,14 +67,6 @@ public class RemoteHttpCache<K, V>
         return null;
     }
 
-    /**
-     * @return the remoteHttpCacheAttributes
-     */
-    public RemoteHttpCacheAttributes getRemoteHttpCacheAttributes()
-    {
-        return remoteHttpCacheAttributes;
-    }
-
     /**
      * Nothing right now. This should setup a zombie and initiate recovery.
      *
@@ -96,10 +83,10 @@ public class RemoteHttpCache<K, V>
         if ( !( getRemoteCacheService() instanceof ZombieCacheServiceNonLocal))
         {
             final String message = "Disabling remote cache due to error: " + msg;
-            logError( cacheName, eventType, message );
+            logError( getCacheName(), eventType, message );
             log.error( message, ex );
 
-            setRemoteCacheService( new ZombieCacheServiceNonLocal<>( getRemoteCacheAttributes().getZombieQueueMaxSize() ) );
+            setRemoteCacheService( new ZombieCacheServiceNonLocal<>( getAuxiliaryCacheAttributes().getZombieQueueMaxSize() ) );
 
             monitor.notifyError( this );
         }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheMonitor.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheMonitor.java
index 044fd377..e135cd75 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheMonitor.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheMonitor.java
@@ -85,7 +85,8 @@ public class RemoteHttpCacheMonitor extends AbstractAuxiliaryCacheMonitor
             {
                 if ( remoteCache.getStatus() == CacheStatus.ERROR )
                 {
-                    final RemoteHttpCacheAttributes attributes = remoteCache.getRemoteHttpCacheAttributes();
+                    final RemoteHttpCacheAttributes attributes =
+                            (RemoteHttpCacheAttributes)remoteCache.getAuxiliaryCacheAttributes();
 
                     final IRemoteHttpCacheClient<Serializable, Serializable> remoteService =
                             factory.createRemoteHttpCacheClientForAttributes( attributes );
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/AbstractRemoteCacheService.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/AbstractRemoteCacheService.java
index c68598d0..3c0eb1c2 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/AbstractRemoteCacheService.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/AbstractRemoteCacheService.java
@@ -70,37 +70,6 @@ public abstract class AbstractRemoteCacheService<K, V>
         setCacheEventLogger(cacheEventLogger);
     }
 
-    /**
-     * Logs an event if an event logger is configured.
-     *
-     * @param item
-     * @param requesterId
-     * @param eventType
-     * @return ICacheEvent
-     */
-    protected ICacheEvent<ICacheElement<K, V>> createICacheEvent( final ICacheElement<K, V> item, final long requesterId, final CacheEventType eventType )
-    {
-        final String ipAddress = getExtraInfoForRequesterId( requesterId );
-        return createICacheEvent( getEventLogSourceName(), item.cacheName(),
-                eventType, ipAddress, item );
-    }
-
-    /**
-     * Logs an event if an event logger is configured.
-     *
-     * @param cacheName
-     * @param key
-     * @param requesterId
-     * @param eventType
-     * @return ICacheEvent
-     */
-    protected <T> ICacheEvent<T> createICacheEvent( final String cacheName, final T key, final long requesterId, final CacheEventType eventType )
-    {
-        final String ipAddress = getExtraInfoForRequesterId( requesterId );
-        return createICacheEvent( getEventLogSourceName(), cacheName,
-                eventType, ipAddress, key );
-    }
-
     /**
      * Frees the specified remote cache.
      *
@@ -124,8 +93,8 @@ public abstract class AbstractRemoteCacheService<K, V>
     public void dispose( final String cacheName, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "none", requesterId,
-                CacheEventType.DISPOSE_EVENT );
+        final ICacheEvent<String> cacheEvent = createICacheEvent(cacheName, "none",
+                CacheEventType.DISPOSE_EVENT, () -> getExtraInfoForRequesterId( requesterId ));
         try
         {
             processDispose( cacheName, requesterId );
@@ -170,7 +139,8 @@ public abstract class AbstractRemoteCacheService<K, V>
         throws IOException
     {
         ICacheElement<K, V> element = null;
-        final ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId, CacheEventType.GET_EVENT );
+        final ICacheEvent<K> cacheEvent = createICacheEvent(cacheName, key,
+                CacheEventType.GET_EVENT, () -> getExtraInfoForRequesterId( requesterId ));
         try
         {
             element = processGet( cacheName, key, requesterId );
@@ -193,6 +163,7 @@ public abstract class AbstractRemoteCacheService<K, V>
     /**
      * @return the eventLogSourceName
      */
+    @Override
     protected String getEventLogSourceName()
     {
         return eventLogSourceName;
@@ -247,8 +218,8 @@ public abstract class AbstractRemoteCacheService<K, V>
     public Map<K, ICacheElement<K, V>> getMatching( final String cacheName, final String pattern, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, pattern, requesterId,
-                                                    CacheEventType.GETMATCHING_EVENT );
+        final ICacheEvent<String> cacheEvent = createICacheEvent(cacheName, pattern,
+                CacheEventType.GETMATCHING_EVENT, () -> getExtraInfoForRequesterId(requesterId));
         try
         {
             return processGetMatching( cacheName, pattern, requesterId );
@@ -291,8 +262,9 @@ public abstract class AbstractRemoteCacheService<K, V>
     public Map<K, ICacheElement<K, V>> getMultiple( final String cacheName, final Set<K> keys, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<Serializable> cacheEvent = createICacheEvent( cacheName, (Serializable) keys, requesterId,
-                                                    CacheEventType.GETMULTIPLE_EVENT );
+        final ICacheEvent<Serializable> cacheEvent = createICacheEvent(cacheName,
+                (Serializable) keys, CacheEventType.GETMULTIPLE_EVENT,
+                () -> getExtraInfoForRequesterId( requesterId ));
         try
         {
             return processGetMultiple( cacheName, keys, requesterId );
@@ -442,7 +414,8 @@ public abstract class AbstractRemoteCacheService<K, V>
     public void remove( final String cacheName, final K key, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId, CacheEventType.REMOVE_EVENT );
+        final ICacheEvent<K> cacheEvent = createICacheEvent(cacheName, key,
+                CacheEventType.REMOVE_EVENT, () -> getExtraInfoForRequesterId( requesterId ));
         try
         {
             processRemove( cacheName, key, requesterId );
@@ -479,7 +452,8 @@ public abstract class AbstractRemoteCacheService<K, V>
     public void removeAll( final String cacheName, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "all", requesterId, CacheEventType.REMOVEALL_EVENT );
+        final ICacheEvent<String> cacheEvent = createICacheEvent(cacheName, "all",
+                CacheEventType.REMOVEALL_EVENT, () -> getExtraInfoForRequesterId( requesterId ));
         try
         {
             processRemoveAll( cacheName, requesterId );
@@ -528,7 +502,8 @@ public abstract class AbstractRemoteCacheService<K, V>
     public void update( final ICacheElement<K, V> item, final long requesterId )
         throws IOException
     {
-        final ICacheEvent<ICacheElement<K, V>> cacheEvent = createICacheEvent( item, requesterId, CacheEventType.UPDATE_EVENT );
+        final ICacheEvent<K> cacheEvent = createICacheEvent( item,
+                CacheEventType.UPDATE_EVENT, () -> getExtraInfoForRequesterId( requesterId ));
         try
         {
             logUpdateInfo( item );
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheService.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheService.java
index ebb6fb2f..2809b207 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheService.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/server/RemoteHttpCacheService.java
@@ -69,7 +69,7 @@ public class RemoteHttpCacheService<K, V>
     @Override
     protected String getExtraInfoForRequesterId( final long requesterId )
     {
-        return requesterId + "";
+        return String.valueOf(requesterId);
     }
 
     /**
@@ -257,13 +257,4 @@ public class RemoteHttpCacheService<K, V>
     {
         //nothing.
     }
-
-    /**
-     * @return the RemoteHttpCacheServerAttributes
-     */
-    @Override
-    public RemoteHttpCacheServerAttributes getAuxiliaryCacheAttributes()
-    {
-        return remoteHttpCacheServerAttributes;
-    }
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/value/RemoteCacheResponse.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/value/RemoteCacheResponse.java
index a260d0fd..4ed2a2db 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/value/RemoteCacheResponse.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/value/RemoteCacheResponse.java
@@ -44,7 +44,7 @@ public record RemoteCacheResponse<T>(
 
     /**
      * Construct error message object
-     * @param succcess
+     * @param success
      * @param errorMessage
      */
     public RemoteCacheResponse(final boolean success, final String errorMessage)
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/behavior/ICacheService.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/behavior/ICacheService.java
index 7ad43be6..de433c5e 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/behavior/ICacheService.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/behavior/ICacheService.java
@@ -23,9 +23,6 @@ import java.io.IOException;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.jcs4.access.exception.ObjectExistsException;
-import org.apache.commons.jcs4.access.exception.ObjectNotFoundException;
-
 /**
  * Used to retrieve and update the cache.
  * <p>
@@ -49,11 +46,10 @@ public interface ICacheService<K, V>
      * @param cacheName
      * @param key
      * @return the ICacheElement&lt;K, V&gt; or null if not found
-     * @throws ObjectNotFoundException
      * @throws IOException
      */
     ICacheElement<K, V> get( String cacheName, K key )
-        throws ObjectNotFoundException, IOException;
+        throws IOException;
 
     /**
      * Gets multiple items from the cache matching the pattern.
@@ -74,11 +70,10 @@ public interface ICacheService<K, V>
      * @param keys
      * @return a map of K key to ICacheElement&lt;K, V&gt; element, or an empty map if there is no
      *         data in cache for any of these keys
-     * @throws ObjectNotFoundException
      * @throws IOException
      */
     Map<K, ICacheElement<K, V>> getMultiple( String cacheName, Set<K> keys )
-        throws ObjectNotFoundException, IOException;
+        throws IOException;
 
     /**
      * Frees all caches.
@@ -109,9 +104,8 @@ public interface ICacheService<K, V>
      * Puts a cache item to the cache.
      *
      * @param item
-     * @throws ObjectExistsException
      * @throws IOException
      */
     void update( ICacheElement<K, V> item )
-        throws ObjectExistsException, IOException;
+        throws IOException;
 }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/control/CompositeCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/control/CompositeCache.java
index de2d2a4f..69062179 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/control/CompositeCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/control/CompositeCache.java
@@ -39,7 +39,6 @@ import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import org.apache.commons.jcs4.access.exception.CacheException;
-import org.apache.commons.jcs4.access.exception.ObjectNotFoundException;
 import org.apache.commons.jcs4.auxiliary.AuxiliaryCache;
 import org.apache.commons.jcs4.engine.CacheStatus;
 import org.apache.commons.jcs4.engine.behavior.ICache;
@@ -519,7 +518,7 @@ public class CompositeCache<K, V>
         final ICacheElement<K, V> ce = get(key);
         if (ce == null)
         {
-            throw new ObjectNotFoundException("key " + key + " is not found");
+            throw new CacheException("key " + key + " is not found");
         }
         return ce.elementAttributes();
     }
diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/soft/SoftReferenceMemoryCache.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/soft/SoftReferenceMemoryCache.java
index 3783ef46..0fb13e23 100644
--- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/soft/SoftReferenceMemoryCache.java
+++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/memory/soft/SoftReferenceMemoryCache.java
@@ -39,7 +39,7 @@ import org.apache.commons.jcs4.log.Log;
 
 /**
  * A JCS IMemoryCache that has {@link SoftReference} to all its values.
- * This cache does not respect {@link ICompositeCacheAttributes#getMaxObjects()}
+ * This cache does not respect {@link ICompositeCacheAttributes#maxObjects()}
  * as overflowing is handled by Java GC.
  * <p>
  * The cache also has strong references to a maximum number of objects given by
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/access/CacheAccessUnitTest.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/access/CacheAccessUnitTest.java
index bcbc55a0..216a486f 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/access/CacheAccessUnitTest.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/access/CacheAccessUnitTest.java
@@ -33,7 +33,6 @@ import java.util.Set;
 
 import org.apache.commons.jcs4.JCS;
 import org.apache.commons.jcs4.access.exception.CacheException;
-import org.apache.commons.jcs4.access.exception.ObjectExistsException;
 import org.apache.commons.jcs4.engine.CompositeCacheAttributes;
 import org.apache.commons.jcs4.engine.ElementAttributes;
 import org.apache.commons.jcs4.engine.TestCompositeCacheAttributes;
@@ -279,7 +278,7 @@ class CacheAccessUnitTest
         }
         catch ( final CacheException e )
         {
-            assertInstanceOf( ObjectExistsException.class, e, "Wrong type of exception." );
+            assertInstanceOf( CacheException.class, e, "Wrong type of exception." );
             assertTrue( e.getMessage().indexOf( "[" + key + "]" ) != -1, "Should have the key in the error message." );
         }
 
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockAuxiliaryCache.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockAuxiliaryCache.java
index 42f188c9..79a43a94 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockAuxiliaryCache.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockAuxiliaryCache.java
@@ -67,15 +67,6 @@ public class MockAuxiliaryCache<K, V>
         return null;
     }
 
-    /**
-     * @return the AuxiliaryCacheAttributes.
-     */
-    @Override
-    public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
-    {
-        return null;
-    }
-
     /**
      * @return null
      */
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/disk/AbstractDiskCacheUnitTest.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/disk/AbstractDiskCacheUnitTest.java
index cfcc7c13..624fbcb8 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/disk/AbstractDiskCacheUnitTest.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/disk/AbstractDiskCacheUnitTest.java
@@ -34,7 +34,6 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.jcs4.TestLogConfigurationUtil;
-import org.apache.commons.jcs4.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.commons.jcs4.auxiliary.disk.behavior.IDiskCacheAttributes;
 import org.apache.commons.jcs4.auxiliary.disk.indexed.IndexedDiskCacheAttributes;
 import org.apache.commons.jcs4.engine.CacheElement;
@@ -69,22 +68,13 @@ class AbstractDiskCacheUnitTest
             setAlive(true);
         }
 
-        /**
-         * @return null
-         */
-        @Override
-        public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
-        {
-            return diskCacheAttributes;
-        }
-
         /**
          * The location on disk
          *
          * @return "memory"
          */
         @Override
-        protected String getDiskLocation()
+        protected String getEventLoggingExtraInfo()
         {
             return "memory";
         }
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheClientTester.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheClientTester.java
index f89929f7..5ddad8f0 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheClientTester.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheClientTester.java
@@ -29,7 +29,6 @@ import java.rmi.server.ExportException;
 import java.rmi.server.UnicastRemoteObject;
 
 import org.apache.commons.jcs4.access.exception.CacheException;
-import org.apache.commons.jcs4.access.exception.ObjectExistsException;
 import org.apache.commons.jcs4.auxiliary.remote.behavior.IRemoteCacheConstants;
 import org.apache.commons.jcs4.auxiliary.remote.behavior.IRemoteCacheListener;
 import org.apache.commons.jcs4.auxiliary.remote.server.behavior.RemoteType;
@@ -215,7 +214,7 @@ public class RemoteCacheClientTester
                 {
                     cache.update( cb );
                 }
-                catch ( final ObjectExistsException oee )
+                catch ( final CacheException oee )
                 {
                     p( oee.toString() );
                 }
diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/control/CompositeCacheDiskUsageUnitTest.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/control/CompositeCacheDiskUsageUnitTest.java
index e0e1d285..b787301d 100644
--- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/control/CompositeCacheDiskUsageUnitTest.java
+++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/engine/control/CompositeCacheDiskUsageUnitTest.java
@@ -32,7 +32,6 @@ import org.apache.commons.jcs4.JCS;
 import org.apache.commons.jcs4.access.CacheAccess;
 import org.apache.commons.jcs4.access.exception.CacheException;
 import org.apache.commons.jcs4.auxiliary.AbstractAuxiliaryCache;
-import org.apache.commons.jcs4.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.commons.jcs4.engine.CacheElement;
 import org.apache.commons.jcs4.engine.CacheStatus;
 import org.apache.commons.jcs4.engine.CompositeCacheAttributes;
@@ -88,15 +87,6 @@ class CompositeCacheDiskUsageUnitTest
             return null;
         }
 
-        /**
-         * @return the AuxiliaryCacheAttributes.
-         */
-        @Override
-        public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
-        {
-            return null;
-        }
-
         /** @return null */
         @Override
         public String getCacheName()


(commons-jcs) 04/12: Fix typo in class name

Posted by tv...@apache.org.
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 768e3b843248fe6257e3615802ce63d9df0b42fe
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Tue Feb 17 14:50:05 2026 +0100

    Fix typo in class name
---
 .../lang/{DefaultSubsitutor.java => DefaultSubstitutor.java} |  2 +-
 .../jcs4/jcache/lang/{Subsitutor.java => Substitutor.java}   | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/DefaultSubsitutor.java b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/DefaultSubstitutor.java
similarity index 95%
rename from commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/DefaultSubsitutor.java
rename to commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/DefaultSubstitutor.java
index 418b87d0..5138f1fc 100644
--- a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/DefaultSubsitutor.java
+++ b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/DefaultSubstitutor.java
@@ -19,7 +19,7 @@
 
 package org.apache.commons.jcs4.jcache.lang;
 
-public class DefaultSubsitutor implements Subsitutor
+public class DefaultSubstitutor implements Substitutor
 {
     @Override
     public String substitute(final String value)
diff --git a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/Subsitutor.java b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/Substitutor.java
similarity index 84%
rename from commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/Subsitutor.java
rename to commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/Substitutor.java
index feba128c..2d39c583 100644
--- a/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/Subsitutor.java
+++ b/commons-jcs4-jcache/src/main/java/org/apache/commons/jcs4/jcache/lang/Substitutor.java
@@ -19,21 +19,21 @@
 
 package org.apache.commons.jcs4.jcache.lang;
 
-public interface Subsitutor
+public interface Substitutor
 {
     final class Helper {
-        public static final Subsitutor INSTANCE;
+        public static final Substitutor INSTANCE;
         static {
-            Subsitutor value = null;
+            Substitutor value = null;
             for (final String name : new String[]
             { // ordered by features
                     "org.apache.commons.jcs4.jcache.lang.Lang3Substitutor",
-                    "org.apache.commons.jcs4.jcache.lang.DefaultSubsitutor"
+                    "org.apache.commons.jcs4.jcache.lang.DefaultSubstitutor"
             })
             {
                 try
                 {
-                    value = (Subsitutor) Subsitutor.class.getClassLoader().loadClass(name).getDeclaredConstructor().newInstance();
+                    value = (Substitutor) Substitutor.class.getClassLoader().loadClass(name).getDeclaredConstructor().newInstance();
                     value.substitute("${java.version}"); // ensure it works
                 }
                 catch (final Throwable e) // not Exception otherwise NoClassDefFoundError
@@ -42,7 +42,7 @@ public interface Subsitutor
                 }
             }
             if (value == null) {
-                throw new IllegalStateException("Can't find a " + Subsitutor.class.getName());
+                throw new IllegalStateException("Can't find a " + Substitutor.class.getName());
             }
             INSTANCE = value;
         }