commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1329467 - in /commons/proper/jcs/branches/generics-interface/src: java/org/apache/jcs/auxiliary/disk/file/ java/org/apache/jcs/auxiliary/disk/indexed/ java/org/apache/jcs/auxiliary/lateral/socket/tcp/ java/org/apache/jcs/auxiliary/remote/ ...
Date Mon, 23 Apr 2012 21:35:44 GMT
Author: tv
Date: Mon Apr 23 21:35:43 2012
New Revision: 1329467

URL: http://svn.apache.org/viewvc?rev=1329467&view=rev
Log:
Further work on generification

Modified:
    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/IndexedDiskCacheManager.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/remote/RemoteCacheFailoverRunner.java
    commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/CompositeCache.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/JCSLightLoadUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSRemovalSimpleConcurrentTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSThrashTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSvsHashtablePerformanceTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/RemovalTestUtil.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/TestTCPLateralCache.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/ZeroSizeCacheUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/SystemPropetyUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/TestCacheAccess.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/admin/AdminBeanUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/block/HugeQuantityBlockDiskCacheLoadTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/HugeQuantityIndDiskCacheLoadTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheDefragPerformanceTest.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/IndexedDiskCacheOptimizationUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheRandomConcurrentTestUtil.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/indexed/IndexedDiskCacheSteadyLoadTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.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/JDBCDiskCacheShrinkUnitTest.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/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/remote/http/client/RemoteHttpCacheManagerUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManualTester.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/SystemPropertyUsageUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/control/event/SimpleEventHandlingUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/logging/CacheEventLoggerDebugLoggerUnitTest.java
    commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/memory/mru/LRUvsMRUPerformanceTest.java

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactory.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactory.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactory.java Mon Apr 23 21:35:43 2012
@@ -4,7 +4,6 @@ import java.io.Serializable;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jcs.auxiliary.AuxiliaryCache;
 import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
 import org.apache.jcs.auxiliary.AuxiliaryCacheFactory;
 import org.apache.jcs.engine.behavior.ICompositeCacheManager;
@@ -35,7 +34,7 @@ public class FileDiskCacheFactory
      * @param elementSerializer the serializer
      * @return AuxiliaryCache
      */
-    public <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> createCache(
+    public <K extends Serializable, V extends Serializable> FileDiskCache<K, V> createCache(
             AuxiliaryCacheAttributes attr, ICompositeCacheManager cacheMgr,
            ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer )
     {

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/file/FileDiskCacheManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/file/FileDiskCacheManager.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/file/FileDiskCacheManager.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/file/FileDiskCacheManager.java Mon Apr 23 21:35:43 2012
@@ -50,7 +50,7 @@ public class FileDiskCacheManager
      * @param cacheName Name that will be used when creating attributes.
      * @return A cache.
      */
-    public <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> getCache( String cacheName )
+    public <K extends Serializable, V extends Serializable> FileDiskCache<K, V> getCache( String cacheName )
     {
         FileDiskCacheAttributes cacheAttributes = (FileDiskCacheAttributes) defaultCacheAttributes.copy();
 
@@ -66,9 +66,9 @@ public class FileDiskCacheManager
      * @param cacheAttributes Attributes the cache should have.
      * @return A cache, either from the existing set or newly created.
      */
-    public <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> getCache( FileDiskCacheAttributes cacheAttributes )
+    public <K extends Serializable, V extends Serializable> FileDiskCache<K, V> getCache( FileDiskCacheAttributes cacheAttributes )
     {
-        AuxiliaryCache<K, V> cache = null;
+        FileDiskCache<K, V> cache = null;
 
         String cacheName = cacheAttributes.getCacheName();
 
@@ -79,7 +79,7 @@ public class FileDiskCacheManager
             // Try to load the cache from the set that have already been
             // created. This only looks at the name attribute.
 
-            cache = (AuxiliaryCache<K, V>) caches.get( cacheName );
+            cache = (FileDiskCache<K, V>) caches.get( cacheName );
 
             // If it was not found, create a new one using the supplied
             // attributes

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheManager.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheManager.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheManager.java Mon Apr 23 21:35:43 2012
@@ -95,7 +95,7 @@ public class IndexedDiskCacheManager
      * @param cacheName Name that will be used when creating attributes.
      * @return A cache.
      */
-    public <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> getCache( String cacheName )
+    public <K extends Serializable, V extends Serializable> IndexedDiskCache<K, V> getCache( String cacheName )
     {
         IndexedDiskCacheAttributes cacheAttributes = (IndexedDiskCacheAttributes) defaultCacheAttributes.copy();
 
@@ -111,9 +111,9 @@ public class IndexedDiskCacheManager
      * @param cacheAttributes Attributes the cache should have.
      * @return A cache, either from the existing set or newly created.
      */
-    public <K extends Serializable, V extends Serializable> AuxiliaryCache<K, V> getCache( IndexedDiskCacheAttributes cacheAttributes )
+    public <K extends Serializable, V extends Serializable> IndexedDiskCache<K, V> getCache( IndexedDiskCacheAttributes cacheAttributes )
     {
-        AuxiliaryCache<K, V> cache = null;
+        IndexedDiskCache<K, V> cache = null;
 
         String cacheName = cacheAttributes.getCacheName();
 
@@ -124,7 +124,7 @@ public class IndexedDiskCacheManager
             // Try to load the cache from the set that have already been
             // created. This only looks at the name attribute.
 
-            cache = (AuxiliaryCache<K, V>) caches.get( cacheName );
+            cache = (IndexedDiskCache<K, V>) caches.get( cacheName );
 
             // If it was not found, create a new one using the supplied
             // attributes

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListener.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListener.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListener.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListener.java Mon Apr 23 21:35:43 2012
@@ -80,7 +80,7 @@ public class LateralTCPDiscoveryListener
      * @param facade - facade (for region) => multiple lateral clients.
      * @return true if the facade was not already registered.
      */
-    public synchronized boolean addNoWaitFacade( String cacheName, LateralCacheNoWaitFacade facade )
+    public synchronized boolean addNoWaitFacade( String cacheName, LateralCacheNoWaitFacade<? extends Serializable, ? extends Serializable> facade )
     {
         boolean isNew = !containsNoWaitFacade( cacheName );
 
@@ -109,9 +109,9 @@ public class LateralTCPDiscoveryListener
      * @param noWait - is this no wait in the facade
      * @return do we contain the no wait. true if so
      */
-    public boolean containsNoWait( String cacheName, LateralCacheNoWait noWait )
+    public <K extends Serializable, V extends Serializable> boolean containsNoWait( String cacheName, LateralCacheNoWait<K, V> noWait )
     {
-        LateralCacheNoWaitFacade facade = facades.get( noWait.getCacheName() );
+        LateralCacheNoWaitFacade<K, V> facade = (LateralCacheNoWaitFacade<K, V>)facades.get( noWait.getCacheName() );
         if ( facade == null )
         {
             return false;
@@ -132,9 +132,9 @@ public class LateralTCPDiscoveryListener
      * @return true if we found the no wait and added it. False if the no wait was not present or it
      *         we already had it.
      */
-    protected boolean addNoWait( LateralCacheNoWait noWait )
+    protected <K extends Serializable, V extends Serializable> boolean addNoWait( LateralCacheNoWait<K, V> noWait )
     {
-        LateralCacheNoWaitFacade facade = facades.get( noWait.getCacheName() );
+        LateralCacheNoWaitFacade<K, V> facade = (LateralCacheNoWaitFacade<K, V>)facades.get( noWait.getCacheName() );
         if ( log.isDebugEnabled() )
         {
             log.debug( "addNoWait > Got facade for " + noWait.getCacheName() + " = " + facade );
@@ -171,9 +171,9 @@ public class LateralTCPDiscoveryListener
      * @param noWait
      * @return true if we found the no wait and removed it. False if the no wait was not present.
      */
-    protected boolean removeNoWait( LateralCacheNoWait noWait )
+    protected <K extends Serializable, V extends Serializable> boolean removeNoWait( LateralCacheNoWait<K, V> noWait )
     {
-        LateralCacheNoWaitFacade facade = facades.get( noWait.getCacheName() );
+        LateralCacheNoWaitFacade<K, V> facade = (LateralCacheNoWaitFacade<K, V>)facades.get( noWait.getCacheName() );
         if ( log.isDebugEnabled() )
         {
             log.debug( "removeNoWait > Got facade for " + noWait.getCacheName() + " = " + facade );
@@ -234,7 +234,7 @@ public class LateralTCPDiscoveryListener
             {
                 try
                 {
-                    ICache ic = lcm.getCache( cacheName );
+                    ICache<? extends Serializable, ? extends Serializable> ic = lcm.getCache( cacheName );
 
                     if ( log.isDebugEnabled() )
                     {
@@ -244,7 +244,7 @@ public class LateralTCPDiscoveryListener
                     // add this to the nowaits for this cachename
                     if ( ic != null )
                     {
-                        addNoWait( (LateralCacheNoWait) ic );
+                        addNoWait( (LateralCacheNoWait<? extends Serializable, ? extends Serializable>) ic );
                         if ( log.isDebugEnabled() )
                         {
                             log.debug( "Called addNoWait for cacheName [" + cacheName + "]" );
@@ -286,7 +286,7 @@ public class LateralTCPDiscoveryListener
             {
                 try
                 {
-                    ICache ic = lcm.getCache( cacheName );
+                    ICache<? extends Serializable, ? extends Serializable> ic = lcm.getCache( cacheName );
 
                     if ( log.isDebugEnabled() )
                     {
@@ -296,7 +296,7 @@ public class LateralTCPDiscoveryListener
                     // remove this to the nowaits for this cachename
                     if ( ic != null )
                     {
-                        removeNoWait( (LateralCacheNoWait) ic );
+                        removeNoWait( (LateralCacheNoWait<? extends Serializable, ? extends Serializable>) ic );
                         if ( log.isDebugEnabled() )
                         {
                             log.debug( "Called removeNoWait for cacheName [" + cacheName + "]" );

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java Mon Apr 23 21:35:43 2012
@@ -20,6 +20,7 @@ package org.apache.jcs.auxiliary.remote;
  */
 
 import java.io.IOException;
+import java.io.Serializable;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -48,14 +49,14 @@ import org.apache.jcs.engine.logging.beh
  * will try to connect to a failover until the primary is restored.
  *
  */
-public class RemoteCacheFailoverRunner
+public class RemoteCacheFailoverRunner<K extends Serializable, V extends Serializable>
     implements Runnable
 {
     /** The logger */
     private final static Log log = LogFactory.getLog( RemoteCacheFailoverRunner.class );
 
     /** The facade returned to the composite cache. */
-    private final RemoteCacheNoWaitFacade facade;
+    private final RemoteCacheNoWaitFacade<K, V> facade;
 
     /** How long to wait between reconnect attempts. */
     private static long idlePeriod = 20 * 1000;
@@ -82,7 +83,7 @@ public class RemoteCacheFailoverRunner
      * @param cacheEventLogger
      * @param elementSerializer
      */
-    public RemoteCacheFailoverRunner( RemoteCacheNoWaitFacade facade, ICompositeCacheManager cacheMgr,
+    public RemoteCacheFailoverRunner( RemoteCacheNoWaitFacade<K, V> facade, ICompositeCacheManager cacheMgr,
                                       ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer )
     {
         this.facade = facade;
@@ -211,7 +212,7 @@ public class RemoteCacheFailoverRunner
 
                         // add a listener if there are none, need to tell rca
                         // what number it is at
-                        ICache ic = rcm.getCache( rca.getCacheName() );
+                        ICache<K, V> ic = rcm.getCache( rca.getCacheName() );
                         if ( ic != null )
                         {
                             if ( ic.getStatus() == CacheConstants.STATUS_ALIVE )
@@ -219,7 +220,7 @@ public class RemoteCacheFailoverRunner
                                 // may need to do this more gracefully
                                 log.debug( "reseting no wait" );
                                 facade.noWaits = new RemoteCacheNoWait[1];
-                                facade.noWaits[0] = (RemoteCacheNoWait) ic;
+                                facade.noWaits[0] = (RemoteCacheNoWait<K, V>) ic;
                                 facade.remoteCacheAttributes.setFailoverIndex( i );
 
                                 synchronized ( this )
@@ -333,7 +334,7 @@ public class RemoteCacheFailoverRunner
      * The primary server is the first server defines in the FailoverServers
      * list.
      *
-     * @return boolean value indicating whether the resoration was successful
+     * @return boolean value indicating whether the restoration was successful
      */
     private boolean restorePrimary()
     {
@@ -355,7 +356,7 @@ public class RemoteCacheFailoverRunner
 
             // add a listener if there are none, need to tell rca what number it
             // is at
-            ICache ic = rcm.getCache( rca.getCacheName() );
+            ICache<K, V> ic = rcm.getCache( rca.getCacheName() );
             // by default the listener id should be 0, else it will be the
             // listener
             // Originally associated with the remote cache. either way is fine.
@@ -437,11 +438,11 @@ public class RemoteCacheFailoverRunner
 
                     // Restore primary
                     // may need to do this more gracefully, letting the failover finish in the background
-                    RemoteCacheNoWait failoverNoWait = facade.noWaits[0];
+                    RemoteCacheNoWait<K, V> failoverNoWait = facade.noWaits[0];
 
                     // swap in a new one
                     facade.noWaits = new RemoteCacheNoWait[1];
-                    facade.noWaits[0] = (RemoteCacheNoWait) ic;
+                    facade.noWaits[0] = (RemoteCacheNoWait<K, V>) ic;
                     facade.remoteCacheAttributes.setFailoverIndex( 0 );
 
                     if ( log.isInfoEnabled() )

Modified: commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/CompositeCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/CompositeCache.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/CompositeCache.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/java/org/apache/jcs/engine/control/CompositeCache.java Mon Apr 23 21:35:43 2012
@@ -1315,7 +1315,11 @@ public class CompositeCache<K extends Se
         alive = false;
 
         // Now, shut down the event queue
-        elementEventQ.destroy();
+        if (elementEventQ != null)
+        {
+            elementEventQ.destroy();
+            elementEventQ = null;
+        }
 
         // Dispose of each auxiliary cache, Remote auxiliaries will be
         // skipped if 'fromRemote' is true.

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSCacheElementRetrievalUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSCacheElementRetrievalUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSCacheElementRetrievalUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSCacheElementRetrievalUnitTest.java Mon Apr 23 21:35:43 2012
@@ -38,7 +38,7 @@ public class JCSCacheElementRetrievalUni
     public void testSimpleElementRetrieval()
         throws Exception
     {
-        JCS jcs = JCS.getInstance( "testCache1" );
+        JCS<String, String> jcs = JCS.getInstance( "testCache1" );
 
         jcs.put( "test_key", "test_data" );
 

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSLightLoadUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSLightLoadUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSLightLoadUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSLightLoadUnitTest.java Mon Apr 23 21:35:43 2012
@@ -78,7 +78,7 @@ public class JCSLightLoadUnitTest
     public void testSimpleLoad()
         throws Exception
     {
-        JCS jcs = JCS.getInstance( "testCache1" );
+        JCS<String, String> jcs = JCS.getInstance( "testCache1" );
         //        ICompositeCacheAttributes cattr = jcs.getCacheAttributes();
         //        cattr.setMaxObjects( 20002 );
         //        jcs.setCacheAttributes( cattr );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSRemovalSimpleConcurrentTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSRemovalSimpleConcurrentTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSRemovalSimpleConcurrentTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSRemovalSimpleConcurrentTest.java Mon Apr 23 21:35:43 2012
@@ -71,7 +71,7 @@ public class JCSRemovalSimpleConcurrentT
         System.out.println( "testTwoDeepRemoval" );
 
         int count = 500;
-        JCS jcs = JCS.getInstance( "testCache1" );
+        JCS<String, String> jcs = JCS.getInstance( "testCache1" );
 
         for ( int i = 0; i <= count; i++ )
         {
@@ -109,7 +109,7 @@ public class JCSRemovalSimpleConcurrentT
         System.out.println( "testSingleDepthRemoval" );
 
         int count = 500;
-        JCS jcs = JCS.getInstance( "testCache1" );
+        JCS<String, String> jcs = JCS.getInstance( "testCache1" );
 
         for ( int i = 0; i <= count; i++ )
         {
@@ -147,7 +147,7 @@ public class JCSRemovalSimpleConcurrentT
         System.out.println( "testRemoveAll" );
 
         int count = 500;
-        JCS jcs = JCS.getInstance( "testCache1" );
+        JCS<String, String> jcs = JCS.getInstance( "testCache1" );
 
         for ( int i = 0; i <= count; i++ )
         {
@@ -190,7 +190,7 @@ public class JCSRemovalSimpleConcurrentT
         System.out.println( "testRemoveAll" );
 
         int count = 500;
-        JCS jcs = JCS.getInstance( "testCache1" );
+        JCS<String, String> jcs = JCS.getInstance( "testCache1" );
 
         jcs.clear();
 

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSThrashTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSThrashTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSThrashTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSThrashTest.java Mon Apr 23 21:35:43 2012
@@ -19,6 +19,7 @@ package org.apache.jcs;
  * under the License.
  */
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -43,7 +44,7 @@ public class JCSThrashTest
     /**
      * the cache instance
      */
-    protected JCS jcs;
+    protected JCS<String, Serializable> jcs;
 
     /**
      * @param args

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSUnitTest.java Mon Apr 23 21:35:43 2012
@@ -67,7 +67,7 @@ public class JCSUnitTest
     public void testJCS()
         throws Exception
     {
-        JCS jcs = JCS.getInstance( "testCache1" );
+        JCS<String, LinkedList<HashMap<String, String>>> jcs = JCS.getInstance( "testCache1" );
 
         LinkedList<HashMap<String, String>> list = buildList();
 

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSvsHashtablePerformanceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSvsHashtablePerformanceTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSvsHashtablePerformanceTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/JCSvsHashtablePerformanceTest.java Mon Apr 23 21:35:43 2012
@@ -114,7 +114,7 @@ public class JCSvsHashtablePerformanceTe
         {
 
             JCS.setConfigFilename( "/TestJCSvHashtablePerf.ccf" );
-            JCS cache = JCS.getInstance( "testCache1" );
+            JCS<String, String> cache = JCS.getInstance( "testCache1" );
 
             for ( int j = 0; j < loops; j++ )
             {
@@ -144,7 +144,7 @@ public class JCSvsHashtablePerformanceTe
 
                 // /////////////////////////////////////////////////////////////
                 name = "Hashtable";
-                Hashtable cache2 = new Hashtable();
+                Hashtable<String, String> cache2 = new Hashtable<String, String>();
                 start = System.currentTimeMillis();
                 for ( int i = 0; i < tries; i++ )
                 {

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/RemovalTestUtil.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/RemovalTestUtil.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/RemovalTestUtil.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/RemovalTestUtil.java Mon Apr 23 21:35:43 2012
@@ -53,7 +53,7 @@ public class RemovalTestUtil
     public void runTestPutThenRemoveCategorical( int start, int end )
         throws Exception
     {
-        JCS jcs = JCS.getInstance( "testCache1" );
+        JCS<String, String> jcs = JCS.getInstance( "testCache1" );
 
         for ( int i = start; i <= end; i++ )
         {
@@ -91,7 +91,7 @@ public class RemovalTestUtil
     public void runPutInRange( int start, int end )
         throws Exception
     {
-        JCS jcs = JCS.getInstance( "testCache1" );
+        JCS<String, String> jcs = JCS.getInstance( "testCache1" );
 
         for ( int i = start; i <= end; i++ )
         {
@@ -119,7 +119,7 @@ public class RemovalTestUtil
     public void runGetInRange( int start, int end, boolean check )
         throws Exception
     {
-        JCS jcs = JCS.getInstance( "testCache1" );
+        JCS<String, String> jcs = JCS.getInstance( "testCache1" );
 
         // don't care if they are found
         for ( int i = end; i >= start; i-- )

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/TestTCPLateralCache.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/TestTCPLateralCache.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/TestTCPLateralCache.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/TestTCPLateralCache.java Mon Apr 23 21:35:43 2012
@@ -117,7 +117,7 @@ public class TestTCPLateralCache
     public void runTestForRegion( String region )
         throws Exception
     {
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
 
         // Add items to cache
 

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/ZeroSizeCacheUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/ZeroSizeCacheUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/ZeroSizeCacheUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/ZeroSizeCacheUnitTest.java Mon Apr 23 21:35:43 2012
@@ -54,7 +54,7 @@ public class ZeroSizeCacheUnitTest
     public void testPutGetRemove()
         throws Exception
     {
-        JCS jcs = JCS.getInstance( "testCache1" );
+        JCS<String, String> jcs = JCS.getInstance( "testCache1" );
 
         for ( int i = 0; i <= items; i++ )
         {

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/SystemPropetyUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/SystemPropetyUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/SystemPropetyUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/SystemPropetyUnitTest.java Mon Apr 23 21:35:43 2012
@@ -50,7 +50,7 @@ public class SystemPropetyUnitTest
 
         JCS.setConfigFilename( "/TestSystemProperties.ccf" );
 
-        JCS cache = JCS.getInstance( "test1" );
+        JCS<String, String> cache = JCS.getInstance( "test1" );
         assertEquals( "We should have used the system property for the memory size", maxMemory, cache
             .getCacheAttributes().getMaxObjects() );
 
@@ -72,7 +72,7 @@ public class SystemPropetyUnitTest
         CompositeCacheManager mgr = CompositeCacheManager.getUnconfiguredInstance();
         mgr.configure( "/TestSystemProperties.ccf" );
 
-        JCS cache = JCS.getInstance( "missing" );
+        JCS<String, String> cache = JCS.getInstance( "missing" );
         // TODO check against the actual default def
         assertEquals( "We should have used the default property for the memory size", 100, cache.getCacheAttributes()
             .getMaxObjects() );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/TestCacheAccess.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/TestCacheAccess.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/TestCacheAccess.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/access/TestCacheAccess.java Mon Apr 23 21:35:43 2012
@@ -46,7 +46,7 @@ public class TestCacheAccess
     private final static Log log = LogFactory.getLog( TestCacheAccess.class );
 
     /** cache instance to use in testing */
-    private JCS cache_control = null;
+    private JCS<String, String> cache_control = null;
 
     /** do we use system.out.println to print out debug data? */
     private static boolean isSysOut = false;

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/admin/AdminBeanUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/admin/AdminBeanUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/admin/AdminBeanUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/admin/AdminBeanUnitTest.java Mon Apr 23 21:35:43 2012
@@ -46,7 +46,7 @@ public class AdminBeanUnitTest
         throws Exception
     {
         String regionName = "myRegion";
-        JCS cache = JCS.getInstance( regionName );
+        JCS<String, String> cache = JCS.getInstance( regionName );
 
         cache.put( "key", "value" );
 
@@ -84,7 +84,7 @@ public class AdminBeanUnitTest
         throws Exception
     {
         String regionName = "myRegion";
-        JCS cache = JCS.getInstance( regionName );
+        JCS<String, String> cache = JCS.getInstance( regionName );
 
         // clear the region
         cache.clear();
@@ -114,7 +114,7 @@ public class AdminBeanUnitTest
         JCSAdminBean admin = new JCSAdminBean();
 
         String regionName = "myRegion";
-        JCS cache = JCS.getInstance( regionName );
+        JCS<String, String> cache = JCS.getInstance( regionName );
 
         // clear the region
         cache.clear();
@@ -148,7 +148,7 @@ public class AdminBeanUnitTest
         JCSAdminBean admin = new JCSAdminBean();
 
         String regionName = "myRegion";
-        JCS cache = JCS.getInstance( regionName );
+        JCS<String, String> cache = JCS.getInstance( regionName );
 
         String key = "myKey";
         cache.put( key, "value" );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/block/HugeQuantityBlockDiskCacheLoadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/block/HugeQuantityBlockDiskCacheLoadTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/block/HugeQuantityBlockDiskCacheLoadTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/block/HugeQuantityBlockDiskCacheLoadTest.java Mon Apr 23 21:35:43 2012
@@ -57,7 +57,7 @@ public class HugeQuantityBlockDiskCacheL
         long initialMemory = measureMemoryUse();
         System.out.println( "Before getting JCS: " + initialMemory );
 
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
         jcs.clear();
 
         try

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java Mon Apr 23 21:35:43 2012
@@ -29,7 +29,7 @@ public class FileDiskCacheFactoryUnitTes
         FileDiskCacheFactory factory = new FileDiskCacheFactory();
 
         // DO WORK
-        FileDiskCache<String, String> result = (FileDiskCache) factory.createCache( cattr, cacheMgr, cacheEventLogger,
+        FileDiskCache<String, String> result = factory.createCache( cattr, cacheMgr, cacheEventLogger,
                                                                     elementSerializer );
 
         // VERIFY

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/HugeQuantityIndDiskCacheLoadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/HugeQuantityIndDiskCacheLoadTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/HugeQuantityIndDiskCacheLoadTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/HugeQuantityIndDiskCacheLoadTest.java Mon Apr 23 21:35:43 2012
@@ -49,7 +49,7 @@ public class HugeQuantityIndDiskCacheLoa
         int items = 300000;
         String region = "testCache1";
 
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
 
         try
         {

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheDefragPerformanceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheDefragPerformanceTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheDefragPerformanceTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheDefragPerformanceTest.java Mon Apr 23 21:35:43 2012
@@ -74,7 +74,7 @@ public class IndexedDiskCacheDefragPerfo
         throws Exception
     {
         JCS.setConfigFilename( "/TestDiskCacheDefragPerformance.ccf" );
-        JCS jcs = JCS.getInstance( "defrag" );
+        JCS<Integer, Tile> jcs = JCS.getInstance( "defrag" );
 
         Tile tile;
         System.out.println( "Cache Defrag Test" );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheManagerUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheManagerUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheManagerUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheManagerUnitTest.java Mon Apr 23 21:35:43 2012
@@ -37,7 +37,7 @@ public class IndexedDiskCacheManagerUnit
                                                                                cacheEventLogger, elementSerializer );
 
         // DO WORK
-        IndexedDiskCache<String, String> cache = (IndexedDiskCache) manager.getCache( cacheName );
+        IndexedDiskCache<String, String> cache = manager.getCache( cacheName );
 
         cache.update( cacheElement );
         SleepUtil.sleepAtLeast( 100 );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheNoMemoryUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheNoMemoryUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheNoMemoryUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheNoMemoryUnitTest.java Mon Apr 23 21:35:43 2012
@@ -123,7 +123,7 @@ public class IndexedDiskCacheNoMemoryUni
     public void runTestForRegion( String region )
         throws Exception
     {
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
 
         // Add items to cache
 
@@ -136,22 +136,22 @@ public class IndexedDiskCacheNoMemoryUni
 
         for ( int i = 0; i <= items; i++ )
         {
-            String value = (String) jcs.get( i + ":key" );
+            String value = jcs.get( i + ":key" );
 
             assertEquals( region + " data " + i, value );
         }
 
         // Test that getElements returns all the expected values
-        Set keys = new HashSet();
+        Set<String> keys = new HashSet<String>();
         for ( int i = 0; i <= items; i++ )
         {
             keys.add( i + ":key" );
         }
 
-        Map elements = jcs.getCacheElements( keys );
+        Map<String, ICacheElement<String, String>> elements = jcs.getCacheElements( keys );
         for ( int i = 0; i <= items; i++ )
         {
-            ICacheElement<String, String> element = (ICacheElement) elements.get( i + ":key" );
+            ICacheElement<String, String> element = elements.get( i + ":key" );
             assertNotNull( "element " + i + ":key is missing", element );
             assertEquals( "value " + i + ":key", region + " data " + i, element.getVal() );
         }

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheOptimizationUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheOptimizationUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheOptimizationUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheOptimizationUnitTest.java Mon Apr 23 21:35:43 2012
@@ -21,6 +21,7 @@ package org.apache.jcs.auxiliary.disk.in
 
 import junit.framework.TestCase;
 
+import org.apache.jcs.auxiliary.disk.DiskTestObject;
 import org.apache.jcs.engine.behavior.ICacheElement;
 import org.apache.jcs.utils.timing.SleepUtil;
 
@@ -49,12 +50,12 @@ public class IndexedDiskCacheOptimizatio
         cattr.setOptimizeAtRemoveCount( removeCount );
         cattr.setMaxRecycleBinSize( removeCount * 3 );
         cattr.setDiskPath( "target/test-sandbox/testOptimization" );
-        IndexedDiskCache disk = new IndexedDiskCache( cattr );
+        IndexedDiskCache<Integer, DiskTestObject> disk = new IndexedDiskCache<Integer, DiskTestObject>( cattr );
 
         disk.removeAll();
 
         int numberToInsert = removeCount * 2;
-        ICacheElement[] elements = DiskTestObjectUtil
+        ICacheElement<Integer, DiskTestObject>[] elements = DiskTestObjectUtil
             .createCacheElementsWithTestObjectsOfVariableSizes( numberToInsert, cattr.getCacheName() );
 
         for ( int i = 0; i < elements.length; i++ )

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheRandomConcurrentTestUtil.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheRandomConcurrentTestUtil.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheRandomConcurrentTestUtil.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheRandomConcurrentTestUtil.java Mon Apr 23 21:35:43 2012
@@ -65,7 +65,7 @@ public class IndexedDiskCacheRandomConcu
 
         // make sure a simple put then get works
         // this may fail if the other tests are flooding the disk cache
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
         String key = "testKey" + testNum;
         String data = "testData" + testNum;
         jcs.put( key, data );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheSameRegionConcurrentUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheSameRegionConcurrentUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheSameRegionConcurrentUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheSameRegionConcurrentUnitTest.java Mon Apr 23 21:35:43 2012
@@ -156,7 +156,7 @@ public class IndexedDiskCacheSameRegionC
     public void runTestForRegion( String region, int start, int end )
         throws Exception
     {
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
 
         // Add items to cache
 
@@ -170,32 +170,32 @@ public class IndexedDiskCacheSameRegionC
         for ( int i = start; i <= end; i++ )
         {
             String key = i + ":key";
-            String value = (String) jcs.get( key );
+            String value = jcs.get( key );
 
             assertEquals( "Wrong value for key [" + key + "]", region + " data " + i, value );
         }
 
         // Test that getElements returns all the expected values
-        Set keys = new HashSet();
+        Set<String> keys = new HashSet<String>();
         for ( int i = start; i <= end; i++ )
         {
             keys.add( i + ":key" );
         }
 
-        Map elements = jcs.getCacheElements( keys );
+        Map<String, ICacheElement<String, String>> elements = jcs.getCacheElements( keys );
         for ( int i = start; i <= end; i++ )
         {
-            ICacheElement<String, String> element = (ICacheElement) elements.get( i + ":key" );
+            ICacheElement<String, String> element = elements.get( i + ":key" );
             assertNotNull( "element " + i + ":key is missing", element );
             assertEquals( "value " + i + ":key", region + " data " + i, element.getVal() );
         }
 
         // you can't remove in one thread and expect them to be in another //
         //          Remove all the items
-        //         
+        //
         //          for ( int i = start; i <= end; i++ ) { jcs.remove( i + ":key" ); } //
         //          Verify removal
-        //         
+        //
         //          for ( int i = start; i <= end; i++ ) { assertNull( "Removed key
         //          should be null: " + i + ":key", jcs.get( i + ":key" ) ); }
     }

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheSteadyLoadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheSteadyLoadTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheSteadyLoadTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/indexed/IndexedDiskCacheSteadyLoadTest.java Mon Apr 23 21:35:43 2012
@@ -66,7 +66,7 @@ public class IndexedDiskCacheSteadyLoadT
         int runs = 1000;
         int upperKB = 50;
 
-        JCS jcs = JCS.getInstance( ( numPerRun / 2 ) + "aSecond" );
+        JCS<String, DiskTestObject> jcs = JCS.getInstance( ( numPerRun / 2 ) + "aSecond" );
 
         ElapsedTimer timer = new ElapsedTimer();
         int numToGet = numPerRun * ( runs / 10 );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheRemovalUnitTest.java Mon Apr 23 21:35:43 2012
@@ -62,7 +62,7 @@ public class JDBCDiskCacheRemovalUnitTes
         String region = "testCache1";
         String data = "adfadsfasfddsafasasd";
 
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
 
         // DO WORK
         jcs.put( keyPart1 + ":" + keyPart2, data );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheSharedPoolUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheSharedPoolUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheSharedPoolUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheSharedPoolUnitTest.java Mon Apr 23 21:35:43 2012
@@ -84,7 +84,7 @@ public class JDBCDiskCacheSharedPoolUnit
     public void runTestForRegion( String region, int items )
         throws Exception
     {
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
 
         System.out.println( "BEFORE PUT \n" + jcs.getStats() );
 
@@ -105,22 +105,22 @@ public class JDBCDiskCacheSharedPoolUnit
 
         for ( int i = 0; i <= items; i++ )
         {
-            String value = (String) jcs.get( i + ":key" );
+            String value = jcs.get( i + ":key" );
 
             assertEquals( "key = [" + i + ":key] value = [" + value + "]", region + " data " + i, value );
         }
 
         // Test that getElements returns all the expected values
-        Set keys = new HashSet();
+        Set<String> keys = new HashSet<String>();
         for ( int i = 0; i <= items; i++ )
         {
             keys.add( i + ":key" );
         }
 
-        Map elements = jcs.getCacheElements( keys );
+        Map<String, ICacheElement<String, String>> elements = jcs.getCacheElements( keys );
         for ( int i = 0; i <= items; i++ )
         {
-            ICacheElement<String, String> element = (ICacheElement) elements.get( i + ":key" );
+            ICacheElement<String, String> element = elements.get( i + ":key" );
             assertNotNull( "element " + i + ":key is missing", element );
             assertEquals( "value " + i + ":key", region + " data " + i, element.getVal() );
         }

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheShrinkUnitTest.java Mon Apr 23 21:35:43 2012
@@ -82,7 +82,7 @@ public class JDBCDiskCacheShrinkUnitTest
         String regionExpire = "expire1Second";
         int items = 200;
 
-        JCS jcsExpire = JCS.getInstance( regionExpire );
+        JCS<String, String> jcsExpire = JCS.getInstance( regionExpire );
 
         System.out.println( "BEFORE PUT \n" + jcsExpire.getStats() );
 
@@ -119,7 +119,7 @@ public class JDBCDiskCacheShrinkUnitTest
         String region = "expire100Second";
         int items = 200;
 
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
 
         System.out.println( "BEFORE PUT \n" + jcs.getStats() );
 
@@ -171,7 +171,7 @@ public class JDBCDiskCacheShrinkUnitTest
         String region = "eternal";
         int items = 200;
 
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
 
         System.out.println( "BEFORE PUT \n" + jcs.getStats() );
 

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCacheUnitTest.java Mon Apr 23 21:35:43 2012
@@ -83,7 +83,7 @@ public class JDBCDiskCacheUnitTest
     public void runTestForRegion( String region, int items )
         throws Exception
     {
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
 
         System.out.println( "BEFORE PUT \n" + jcs.getStats() );
 
@@ -104,22 +104,22 @@ public class JDBCDiskCacheUnitTest
 
         for ( int i = 0; i <= items; i++ )
         {
-            String value = (String) jcs.get( i + ":key" );
+            String value = jcs.get( i + ":key" );
 
             assertEquals( "key = [" + i + ":key] value = [" + value + "]", region + " data " + i, value );
         }
 
         // Test that getElements returns all the expected values
-        Set keys = new HashSet();
+        Set<String> keys = new HashSet<String>();
         for ( int i = 0; i <= items; i++ )
         {
             keys.add( i + ":key" );
         }
 
-        Map elements = jcs.getCacheElements( keys );
+        Map<String, ICacheElement<String, String>> elements = jcs.getCacheElements( keys );
         for ( int i = 0; i <= items; i++ )
         {
-            ICacheElement<String, String> element = (ICacheElement) elements.get( i + ":key" );
+            ICacheElement<String, String> element = elements.get( i + ":key" );
             assertNotNull( "element " + i + ":key is missing", element );
             assertEquals( "value " + i + ":key", region + " data " + i, element.getVal() );
         }
@@ -167,10 +167,10 @@ public class JDBCDiskCacheUnitTest
         cattr.setConnectionPoolName( poolName );
 
         TableState tableState = new TableState( "JCSTESTTABLE_InitializePoolAccess" );
-        MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager();
+        MockCompositeCacheManager<String, String> compositeCacheManager = new MockCompositeCacheManager<String, String>();
         compositeCacheManager.setConfigurationProperties( props );
 
-        JDBCDiskCache diskCache = new JDBCDiskCache( cattr, tableState, compositeCacheManager );
+        JDBCDiskCache<String, String> diskCache = new JDBCDiskCache<String, String>( cattr, tableState, compositeCacheManager );
 
         System.setProperty( "hsqldb.cache_scale", "8" );
 
@@ -180,7 +180,7 @@ public class JDBCDiskCacheUnitTest
         new org.hsqldb.jdbcDriver();
         Class.forName( driverClassName ).newInstance();
         Connection cConn = DriverManager.getConnection( url + database, userName, password );
-        
+
         HsqlSetupTableUtil.setupTABLE( cConn, "JCSTESTTABLE_InitializePoolAccess" );
 
         // DO WORK

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/hsql/HSQLDiskCacheUnitTest.java Mon Apr 23 21:35:43 2012
@@ -86,10 +86,10 @@ public class HSQLDiskCacheUnitTest
             keys.add( i + ":key" );
         }
 
-        Map elements = jcs.getCacheElements( keys );
+        Map<String, ICacheElement<String, String>> elements = jcs.getCacheElements( keys );
         for ( int i = 0; i <= items; i++ )
         {
-            ICacheElement<String, String> element = (ICacheElement) elements.get( i + ":key" );
+            ICacheElement<String, String> element = elements.get( i + ":key" );
             assertNotNull( "element " + i + ":key is missing", element );
             assertEquals( "value " + i + ":key", region + " data " + i, element.getVal() );
         }

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/disk/jdbc/mysql/MySQLDiskCacheHsqlBackedUnitTest.java Mon Apr 23 21:35:43 2012
@@ -95,7 +95,7 @@ public class MySQLDiskCacheHsqlBackedUni
     public void runTestForRegion( String region, int items )
         throws Exception
     {
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
         //System.out.println( "BEFORE PUT \n" + jcs.getStats() );
 
         // Add items to cache
@@ -111,22 +111,22 @@ public class MySQLDiskCacheHsqlBackedUni
         // Test that all items are in cache
         for ( int i = 0; i <= items; i++ )
         {
-            String value = (String) jcs.get( i + ":key" );
+            String value = jcs.get( i + ":key" );
 
             assertEquals( "key = [" + i + ":key] value = [" + value + "]", region + " data " + i, value );
         }
 
         // Test that getElements returns all the expected values
-        Set keys = new HashSet();
+        Set<String> keys = new HashSet<String>();
         for ( int i = 0; i <= items; i++ )
         {
             keys.add( i + ":key" );
         }
 
-        Map elements = jcs.getCacheElements( keys );
+        Map<String, ICacheElement<String, String>> elements = jcs.getCacheElements( keys );
         for ( int i = 0; i <= items; i++ )
         {
-            ICacheElement<String, String> element = (ICacheElement) elements.get( i + ":key" );
+            ICacheElement<String, String> element = elements.get( i + ":key" );
             assertNotNull( "element " + i + ":key is missing", element );
             assertEquals( "value " + i + ":key", region + " data " + i, element.getVal() );
         }
@@ -156,7 +156,7 @@ public class MySQLDiskCacheHsqlBackedUni
         // SETUP
         int items = 200;
         String region = "testCache2";
-        JCS jcs = JCS.getInstance( region );
+        JCS<String, String> jcs = JCS.getInstance( region );
         System.out.println( "BEFORE PUT \n" + jcs.getStats() );
 
         // DO WORK
@@ -166,7 +166,7 @@ public class MySQLDiskCacheHsqlBackedUni
         }
         Thread.sleep( 1000 );
 
-        Map matchingResults = jcs.getMatchingCacheElements( "1.8.+" );
+        Map<String, ICacheElement<String, String>> matchingResults = jcs.getMatchingCacheElements( "1.8.+" );
 
         // VERIFY
         assertEquals( "Wrong number returned", 10, matchingResults.size() );
@@ -178,7 +178,7 @@ public class MySQLDiskCacheHsqlBackedUni
      * SETUP TABLE FOR CACHE
      * @param cConn
      */
-    void setupTABLE( Connection cConn )
+    void setupTABLE( Connection cConn ) throws SQLException
     {
         boolean newT = true;
 
@@ -196,15 +196,7 @@ public class MySQLDiskCacheHsqlBackedUni
         createSql.append( "PRIMARY KEY (CACHE_KEY, REGION) " );
         createSql.append( ");" );
 
-        Statement sStatement = null;
-        try
-        {
-            sStatement = cConn.createStatement();
-        }
-        catch ( SQLException e )
-        {
-            e.printStackTrace();
-        }
+        Statement sStatement = cConn.createStatement();
 
         try
         {
@@ -221,7 +213,7 @@ public class MySQLDiskCacheHsqlBackedUni
             {
                 // TODO figure out if it exists prior to trying to create it.
                 // log.error( "Problem creating table.", e );
-                e.printStackTrace();
+                throw e;
             }
         }
 

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManagerUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManagerUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManagerUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManagerUnitTest.java Mon Apr 23 21:35:43 2012
@@ -47,14 +47,14 @@ public class RemoteHttpCacheManagerUnitT
                                                                              elementSerializer );
 
         // DO WORK
-        IRemoteHttpCacheClient result = manager.createRemoteHttpCacheClientForAttributes( cattr );
+        IRemoteHttpCacheClient<String, String> result = manager.createRemoteHttpCacheClientForAttributes( cattr );
 
         // VEIFY
         assertNotNull( "Should have a cache.", result );
         assertTrue( "Wrong default.", result instanceof RemoteHttpCacheClient );
         assertTrue( "Should be initialized", ((RemoteHttpCacheClient)result).isInitialized() );
     }
-    
+
     /** Verify that we get the default. */
     public void testCreateRemoteHttpCacheClient_deafult()
     {
@@ -69,13 +69,13 @@ public class RemoteHttpCacheManagerUnitT
                                                                              elementSerializer );
 
         // DO WORK
-        IRemoteHttpCacheClient result = manager.createRemoteHttpCacheClientForAttributes( cattr );
+        IRemoteHttpCacheClient<String, String> result = manager.createRemoteHttpCacheClientForAttributes( cattr );
 
         // VEIFY
         assertNotNull( "Should have a cache.", result );
         assertTrue( "Wrong default.", result instanceof RemoteHttpCacheClient );
     }
-    
+
     /** Verify that we get a cache no wait. */
     public void testGetCache_normal()
     {
@@ -90,7 +90,7 @@ public class RemoteHttpCacheManagerUnitT
                                                                              elementSerializer );
 
         // DO WORK
-        AuxiliaryCache result = manager.getCache( cattr );
+        AuxiliaryCache<String, String> result = manager.getCache( cattr );
 
         // VEIFY
         assertNotNull( "Should have a cache.", result );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManualTester.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManualTester.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManualTester.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/auxiliary/remote/http/client/RemoteHttpCacheManualTester.java Mon Apr 23 21:35:43 2012
@@ -45,7 +45,7 @@ public class RemoteHttpCacheManualTester
     public void testSimpleLoad()
         throws Exception
     {
-        JCS jcs = JCS.getInstance( "testCache1" );
+        JCS<String, String> jcs = JCS.getInstance( "testCache1" );
 
         jcs.put( "TestKey", "TestValue" );
 

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/SystemPropertyUsageUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/SystemPropertyUsageUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/SystemPropertyUsageUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/SystemPropertyUsageUnitTest.java Mon Apr 23 21:35:43 2012
@@ -46,7 +46,7 @@ public class SystemPropertyUsageUnitTest
 
         JCS.setConfigFilename( "/TestSystemPropertyUsage.ccf" );
 
-        JCS jcs = JCS.getInstance( "someCacheNotInFile" );
+        JCS<String, String> jcs = JCS.getInstance( "someCacheNotInFile" );
 
         assertEquals( "System property value is not reflected", jcs.getCacheAttributes().getMaxObjects(), Integer
             .parseInt( "6789" ) );
@@ -70,7 +70,7 @@ public class SystemPropertyUsageUnitTest
 
         mgr.configure( props, false );
 
-        JCS jcs = JCS.getInstance( "someCacheNotInFile" );
+        JCS<String, String> jcs = JCS.getInstance( "someCacheNotInFile" );
 
         assertFalse( "System property value should not be reflected",
                      jcs.getCacheAttributes().getMaxObjects() == Integer.parseInt( props

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/control/event/SimpleEventHandlingUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/control/event/SimpleEventHandlingUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/control/event/SimpleEventHandlingUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/control/event/SimpleEventHandlingUnitTest.java Mon Apr 23 21:35:43 2012
@@ -56,7 +56,7 @@ public class SimpleEventHandlingUnitTest
         // SETUP
         MyEventHandler meh = new MyEventHandler();
 
-        JCS jcs = JCS.getInstance( "WithDisk" );
+        JCS<String, String> jcs = JCS.getInstance( "WithDisk" );
         // this should add the event handler to all items as they are created.
         IElementAttributes attributes = jcs.getDefaultElementAttributes();
         attributes.addElementEventHandler( meh );
@@ -86,7 +86,7 @@ public class SimpleEventHandlingUnitTest
     public void testSpoolNoDiskEvent()
         throws Exception
     {
-        JCS jcs = JCS.getInstance( "NoDisk" );
+        JCS<String, String> jcs = JCS.getInstance( "NoDisk" );
 
         MyEventHandler meh = new MyEventHandler();
 
@@ -119,7 +119,7 @@ public class SimpleEventHandlingUnitTest
     {
         MyEventHandler meh = new MyEventHandler();
 
-        JCS jcs = JCS.getInstance( "DiskButNotAllowed" );
+        JCS<String, String> jcs = JCS.getInstance( "DiskButNotAllowed" );
         // this should add the event handler to all items as they are created.
         IElementAttributes attributes = jcs.getDefaultElementAttributes();
         attributes.addElementEventHandler( meh );
@@ -149,7 +149,7 @@ public class SimpleEventHandlingUnitTest
     {
         MyEventHandler meh = new MyEventHandler();
 
-        JCS jcs = JCS.getInstance( "DiskButNotAllowed" );
+        JCS<String, String> jcs = JCS.getInstance( "DiskButNotAllowed" );
         // this should add the event handler to all items as they are created.
         //IElementAttributes attributes = jcs.getDefaultElementAttributes();
         //attributes.addElementEventHandler( meh );

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/logging/CacheEventLoggerDebugLoggerUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/logging/CacheEventLoggerDebugLoggerUnitTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/logging/CacheEventLoggerDebugLoggerUnitTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/logging/CacheEventLoggerDebugLoggerUnitTest.java Mon Apr 23 21:35:43 2012
@@ -33,13 +33,13 @@ public class CacheEventLoggerDebugLogger
         CacheEventLoggerDebugLogger logger = new CacheEventLoggerDebugLogger();
         logger.setLogCategoryName( logCategoryName );
 
-        ICacheEvent event = logger.createICacheEvent( source, region, eventName, optionalDetails, key );
+        ICacheEvent<String> event = logger.createICacheEvent( source, region, eventName, optionalDetails, key );
 
         // DO WORK
         logger.logICacheEvent( event );
-        
+
         // VERIFY
-        String result = stringWriter.toString();     
+        String result = stringWriter.toString();
         assertTrue( "An event with the source should have been logged:" + result, result.indexOf( source ) != -1 );
         assertTrue( "An event with the region should have been logged:" + result, result.indexOf( region ) != -1 );
         assertTrue( "An event with the event name should have been logged:" + result, result.indexOf( eventName ) != -1 );
@@ -65,14 +65,14 @@ public class CacheEventLoggerDebugLogger
 
         // DO WORK
         logger.logApplicationEvent( source, eventName, optionalDetails );
-        
+
         // VERIFY
-        String result = stringWriter.toString();  
+        String result = stringWriter.toString();
         assertTrue( "An event with the source should have been logged:" + result, result.indexOf( source ) != -1 );
         assertTrue( "An event with the event name should have been logged:" + result, result.indexOf( eventName ) != -1 );
         assertTrue( "An event with the optionalDetails should have been logged:" + result, result.indexOf( optionalDetails ) != -1 );
     }
-    
+
     /** verify that we can log */
     public void testLogError_normal()
     {
@@ -91,14 +91,14 @@ public class CacheEventLoggerDebugLogger
 
         // DO WORK
         logger.logError( source, eventName, errorMessage );
-        
+
         // VERIFY
-        String result = stringWriter.toString();  
+        String result = stringWriter.toString();
         assertTrue( "An event with the source should have been logged:" + result, result.indexOf( source ) != -1 );
         assertTrue( "An event with the event name should have been logged:" + result, result.indexOf( eventName ) != -1 );
         assertTrue( "An event with the errorMessage should have been logged:" + result, result.indexOf( errorMessage ) != -1 );
     }
-    
+
     /**
      * Configures a logger for the given name. This allows us to check the log output.
      * <p>

Modified: commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/memory/mru/LRUvsMRUPerformanceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/memory/mru/LRUvsMRUPerformanceTest.java?rev=1329467&r1=1329466&r2=1329467&view=diff
==============================================================================
--- commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/memory/mru/LRUvsMRUPerformanceTest.java (original)
+++ commons/proper/jcs/branches/generics-interface/src/test/org/apache/jcs/engine/memory/mru/LRUvsMRUPerformanceTest.java Mon Apr 23 21:35:43 2012
@@ -93,8 +93,8 @@ public class LRUvsMRUPerformanceTest
         {
 
             JCS.setConfigFilename( "/TestMRUCache.ccf" );
-            JCS cache = JCS.getInstance( "lruDefined" );
-            JCS mru = JCS.getInstance( "mruDefined" );
+            JCS<String, String> cache = JCS.getInstance( "lruDefined" );
+            JCS<String, String> mru = JCS.getInstance( "mruDefined" );
 
             System.out.println( "LRU = " + cache );
 



Mime
View raw message