【问题标题】:How to serialize an object to Geode如何将对象序列化为 Geode
【发布时间】:2018-11-01 17:46:01
【问题描述】:

我对 apache geode 还是很陌生...

我目前使用fromData(IPdxReader)toData(IPdxWriter) 将对象放入geode 区域,并逐行写入/读取。

我需要添加一个数百行长的新对象。

如何在不逐行序列化的情况下序列化整个对象?

【问题讨论】:

    标签: apache serialization geode


    【解决方案1】:

    在:

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

    选项一:

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

    选项 2:

    AutoBooker qb = (dynamic)ev.NewValue;
    

    【讨论】:

    • 还有另一种方法可以序列化here
    猜你喜欢
    • 2011-12-03
    • 2019-03-04
    • 2018-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-11
    • 2017-08-20
    相关资源
    最近更新 更多