Package de.javakaffee.web.msm

Examples of de.javakaffee.web.msm.TranscoderService.deserialize()


        final MemcachedBackupSession session = createSession( manager, "123456789" );
        session.setAttribute( "person", foundPerson );

        final byte[] data = transcoderService.serialize( session );
        final MemcachedBackupSession deserialized = transcoderService.deserialize( data, manager );

        final Person deserializedPerson = (Person) deserialized.getAttribute( "person" );
        TestUtils.assertDeepEquals( foundPerson, deserializedPerson );

    }
View Full Code Here


       
        // deserialization
        for( int r = 0; r < rounds; r++ ) {
            final long start = System.currentTimeMillis();
            for( int i = 0; i < 500; i++ ) {
                transcoderService.deserialize( data, manager );
            }
            deserializationStats.registerSince( start );
            deserializationStats.setSize( size );
        }
       
View Full Code Here

        System.out.println(" (" + (System.currentTimeMillis() - serWarmupStart) + " ms)");
       
        System.out.print("Performing warmup for deserialization...");
        final byte[] data = transcoderService.serialize( session );
        final long deserWarmupStart = System.currentTimeMillis();
        for( int i = 0; i < loops; i++ ) transcoderService.deserialize( data, manager );
        System.out.println(" (" + (System.currentTimeMillis() - deserWarmupStart) + " ms)");

    }

    private static MemcachedBackupSession createSession( final MemcachedBackupSessionManager manager, final String id,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.