commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1232163 [1/10] - in /commons/proper/jcs/branches/generics-interface/src: java/org/apache/jcs/ java/org/apache/jcs/access/ java/org/apache/jcs/access/behavior/ java/org/apache/jcs/admin/ java/org/apache/jcs/auxiliary/ java/org/apache/jcs/au...
Date Mon, 16 Jan 2012 21:05:50 GMT
Author: tv
Date: Mon Jan 16 21:05:44 2012
New Revision: 1232163

URL: http://svn.apache.org/viewvc?rev=1232163&view=rev
Log:
Switch to generics - Save the work done so far
This code does not compile.

Modified:
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/JCS.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/CacheAccess.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/GroupCacheAccess.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/PartitionedCacheAccess.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/behavior/ICacheAccess.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/behavior/IGroupCacheAccess.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/admin/CacheRegionInfo.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/admin/JCSAdminBean.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AbstractAuxiliaryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AbstractAuxiliaryCacheEventLogging.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCacheFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/AbstractDiskCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/PurgatoryElement.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/block/BlockDiskCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/block/BlockDiskElementDescriptor.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/block/BlockDiskKeyStore.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/file/FileDiskCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/file/FileDiskCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskDumper.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheManagerAbstractTemplate.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/ShrinkerThread.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/LateralCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheAbstractFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheAbstractManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWait.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWaitFacade.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/LateralElementDescriptor.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/ZombieLateralCacheService.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/behavior/ILateralCacheListener.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/behavior/ILateralCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/behavior/ILateralCacheService.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListener.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPListener.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPSender.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPService.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/AbsractRemoteCacheListener.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/RemoteCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheListener.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWait.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheService.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/behavior/IRemoteCacheClient.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/behavior/IRemoteCacheListener.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/behavior/IRemoteCacheService.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheClient.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpClientListener.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/http/client/behavior/IRemoteHttpCacheClient.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/http/server/AbstractRemoteCacheService.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/http/server/RemoteCacheServiceAdaptor.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheService.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheSeviceFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/server/RemoteCacheServer.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/util/RemoteCacheRequestFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/value/RemoteCacheRequest.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/value/RemoteCacheResponse.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/AbstractCacheEventQueue.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/CacheAdaptor.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/CacheElement.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/CacheElementSerialized.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/CacheEventQueue.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/CacheEventQueueFactory.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/CacheListeners.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/CacheWatchRepairable.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/PooledCacheEventQueue.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/ZombieCacheService.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/ZombieCacheServiceNonLocal.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/ZombieCacheWatch.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/behavior/ICache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/behavior/ICacheElement.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/behavior/ICacheElementSerialized.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/behavior/ICacheEventQueue.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/behavior/ICacheListener.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/behavior/ICacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/behavior/ICacheObserver.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/behavior/ICacheService.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/behavior/ICacheServiceNonLocal.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/behavior/ICompositeCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/behavior/IElementSerializer.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/CompositeCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/CompositeCacheConfigurator.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/CompositeCacheManager.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/group/GroupAttrName.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/logging/CacheEvent.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/logging/CacheEventLoggerDebugLogger.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/logging/behavior/ICacheEvent.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/logging/behavior/ICacheEventLogger.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/match/KeyMatcherPatternImpl.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/match/behavior/IKeyMatcher.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/AbstractDoulbeLinkedListMemoryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/AbstractMemoryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/MemoryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/behavior/IMemoryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/fifo/FIFOMemoryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/lru/LHMLRUMemoryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/lru/LRUMemoryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/mru/MRUMemoryCache.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/shrinking/ShrinkerThread.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/memory/util/MemoryElementDescriptor.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/utils/access/JCSWorker.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/utils/serialization/CompressingSerializer.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/utils/serialization/SerializationConversionUtil.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/utils/serialization/StandardSerializer.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSCacheElementRetrievalUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/CacheAccessUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/MockAuxiliaryCache.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/MockCacheEventLogger.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/AbstractDiskCacheUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/PurgatoryElementUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheConcurrentUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/block/BlockDiskCacheUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/DiskTestObjectUtil.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexDiskCacheUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheConcurrentUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheKeyStoreUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheManagerUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheNoMemoryUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheSameRegionConcurrentUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheSharedPoolUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheConcurrentUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPConcurrentRandomTestUtil.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPFilterRemoveHashCodeUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPIssueRemoveOnPutUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/MockLateralCache.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheClient.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheListener.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/MockRemoteCacheService.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheClientTester.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheServiceUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheClientUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteCacheServiceAdaptorUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteHttpCacheServiceUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/server/RemoteCacheServerUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/util/RemoteCacheRequestFactoryUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/EventQueueConcurrentLoadTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/MockCacheServiceNonLocal.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/ZombieCacheServiceNonLocalUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/control/CompositeCacheDiskUsageUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/control/CompositeCacheUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/control/MockElementSerializer.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/logging/MockCacheEventLogger.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/match/KeyMatcherPatternImpllUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/memory/MockMemoryCache.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/memory/lru/LHMLRUMemoryCacheConcurrentUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/memory/lru/LHMLRUMemoryCacheUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/memory/lru/LRUMemoryCacheConcurrentUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/memory/mru/MRUMemoryCacheUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/memory/shrinking/ShrinkerThreadUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/utils/serialization/SerializationConversionUtilUnitTest.java

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/JCS.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/JCS.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/JCS.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/JCS.java Mon Jan 16 21:05:44 2012
@@ -19,6 +19,7 @@ package org.apache.jcs;
  * under the License.
  */
 
+import java.io.Serializable;
 import java.util.Properties;
 
 import org.apache.jcs.access.GroupCacheAccess;
@@ -26,6 +27,7 @@ import org.apache.jcs.access.exception.C
 import org.apache.jcs.engine.behavior.ICompositeCacheAttributes;
 import org.apache.jcs.engine.control.CompositeCache;
 import org.apache.jcs.engine.control.CompositeCacheManager;
+import org.apache.jcs.engine.control.group.GroupAttrName;
 
 /**
  * Simple class for using JCS. To use JCS in your application, you can use the static methods of
@@ -34,8 +36,8 @@ import org.apache.jcs.engine.control.Com
  * want to access. If you have several regions, then get instances for each. For best performance
  * the getInstance call should be made in an initialization method.
  */
-public class JCS
-    extends GroupCacheAccess
+public class JCS<K extends Serializable, V extends Serializable>
+    extends GroupCacheAccess<K, V>
 {
     /** cache.ccf alternative. */
     private static String configFilename = null;
@@ -51,7 +53,7 @@ public class JCS
      * <p>
      * @param cacheControl Cache which the instance will provide access to
      */
-    protected JCS( CompositeCache cacheControl )
+    protected JCS( CompositeCache<GroupAttrName<K>, V> cacheControl )
     {
         super( cacheControl );
     }
@@ -63,10 +65,11 @@ public class JCS
      * @return A JCS which provides access to a given region.
      * @exception CacheException
      */
-    public static JCS getInstance( String region )
+    public static <K extends Serializable, V extends Serializable> JCS<K, V> getInstance( String region )
         throws CacheException
     {
-        return new JCS( getCacheManager().getCache( region ) );
+        CompositeCache<GroupAttrName<K>, V> cache = getCacheManager().getCache( region );
+        return new JCS<K, V>( cache );
     }
 
     /**
@@ -77,10 +80,11 @@ public class JCS
      * @return A JCS which provides access to a given region.
      * @exception CacheException
      */
-    public static JCS getInstance( String region, ICompositeCacheAttributes icca )
+    public static <K extends Serializable, V extends Serializable> JCS<K, V> getInstance( String region, ICompositeCacheAttributes icca )
         throws CacheException
     {
-        return new JCS( getCacheManager().getCache( region, icca ) );
+        CompositeCache<GroupAttrName<K>, V> cache = getCacheManager().getCache( region, icca );
+        return new JCS<K, V>( cache );
     }
 
     /**

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/CacheAccess.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/CacheAccess.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/CacheAccess.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/CacheAccess.java Mon Jan 16 21:05:44 2012
@@ -51,8 +51,8 @@ import org.apache.jcs.engine.stats.behav
  * <p>
  * The JCS class is the preferred way to access these methods.
  */
-public class CacheAccess
-    implements ICacheAccess<Serializable, Serializable>
+public class CacheAccess<K extends Serializable, V extends Serializable>
+    implements ICacheAccess<K, V>
 {
     /** The logger. */
     private static final Log log = LogFactory.getLog( CacheAccess.class );
@@ -65,14 +65,14 @@ public class CacheAccess
      * <p>
      * @TODO Should this be the interface?
      */
-    protected CompositeCache cacheControl;
+    protected CompositeCache<K, V> cacheControl;
 
     /**
      * Constructor for the CacheAccess object.
      * <p>
      * @param cacheControl The cache which the created instance accesses
      */
-    public CacheAccess( CompositeCache cacheControl )
+    public CacheAccess( CompositeCache<K, V> cacheControl )
     {
         this.cacheControl = cacheControl;
     }
@@ -90,12 +90,11 @@ public class CacheAccess
      * @return CacheAccess instance for the new region
      * @exception CacheException
      */
-    public static CacheAccess defineRegion( String name )
+    public static <K extends Serializable, V extends Serializable> CacheAccess<K, V> defineRegion( String name )
         throws CacheException
     {
-        getCacheManager();
-
-        return new CacheAccess( getCacheManager().getCache( name ) );
+        CompositeCache<K, V> cache = getCacheManager().getCache( name );
+        return new CacheAccess<K, V>( cache );
     }
 
     /**
@@ -106,10 +105,11 @@ public class CacheAccess
      * @return CacheAccess instance for the new region
      * @exception CacheException
      */
-    public static CacheAccess defineRegion( String name, ICompositeCacheAttributes cattr )
+    public static <K extends Serializable, V extends Serializable> CacheAccess<K, V> defineRegion( String name, ICompositeCacheAttributes cattr )
         throws CacheException
     {
-        return new CacheAccess( getCacheManager().getCache( name, cattr ) );
+        CompositeCache<K, V> cache = getCacheManager().getCache( name, cattr );
+        return new CacheAccess<K, V>( cache );
     }
 
     /**
@@ -122,10 +122,11 @@ public class CacheAccess
      * @return CacheAccess instance for the new region
      * @exception CacheException
      */
-    public static CacheAccess defineRegion( String name, ICompositeCacheAttributes cattr, IElementAttributes attr )
+    public static <K extends Serializable, V extends Serializable> CacheAccess<K, V> defineRegion( String name, ICompositeCacheAttributes cattr, IElementAttributes attr )
         throws CacheException
     {
-        return new CacheAccess( getCacheManager().getCache( name, cattr, attr ) );
+        CompositeCache<K, V> cache = getCacheManager().getCache( name, cattr, attr );
+        return new CacheAccess<K, V>( cache );
     }
 
     /**
@@ -135,10 +136,11 @@ public class CacheAccess
      * @return CacheAccess instance for region
      * @exception CacheException
      */
-    public static CacheAccess getAccess( String region )
+    public static <K extends Serializable, V extends Serializable> CacheAccess<K, V> getAccess( String region )
         throws CacheException
     {
-        return new CacheAccess( getCacheManager().getCache( region ) );
+        CompositeCache<K, V> cache = getCacheManager().getCache( region );
+        return new CacheAccess<K, V>( cache );
     }
 
     /**
@@ -149,10 +151,11 @@ public class CacheAccess
      * @return CacheAccess instance for region
      * @exception CacheException
      */
-    public static CacheAccess getAccess( String region, ICompositeCacheAttributes icca )
+    public static <K extends Serializable, V extends Serializable> CacheAccess<K, V> getAccess( String region, ICompositeCacheAttributes icca )
         throws CacheException
     {
-        return new CacheAccess( getCacheManager().getCache( region, icca ) );
+        CompositeCache<K, V> cache = getCacheManager().getCache( region, icca );
+        return new CacheAccess<K, V>( cache );
     }
 
     /**
@@ -182,9 +185,9 @@ public class CacheAccess
      * @param name Key the object is stored as
      * @return The object if found or null
      */
-    public Serializable get( Serializable name )
+    public V get( K name )
     {
-        ICacheElement element = this.cacheControl.get( name );
+        ICacheElement<K, V> element = this.cacheControl.get( name );
 
         return ( element != null ) ? element.getVal() : null;
     }
@@ -195,16 +198,16 @@ public class CacheAccess
      * @param pattern - a key pattern for the objects stored
      * @return A map of key to values.  These are stripped from the wrapper.
      */
-    public Map<Serializable, Serializable> getMatching( String pattern )
+    public Map<K, V> getMatching( String pattern )
     {
-        HashMap<Serializable, Serializable> unwrappedResults = new HashMap<Serializable, Serializable>();
+        HashMap<K, V> unwrappedResults = new HashMap<K, V>();
 
-        Map<Serializable, ICacheElement> wrappedResults = this.cacheControl.getMatching( pattern );
+        Map<K, ICacheElement<K, V>> wrappedResults = this.cacheControl.getMatching( pattern );
         if ( wrappedResults != null )
         {
-            for (Map.Entry<Serializable, ICacheElement> entry : wrappedResults.entrySet())
+            for (Map.Entry<K, ICacheElement<K, V>> entry : wrappedResults.entrySet())
             {
-                ICacheElement element = wrappedResults.get( entry.getKey() );
+                ICacheElement<K, V> element = entry.getValue();
                 if ( element != null )
                 {
                     unwrappedResults.put( entry.getKey(), element.getVal() );
@@ -215,7 +218,7 @@ public class CacheAccess
     }
 
     /**
-     * This method returns the ICacheElement wrapper which provides access to element info and other
+     * This method returns the ICacheElement<K, V> wrapper which provides access to element info and other
      * attributes.
      * <p>
      * This returns a reference to the wrapper. Any modifications will be reflected in the cache. No
@@ -227,9 +230,9 @@ public class CacheAccess
      * The last access time in the ElementAttributes should be current.
      * <p>
      * @param name Key the Serializable is stored as
-     * @return The ICacheElement if the object is found or null
+     * @return The ICacheElement<K, V> if the object is found or null
      */
-    public ICacheElement getCacheElement( Serializable name )
+    public ICacheElement<K, V> getCacheElement( K name )
     {
         return this.cacheControl.get( name );
     }
@@ -237,7 +240,7 @@ public class CacheAccess
     /**
      * Get multiple elements from the cache based on a set of cache keys.
      * <p>
-     * This method returns the ICacheElement wrapper which provides access to element info and other
+     * This method returns the ICacheElement<K, V> wrapper which provides access to element info and other
      * attributes.
      * <p>
      * This returns a reference to the wrapper. Any modifications will be reflected in the cache. No
@@ -249,9 +252,9 @@ public class CacheAccess
      * The last access time in the ElementAttributes should be current.
      * <p>
      * @param names set of Serializable cache keys
-     * @return a map of Serializable key to ICacheElement element, or empty map if none of the keys are present
+     * @return a map of K key to ICacheElement<K, V> element, or empty map if none of the keys are present
      */
-    public Map<Serializable, ICacheElement> getCacheElements( Set<Serializable> names )
+    public Map<K, ICacheElement<K, V>> getCacheElements( Set<K> names )
     {
         return this.cacheControl.getMultiple( names );
     }
@@ -259,7 +262,7 @@ public class CacheAccess
     /**
      * Get multiple elements from the cache based on a set of cache keys.
      * <p>
-     * This method returns the ICacheElement wrapper which provides access to element info and other
+     * This method returns the ICacheElement<K, V> wrapper which provides access to element info and other
      * attributes.
      * <p>
      * This returns a reference to the wrapper. Any modifications will be reflected in the cache. No
@@ -271,9 +274,9 @@ public class CacheAccess
      * The last access time in the ElementAttributes should be current.
      * <p>
      * @param pattern key search pattern
-     * @return a map of Serializable key to ICacheElement element, or empty map if no keys match the pattern
+     * @return a map of K key to ICacheElement<K, V> element, or empty map if no keys match the pattern
      */
-    public Map<Serializable, ICacheElement> getMatchingCacheElements( String pattern )
+    public Map<K, ICacheElement<K, V>> getMatchingCacheElements( String pattern )
     {
         return this.cacheControl.getMatching( pattern );
     }
@@ -288,7 +291,7 @@ public class CacheAccess
      * @exception CacheException and ObjectExistsException is thrown if the item is already in the
      *                cache.
      */
-    public void putSafe( Serializable key, Serializable value )
+    public void putSafe( K key, V value )
         throws CacheException
     {
         if ( this.cacheControl.get( key ) != null )
@@ -307,7 +310,7 @@ public class CacheAccess
      * @param obj Object to store
      * @exception CacheException
      */
-    public void put( Serializable name, Serializable obj )
+    public void put( K name, V obj )
         throws CacheException
     {
         // Call put with a copy of the contained caches default attributes.
@@ -323,14 +326,15 @@ public class CacheAccess
      * @see org.apache.jcs.access.behavior.ICacheAccess#put(java.lang.Object, java.lang.Object,
      *      org.apache.jcs.engine.behavior.IElementAttributes)
      */
-    public void put( Serializable key, Serializable val, IElementAttributes attr )
+    public void put( K key, V val, IElementAttributes attr )
         throws CacheException
     {
         if ( key == null )
         {
             throw new InvalidArgumentException( "Key must not be null" );
         }
-        else if ( val == null )
+
+        if ( val == null )
         {
             throw new InvalidArgumentException( "Value must not be null" );
         }
@@ -339,7 +343,7 @@ public class CacheAccess
         // should be wrapped by cache access.
         try
         {
-            CacheElement ce = new CacheElement( this.cacheControl.getCacheName(), key,
+            CacheElement<K, V> ce = new CacheElement<K, V>( this.cacheControl.getCacheName(), key,
                                                 val );
 
             ce.setElementAttributes( attr );
@@ -413,7 +417,7 @@ public class CacheAccess
      * @deprecated use remove
      */
     @Deprecated
-    public void destroy( Serializable name )
+    public void destroy( K name )
         throws CacheException
     {
         this.cacheControl.remove( name );
@@ -425,7 +429,7 @@ public class CacheAccess
      * @param name the name of the item to remove.
      * @throws CacheException
      */
-    public void remove( Serializable name )
+    public void remove( K name )
         throws CacheException
     {
         this.cacheControl.remove( name );
@@ -483,10 +487,10 @@ public class CacheAccess
      * @exception CacheException
      * @exception InvalidHandleException if the item does not exist.
      */
-    public void resetElementAttributes( Serializable name, IElementAttributes attr )
+    public void resetElementAttributes( K name, IElementAttributes attr )
         throws CacheException, InvalidHandleException
     {
-        ICacheElement element = this.cacheControl.get( name );
+        ICacheElement<K, V> element = this.cacheControl.get( name );
 
         if ( element == null )
         {
@@ -544,7 +548,7 @@ public class CacheAccess
      * @return Attributes for the object, null if object not in cache
      * @exception CacheException
      */
-    public IElementAttributes getElementAttributes( Serializable name )
+    public IElementAttributes getElementAttributes( K name )
         throws CacheException
     {
         IElementAttributes attr = null;

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/GroupCacheAccess.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/GroupCacheAccess.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/GroupCacheAccess.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/GroupCacheAccess.java Mon Jan 16 21:05:44 2012
@@ -20,6 +20,7 @@ package org.apache.jcs.access;
  */
 
 import java.io.Serializable;
+import java.util.HashSet;
 import java.util.Set;
 
 import org.apache.jcs.access.behavior.IGroupCacheAccess;
@@ -34,16 +35,16 @@ import org.apache.jcs.engine.control.gro
 /**
  * Access for groups.
  */
-public class GroupCacheAccess
-    extends CacheAccess
-    implements IGroupCacheAccess<Serializable, Serializable>
+public class GroupCacheAccess<K extends Serializable, V extends Serializable>
+    extends CacheAccess<GroupAttrName<K>, V>
+    implements IGroupCacheAccess<K, V>
 {
     /**
      * Constructor for the GroupCacheAccess object
      * <p>
      * @param cacheControl
      */
-    public GroupCacheAccess( CompositeCache cacheControl )
+    public GroupCacheAccess( CompositeCache<GroupAttrName<K>, V> cacheControl )
     {
         super( cacheControl );
     }
@@ -55,10 +56,11 @@ public class GroupCacheAccess
      * @return The groupAccess value
      * @throws CacheException
      */
-    public static GroupCacheAccess getGroupAccess( String region )
+    public static <K extends Serializable, V extends Serializable> GroupCacheAccess<K, V> getGroupAccess( String region )
         throws CacheException
     {
-        return new GroupCacheAccess( getCacheManager().getCache( region ) );
+        CompositeCache<GroupAttrName<K>, V> cache = getCacheManager().getCache( region );
+        return new GroupCacheAccess<K, V>( cache );
     }
 
     /**
@@ -69,10 +71,11 @@ public class GroupCacheAccess
      * @return The groupAccess value
      * @throws CacheException
      */
-    public static GroupCacheAccess getGroupAccess( String region, ICompositeCacheAttributes icca )
+    public static <K extends Serializable, V extends Serializable> GroupCacheAccess<K, V> getGroupAccess( String region, ICompositeCacheAttributes icca )
         throws CacheException
     {
-        return new GroupCacheAccess( getCacheManager().getCache( region, icca ) );
+        CompositeCache<GroupAttrName<K>, V> cache = getCacheManager().getCache( region, icca );
+        return new GroupCacheAccess<K, V>( cache );
     }
 
     /**
@@ -84,9 +87,9 @@ public class GroupCacheAccess
      *            The group name.
      * @return The cached value, null if not found.
      */
-    public Serializable getFromGroup( Serializable name, String group )
+    public V getFromGroup( K name, String group )
     {
-        ICacheElement element = this.cacheControl.get( getGroupAttrName( group, name ) );
+        ICacheElement<GroupAttrName<K>, V> element = this.cacheControl.get( getGroupAttrName( group, name ) );
         return ( element != null ) ? element.getVal() : null;
     }
 
@@ -97,10 +100,10 @@ public class GroupCacheAccess
      * @param name
      * @return GroupAttrName
      */
-    private GroupAttrName getGroupAttrName( String group, Serializable name )
+    private GroupAttrName<K> getGroupAttrName( String group, K name )
     {
         GroupId gid = new GroupId( this.cacheControl.getCacheName(), group );
-        return new GroupAttrName( gid, name );
+        return new GroupAttrName<K>( gid, name );
     }
 
     /**
@@ -116,7 +119,7 @@ public class GroupCacheAccess
      *            The object to cache
      * @throws CacheException
      */
-    public void putInGroup( Serializable name, String groupName, Serializable value )
+    public void putInGroup( K name, String groupName, V value )
         throws CacheException
     {
         putInGroup( name, groupName, value, null );
@@ -137,7 +140,7 @@ public class GroupCacheAccess
      *            The objects attributes.
      * @throws CacheException
      */
-    public void putInGroup( Serializable name, String groupName, Serializable value, IElementAttributes attr )
+    public void putInGroup( K name, String groupName, V value, IElementAttributes attr )
         throws CacheException
     {
         // unbind object first if any.
@@ -157,9 +160,9 @@ public class GroupCacheAccess
      * @param name
      * @param group
      */
-    public void remove( Serializable name, String group )
+    public void remove( K name, String group )
     {
-        GroupAttrName key = getGroupAttrName( group, name );
+        GroupAttrName<K> key = getGroupAttrName( group, name );
         this.cacheControl.remove( key );
     }
 
@@ -169,9 +172,16 @@ public class GroupCacheAccess
      * @param group
      * @return A Set of keys.
      */
-    public Set<Serializable> getGroupKeys( String group )
+    public Set<K> getGroupKeys( String group )
     {
-        return this.cacheControl.getGroupKeys( group );
+        Set<K> groupKeys = new HashSet<K>();
+
+        for (GroupAttrName<K> gan : this.cacheControl.getGroupKeys( group ))
+        {
+            groupKeys.add(gan.attrName);
+        }
+
+        return groupKeys;
     }
 
     /**

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/PartitionedCacheAccess.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/PartitionedCacheAccess.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/PartitionedCacheAccess.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/PartitionedCacheAccess.java Mon Jan 16 21:05:44 2012
@@ -19,6 +19,7 @@ package org.apache.jcs.access;
  * under the License.
  */
 
+import java.io.Serializable;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -53,7 +54,7 @@ import org.apache.jcs.utils.props.Abstra
  * <p>
  * @author Aaron Smuts
  */
-public class PartitionedCacheAccess<K, V>
+public class PartitionedCacheAccess<K extends Serializable, V extends Serializable>
     extends AbstractPropertyContainer
     implements ICacheAccess<K, V>
 {
@@ -191,12 +192,12 @@ public class PartitionedCacheAccess<K, V
     }
 
     /**
-     * Gets the ICacheElement (the wrapped object) for the key from the desired partition.
+     * Gets the ICacheElement<K, V> (the wrapped object) for the key from the desired partition.
      * <p>
      * @param key key
      * @return result, null if not found.
      */
-    public ICacheElement getCacheElement( K key )
+    public ICacheElement<K, V> getCacheElement( K key )
     {
         if ( key == null )
         {
@@ -225,7 +226,7 @@ public class PartitionedCacheAccess<K, V
      * @param names
      * @return Map of keys to ICacheElement
      */
-    public Map<K, ICacheElement> getCacheElements( Set<K> names )
+    public Map<K, ICacheElement<K, V>> getCacheElements( Set<K> names )
     {
         if ( names == null )
         {
@@ -245,7 +246,7 @@ public class PartitionedCacheAccess<K, V
             dividedNames[partition].add( key );
         }
 
-        Map<K, ICacheElement> result = new HashMap<K, ICacheElement>();
+        Map<K, ICacheElement<K, V>> result = new HashMap<K, ICacheElement<K, V>>();
         for ( int i = 0; i < partitions.length; i++ )
         {
             if ( dividedNames[i] != null && !dividedNames[i].isEmpty() )
@@ -283,7 +284,7 @@ public class PartitionedCacheAccess<K, V
             return null;
         }
 
-        Map<K, V> result = new HashMap<K,V>();
+        Map<K, V> result = new HashMap<K, V>();
         for ( int i = 0; i < partitions.length; i++ )
         {
             result.putAll( partitions[i].getMatching( pattern ) );
@@ -297,7 +298,7 @@ public class PartitionedCacheAccess<K, V
      * @param pattern
      * @return HashMap key to ICacheElement
      */
-    public Map<K, ICacheElement> getMatchingCacheElements( String pattern )
+    public Map<K, ICacheElement<K, V>> getMatchingCacheElements( String pattern )
     {
         if ( pattern == null )
         {
@@ -315,7 +316,7 @@ public class PartitionedCacheAccess<K, V
             return null;
         }
 
-        Map<K, ICacheElement> result = new HashMap<K, ICacheElement>();
+        Map<K, ICacheElement<K, V>> result = new HashMap<K, ICacheElement<K, V>>();
         for ( int i = 0; i < partitions.length; i++ )
         {
             result.putAll( partitions[i].getMatchingCacheElements( pattern ) );
@@ -596,7 +597,7 @@ public class PartitionedCacheAccess<K, V
             String regionName = this.getPartitionRegionNamePrefix() + "_" + i;
             try
             {
-                tempPartitions[i] = (ICacheAccess<K, V>) CacheAccess.getAccess( regionName );
+                tempPartitions[i] = CacheAccess.getAccess( regionName );
             }
             catch ( CacheException e )
             {

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/behavior/ICacheAccess.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/behavior/ICacheAccess.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/behavior/ICacheAccess.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/behavior/ICacheAccess.java Mon Jan 16 21:05:44 2012
@@ -19,6 +19,7 @@ package org.apache.jcs.access.behavior;
  * under the License.
  */
 
+import java.io.Serializable;
 import java.util.Map;
 import java.util.Set;
 
@@ -30,7 +31,7 @@ import org.apache.jcs.engine.behavior.IE
 /**
  * ICacheAccess defines the behavior for client access.
  */
-public interface ICacheAccess<K, V>
+public interface ICacheAccess<K extends Serializable, V extends Serializable>
 {
     /**
      * Basic get method.
@@ -80,7 +81,7 @@ public interface ICacheAccess<K, V>
         throws CacheException;
 
     /**
-     * This method returns the ICacheElement wrapper which provides access to element info and other
+     * This method returns the ICacheElement<K, V> wrapper which provides access to element info and other
      * attributes.
      * <p>
      * This returns a reference to the wrapper. Any modifications will be reflected in the cache. No
@@ -92,14 +93,14 @@ public interface ICacheAccess<K, V>
      * The last access time in the ElementAttributes should be current.
      * <p>
      * @param name Key the object is stored as
-     * @return The ICacheElement if the object is found or null
+     * @return The ICacheElement<K, V> if the object is found or null
      */
-    ICacheElement getCacheElement( K name );
+    ICacheElement<K, V> getCacheElement( K name );
 
     /**
      * Get multiple elements from the cache based on a set of cache keys.
      * <p>
-     * This method returns the ICacheElement wrapper which provides access to element info and other
+     * This method returns the ICacheElement<K, V> wrapper which provides access to element info and other
      * attributes.
      * <p>
      * This returns a reference to the wrapper. Any modifications will be reflected in the cache. No
@@ -111,15 +112,15 @@ public interface ICacheAccess<K, V>
      * The last access time in the ElementAttributes should be current.
      * <p>
      * @param names set of Object cache keys
-     * @return a map of Object key to ICacheElement element, or empty map if none of the keys are
+     * @return a map of Object key to ICacheElement<K, V> element, or empty map if none of the keys are
      *         present
      */
-    Map<K, ICacheElement> getCacheElements( Set<K> names );
+    Map<K, ICacheElement<K, V>> getCacheElements( Set<K> names );
 
     /**
      * Get multiple elements from the cache based on a set of cache keys.
      * <p>
-     * This method returns the ICacheElement wrapper which provides access to element info and other
+     * This method returns the ICacheElement<K, V> wrapper which provides access to element info and other
      * attributes.
      * <p>
      * This returns a reference to the wrapper. Any modifications will be reflected in the cache. No
@@ -130,11 +131,11 @@ public interface ICacheAccess<K, V>
      * <p>
      * The last access time in the ElementAttributes should be current.
      * <p>
-     * @param pattern key search patern
-     * @return a map of Object key to ICacheElement element, or empty map if no keys match the
+     * @param pattern key search pattern
+     * @return a map of Object key to ICacheElement<K, V> element, or empty map if no keys match the
      *         pattern
      */
-    Map<K, ICacheElement> getMatchingCacheElements( String pattern );
+    Map<K, ICacheElement<K, V>> getMatchingCacheElements( String pattern );
 
     /**
      * Old remove all method.

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/behavior/IGroupCacheAccess.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/behavior/IGroupCacheAccess.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/behavior/IGroupCacheAccess.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/access/behavior/IGroupCacheAccess.java Mon Jan 16 21:05:44 2012
@@ -19,17 +19,19 @@ package org.apache.jcs.access.behavior;
  * under the License.
  */
 
+import java.io.Serializable;
 import java.util.Set;
 
 import org.apache.jcs.access.exception.CacheException;
 import org.apache.jcs.engine.behavior.IElementAttributes;
+import org.apache.jcs.engine.control.group.GroupAttrName;
 
 /**
  * IGroupCacheAccess defines group specific behavior for the client access
  * classes.
  */
-public interface IGroupCacheAccess<K, V>
-    extends ICacheAccess<K, V>
+public interface IGroupCacheAccess<K extends Serializable, V extends Serializable>
+    extends ICacheAccess<GroupAttrName<K>, V>
 {
     /**
      * Gets the g attribute of the IGroupCacheAccess object
@@ -37,12 +39,12 @@ public interface IGroupCacheAccess<K, V>
      * @param name
      * @param group
      *            the name of the group to associate this with.
-     * @return The teh object that is keyed by the name in the group
+     * @return The object that is keyed by the name in the group
      */
     V getFromGroup( K name, String group );
 
     /**
-     * Puts an item int eh cache associated with this group.
+     * Puts an item in the cache associated with this group.
      * <p>
      * @param key
      * @param group

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/admin/CacheRegionInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/admin/CacheRegionInfo.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/admin/CacheRegionInfo.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/admin/CacheRegionInfo.java Mon Jan 16 21:05:44 2012
@@ -28,7 +28,7 @@ import org.apache.jcs.engine.control.Com
 public class CacheRegionInfo
 {
     /** The cache region we are getting info on. */
-    CompositeCache cache = null;
+    CompositeCache<?,?> cache = null;
 
     /** number of bytes counted so far, will be a total of all items. */
     long byteCount = 0;
@@ -36,7 +36,7 @@ public class CacheRegionInfo
     /**
      * @return the underlying region
      */
-    public CompositeCache getCache()
+    public CompositeCache<?, ?> getCache()
     {
         return this.cache;
     }

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/admin/JCSAdminBean.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/admin/JCSAdminBean.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/admin/JCSAdminBean.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/admin/JCSAdminBean.java Mon Jan 16 21:05:44 2012
@@ -74,12 +74,12 @@ public class JCSAdminBean
      * @return List of CacheElementInfo objects
      * @throws Exception
      */
-    public LinkedList<CacheElementInfo> buildElementInfo( String cacheName )
+    public <K extends Serializable, V extends Serializable> LinkedList<CacheElementInfo> buildElementInfo( String cacheName )
         throws Exception
     {
-        CompositeCache cache = cacheHub.getCache( cacheName );
+        CompositeCache<K, V> cache = cacheHub.getCache( cacheName );
 
-        Object[] keys = cache.getMemoryCache().getKeyArray();
+        K[] keys = cache.getMemoryCache().getKeyArray();
 
         // Attempt to sort keys according to their natural ordering. If that
         // fails, get the key array again and continue unsorted.
@@ -94,7 +94,7 @@ public class JCSAdminBean
 
         LinkedList<CacheElementInfo> records = new LinkedList<CacheElementInfo>();
 
-        ICacheElement element;
+        ICacheElement<K, V> element;
         IElementAttributes attributes;
         CacheElementInfo elementInfo;
 
@@ -104,7 +104,7 @@ public class JCSAdminBean
 
         for ( int i = 0; i < keys.length; i++ )
         {
-            element = cache.getMemoryCache().getQuiet( (Serializable) keys[i] );
+            element = cache.getMemoryCache().getQuiet( keys[i] );
 
             attributes = element.getElementAttributes();
 
@@ -143,7 +143,7 @@ public class JCSAdminBean
         LinkedList<CacheRegionInfo> cacheInfo = new LinkedList<CacheRegionInfo>();
 
         CacheRegionInfo regionInfo;
-        CompositeCache cache;
+        CompositeCache<?, ?> cache;
 
         for ( int i = 0; i < cacheNames.length; i++ )
         {
@@ -167,7 +167,7 @@ public class JCSAdminBean
      *
      * @return int The size of the region in bytes.
      */
-    public int getByteCount(CompositeCache cache) throws Exception
+    public <K extends Serializable, V extends Serializable> int getByteCount(CompositeCache<K, V> cache) throws Exception
     {
         if (cache == null)
         {
@@ -177,17 +177,17 @@ public class JCSAdminBean
         long size = 0;
         try
         {
-            IMemoryCache memCache = cache.getMemoryCache();
+            IMemoryCache<K, V> memCache = cache.getMemoryCache();
 
-            Iterator<Map.Entry<Serializable, MemoryElementDescriptor>> iter = memCache.getIterator();
+            Iterator<Map.Entry<K, MemoryElementDescriptor<K, V>>> iter = memCache.getIterator();
             while (iter.hasNext())
             {
-                MemoryElementDescriptor me = iter.next().getValue();
-                ICacheElement ice = me.ce;
+                MemoryElementDescriptor<K, V> me = iter.next().getValue();
+                ICacheElement<K, V> ice = me.ce;
 
                 if (ice instanceof CacheElementSerialized)
                 {
-                    size = size + ((CacheElementSerialized) ice).getSerializedValue().length;
+                    size = size + ((CacheElementSerialized<K, V>) ice).getSerializedValue().length;
                 }
                 else
                 {
@@ -254,7 +254,7 @@ public class JCSAdminBean
                 String[] cacheNames = cacheHub.getCacheNames();
 
                 // Call remoteCacheServer.removeAll(String) for each cacheName...
-                RemoteCacheServer remoteCacheServer = RemoteCacheServerFactory.getRemoteCacheServer();
+                RemoteCacheServer<?, ?> remoteCacheServer = RemoteCacheServerFactory.getRemoteCacheServer();
                 for (int i = 0; i < cacheNames.length; i++)
                 {
                     String cacheName = cacheNames[i];
@@ -294,7 +294,7 @@ public class JCSAdminBean
             try
             {
                 // Call remoteCacheServer.removeAll(String)...
-                RemoteCacheServer remoteCacheServer = RemoteCacheServerFactory.getRemoteCacheServer();
+                RemoteCacheServer<?, ?> remoteCacheServer = RemoteCacheServerFactory.getRemoteCacheServer();
                 remoteCacheServer.removeAll(cacheName);
             }
             catch (IOException e)
@@ -339,7 +339,7 @@ public class JCSAdminBean
             try
             {
                 Object keyToRemove = null;
-                CompositeCache cache = CompositeCacheManager.getInstance().getCache(cacheName);
+                CompositeCache<? extends Serializable, ? extends Serializable> cache = CompositeCacheManager.getInstance().getCache(cacheName);
 
                 // A String key was supplied, but to remove elements via the RemoteCacheServer API, we need the
                 // actual key object as stored in the cache (i.e. a Serializable object). To find the key in this form,
@@ -370,7 +370,7 @@ public class JCSAdminBean
                 {
                     throw new IllegalStateException("Found key [" + keyToRemove + ", " + keyToRemove.getClass() + "] in cache matching key specified, however key found in cache is unexpectedly not serializable.");
                 }
-                // At this point, we have retrieved the matching Serializable key.
+                // At this point, we have retrieved the matching K key.
 
                 // Call remoteCacheServer.remove(String, Serializable)...
                 RemoteCacheServer remoteCacheServer = RemoteCacheServerFactory.getRemoteCacheServer();

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AbstractAuxiliaryCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AbstractAuxiliaryCache.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AbstractAuxiliaryCache.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AbstractAuxiliaryCache.java Mon Jan 16 21:05:44 2012
@@ -12,8 +12,8 @@ import org.apache.jcs.engine.match.behav
 import org.apache.jcs.utils.serialization.StandardSerializer;
 
 /** This holds convenience methods used by most auxiliary caches. */
-public abstract class AbstractAuxiliaryCache
-    implements AuxiliaryCache
+public abstract class AbstractAuxiliaryCache<K extends Serializable, V extends Serializable>
+    implements AuxiliaryCache<K, V>
 {
     /** Don't change. */
     private static final long serialVersionUID = -1285708398502576617L;
@@ -24,11 +24,8 @@ public abstract class AbstractAuxiliaryC
     /** The serializer. Uses a standard serializer by default. */
     protected IElementSerializer elementSerializer = new StandardSerializer();
 
-    /** If there is no event logger, we will return this event for all create calls. */
-    private static final ICacheEvent EMPTY_ICACHE_EVENT = new CacheEvent();
-
     /** Key matcher used by the getMatching API */
-    protected IKeyMatcher keyMatcher = new KeyMatcherPatternImpl();
+    protected IKeyMatcher<K> keyMatcher = new KeyMatcherPatternImpl<K>();
 
     /**
      * Logs an event if an event logger is configured.
@@ -37,20 +34,22 @@ public abstract class AbstractAuxiliaryC
      * @param eventName
      * @return ICacheEvent
      */
-    protected ICacheEvent createICacheEvent( ICacheElement item, String eventName )
+    protected ICacheEvent<K> createICacheEvent( ICacheElement<K, V> item, String eventName )
     {
         if ( cacheEventLogger == null )
         {
-            return EMPTY_ICACHE_EVENT;
+            return new CacheEvent<K>();
         }
         String diskLocation = getEventLoggingExtraInfo();
         String regionName = null;
+        K key = null;
         if ( item != null )
         {
             regionName = item.getCacheName();
+            key = item.getKey();
         }
         return cacheEventLogger.createICacheEvent( getAuxiliaryCacheAttributes().getName(), regionName, eventName,
-                                                   diskLocation, item );
+                                                   diskLocation, key );
     }
 
     /**
@@ -61,11 +60,11 @@ public abstract class AbstractAuxiliaryC
      * @param eventName
      * @return ICacheEvent
      */
-    protected ICacheEvent createICacheEvent( String regionName, Serializable key, String eventName )
+    protected <T extends Serializable> ICacheEvent<T> createICacheEvent( String regionName, T key, String eventName )
     {
         if ( cacheEventLogger == null )
         {
-            return EMPTY_ICACHE_EVENT;
+            return new CacheEvent<T>();
         }
         String diskLocation = getEventLoggingExtraInfo();
         return cacheEventLogger.createICacheEvent( getAuxiliaryCacheAttributes().getName(), regionName, eventName,
@@ -78,7 +77,7 @@ public abstract class AbstractAuxiliaryC
      * <p>
      * @param cacheEvent
      */
-    protected void logICacheEvent( ICacheEvent cacheEvent )
+    protected <T extends Serializable> void logICacheEvent( ICacheEvent<T> cacheEvent )
     {
         if ( cacheEventLogger != null )
         {
@@ -174,7 +173,7 @@ public abstract class AbstractAuxiliaryC
      * <p>
      * @param keyMatcher
      */
-    public void setKeyMatcher( IKeyMatcher keyMatcher )
+    public void setKeyMatcher( IKeyMatcher<K> keyMatcher )
     {
         if ( keyMatcher != null )
         {
@@ -187,7 +186,7 @@ public abstract class AbstractAuxiliaryC
      * <p>
      * @return keyMatcher
      */
-    public IKeyMatcher getKeyMatcher()
+    public IKeyMatcher<K> getKeyMatcher()
     {
         return this.keyMatcher;
     }

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AbstractAuxiliaryCacheEventLogging.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AbstractAuxiliaryCacheEventLogging.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AbstractAuxiliaryCacheEventLogging.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AbstractAuxiliaryCacheEventLogging.java Mon Jan 16 21:05:44 2012
@@ -15,8 +15,8 @@ import org.apache.jcs.engine.logging.beh
  * <p>
  * You can override the public method, but if you don't, the default will call getWithTiming.
  */
-public abstract class AbstractAuxiliaryCacheEventLogging
-    extends AbstractAuxiliaryCache
+public abstract class AbstractAuxiliaryCacheEventLogging<K extends Serializable, V extends Serializable>
+    extends AbstractAuxiliaryCache<K, V>
 {
     /** Don't change. */
     private static final long serialVersionUID = -3921738303365238919L;
@@ -27,7 +27,7 @@ public abstract class AbstractAuxiliaryC
      * @param cacheElement
      * @throws IOException
      */
-    public void update( ICacheElement cacheElement )
+    public void update( ICacheElement<K, V> cacheElement )
         throws IOException
     {
         updateWithEventLogging( cacheElement );
@@ -39,10 +39,10 @@ public abstract class AbstractAuxiliaryC
      * @param cacheElement
      * @throws IOException
      */
-    protected final void updateWithEventLogging( ICacheElement cacheElement )
+    protected final void updateWithEventLogging( ICacheElement<K, V> cacheElement )
         throws IOException
     {
-        ICacheEvent cacheEvent = createICacheEvent( cacheElement, ICacheEventLogger.UPDATE_EVENT );
+        ICacheEvent<K> cacheEvent = createICacheEvent( cacheElement, ICacheEventLogger.UPDATE_EVENT );
         try
         {
             processUpdate( cacheElement );
@@ -59,7 +59,7 @@ public abstract class AbstractAuxiliaryC
      * @param cacheElement
      * @throws IOException
      */
-    protected abstract void processUpdate( ICacheElement cacheElement )
+    protected abstract void processUpdate( ICacheElement<K, V> cacheElement )
         throws IOException;
 
     /**
@@ -69,7 +69,7 @@ public abstract class AbstractAuxiliaryC
      * @return ICacheElement, a wrapper around the key, value, and attributes
      * @throws IOException
      */
-    public ICacheElement get( Serializable key )
+    public ICacheElement<K, V> get( K key )
         throws IOException
     {
         return getWithEventLogging( key );
@@ -82,10 +82,10 @@ public abstract class AbstractAuxiliaryC
      * @return ICacheElement, a wrapper around the key, value, and attributes
      * @throws IOException
      */
-    protected final ICacheElement getWithEventLogging( Serializable key )
+    protected final ICacheElement<K, V> getWithEventLogging( K key )
         throws IOException
     {
-        ICacheEvent cacheEvent = createICacheEvent( getCacheName(), key, ICacheEventLogger.GET_EVENT );
+        ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), key, ICacheEventLogger.GET_EVENT );
         try
         {
             return processGet( key );
@@ -103,18 +103,18 @@ public abstract class AbstractAuxiliaryC
      * @return ICacheElement, a wrapper around the key, value, and attributes
      * @throws IOException
      */
-    protected abstract ICacheElement processGet( Serializable key )
+    protected abstract ICacheElement<K, V> processGet( K key )
         throws IOException;
 
     /**
      * Gets multiple items from the cache based on the given set of keys.
      * <p>
      * @param keys
-     * @return a map of Serializable key to ICacheElement element, or an empty map if there is no
+     * @return a map of K key to ICacheElement<K, V> element, or an empty map if there is no
      *         data in cache for any of these keys
      * @throws IOException
      */
-    public Map<Serializable, ICacheElement> getMultiple(Set<Serializable> keys)
+    public Map<K, ICacheElement<K, V>> getMultiple(Set<K> keys)
         throws IOException
     {
         return getMultipleWithEventLogging( keys );
@@ -124,14 +124,14 @@ public abstract class AbstractAuxiliaryC
      * Gets multiple items from the cache based on the given set of keys.
      * <p>
      * @param keys
-     * @return a map of Serializable key to ICacheElement element, or an empty map if there is no
+     * @return a map of K key to ICacheElement<K, V> element, or an empty map if there is no
      *         data in cache for any of these keys
      * @throws IOException
      */
-    protected final Map<Serializable, ICacheElement> getMultipleWithEventLogging(Set<Serializable> keys )
+    protected final Map<K, ICacheElement<K, V>> getMultipleWithEventLogging(Set<K> keys )
         throws IOException
     {
-        ICacheEvent cacheEvent = createICacheEvent( getCacheName(), (Serializable) keys,
+        ICacheEvent<Serializable> cacheEvent = createICacheEvent( getCacheName(), (Serializable) keys,
                                                     ICacheEventLogger.GETMULTIPLE_EVENT );
         try
         {
@@ -147,11 +147,11 @@ public abstract class AbstractAuxiliaryC
      * Implementation of getMultiple.
      * <p>
      * @param keys
-     * @return a map of Serializable key to ICacheElement element, or an empty map if there is no
+     * @return a map of K key to ICacheElement<K, V> element, or an empty map if there is no
      *         data in cache for any of these keys
      * @throws IOException
      */
-    protected abstract Map<Serializable, ICacheElement> processGetMultiple(Set<Serializable> keys)
+    protected abstract Map<K, ICacheElement<K, V>> processGetMultiple(Set<K> keys)
         throws IOException;
 
     /**
@@ -164,11 +164,11 @@ public abstract class AbstractAuxiliaryC
      * cache will convert * to % and . to _
      * <p>
      * @param pattern
-     * @return a map of Serializable key to ICacheElement element, or an empty map if there is no
+     * @return a map of K key to ICacheElement<K, V> element, or an empty map if there is no
      *         data matching the pattern.
      * @throws IOException
      */
-    public Map<Serializable, ICacheElement> getMatching( String pattern )
+    public Map<K, ICacheElement<K, V>> getMatching( String pattern )
         throws IOException
     {
         return getMatchingWithEventLogging( pattern );
@@ -178,14 +178,14 @@ public abstract class AbstractAuxiliaryC
      * Gets mmatching items from the cache based on the given pattern.
      * <p>
      * @param pattern
-     * @return a map of Serializable key to ICacheElement element, or an empty map if there is no
+     * @return a map of K key to ICacheElement<K, V> element, or an empty map if there is no
      *         data matching the pattern.
      * @throws IOException
      */
-    protected final Map<Serializable, ICacheElement> getMatchingWithEventLogging( String pattern )
+    protected final Map<K, ICacheElement<K, V>> getMatchingWithEventLogging( String pattern )
         throws IOException
     {
-        ICacheEvent cacheEvent = createICacheEvent( getCacheName(), pattern, ICacheEventLogger.GETMATCHING_EVENT );
+        ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), pattern, ICacheEventLogger.GETMATCHING_EVENT );
         try
         {
             return processGetMatching( pattern );
@@ -200,11 +200,11 @@ public abstract class AbstractAuxiliaryC
      * Implementation of getMatching.
      * <p>
      * @param pattern
-     * @return a map of Serializable key to ICacheElement element, or an empty map if there is no
+     * @return a map of K key to ICacheElement<K, V> element, or an empty map if there is no
      *         data matching the pattern.
      * @throws IOException
      */
-    protected abstract Map<Serializable, ICacheElement> processGetMatching( String pattern )
+    protected abstract Map<K, ICacheElement<K, V>> processGetMatching( String pattern )
         throws IOException;
 
     /**
@@ -214,7 +214,7 @@ public abstract class AbstractAuxiliaryC
      * @return boolean, whether or not the item was removed
      * @throws IOException
      */
-    public boolean remove( Serializable key )
+    public boolean remove( K key )
         throws IOException
     {
         return removeWithEventLogging( key );
@@ -227,10 +227,10 @@ public abstract class AbstractAuxiliaryC
      * @return boolean, whether or not the item was removed
      * @throws IOException
      */
-    protected final boolean removeWithEventLogging( Serializable key )
+    protected final boolean removeWithEventLogging( K key )
         throws IOException
     {
-        ICacheEvent cacheEvent = createICacheEvent( getCacheName(), key, ICacheEventLogger.REMOVE_EVENT );
+        ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), key, ICacheEventLogger.REMOVE_EVENT );
         try
         {
             return processRemove( key );
@@ -248,7 +248,7 @@ public abstract class AbstractAuxiliaryC
      * @return boolean, whether or not the item was removed
      * @throws IOException
      */
-    protected abstract boolean processRemove( Serializable key )
+    protected abstract boolean processRemove( K key )
         throws IOException;
 
     /**
@@ -270,7 +270,7 @@ public abstract class AbstractAuxiliaryC
     protected final void removeAllWithEventLogging()
         throws IOException
     {
-        ICacheEvent cacheEvent = createICacheEvent( getCacheName(), "all", ICacheEventLogger.REMOVEALL_EVENT );
+        ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), "all", ICacheEventLogger.REMOVEALL_EVENT );
         try
         {
             processRemoveAll();
@@ -309,7 +309,7 @@ public abstract class AbstractAuxiliaryC
     protected final void disposeWithEventLogging()
         throws IOException
     {
-        ICacheEvent cacheEvent = createICacheEvent( getCacheName(), "none", ICacheEventLogger.DISPOSE_EVENT );
+        ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), "none", ICacheEventLogger.DISPOSE_EVENT );
         try
         {
             processDispose();

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCache.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCache.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCache.java Mon Jan 16 21:05:44 2012
@@ -34,8 +34,8 @@ import org.apache.jcs.engine.stats.behav
  * the type (disk/lateral/remote) of the auxiliary here -- and the existing getCacheType will be
  * removed from ICache.
  */
-public interface AuxiliaryCache
-    extends ICache
+public interface AuxiliaryCache<K extends Serializable, V extends Serializable>
+    extends ICache<K, V>
 {
     /**
      * Gets the set of keys of objects currently in the group
@@ -43,7 +43,7 @@ public interface AuxiliaryCache
      * @return a set of group keys
      * @throws IOException
      */
-    Set<Serializable> getGroupKeys( String group )
+    Set<K> getGroupKeys( String group )
         throws IOException;
 
     /**

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCacheFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCacheFactory.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCacheFactory.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCacheFactory.java Mon Jan 16 21:05:44 2012
@@ -6,15 +6,17 @@ package org.apache.jcs.auxiliary;
  * 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
- * 
+ *
  * http://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.io.Serializable;
+
 import org.apache.jcs.engine.behavior.ICompositeCacheManager;
 import org.apache.jcs.engine.behavior.IElementSerializer;
 import org.apache.jcs.engine.logging.behavior.ICacheEventLogger;
@@ -31,12 +33,13 @@ public interface AuxiliaryCacheFactory
      * @param cacheMgr This allows auxiliaries to reference the manager without assuming that it is
      *            a singleton. This will allow JCS to be a nonsingleton. Also, it makes it easier to
      *            test.
-     * @param cacheEventLogger 
-     * @param elementSerializer 
+     * @param cacheEventLogger
+     * @param elementSerializer
      * @return AuxiliaryCache
      */
-    public AuxiliaryCache createCache( AuxiliaryCacheAttributes attr, ICompositeCacheManager cacheMgr,
-                                       ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer );
+    public <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> createCache(
+            AuxiliaryCacheAttributes attr, ICompositeCacheManager cacheMgr,
+            ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer );
 
     /**
      * Sets the name attribute of the AuxiliaryCacheFactory object

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCacheManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCacheManager.java?rev=1232163&r1=1232162&r2=1232163&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCacheManager.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/AuxiliaryCacheManager.java Mon Jan 16 21:05:44 2012
@@ -19,6 +19,8 @@ package org.apache.jcs.auxiliary;
  * under the License.
  */
 
+import java.io.Serializable;
+
 import org.apache.jcs.engine.behavior.ICacheType;
 
 /**
@@ -36,7 +38,7 @@ public interface AuxiliaryCacheManager
      * @param cacheName
      * @return AuxiliaryCache
      */
-    public AuxiliaryCache getCache( String cacheName );
+    public <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> getCache( String cacheName );
 
     /**
      * This allows the cache manager to be plugged into the auxiliary caches,



Mime
View raw message