Examples of ExampleSerializerFactory


Examples of com.netflix.zeno.examples.serializers.ExampleSerializerFactory

        /// get a diff "instruction".  This describes how to match up objects
        /// between two FastBlobStateEngines.
        DiffInstruction instruction = getDiffInstruction();
       
        DiffOperation diffOperation = new DiffOperation(new ExampleSerializerFactory(), instruction);

        /// perform the diff report
        DiffReport diffReport = diffOperation.performDiff(fromStateEngine, toStateEngine);

        /// this score can be used as a quick overview to see the magnitude of the differences between the data states
View Full Code Here

Examples of com.netflix.zeno.examples.serializers.ExampleSerializerFactory

        }

    }

    private void displayObjectDifferences(A from, A to) {
        DiffHtmlGenerator generator = new DiffHtmlGenerator(new ExampleSerializerFactory());

        String html = generator.generateDiff("A", from, to);

        displayTheHtml(html);
    }
View Full Code Here

Examples of com.netflix.zeno.examples.serializers.ExampleSerializerFactory

    /*
     * Round trip the objects in a FastBlobStateEngine, so they appear in the type deserialization state.
     */
    private FastBlobStateEngine getDeserializedStateEngineWithObjects(A... objects) throws IOException {
        FastBlobStateEngine stateEngine = new FastBlobStateEngine(new ExampleSerializerFactory());

        for(A object : objects) {
            stateEngine.add("A", object);
        }

View Full Code Here

Examples of com.netflix.zeno.examples.serializers.ExampleSerializerFactory

    @Test
    public void basicSerializationCycle() {
        /// First we create a state engine, we need to tell it about our data model by
        /// passing it a serializer factory which creates our top-level serializers.
        stateEngine = new FastBlobStateEngine(new ExampleSerializerFactory());

        /// For this example, we're just storing the serialized data in memory.
        byte snapshot[] = createSnapshot();
        byte delta[] = createDelta();
View Full Code Here

Examples of com.netflix.zeno.examples.serializers.ExampleSerializerFactory

    }

    public FastBlobStateEngine deserializeLatestData(byte snapshot[], byte delta[]) {
        /// now we are on the client.  We need to create a state engine, and again
        /// tell it about our data model.
        FastBlobStateEngine stateEngine = new FastBlobStateEngine(new ExampleSerializerFactory());

        /// we need to create a FastBlobReader, which is responsible for reading
        /// serialized blobs.
        FastBlobReader reader = new FastBlobReader(stateEngine);
View Full Code Here

Examples of com.netflix.zeno.examples.serializers.ExampleSerializerFactory

    public void basicSerializationCycle() {

        /// First we create a state engine, we need to tell it about our data model by
        /// passing it a serializer factory which creates our top-level serializers.
        /// Here, we're also telling it that we will be creating two separate images.
        stateEngine = new FastBlobStateEngine(new ExampleSerializerFactory(), 2);

        /// For this example, we're just storing the serialized data in memory.
        createSnapshot();
        createDelta();
View Full Code Here

Examples of com.netflix.zeno.examples.serializers.ExampleSerializerFactory

    }

    public FastBlobStateEngine deserializeLatestData(byte snapshot[], byte delta[]) {
        /// now we are on the client.  We need to create a state engine, and again
        /// tell it about our data model.
        FastBlobStateEngine stateEngine = new FastBlobStateEngine(new ExampleSerializerFactory());

        /// we need to create a FastBlobReader, which is responsible for reading
        /// serialized blobs.
        FastBlobReader reader = new FastBlobReader(stateEngine);
View Full Code Here

Examples of com.netflix.zeno.examples.serializers.ExampleSerializerFactory

    @Test
    @SuppressWarnings("unused")
    public void serializeJson() throws IOException {

        JsonSerializationFramework jsonFramework = new JsonSerializationFramework(new ExampleSerializerFactory());

        String json = jsonFramework.serializeAsJson("A", getExampleA());

        System.out.println("JSON FOR A:");
        System.out.println(json);
View Full Code Here

Examples of com.netflix.zeno.examples.serializers.ExampleSerializerFactory

*/
public class IntSumFrameworkExample {

    @Test
    public void determineSumOfValues() {
        IntSumFramework sumFramework = new IntSumFramework(new ExampleSerializerFactory());

        B b1 = new B(12, "Twelve!")/// sum = 12
        B b2 = new B(25, "Plus Twenty Five!")/// sum = 37
        B b3 = new B(10, "Plus Ten!")/// sum = 47

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.