Package com.thinkaurelius.titan.graphdb.database.serialize

Examples of com.thinkaurelius.titan.graphdb.database.serialize.DataOutput.writeObject()


        int i = 5;
        TestClass c = new TestClass(5, 8, new short[]{1, 2, 3, 4, 5}, TestEnum.Two);
        Number n = new Double(3.555);
        out.writeObjectNotNull(str);
        out.putInt(i);
        out.writeObject(c, TestClass.class);
        out.writeClassAndObject(n);
        ReadBuffer b = out.getStaticBuffer().asReadBuffer();
        if (printStats) log.debug(bufferStats(b));
        String str2 = serialize.readObjectNotNull(b, String.class);
        assertEquals(str, str2);
View Full Code Here


    public void parallelDeserialization() throws InterruptedException {
        DataOutput out = serialize.getDataOutput(128, true);
        out.putLong(8);
        out.writeClassAndObject(Long.valueOf(8));
        TestClass c = new TestClass(5, 8, new short[]{1, 2, 3, 4, 5}, TestEnum.Two);
        out.writeObject(c, TestClass.class);
        final StaticBuffer b = out.getStaticBuffer();

        int numThreads = 100;
        Thread[] threads = new Thread[numThreads];
        for (int i = 0; i < numThreads; i++) {
View Full Code Here

            out.writeClassAndObject(d);
            fail();
        } catch (IllegalArgumentException e) {

        }
        out.writeObject(null, TestClass.class);
    }


    @Test
    public void longWriteTest() {
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void checkNonObject() {
        DataOutput out = serialize.getDataOutput(128, false);
        out.writeObject("This is a test", String.class);
    }


    @After
    public void tearDown() throws Exception {
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.