Ok, I found that I can use binaryObject.deserialize() to get back the POJO. So, the only remaining question is:
When a cache does not have 'withKeepBinary' set, why ContinuousQuery can handle class versioning fine whereas ScanQuery cannot? Is that an expected behaviour? Thanks, Calvin From: Calvin KL Wong, CLSA [mailto:calvin.kl.w...@clsa.com] Sent: Monday, July 09, 2018 11:50 AM To: user@ignite.apache.org Subject: OptimizedMarshaller instead of BinaryMarshaller is used for ScanQuery Hi, I have a cache of <Integer, POJO>. I found that when I use a ScanQuery on that cache, result will be deserialized using OptimizedMarshaller; Ignite sends 'ordered' message using GridCacheQueryResonseEntry. Whereas if I use ContinousQuery, result will be deserialized using BinaryMarshaller. My problem is that ScanQuery won't be able to handle class versioning. Question: 1. I am using "keepBinary" and BinaryObject on the cache to avoid versioning related problem. Is that the recommended approach? Because it seems strange that "ScanQuery" and "ContinousQuery" have different behaviour. 2. What is the recommended way to convert BinaryObject into POJO? Ignite website talks about getting field of each object using 'BinaryObject.field()'. However, Ignite uses 'BinaryReaderExImpl implements BinaryReader' internally. How can I get a reference to that object? Thanks, Calvin Calvin KL Wong Sr. Lead Engineer, Execution Services D +852 2600 7983 | M +852 9267 9471 | T +852 2600 8888 5/F, One Island East, 18 Westlands Road, Island East, Hong Kong [:1. Social Media Icons:CLSA_Social Media Icons_linkedin.png]<https://hk.linkedin.com/company/clsa>[:1. Social Media Icons:CLSA_Social Media Icons_twitter.png]<https://twitter.com/clsainsights?lang=en>[:1. Social Media Icons:CLSA_Social Media Icons_youtube.png]<https://www.youtube.com/channel/UC0qWp_lLnOcRYmBlCNQgZKA>[:1. Social Media Icons:CLSA_Social Media Icons_facebook.png]<https://www.facebook.com/clsacommunity/> clsa.com<https://www.clsa.com/> Insights. Liquidity. Capital. [CLSA_RGB]<https://www.clsa.com/member> A CITIC Securities Company The content of this communication is intended for the recipient and is subject to CLSA Legal and Regulatory Notices. These can be viewed at https://www.clsa.com/disclaimer.html or sent to you upon request. Please consider before printing. CLSA is ISO14001 certified and committed to reducing its impact on the environment. The content of this communication is intended for the recipient and is subject to CLSA Legal and Regulatory Notices. These can be viewed at https://www.clsa.com/disclaimer.html or sent to you upon request. Please consider before printing. CLSA is ISO14001 certified and committed to reducing its impact on the environment.