<div dir="ltr"><div><div>I agree, eventually we should have separate getAndXxx methods like JSR-107. The Jokre is cool, but running with an instrumentation agent is never going to be ok for everyone.<br><br></div>I was thinking about this in the context of AtomicHashMap. It uses withFlags(SKIP_REMOTE_LOOKUP, DELTA_WRITE, FORCE_WRITE_LOCK) for write operations, but it still has to keep a reference to the original cache for read operations. Of course, after more digging, I don't think the SKIP_REMOTE_LOOKUP flag is that useful for writes either (since we already have a copy of the map in the invocation context at that point). But it seemed like an interesting idea in the general case.<br>
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 3, 2013 at 1:15 PM, Sanne Grinovero <span dir="ltr"><<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">ha got it, good point. <br>
but I'm not persuaded: doesn't it get even more confusing for users? Imho it would be more helpful to throw an exception. </p>
<p dir="ltr">these flags are confusing and ideally we should evolve the API, as the JSR did, or push on The Jokre. </p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On 3 Jun 2013 11:08, "Dan Berindei" <<a href="mailto:dan.berindei@gmail.com" target="_blank">dan.berindei@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Sanne, I'm only talking about get operations. I was thinking that if you call cache.get(key), you want the value of that key, regardless of where it is stored...<br><br>Obviously, write operations would still behave as they do now.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 3, 2013 at 12:59 PM, Sanne Grinovero <span dir="ltr"><<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Dan,<br>
I'm not sure I understood this. How can I prevent it to return values<br>
if you have the flag ignored? Note that in some cases it makes a huge<br>
performance difference.<br>
<br>
Sanne<br>
<div><div><br>
On 3 June 2013 10:52, Dan Berindei <<a href="mailto:dan.berindei@gmail.com" target="_blank">dan.berindei@gmail.com</a>> wrote:<br>
> Hi guys<br>
><br>
> CacheLoaderInterceptor and DistributionInterceptor both honour the<br>
> IGNORE_RETURN_VALUES flag for get commands, but I think it would be more<br>
> useful if they ignored it - just like they ignore it for conditional<br>
> commands.<br>
><br>
> That would make it possible for users to only keep a reference to a<br>
> cache.getAdvancedCache().withFlags(IGNORE_RETURN_VALUES) and use it for both<br>
> read and write operations.<br>
><br>
> What do you think?<br>
><br>
> Cheers<br>
> Dan<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> infinispan-dev mailing list<br>
> <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</blockquote></div><br></div>
<br>_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br></blockquote></div>
</div></div><br>_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br></blockquote></div><br></div>