[ 
https://issues.apache.org/jira/browse/IGNITE-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14943603#comment-14943603
 ] 

Pavel  Tupitsyn commented on IGNITE-1562:
-----------------------------------------

1) Looks like there is a bigger issue.
For example, in current code base, WriteCollection() simply calls Write() and 
relies on handler resolution, which works like this:
int[] -> WriteIntArray
object[] -> WriteArray
List<int> -> WriteCollection

Now, in ReadCollection, we don't expect an Array or IntArray, so that would not 
work. Write and Read are not symmetrical.
In this pull request I fixed this issue by changing WriteCollection to call 
PU.WriteCollection directly, so no matter what we got, we write it as a 
collection (which will be less efficient for int array, for example; but we 
skip the handle lookup, on the other hand).

Another way to fix this is on reader side: call ReadObject inside of 
ReadCollection. This way we have more handler lookups, but write/read in the 
most efficient way.
* I think this is the right way
* We can remove such methods (which simply call ReadObject/WriteObject) from 
reader/writer API altogether, making it cleaner.

> .Net: Remove "Generic" word from "WriteGenericCollection" and 
> "WriteGenericDictionary".
> ---------------------------------------------------------------------------------------
>
>                 Key: IGNITE-1562
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1562
>             Project: Ignite
>          Issue Type: Task
>          Components: interop
>    Affects Versions: ignite-1.4
>            Reporter: Vladimir Ozerov
>            Assignee: Pavel  Tupitsyn
>            Priority: Critical
>             Fix For: ignite-1.5
>
>
> Normally users will use these methods instead of non-generic. Lets make their 
> names as simple as possible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to