Package com.netflix.zeno.fastblob.record.schema

Examples of com.netflix.zeno.fastblob.record.schema.FastBlobSchema



    @Test
    public void remapsListOrdinals() {
        NFTypeSerializer<List<TypeA>> listSerializer = stateEngine.getSerializer(LIST_SERIALIZER.getName());
        FastBlobSchema listSchema = listSerializer.getFastBlobSchema();
        FastBlobSerializationRecord rec = new FastBlobSerializationRecord(listSchema);
        rec.setImageMembershipsFlags(FastBlobImageUtils.ONE_TRUE);

        List<TypeA> list = new ArrayList<TypeA>();
        list.add(new TypeA(3, 3));
View Full Code Here


        Assert.assertEquals(new TypeA(2, 2), typeAs.get(3));
    }

    @Test
    public void remapsListFieldOrdinals() {
        FastBlobSchema schema = new FastBlobSchema("Test", 2);
        schema.addField("intField", new FieldDefinition(FieldType.INT));
        schema.addField("listField", new TypedFieldDefinition(FieldType.LIST, "ElementType"));

        Random rand = new Random();

        for(int i=0;i<1000;i++) {
View Full Code Here

        }
    }

    @Test
    public void remapsMapFieldOrdinals() {
        FastBlobSchema schema = new FastBlobSchema("Test", 2);
        schema.addField("intField", new FieldDefinition(FieldType.INT));
        schema.addField("mapField", new MapFieldDefinition("ElementType", "ElementType"));

        Random rand = new Random();

        for(int i=0;i<1000;i++) {
View Full Code Here

        }
    }

    @Test
    public void remapsSetFieldOrdinals() {
        FastBlobSchema schema = new FastBlobSchema("Test", 2);
        schema.addField("intField", new FieldDefinition(FieldType.INT));
        schema.addField("setField", new TypedFieldDefinition(FieldType.SET, "ElementType"));

        Random rand = new Random();

        for(int i=0;i<1000;i++) {
View Full Code Here

    }

    @Test
    public void remapsSetOrdinals() {
        NFTypeSerializer<Set<TypeA>> setSerializer = stateEngine.getSerializer(SET_SERIALIZER.getName());
        FastBlobSchema setSchema = setSerializer.getFastBlobSchema();
        FastBlobSerializationRecord rec = new FastBlobSerializationRecord(setSchema);
        rec.setImageMembershipsFlags(FastBlobImageUtils.ONE_TRUE);

        Set<TypeA> set = new HashSet<TypeA>();
        set.add(new TypeA(1, 1));
View Full Code Here

    }

    @Test
    public void remapsMapOrdinals() {
        NFTypeSerializer<Map<TypeA, TypeA>> mapSerializer = stateEngine.getSerializer(MAP_SERIALIZER.getName());
        FastBlobSchema mapSchema = mapSerializer.getFastBlobSchema();
        FastBlobSerializationRecord rec = new FastBlobSerializationRecord(mapSchema);
        rec.setImageMembershipsFlags(FastBlobImageUtils.ONE_TRUE);

        Map<TypeA, TypeA> map = new HashMap<TypeA, TypeA>();
        map.put(new TypeA(1, 1), new TypeA(4, 4));
View Full Code Here

    }

    @Test
    public void remapsObjectOrdinals() {
        NFTypeSerializer<TypeD> serializer = stateEngine.getSerializer("TypeD");
        FastBlobSchema typeDSchema = serializer.getFastBlobSchema();
        FastBlobSerializationRecord rec = new FastBlobSerializationRecord(typeDSchema);
        rec.setImageMembershipsFlags(FastBlobImageUtils.ONE_TRUE);

        TypeD typeD = new TypeD(100, new TypeA(3, 3));
View Full Code Here

    private void readSnapshotTypes(StreamingByteData byteData, DataInputStream dis, int numTypes) throws IOException {
        for(int i=0;i<numTypes;i++) {
            /// type flags byte -- reserved for later use
            dis.read();

            FastBlobSchema schema = FastBlobSchema.readFrom(dis);

            readTypeStateObjects(byteData, schema);
        }
    }
View Full Code Here

TOP

Related Classes of com.netflix.zeno.fastblob.record.schema.FastBlobSchema

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.