<html><body bgcolor="#FFFFFF"><div>Manik and I agreed on API we need in DistributedCallable:</div><div><br></div><span class="Apple-style-span" style="font-size: medium; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><span>Map&lt;String, Set&lt;K&gt;&gt; getRelatedKeys();&nbsp;</span><br></span><div>void mappedToNode(CacheManager cm);</div><div><br></div><div>I will update the document accordingly.&nbsp;</div><div><br></div><div><br>On 2010-08-02, at 10:36, Manik Surtani &lt;<a href="mailto:manik@jboss.org">manik@jboss.org</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div><span>Simple: the environment first calls getRelatedKeys(), and the impl passes back the keys it would need. &nbsp;The env then maps the task to a node, based on locating the keys, serializes and pushes the callable to the assigned node. &nbsp;The assigned node then calls mappedToNode() so that the impl has a ref to the cache in the local VM. &nbsp;After that, call() is invoked.</span><br><span></span><br><span>On 2 Aug 2010, at 15:31, <a href="mailto:vblagoje@redhat.com">vblagoje@redhat.com</a> wrote:</span><br><span></span><br><blockquote type="cite"><span>I would love to make it this simple but how does execution environment know which cache to pass in mappedToNode? Task Implementors somehow have to inform the environment about the cache they need to retrieve data.... &nbsp;&nbsp;</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>I still don't see why you need to pass it the cache manager. &nbsp;Perhaps:</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>DistributedCallable {</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><span class="Apple-tab-span" style="white-space:pre">        </span>Set&lt;K&gt; getRelatedKeys();</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><span class="Apple-tab-span" style="white-space:pre">        </span>void mappedToNode(Cache&lt;K, V&gt; cache);</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>}</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>--</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Manik Surtani</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="mailto:manik@jboss.org">manik@jboss.org</a></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Lead, Infinispan</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Lead, JBoss Cache</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="http://www.infinispan.org">http://www.infinispan.org</a></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="http://www.jbosscache.org">http://www.jbosscache.org</a></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>_______________________________________________</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>infinispan-dev mailing list</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></span><br></blockquote></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>_______________________________________________</span><br></blockquote><blockquote type="cite"><span>infinispan-dev mailing list</span><br></blockquote><blockquote type="cite"><span><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a></span><br></blockquote><blockquote type="cite"><span><a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></span><br></blockquote><span></span><br><span>--</span><br><span>Manik Surtani</span><br><span><a href="mailto:manik@jboss.org">manik@jboss.org</a></span><br><span>Lead, Infinispan</span><br><span>Lead, JBoss Cache</span><br><span><a href="http://www.infinispan.org">http://www.infinispan.org</a></span><br><span><a href="http://www.jbosscache.org">http://www.jbosscache.org</a></span><br><span></span><br><span></span><br><span></span><br><span></span><br><span></span><br><span>_______________________________________________</span><br><span>infinispan-dev mailing list</span><br><span><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></span><br></div></blockquote></body></html>