Examples of StringSerializerUtf8


Examples of krati.io.serializer.StringSerializerUtf8

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

Examples of krati.io.serializer.StringSerializerUtf8

    }
   
    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

Examples of krati.io.serializer.StringSerializerUtf8

        }
    }
   
    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

Examples of krati.io.serializer.StringSerializerUtf8

   
    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

Examples of krati.io.serializer.StringSerializerUtf8

        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

Examples of krati.io.serializer.StringSerializerUtf8

        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

Examples of krati.io.serializer.StringSerializerUtf8

        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

Examples of krati.io.serializer.StringSerializerUtf8

        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

Examples of krati.io.serializer.StringSerializerUtf8

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

Examples of krati.io.serializer.StringSerializerUtf8

        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
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.