Package com.netflix.zeno.fastblob.record

Examples of com.netflix.zeno.fastblob.record.FastBlobSerializationRecord


    @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));

        serializer.serialize(typeD, rec);
View Full Code Here


                    return existingEntry.getOrdinal();
                }
            }
        }

        FastBlobSerializationRecord rec = record();

        rec.setImageMembershipsFlags(imageMembershipsFlags);

        serializer.serialize(data, rec);

        ByteDataBuffer scratch = scratch();
        rec.writeDataTo(scratch);

        int ordinal = addData(scratch, imageMembershipsFlags);

        scratch.reset();
        rec.reset();

        if (objectOrdinalMap != null) {
            objectOrdinalMap.put(data, ordinal, imageMembershipsFlags);
        }
        return ordinal;
View Full Code Here

    /**
     * Get or create a FastBlobSerializationRecord.  Each thread will create and reuse its own record,
     * so these are referenced via a ThreadLocal variable.
     */
    private FastBlobSerializationRecord record() {
        FastBlobSerializationRecord rec = serializationRecord.get();
        if(rec == null) {
            rec = new FastBlobSerializationRecord(typeSchema);
            serializationRecord.set(rec);
        }
        return rec;
    }
View Full Code Here

TOP

Related Classes of com.netflix.zeno.fastblob.record.FastBlobSerializationRecord

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.