Package com.boundary.tuple

Examples of com.boundary.tuple.FastTuple


                addField("b", Long.TYPE).
                addField("c", Long.TYPE).
                heapMemory().
                build();

        FastTuple tuple = schema.createTuple();
        tuple.setLong(1, 100L);
        tuple.setLong(2, 600L);
        tuple.setLong(3, 1000L);

        TupleExpressionGenerator.LongTupleExpression eval = TupleExpressionGenerator.builder().expression("tuple.a + tuple.b + tuple.c").schema(schema).returnLong();
        assertEquals(1700L, eval.evaluate(tuple));
    }
View Full Code Here


                addField("b", Long.TYPE).
                addField("c", Long.TYPE).
                heapMemory().
                build();

        FastTuple tuple = schema.createTuple();
        TupleExpressionGenerator.TupleExpression eval = TupleExpressionGenerator.builder().expression("tuple.a(100), tuple.b(200), tuple.c(300)").schema(schema).returnVoid();
        eval.evaluate(tuple);
        assertEquals(100L, tuple.getLong(1));
        assertEquals(200, tuple.getLong(2));
        assertEquals(300, tuple.getLong(3));
    }
View Full Code Here

                addField("e", Byte.TYPE).
                addField("f", Float.TYPE).
                addField("g", Double.TYPE).
                heapMemory().
                build();
        FastTuple tuple = schema.createTuple();
        assertGetterAndSetterRoundTrip(tuple, schema.tupleClass(), "a", Long.TYPE, 100L);
        assertGetterAndSetterRoundTrip(tuple, schema.tupleClass(), "b", Integer.TYPE, 40);
        assertGetterAndSetterRoundTrip(tuple, schema.tupleClass(), "c", Short.TYPE, (short)10);
        assertGetterAndSetterRoundTrip(tuple, schema.tupleClass(), "d", Character.TYPE, 'j');
        assertGetterAndSetterRoundTrip(tuple, schema.tupleClass(), "e", Byte.TYPE, (byte)255);
View Full Code Here

                addField("e", Byte.TYPE).
                addField("f", Float.TYPE).
                addField("g", Double.TYPE).
                heapMemory().
                build();
        FastTuple tuple = schema.createTuple();
        assertIndexedGetterAndSetterRoundTrip(tuple, 1, 100L);
        assertIndexedGetterAndSetterRoundTrip(tuple, 2, 40);
        assertIndexedGetterAndSetterRoundTrip(tuple, 3, (short)10);
        assertIndexedGetterAndSetterRoundTrip(tuple, 4, 'j');
        assertIndexedGetterAndSetterRoundTrip(tuple, 5, (byte)255);
View Full Code Here

                addField("e", Byte.TYPE).
                addField("f", Float.TYPE).
                addField("g", Double.TYPE).
                heapMemory().
                build();
        FastTuple tuple = schema.createTuple();
        assertIndexedTypedGetterAndSetterRoundTrip(tuple, 1, 100L);
        assertIndexedTypedGetterAndSetterRoundTrip(tuple, 2, 40);
        assertIndexedTypedGetterAndSetterRoundTrip(tuple, 3, (short)10);
        assertIndexedTypedGetterAndSetterRoundTrip(tuple, 4, 'j');
        assertIndexedTypedGetterAndSetterRoundTrip(tuple, 5, (byte)255);
View Full Code Here

        TupleSchema schema = TupleSchema.builder().
                addField("a", Long.TYPE).
                implementInterface(StaticBinding.class).
                heapMemory().
                build();
        FastTuple tuple = schema.createTuple();
        assertTrue(tuple instanceof StaticBinding);
    }
View Full Code Here

                addField("e", Byte.TYPE).
                addField("f", Float.TYPE).
                addField("g", Double.TYPE).
                directMemory().
                build();
        FastTuple tuple = schema.createTuple();
        assertGetterAndSetterRoundTrip(tuple, schema.tupleClass(), "a", Long.TYPE, 100L);
        assertGetterAndSetterRoundTrip(tuple, schema.tupleClass(), "b", Integer.TYPE, 40);
        assertGetterAndSetterRoundTrip(tuple, schema.tupleClass(), "c", Short.TYPE, (short)10);
        assertGetterAndSetterRoundTrip(tuple, schema.tupleClass(), "d", Character.TYPE, 'j');
        assertGetterAndSetterRoundTrip(tuple, schema.tupleClass(), "e", Byte.TYPE, (byte)255);
View Full Code Here

                addField("e", Byte.TYPE).
                addField("f", Float.TYPE).
                addField("g", Double.TYPE).
                directMemory().
                build();
        FastTuple tuple = schema.createTuple();
        assertIndexedGetterAndSetterRoundTrip(tuple, 1, 100L);
        assertIndexedGetterAndSetterRoundTrip(tuple, 2, 40);
        assertIndexedGetterAndSetterRoundTrip(tuple, 3, (short)10);
        assertIndexedGetterAndSetterRoundTrip(tuple, 4, 'j');
        assertIndexedGetterAndSetterRoundTrip(tuple, 5, (byte)255);
View Full Code Here

                addField("e", Byte.TYPE).
                addField("f", Float.TYPE).
                addField("g", Double.TYPE).
                directMemory().
                build();
        FastTuple tuple = schema.createTuple();
        assertIndexedTypedGetterAndSetterRoundTrip(tuple, 1, 100L);
        assertIndexedTypedGetterAndSetterRoundTrip(tuple, 2, 40);
        assertIndexedTypedGetterAndSetterRoundTrip(tuple, 3, (short) 10);
        assertIndexedTypedGetterAndSetterRoundTrip(tuple, 4, 'j');
        assertIndexedTypedGetterAndSetterRoundTrip(tuple, 5, (byte) 255);
View Full Code Here

        TupleSchema schema = TupleSchema.builder().
                addField("a", Long.TYPE).
                implementInterface(StaticBinding.class).
                directMemory().
                build();
        FastTuple tuple = schema.createTuple();
        assertTrue(tuple instanceof StaticBinding);
    }
View Full Code Here

TOP

Related Classes of com.boundary.tuple.FastTuple

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.