Package krati.io.serializer

Examples of krati.io.serializer.StringSerializerUtf8


        return "member." + memberId;
    }
   
    @Override
    protected Serializer<String> createKeySerializer() {
        return new StringSerializerUtf8();
    }
View Full Code Here


    }
   
    protected SerializableObjectArray<String> createStore(File homeDir) throws Exception {
        StoreConfig config = new StoreConfig(homeDir, 1000);
        ArrayStore arrayStore = StoreFactory.createDynamicArrayStore(config);
        return new SerializableObjectArray<String>(arrayStore, new StringSerializerUtf8());
    }
View Full Code Here

        }
    }
   
    public void testStaticObjectArrayFactory1() throws IOException {
        ObjectStoreFactory<Integer, String> storeFactory = new StaticObjectArrayFactory<String>();
        ObjectStore<Integer, String> store = storeFactory.create(_config, new IntSerializer(), new StringSerializerUtf8());
        assertEquals(SerializableObjectArray.class, store.getClass());
        assertEquals(StaticDataArray.class, ((SerializableObjectArray<String>)store).getStore().getClass());
        store.close();
    }
View Full Code Here

   
    public void testStaticObjectArrayFactory2() throws IOException {
        setUpStorePartitionConfig();
       
        ObjectStoreFactory<Integer, String> storeFactory = new StaticObjectArrayFactory<String>();
        ObjectStore<Integer, String> store = storeFactory.create(_config, new IntSerializer(), new StringSerializerUtf8());
        assertEquals(SerializableObjectArray.class, store.getClass());
        assertEquals(StaticArrayStorePartition.class, ((SerializableObjectArray<String>)store).getStore().getClass());
        store.close();
    }
View Full Code Here

        store.close();
    }
   
    public void testDynamicObjectArrayFactory() throws IOException {
        ObjectStoreFactory<Integer, String> storeFactory = new DynamicObjectArrayFactory<String>();
        ObjectStore<Integer, String> store = storeFactory.create(_config, new IntSerializer(), new StringSerializerUtf8());
        assertEquals(SerializableObjectArray.class, store.getClass());
        assertEquals(DynamicDataArray.class, ((SerializableObjectArray<String>)store).getStore().getClass());
        store.close();
    }
View Full Code Here

        store.close();
    }
   
    public void testStaticObjectStoreFactory() throws IOException {
        ObjectStoreFactory<Integer, String> storeFactory = new StaticObjectStoreFactory<Integer, String>();
        ObjectStore<Integer, String> store = storeFactory.create(_config, new IntSerializer(), new StringSerializerUtf8());
        assertEquals(SerializableObjectStore.class, store.getClass());
        assertEquals(StaticDataStore.class, ((SerializableObjectStore<Integer, String>)store).getStore().getClass());
        store.close();
    }
View Full Code Here

        store.close();
    }
   
    public void testDynamicObjectStoreFactory() throws IOException {
        ObjectStoreFactory<Integer, String> storeFactory = new DynamicObjectStoreFactory<Integer, String>();
        ObjectStore<Integer, String> store = storeFactory.create(_config, new IntSerializer(), new StringSerializerUtf8());
        assertEquals(SerializableObjectStore.class, store.getClass());
        assertEquals(DynamicDataStore.class, ((SerializableObjectStore<Integer, String>)store).getStore().getClass());
        store.close();
    }
View Full Code Here

        store.close();
    }
   
    public void testIndexedObjectStoreFactory() throws IOException {
        ObjectStoreFactory<Integer, String> storeFactory = new IndexedObjectStoreFactory<Integer, String>();
        ObjectStore<Integer, String> store = storeFactory.create(_config, new IntSerializer(), new StringSerializerUtf8());
        assertEquals(SerializableObjectStore.class, store.getClass());
        assertEquals(IndexedDataStore.class, ((SerializableObjectStore<Integer, String>)store).getStore().getClass());
        store.close();
    }
View Full Code Here

    @Override
    protected StoreClient<String, String> createStoreClient() {
        return new StoreClientLocal<String, String>(
                createStoreResponder(),
                getClass().getSimpleName(),
                new StringSerializerUtf8(),
                new StringSerializerUtf8());
    }
View Full Code Here

        String str2 = serializer.deserialize(serializer.serialize(str1));
        assertEquals(str1, str2);
    }
   
    public void testStringSerializerUtf8() {
        Serializer<String> serializer = new StringSerializerUtf8();
       
        String str1 = TestSerializer.class.getSimpleName();
        String str2 = serializer.deserialize(serializer.serialize(str1));
        assertEquals(str1, str2);
    }
View Full Code Here

TOP

Related Classes of krati.io.serializer.StringSerializerUtf8

Copyright © 2018 www.massapicom. 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.