Examples of StandardSerializer


Examples of org.apache.jcs.utils.serialization.StandardSerializer

     * @throws IOException
     */
    public static long totalSize( DiskTestObject[] testObjects, int endPosition )
        throws IOException
    {
        StandardSerializer serializer = new StandardSerializer();
        long total = 0;
        for ( int i = 0; i < endPosition; i++ )
        {
            int tileSize = serializer.serialize( testObjects[i] ).length + IndexedDisk.RECORD_HEADER;
            total += tileSize;
        }
        return total;
    }
View Full Code Here

Examples of org.apache.jcs.utils.serialization.StandardSerializer

     * @throws IOException
     */
    public static long totalSize( ICacheElement[] elements, int startPosition, int endPosition )
        throws IOException
    {
        StandardSerializer serializer = new StandardSerializer();
        long total = 0;
        for ( int i = startPosition; i < endPosition; i++ )
        {
            int tileSize = serializer.serialize( elements[i] ).length + IndexedDisk.RECORD_HEADER;
            total += tileSize;
        }
        return total;
    }
View Full Code Here

Examples of org.apache.jcs.utils.serialization.StandardSerializer

        String key = "key";
        String value = "value fdsadf dsafdsa fdsaf dsafdsaf dsafdsaf dsaf dsaf dsaf dsafa dsaf dsaf dsafdsaf";
        IElementAttributes attr = new ElementAttributes();
        attr.setMaxLifeSeconds( 34 );

        IElementSerializer elementSerializer = new StandardSerializer();

        ICacheElementSerialized element = new CacheElementSerialized( cacheName, key, elementSerializer
            .serialize( value ), attr );
        listener.handlePut( element );

        ICacheElement after = cacheMgr.getCache( cacheName ).get( key );
View Full Code Here

Examples of org.apache.jcs.utils.serialization.StandardSerializer

        String key = "key";
        String value = "value fdsadf dsafdsa fdsaf dsafdsaf dsafdsaf dsaf dsaf dsaf dsafa dsaf dsaf dsafdsaf";
        IElementAttributes attr = new ElementAttributes();
        attr.setMaxLifeSeconds( 34 );

        IElementSerializer elementSerializer = new StandardSerializer();

        ICacheElementSerialized element = new CacheElementSerialized( cacheName, key, elementSerializer
            .serialize( value ), attr );
        listener.handlePut( element );

        ICacheElement after = cacheMgr.getCache( cacheName ).get( key );
View Full Code Here

Examples of org.directmemory.serialization.StandardSerializer

    testSerializer("protostuff-new", new ProtoStuffWithLinkedBufferSerializer(), Ram.Kb(4), 20000);
    testSerializer("cinquantamila", new ProtoStuffWithLinkedBufferSerializer(), Ram.Kb(3), 50000);
  }
  @Test
  public void StandardTest() throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException {
    testSerializer("java-serialization", new StandardSerializer(), Ram.Kb(1), 20000);
    testSerializer("java-serialization", new StandardSerializer(), Ram.Kb(2), 20000);
    testSerializer("java-serialization", new StandardSerializer(), Ram.Kb(3), 20000);
    testSerializer("java-serialization", new StandardSerializer(), Ram.Kb(4), 20000);
  }
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.