Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/IStats.java URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/IStats.java?rev=1583038&r1=1583037&r2=1583038&view=diff ============================================================================== --- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/IStats.java (original) +++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/engine/stats/behavior/IStats.java Sat Mar 29 18:36:20 2014 @@ -36,21 +36,21 @@ public interface IStats * * @return IStatElement[] */ - public abstract IStatElement[] getStatElements(); + IStatElement[] getStatElements(); /** * Set the generic statistical or historical data. * * @param stats */ - public abstract void setStatElements( IStatElement[] stats ); + void setStatElements( IStatElement[] stats ); /** * Get the type name, such as "LRU Memory Cache." No formal type is defined. * * @return String */ - public abstract String getTypeName(); + String getTypeName(); /** * Set the type name, such as "LRU Memory Cache." No formal type is defined. @@ -58,5 +58,5 @@ public interface IStats * * @param name */ - public abstract void setTypeName( String name ); + void setTypeName( String name ); }
Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/utils/access/JCSWorkerHelper.java URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/utils/access/JCSWorkerHelper.java?rev=1583038&r1=1583037&r2=1583038&view=diff ============================================================================== --- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/utils/access/JCSWorkerHelper.java (original) +++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/utils/access/JCSWorkerHelper.java Sat Mar 29 18:36:20 2014 @@ -32,20 +32,20 @@ package org.apache.commons.jcs.utils.acc public interface JCSWorkerHelper { /** - * Tells us weather or not the work has been completed. This will be called + * Tells us whether or not the work has been completed. This will be called * automatically by JCSWorker. You should not call it yourself. * <p> - * @return True if the work has allready been done, otherwise false. + * @return True if the work has already been done, otherwise false. */ - public boolean isFinished(); + boolean isFinished(); /** - * Sets weather or not the work has been done. + * Sets whether or not the work has been done. * <p> * @param isFinished - * True if the work has allready been done, otherwise false. + * True if the work has already been done, otherwise false. */ - public void setFinished( boolean isFinished ); + void setFinished( boolean isFinished ); /** * The method to implement to do the work that should be cached. JCSWorker @@ -56,6 +56,6 @@ public interface JCSWorkerHelper * If anything goes wrong while doing the work, an Exception * should be thrown. */ - public Object doWork() + Object doWork() throws Exception; } Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/utils/discovery/behavior/IDiscoveryListener.java URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/utils/discovery/behavior/IDiscoveryListener.java?rev=1583038&r1=1583037&r2=1583038&view=diff ============================================================================== --- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/utils/discovery/behavior/IDiscoveryListener.java (original) +++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/utils/discovery/behavior/IDiscoveryListener.java Sat Mar 29 18:36:20 2014 @@ -33,12 +33,12 @@ public interface IDiscoveryListener * <p> * @param service the service to add */ - public void addDiscoveredService( DiscoveredService service ); + void addDiscoveredService( DiscoveredService service ); /** * Remove the service from the list. * <p> * @param service the service to remove */ - public void removeDiscoveredService( DiscoveredService service ); + void removeDiscoveredService( DiscoveredService service ); } Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java?rev=1583038&r1=1583037&r2=1583038&view=diff ============================================================================== --- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java (original) +++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/LateralTCPDiscoveryListenerUnitTest.java Sat Mar 29 18:36:20 2014 @@ -223,7 +223,7 @@ public class LateralTCPDiscoveryListener // since the no waits are compared by object equality, I have to do this // TODO add an equals method to the noWait. the problem if is figuring out what to compare. ITCPLateralCacheAttributes lca = new TCPLateralCacheAttributes(); - lca.setTransmissionType( LateralCacheAttributes.TCP ); + lca.setTransmissionType( LateralCacheAttributes.Type.TCP ); lca.setTcpServer( service.getServiceAddress() + ":" + service.getServicePort() ); LateralTCPCacheManager lcm = LateralTCPCacheManager.getInstance( lca, cacheMgr, cacheEventLogger, elementSerializer ); @@ -262,7 +262,7 @@ public class LateralTCPDiscoveryListener // since the no waits are compared by object equality, I have to do this // TODO add an equals method to the noWait. the problem if is figuring out what to compare. ITCPLateralCacheAttributes lca = new TCPLateralCacheAttributes(); - lca.setTransmissionType( LateralCacheAttributes.TCP ); + lca.setTransmissionType( LateralCacheAttributes.Type.TCP ); lca.setTcpServer( service.getServiceAddress() + ":" + service.getServicePort() ); LateralTCPCacheManager lcm = LateralTCPCacheManager.getInstance( lca, cacheMgr, cacheEventLogger, elementSerializer ); Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java?rev=1583038&r1=1583037&r2=1583038&view=diff ============================================================================== --- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java (original) +++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/lateral/socket/tcp/TestTCPLateralUnitTest.java Sat Mar 29 18:36:20 2014 @@ -70,7 +70,7 @@ public class TestTCPLateralUnitTest JCS.getInstance( "test" ); TCPLateralCacheAttributes lac = new TCPLateralCacheAttributes(); - lac.setTransmissionType( LateralCacheAttributes.TCP ); + lac.setTransmissionType( LateralCacheAttributes.Type.TCP ); lac.setTcpServer( "localhost" + ":" + 8111 ); lac.setTcpListenerPort( 8111 ); Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/engine/CacheEventQueueFactoryUnitTest.java URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/engine/CacheEventQueueFactoryUnitTest.java?rev=1583038&r1=1583037&r2=1583038&view=diff ============================================================================== --- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/engine/CacheEventQueueFactoryUnitTest.java (original) +++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/engine/CacheEventQueueFactoryUnitTest.java Sat Mar 29 18:36:20 2014 @@ -23,6 +23,7 @@ import junit.framework.TestCase; import org.apache.commons.jcs.auxiliary.remote.MockRemoteCacheListener; import org.apache.commons.jcs.engine.behavior.ICacheEventQueue; +import org.apache.commons.jcs.engine.behavior.ICacheEventQueue.QueueType; import org.apache.commons.jcs.engine.behavior.ICacheListener; /** Unit tests for the CacheEventQueueFactory */ @@ -33,7 +34,7 @@ public class CacheEventQueueFactoryUnitT public void testCreateCacheEventQueue_Single() { // SETUP - String eventQueueType = ICacheEventQueue.SINGLE_QUEUE_TYPE; + QueueType eventQueueType = QueueType.SINGLE; ICacheListener<String, String> listener = new MockRemoteCacheListener<String, String>(); long listenerId = 1; @@ -51,7 +52,7 @@ public class CacheEventQueueFactoryUnitT public void testCreateCacheEventQueue_Pooled() { // SETUP - String eventQueueType = ICacheEventQueue.POOLED_QUEUE_TYPE; + QueueType eventQueueType = QueueType.POOLED; ICacheListener<String, String> listener = new MockRemoteCacheListener<String, String>(); long listenerId = 1; @@ -64,22 +65,4 @@ public class CacheEventQueueFactoryUnitT assertNotNull( "Should have a result", result ); assertTrue( "Wrong type", result instanceof PooledCacheEventQueue ); } - - /** Test create */ - public void testCreateCacheEventQueue_Custom() - { - // SETUP - String eventQueueType = MockCacheEventQueue.class.getName(); - ICacheListener<String, String> listener = new MockRemoteCacheListener<String, String>(); - long listenerId = 1; - - CacheEventQueueFactory<String, String> factory = new CacheEventQueueFactory<String, String>(); - - // DO WORK - ICacheEventQueue<String, String> result = factory.createCacheEventQueue( listener, listenerId, "cacheName", "threadPoolName", eventQueueType ); - - // VERIFY - assertNotNull( "Should have a result", result ); - assertTrue( "Wrong type: " + result, result instanceof MockCacheEventQueue ); - } }
