Search code examples
apacheserializationgeode

How to serialize an object to Geode


I'm still quite new to apache geode...

I currently put objects in geode region using fromData(IPdxReader) and toData(IPdxWriter) and I write/read line by line.

I need to add a new object, that is hundreds of lines long.

How to serialize a whole object without serializing it line by line?


Solution

  • At:

    private void HandleCreateAndUpdate(EntryEvent<TKey, TVal> ev)
    

    Option 1:

    IPdxInstance pdx = (IPdxInstance)ev.NewValue;
    AutoBooker qb = (AutoBooker)pdx.GetObject();
    

    Option 2:

    AutoBooker qb = (dynamic)ev.NewValue;