<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 25 Sep 2012, at 16:39, Sanne Grinovero &lt;<a href="mailto:sanne@infinispan.org">sanne@infinispan.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On 25 September 2012 15:53, Manik Surtani &lt;<a href="mailto:manik@jboss.org">manik@jboss.org</a>&gt; wrote:<br><blockquote type="cite"><br>On 25 Sep 2012, at 15:00, Sanne Grinovero &lt;<a href="mailto:sanne@infinispan.org">sanne@infinispan.org</a>&gt; wrote:<br><br>On 25 September 2012 12:11, Marko Lukša &lt;<a href="mailto:marko.luksa@gmail.com">marko.luksa@gmail.com</a>&gt; wrote:<br><br>On 25.9.2012 11:51, Sanne Grinovero wrote:<br><br>Any comments / other ideas?<br><br>Marko<br><br>That's a lot of changes needed. One would say we could deprecate all<br>methods and rewrite the new ones, but wouldn't it be better to<br>deprecate the interface and introduce a brand new one?<br>What about "ResultsIterator" ? after all, we're not iterating on queries..<br><br>I agree. The only thing that bothers me is that CacheQuery would then<br>need new methods called (lazy)resultIterator() (instead of iterator(),<br>which already exists).<br><br>Right. though I like "resultIterator()" more so we're having luck in<br>this case ;)<br><br>Any better suggestion for names? Anyone thinks it's worth to remove<br>the old ones without a deprecation step to reuse the old names?<br><br>One thing to keep in mind is that CacheQuery extends Iterable, therefore<br>a lot of users will actually implicitly invoke the iterator() method.<br>This pretty much means we should not introduce resultIterator().<br><br><br>Looks like we have to break backwards compatibility. From the look of<br>how this API was, I guess not many users dealt with it before you, so<br>I'm fine with that, I don't see how else we can fix this API.<br><br>While at it, it would be nice to see if we can change the signature<br>from "extends Iterable&lt;Object&gt;" to return an iterator on the types<br>compatible with the values of the cache, since the Cache supports<br>proper generics.<br><br>To deal safely with Iterable, I think it would be better to default to<br>lazy loading mode and to provide an overloaded method which allows to<br>specify a loading mode.<br><br>Anyone having a better idea which allows to not break backwards<br>compatibility?<br><br><br>Not really - I think compatibility will break, sadly. &nbsp;:/<br><br>One option to maintain compatibility is to keep the existing QueryIterator<br>and mark it as deprecated, and write a new iterator, maybe call it a<br>ResultIterator (which is more accurate anyway!).<br></blockquote><br>Your screen is too small ;-)<br></blockquote><div><br></div><div>Ah, could be the way Apple Mail collapses threads.</div><br><blockquote type="cite">That was suggested above ^^ but isn't possible as<br>a) we can't change the method name as it would break the fact<br>CacheQuery implements Iterable<br></blockquote><div><br></div><div>Maybe move the change one step higher: deprecate CacheQuery and replace that interface with (suggestions?).</div><br><blockquote type="cite">b) we can't change the return type of the existing method name<br></blockquote><div><br></div><div><br></div><br><blockquote type="cite"><br><blockquote type="cite"><br>--<br>Manik Surtani<br><a href="mailto:manik@jboss.org">manik@jboss.org</a><br>twitter.com/maniksurtani<br><br>Platform Architect, JBoss Data Grid<br>http://red.ht/data-grid<br><br><br>_______________________________________________<br>infinispan-dev mailing list<br>infinispan-dev@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/infinispan-dev<br></blockquote><br>_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/infinispan-dev</blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div><a href="http://twitter.com/maniksurtani">twitter.com/maniksurtani</a></div><div><br></div><div><div>Platform Architect, JBoss Data Grid</div><div><a href="http://red.ht/data-grid">http://red.ht/data-grid</a></div></div></div></span></div></span></div></span>
</div>
<br></body></html>