<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>


        
        
        
        <style type="text/css">
        <!--
                @page { margin: 0.79in }
                P { margin-bottom: 0.08in }
        -->
        </style>


</div><div style="margin-bottom: 0in">Hi, <br></div><div style="margin-bottom: 0in; color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div>
<div style="margin-bottom: 0in">
</div>
<div style="margin-bottom: 0in">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:</div><div style="margin-bottom: 0in"><br>
</div>
<div style="margin-bottom: 0in">
</div>
<div style="margin-bottom: 0in">In the DistributedTaskFailoverPolicy
class:</div><div style="margin-bottom: 0in"><br></div>
<div style="margin-bottom: 0in">
</div>
<div style="margin-bottom: 0in">Map&lt;Object, Object&gt;
getEnvironmentParameters()
</div>
<div style="margin-bottom: 0in">
</div>
<div style="margin-bottom: 0in">
</div>
<div style="margin-bottom: 0in"><br></div><div style="margin-bottom: 0in; color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">In the DistributedCallable
 class:</div><div style="margin-bottom: 0in; color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div>
<div style="margin-bottom: 0in">
</div>
<div style="margin-bottom: 0in">setEnvironment(Cache&lt;K, V&gt; cache,
Set&lt;K&gt; inputKeys, Map&lt;Object, Object&gt; params)
</div>
<div style="margin-bottom: 0in">
</div>
<div style="margin-bottom: 0in"><br></div><div style="margin-bottom: 0in; color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">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.
</div>
<div style="margin-bottom: 0in">
</div>
<div style="margin-bottom: 0in"><br></div><div style="margin-bottom: 0in; color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Thank you in advance for your comments
and suggestions.
</div>
<div style="margin-bottom: 0in">Strahinja Lazetic</div>

</div></body></html>