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 6306eb65a6a9e310004c69987df2cc511f73f977 Author: Thomas Vandahl <[email protected]> AuthorDate: Mon Feb 9 17:54:20 2026 +0100 Add method to get the implementing AuxiliaryCacheAttributes class --- .../commons/jcs4/auxiliary/AuxiliaryCacheFactory.java | 7 +++++++ .../jcs4/auxiliary/disk/block/BlockDiskCacheFactory.java | 11 +++++++++++ .../auxiliary/disk/indexed/IndexedDiskCacheFactory.java | 11 +++++++++++ .../jcs4/auxiliary/disk/jdbc/JDBCDiskCacheFactory.java | 11 +++++++++++ .../lateral/socket/tcp/LateralTCPCacheFactory.java | 13 ++++++++++++- .../commons/jcs4/auxiliary/remote/RemoteCacheFactory.java | 11 +++++++++++ .../remote/http/client/RemoteHttpCacheFactory.java | 11 +++++++++++ .../commons/jcs4/auxiliary/MockAuxiliaryCacheFactory.java | 11 +++++++++++ 8 files changed, 85 insertions(+), 1 deletion(-) diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AuxiliaryCacheFactory.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AuxiliaryCacheFactory.java index b5239049..cd1caa49 100644 --- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AuxiliaryCacheFactory.java +++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/AuxiliaryCacheFactory.java @@ -68,4 +68,11 @@ public interface AuxiliaryCacheFactory * @param s The new name value */ void setName( String s ); + + /** + * Gets the class implementing the extended AuxiliaryCacheAttributes for this factory + * + * @return The class value + */ + Class<? extends AuxiliaryCacheAttributes> getAttributeClass(); } 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 c774e15d..867070c2 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 @@ -58,4 +58,15 @@ public class BlockDiskCacheFactory return cache; } + + /** + * Gets the class implementing the extended AuxiliaryCacheAttributes for this factory + * + * @return The class value + */ + @Override + public Class<BlockDiskCacheAttributes> getAttributeClass() + { + return BlockDiskCacheAttributes.class; + } } diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDiskCacheFactory.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDiskCacheFactory.java index f692444a..d3249a1c 100644 --- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDiskCacheFactory.java +++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/indexed/IndexedDiskCacheFactory.java @@ -58,4 +58,15 @@ public class IndexedDiskCacheFactory return cache; } + + /** + * Gets the class implementing the extended AuxiliaryCacheAttributes for this factory + * + * @return The class value + */ + @Override + public Class<IndexedDiskCacheAttributes> getAttributeClass() + { + return IndexedDiskCacheAttributes.class; + } } diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCacheFactory.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCacheFactory.java index a0e8c966..95aa9963 100644 --- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCacheFactory.java +++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/disk/jdbc/JDBCDiskCacheFactory.java @@ -249,6 +249,17 @@ public class JDBCDiskCacheFactory this.dsFactories = new ConcurrentHashMap<>(); } + /** + * Gets the class implementing the extended AuxiliaryCacheAttributes for this factory + * + * @return The class value + */ + @Override + public Class<JDBCDiskCacheAttributes> getAttributeClass() + { + return JDBCDiskCacheAttributes.class; + } + /** * @see org.apache.commons.jcs4.engine.behavior.IRequireScheduler#setScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) */ 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 ed5b169d..3444baba 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 @@ -164,7 +164,7 @@ public class LateralTCPCacheFactory final AuxiliaryCacheAttributes iaca, final ICompositeCacheManager cacheMgr, final ICacheEventLogger cacheEventLogger, final IElementSerializer elementSerializer ) { - final ILateralTCPCacheAttributes lac = (ILateralTCPCacheAttributes) iaca; + final LateralTCPCacheAttributes lac = (LateralTCPCacheAttributes) iaca; final ArrayList<LateralTCPCacheNoWait<K, V>> noWaits = new ArrayList<>(); // pairs up the tcp servers and set the tcpServer value and @@ -413,6 +413,17 @@ public class LateralTCPCacheFactory this.lateralWatch.setCacheWatch( new ZombieCacheWatch() ); } + /** + * Gets the class implementing the extended AuxiliaryCacheAttributes for this factory + * + * @return The class value + */ + @Override + public Class<LateralTCPCacheAttributes> getAttributeClass() + { + return LateralTCPCacheAttributes.class; + } + /** * Add cache instance to monitor * diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheFactory.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheFactory.java index 182e4a1d..0e2bc493 100644 --- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheFactory.java +++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/RemoteCacheFactory.java @@ -238,4 +238,15 @@ public class RemoteCacheFactory monitor = new RemoteCacheMonitor(); monitor.setDaemon(true); } + + /** + * Gets the class implementing the extended AuxiliaryCacheAttributes for this factory + * + * @return The class value + */ + @Override + public Class<RemoteCacheAttributes> getAttributeClass() + { + return RemoteCacheAttributes.class; + } } diff --git a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheFactory.java b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheFactory.java index cc6fc22d..777092aa 100644 --- a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheFactory.java +++ b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/auxiliary/remote/http/client/RemoteHttpCacheFactory.java @@ -142,4 +142,15 @@ public class RemoteHttpCacheFactory monitor.setDaemon(true); monitor.start(); } + + /** + * Gets the class implementing the extended AuxiliaryCacheAttributes for this factory + * + * @return The class value + */ + @Override + public Class<RemoteHttpCacheAttributes> getAttributeClass() + { + return RemoteHttpCacheAttributes.class; + } } diff --git a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockAuxiliaryCacheFactory.java b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockAuxiliaryCacheFactory.java index c44eb387..6ef98ef3 100644 --- a/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockAuxiliaryCacheFactory.java +++ b/commons-jcs4-core/src/test/java/org/apache/commons/jcs4/auxiliary/MockAuxiliaryCacheFactory.java @@ -67,4 +67,15 @@ public class MockAuxiliaryCacheFactory { this.name = s; } + + /** + * Gets the class implementing the extended AuxiliaryCacheAttributes for this factory + * + * @return The class value + */ + @Override + public Class<MockAuxiliaryCacheAttributes> getAttributeClass() + { + return MockAuxiliaryCacheAttributes.class; + } }
