On 10/07/2015 00:10, Galder Zamarreno wrote:
> After the discussion we started in Galder's PR's comments
[1], I
> started thinking that we should really have a stream() method directly
> in the Cache/AdvancedCache interface.
^ I don't think that's a good idea. A stream of what? keys only? values and
keys?
In the end you'd end up with 2/3 stream methods....
I agree with Galder here: streams only apply to Collections and not to
Maps (like in the JDK). It has already proven difficult mimicking the
Map interface in a distributed environment: let's not aggravate this.
entrySet().stream(), keySet().stream() are unambiguous and respect the
original interfaces.
Tristan
--
Tristan Tarrant
Infinispan Lead
JBoss, a division of Red Hat