/** * Verify that we can parse the ElementSerializer. */ public void testParseElementSerializer_Normal() { // SETUP String auxPrefix = "jcs.auxiliary." + "MYAux"; String testPropertyValue = "This is the value"; String className = MockElementSerializer.class.getName(); Properties props = new Properties(); props.put( auxPrefix + AuxiliaryCacheConfigurator.SERIALIZER_PREFIX, className ); props.put( auxPrefix + AuxiliaryCacheConfigurator.SERIALIZER_PREFIX + AuxiliaryCacheConfigurator.ATTRIBUTE_PREFIX + ".testProperty", testPropertyValue ); // DO WORK MockElementSerializer result = (MockElementSerializer) AuxiliaryCacheConfigurator .parseElementSerializer( props, auxPrefix ); // VERIFY assertNotNull( "Should have a Serializer.", result ); assertEquals( "Property should be set.", testPropertyValue, result.getTestProperty() ); }
rca.setRemotePort( 1101 ); RemoteCacheManager mgr = RemoteCacheManager.getInstance( rca, cacheMgr, new MockCacheEventLogger(), new MockElementSerializer() ); AuxiliaryCache<String, String> cache = mgr.getCache( "testCache" );
RemoteCacheManager mgr = factory.getManager( rca, cacheMgr, new MockCacheEventLogger(), new MockElementSerializer() ); AuxiliaryCache<String, String> cache = mgr.getCache( rca );
attributes.setRemotePort(remotePort); RemoteCacheManager remoteCacheManager = RemoteCacheManager.getInstance(attributes, compositeCacheManager, new MockCacheEventLogger(), new MockElementSerializer()); String regionName = "testPutaMultipleAndListen"; AuxiliaryCache<String, String> cache = remoteCacheManager.getCache(regionName);
/** * Verify that we can parse the ElementSerializer. */ public void testParseElementSerializer_Normal() { // SETUP String auxPrefix = "jcs.auxiliary." + "MYAux"; String testPropertyValue = "This is the value"; String className = MockElementSerializer.class.getName(); Properties props = new Properties(); props.put( auxPrefix + AuxiliaryCacheConfigurator.SERIALIZER_PREFIX, className ); props.put( auxPrefix + AuxiliaryCacheConfigurator.SERIALIZER_PREFIX + AuxiliaryCacheConfigurator.ATTRIBUTE_PREFIX + ".testProperty", testPropertyValue ); // DO WORK MockElementSerializer result = (MockElementSerializer) AuxiliaryCacheConfigurator .parseElementSerializer( props, auxPrefix ); // VERIFY assertNotNull( "Should have a Serializer.", result ); assertEquals( "Property should be set.", testPropertyValue, result.getTestProperty() ); }
attributes.setRemotePort(remotePort); RemoteCacheManager remoteCacheManager = RemoteCacheManager.getInstance(attributes, compositeCacheManager, new MockCacheEventLogger(), new MockElementSerializer()); String regionName = "testPutAndListen"; AuxiliaryCache<String, String> cache = remoteCacheManager.getCache(regionName);
attributes.setCacheName("testPutaMultipleAndListen"); RemoteCacheManager remoteCacheManager = factory.getManager(attributes, compositeCacheManager, new MockCacheEventLogger(), new MockElementSerializer()); AuxiliaryCache<String, String> cache = remoteCacheManager.getCache(attributes);
attributes.setRemotePort(remotePort); RemoteCacheManager remoteCacheManager = RemoteCacheManager.getInstance(attributes, compositeCacheManager, new MockCacheEventLogger(), new MockElementSerializer()); String regionName = "testSinglePut"; AuxiliaryCache<String, String> cache = remoteCacheManager.getCache(regionName);
attributes.setCacheName("testSinglePut"); RemoteCacheManager remoteCacheManager = factory.getManager(attributes, compositeCacheManager, new MockCacheEventLogger(), new MockElementSerializer()); AuxiliaryCache<String, String> cache = remoteCacheManager.getCache(attributes);
attributes.setCacheName("testPutAndListen"); RemoteCacheManager remoteCacheManager = factory.getManager(attributes, compositeCacheManager, new MockCacheEventLogger(), new MockElementSerializer()); AuxiliaryCache<String, String> cache = remoteCacheManager.getCache(attributes);