<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><font face="Arial" size="2">Hi Galder,</font></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: Arial; background-color: transparent; font-style: normal;"><font face="Arial" size="2"><br></font></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: Arial; background-color: transparent; font-style: normal;"><font face="Arial" size="2">thank you for your response. I can serialize the parameters that I passed in the constructor upon first start, but they remain the same upon a failover and recreation of the Callable, so I can not get any new info based on the failover. As I mentioned in my example (though maybe not very smart), how can I say to my Callable that it does not start for the first time but rather it was restarted. Or any other data that depends on the specific conditions of the
 failover (e.g. Callable needs to know a new ip or port that was determined in the FailoverPolicy based on the available targets...).</font></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: Arial; background-color: transparent; font-style: normal;"><font face="Arial" size="2"><br></font></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: Arial; background-color: transparent; font-style: normal;"><font face="Arial" size="2">Thanks,</font></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: Arial; background-color: transparent; font-style: normal;"><font face="Arial" size="2">Strahinja Lazetic</font></div><div style="font-family: Arial; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-family: Arial; font-size: 13px;"><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div>  <div
 style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Galder Zamarreņo &lt;galder@redhat.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Strahinja Lazetic &lt;lazetics@yahoo.com&gt;; infinispan -Dev List &lt;infinispan-dev@lists.jboss.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, May 28, 2013 10:58 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [infinispan-dev] Infinispan DEF - Custom parameters upon a failover<br> </font> </div> <div class="y_msg_container"><br>Hi Strahinja,<br><br>Glad to hear that you're using Infinispan in your master thesis :)<br><br>I have some reservations about adding these methods.<br><br>You can create a custom distributed callable, so
 why not pass in this info on construction of the callable, and make sure it's serialized so these parameters are available when these classes are sent to other nodes?<br><br>Cheers,<br><br>On May 27, 2013, at 6:51 PM, Strahinja Lazetic &lt;<a ymailto="mailto:lazetics@yahoo.com" href="mailto:lazetics@yahoo.com">lazetics@yahoo.com</a>&gt; wrote:<br><br>&gt; Hi, <br>&gt; <br>&gt; I am currently using Infinispan Distributed Execution Framework for my Master thesis project and I am wondering if it is possible that a DistributedCallable receives some custom parameters from the framework upon a failover, besides Cache instance and Set of keys passed in the setEnvironment method. As a simplified example, a DistributedCallable wants to know whether it was restarted or freshly started. If this is not possible, does it make sense to add a new method to the DistributedTaskFailoverPolicy which will return a user supplied parameters Map and then read it from the
 setEnvironment method in the DistributedCallable? Here are the signatures of the methods I was thinking off:<br>&gt; <br>&gt; In the DistributedTaskFailoverPolicy class:<br>&gt; <br>&gt; Map&lt;Object, Object&gt; getEnvironmentParameters()<br>&gt; <br>&gt; In the DistributedCallable class:<br>&gt; <br>&gt; setEnvironment(Cache&lt;K, V&gt; cache, Set&lt;K&gt; inputKeys, Map&lt;Object, Object&gt; params)<br>&gt; <br>&gt; I was free to try to implement this and did not take to much time, so now I am wondering if there was already a way to do something like this in the Infinispan DEF.<br>&gt; <br>&gt; Thank you in advance for your comments and suggestions.<br>&gt; Strahinja Lazetic<br>&gt; _______________________________________________<br>&gt; infinispan-dev mailing list<br>&gt; <a ymailto="mailto:infinispan-dev@lists.jboss.org" href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>&gt; <a
 href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br><br><br>--<br>Galder Zamarreņo<br><a ymailto="mailto:galder@redhat.com" href="mailto:galder@redhat.com">galder@redhat.com</a><br>twitter.com/galderz<br><br>Project Lead, Escalante<br><a href="http://escalante.io/" target="_blank">http://escalante.io</a><br><br>Engineer, Infinispan<br><a href="http://infinispan.org/" target="_blank">http://infinispan.org</a><br><br><br></div> </div> </div>  </div></body></html>