Search in sources :

Example 6 with KryoSerializer

use of com.thinkaurelius.titan.graphdb.database.serialize.kryo.KryoSerializer in project titan by thinkaurelius.

the class SerializerUTF8Test method setUp.

@Before
public void setUp() throws Exception {
    Configuration conf = new PropertiesConfiguration();
    conf.setProperty(GraphDatabaseConfiguration.STRING_COMPACT_SERIALIZE, true);
    serialize = new KryoSerializer(conf);
    serialize.registerClass(TestEnum.class, RESERVED_ID_OFFSET + 1);
    serialize.registerClass(TestClass.class, RESERVED_ID_OFFSET + 2);
    serialize.registerClass(short[].class, RESERVED_ID_OFFSET + 3);
    printStats = true;
}
Also used : Configuration(org.apache.commons.configuration.Configuration) GraphDatabaseConfiguration(com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration) PropertiesConfiguration(org.apache.commons.configuration.PropertiesConfiguration) PropertiesConfiguration(org.apache.commons.configuration.PropertiesConfiguration) KryoSerializer(com.thinkaurelius.titan.graphdb.database.serialize.kryo.KryoSerializer) Before(org.junit.Before)

Aggregations

KryoSerializer (com.thinkaurelius.titan.graphdb.database.serialize.kryo.KryoSerializer)6 Configuration (org.apache.commons.configuration.Configuration)4 PropertiesConfiguration (org.apache.commons.configuration.PropertiesConfiguration)4 GraphDatabaseConfiguration (com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration)3 DataOutput (com.thinkaurelius.titan.graphdb.database.serialize.DataOutput)2 Before (org.junit.Before)2 Test (org.junit.Test)2 ReadBuffer (com.thinkaurelius.titan.diskstorage.ReadBuffer)1 StaticBuffer (com.thinkaurelius.titan.diskstorage.StaticBuffer)1 WriteBuffer (com.thinkaurelius.titan.diskstorage.WriteBuffer)1 WriteByteBuffer (com.thinkaurelius.titan.diskstorage.util.WriteByteBuffer)1 Serializer (com.thinkaurelius.titan.graphdb.database.serialize.Serializer)1 RelationType (com.thinkaurelius.titan.graphdb.internal.RelationType)1 PerformanceTest (com.thinkaurelius.titan.testutil.PerformanceTest)1 Calendar (java.util.Calendar)1 BaseConfiguration (org.apache.commons.configuration.BaseConfiguration)1