Igor, good point about "pluggable" collections, and Java has Collector
interface for streams.
Instead of replacing Maps with something, we can add overloads for advanced
usage:
putAll(Iterable)
R getAll(Collector)
On Fri, Sep 10, 2021 at 3:07 PM Igor Sapego wrote:
> I actually agree with
I actually agree with Pavel, at least at putAll() part. We require a Map
from user
when we do not really need a Map in this method. What we really need here is
an iterable collection of pairs. Can not see why user can not pass for
example an
array here.
Now, when we talk about getAll() method
Val, Alexei - thanks for your replies.
Let's keep the Map approach then.
Regarding tuple equality - there is another thread [1], please have a look.
https://lists.apache.org/thread.html/r9ed68cd515bffab6df821bbeccb8e44d0e5536000e5e7dd05bd87017%40%3Cdev.ignite.apache.org%3E
On Thu, Sep 9, 2021
How do we handle the "equality" part in 2.x? The same problem exists there
as well, but we still somehow return a Map.
Generally, I like Pavel's ideas, but there are a couple of issues with
them. Firstly, Java developers are really used to maps in this context.
Introducing something else might be
Pavel,
I think the current API looks more natural compared to your proposal.
-1 from my side, see comments below.
чт, 9 сент. 2021 г. в 15:38, Pavel Tupitsyn :
> Igniters,
>
> I propose to replace Map with List in getAll and invokeAll, and
> Iterable in putAll APIs of Ignite 3.x KeyValueView.
Igniters,
I propose to replace Map with List in getAll and invokeAll, and
Iterable in putAll APIs of Ignite 3.x KeyValueView.
1. Performance
putAll simply iterates over the map, we can easily accept Iterable instead.
Iterable can be implemented over anything, it can lazily read data from a
file