.getDeSerializedCacheElement( (ICacheElementSerialized<K, V>) entry.getValue(), super.getElementSerializer() );
/** * Verify null for null. * <p> * @throws IOException */ public void testgGetSerializedCacheElement_null() throws IOException { // SETUP IElementSerializer elementSerializer = new StandardSerializer(); ICacheElement<String, String> before = null; // DO WORK ICacheElementSerialized<String, String> result = SerializationConversionUtil.getSerializedCacheElement( before, elementSerializer ); // VERIFY assertNull( "Should get null for null", result ); }
SerializationConversionUtil.getSerializedCacheElement( before, elementSerializer ); ICacheElementSerialized<String, String> serialized = SerializationConversionUtil.getSerializedCacheElement( alreadySerialized, elementSerializer ); SerializationConversionUtil.getDeSerializedCacheElement( serialized, elementSerializer );
SerializationConversionUtil.getSerializedCacheElement( before, elementSerializer ); ICacheElementSerialized<String, String> serialized = SerializationConversionUtil.getSerializedCacheElement( alreadySerialized, elementSerializer ); SerializationConversionUtil.getDeSerializedCacheElement( serialized, elementSerializer );
SerializationConversionUtil.getSerializedCacheElement( before, elementSerializer ); SerializationConversionUtil.getDeSerializedCacheElement( serialized, elementSerializer );
cb = SerializationConversionUtil.getDeSerializedCacheElement( (ICacheElementSerialized<K, V>) cb, this.elementSerializer ); if ( log.isDebugEnabled() )
/** * Verify null for null. * <p> * @throws IOException */ public void testgGetSerializedCacheElement_null() throws IOException { // SETUP IElementSerializer elementSerializer = new StandardSerializer(); ICacheElement<String, String> before = null; // DO WORK ICacheElementSerialized<String, String> result = SerializationConversionUtil.getSerializedCacheElement( before, elementSerializer ); // VERIFY assertNull( "Should get null for null", result ); }
SerializationConversionUtil.getSerializedCacheElement( before, elementSerializer ); SerializationConversionUtil.getDeSerializedCacheElement( serialized, elementSerializer );
cb = SerializationConversionUtil.getDeSerializedCacheElement( (ICacheElementSerialized<K, V>) cb, this.elementSerializer ); if ( log.isDebugEnabled() )
serialized = SerializationConversionUtil.getSerializedCacheElement( ce, super.getElementSerializer() );
.getDeSerializedCacheElement( (ICacheElementSerialized<K, V>) entry.getValue(), super.getElementSerializer() );
serialized = SerializationConversionUtil.getSerializedCacheElement( ce, super.getElementSerializer() );
/** * Verify null for null. * <p> * @throws Exception */ public void testgGetDeSerializedCacheElement_null() throws Exception { // SETUP IElementSerializer elementSerializer = new StandardSerializer(); ICacheElementSerialized<String, String> before = null; // DO WORK ICacheElement<String, String> result = SerializationConversionUtil.getDeSerializedCacheElement( before, elementSerializer ); // VERIFY assertNull( "Should get null for null", result ); }
SerializationConversionUtil.getSerializedCacheElement( before, elementSerializer );
/** * Verify null for null. * <p> * @throws Exception */ public void testgGetDeSerializedCacheElement_null() throws Exception { // SETUP IElementSerializer elementSerializer = new StandardSerializer(); ICacheElementSerialized<String, String> before = null; // DO WORK ICacheElement<String, String> result = SerializationConversionUtil.getDeSerializedCacheElement( before, elementSerializer ); // VERIFY assertNull( "Should get null for null", result ); }
SerializationConversionUtil.getSerializedCacheElement( before, elementSerializer );
retVal = SerializationConversionUtil.getDeSerializedCacheElement( (ICacheElementSerialized<K, V>) retVal, super.getElementSerializer() );
retVal = SerializationConversionUtil.getDeSerializedCacheElement( (ICacheElementSerialized<K, V>) retVal, super.getElementSerializer() );
/** * Verify that the remote service update method is called. The remote cache serializes the object * first. * <p> * @throws Exception */ public void testUpdate() throws Exception { // SETUP long listenerId = 123; listener.setListenerId( listenerId ); RemoteCache<String, String> remoteCache = new RemoteCache<String, String>( cattr, service, listener, monitor ); String cacheName = "testUpdate"; // DO WORK ICacheElement<String, String> element = new CacheElement<String, String>( cacheName, "key", "value" ); remoteCache.update( element ); // VERIFY assertTrue( "The element should be in the serialized wrapper.", service.lastUpdate instanceof ICacheElementSerialized ); ICacheElement<String, String> result = SerializationConversionUtil .getDeSerializedCacheElement( (ICacheElementSerialized<String, String>) service.lastUpdate, remoteCache .getElementSerializer() ); assertEquals( "Wrong element updated.", element.getVal(), result.getVal() ); assertEquals( "Wrong listener id.", Long.valueOf( listenerId ), service.updateRequestIdList.get( 0 ) ); }
/** * Verify that the remote service update method is called. The remote cache serializes the obect * first. * <p> * @throws Exception */ public void testUpdate() throws Exception { // SETUP long listenerId = 123; IRemoteCacheAttributes cattr = new RemoteCacheAttributes(); MockRemoteCacheService<String, String> service = new MockRemoteCacheService<String, String>(); MockRemoteCacheListener<String, String> listener = new MockRemoteCacheListener<String, String>(); listener.setListenerId( listenerId ); RemoteCache<String, String> remoteCache = new RemoteCache<String, String>( cattr, service, listener ); String cacheName = "testUpdate"; // DO WORK ICacheElement<String, String> element = new CacheElement<String, String>( cacheName, "key", "value" ); remoteCache.update( element ); // VERIFY assertTrue( "The element should be in the serialized wrapper.", service.lastUpdate instanceof ICacheElementSerialized ); ICacheElement<String, String> result = SerializationConversionUtil .getDeSerializedCacheElement( (ICacheElementSerialized<String, String>) service.lastUpdate, remoteCache .getElementSerializer() ); assertEquals( "Wrong element updated.", element.getVal(), result.getVal() ); assertEquals( "Wrong listener id.", Long.valueOf( listenerId ), service.updateRequestIdList.get( 0 ) ); }