If a value can be serialized to BinaryObject then it will be serialized. This 
piece of the code works perfectly well as far as I understand.

I would agree with Vladimir that the binary protocol needs to be revisited or 
the way we serialize/deserialize arrays. Presently, when an array of any type 
is serialized with BinaryWriterExImpl.doWriteObjectArray we write that this is 
the array

out.unsafeWriteByte(GridBinaryMarshaller.OBJ_ARR);
and right below we store the actual type

out.unsafeWriteInt(desc.typeId())

In my understanding, in the layout of binary data we have all the data needed 
to deserialize an array back properly.

Vovan, is there anything we are missing?

—
Denis

> On Feb 3, 2017, at 7:09 AM, ALEKSEY KUZNETSOV <alkuznetsov...@gmail.com> 
> wrote:
> 
> There is javax.cache.integration.CacheWriter#write() method which writes
> key and value, wrapped in CacheEntryImpl.
> In case of class arrays, values must be in form of BinaryObject or
> serialized class arrays ?
> 
> чт, 2 февр. 2017 г. в 19:57, Denis Magda <dma...@apache.org>:
> 
>> Yes, this is exactly the reason why this ticket is created. Presently,
>> binary marshaller ignores custom type for arrays. We need to find a way how
>> to handle this.
>> 
>> —
>> Denis
>> 
>>> On Feb 2, 2017, at 6:23 AM, ALEKSEY KUZNETSOV <alkuznetsov...@gmail.com>
>> wrote:
>>> 
>>> I founded that cache.get(i) actually returns an array, containing
>>> TestObject. But somehow the type of returned value is Object[] not
>>> TestObject[]
>>> 
>>> ср, 1 февр. 2017 г. в 22:26, Denis Magda <dma...@apache.org>:
>>> 
>>>> Excellent, please share the way you want to fix the issue with the
>>>> community. You might get a valuable feedback before getting down to
>> coding.
>>>> 
>>>> —
>>>> Denis
>>>> 
>>>>> On Feb 1, 2017, at 1:18 AM, ALEKSEY KUZNETSOV <
>> alkuznetsov...@gmail.com>
>>>> wrote:
>>>>> 
>>>>> will take https://issues.apache.org/jira/browse/IGNITE-3244
>>>>> --
>>>>> 
>>>>> *Best Regards,*
>>>>> 
>>>>> *Kuznetsov Aleksey*
>>>> 
>>>> --
>>> 
>>> *Best Regards,*
>>> 
>>> *Kuznetsov Aleksey*
>> 
>> --
> 
> *Best Regards,*
> 
> *Kuznetsov Aleksey*

Reply via email to