blob: ad1f0a61305fb8502843fb05b8abb6ea53c0cec6 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="canonical" href="https://ignite.apache.org/releases/1.9.0/dotnetdoc/class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_adapter.html" />
<META NAME="ROBOTS" CONTENT="NOINDEX">
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>Apache Ignite.NET: Apache.Ignite.Core.Compute.ComputeTaskAdapter&lt; TArg, TJobRes, TTaskRes &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61232409-1', 'auto');
ga('send', 'pageview');
</script></head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="ignite_logo.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">Apache Ignite.NET
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_adapter.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_adapter-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Apache.Ignite.Core.Compute.ComputeTaskAdapter&lt; TArg, TJobRes, TTaskRes &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>Convenience adapter for <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_task.html">IComputeTask&lt;TArg,TJobRes,TTaskRes&gt;</a> interface
<a href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_adapter.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for Apache.Ignite.Core.Compute.ComputeTaskAdapter&lt; TArg, TJobRes, TTaskRes &gt;:</div>
<div class="dyncontent">
<div class="center">
<img src="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_adapter.png" usemap="#Apache.Ignite.Core.Compute.ComputeTaskAdapter&lt; TArg, TJobRes, TTaskRes &gt;_map" alt=""/>
<map id="Apache.Ignite.Core.Compute.ComputeTaskAdapter&lt; TArg, TJobRes, TTaskRes &gt;_map" name="Apache.Ignite.Core.Compute.ComputeTaskAdapter&lt; TArg, TJobRes, TTaskRes &gt;_map">
<area href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_task.html" alt="Apache.Ignite.Core.Compute.IComputeTask&lt; TArg, TJobRes, TTaskRes &gt;" shape="rect" coords="0,0,496,24"/>
<area href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_split_adapter.html" title="This class defines simplified adapter for IComputeTask<A,T,R>. This adapter can be used when jobs can..." alt="Apache.Ignite.Core.Compute.ComputeTaskSplitAdapter&lt; TArg, TJobRes, TTaskRes &gt;" shape="rect" coords="0,112,496,136"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5e331eb752b9e734d745746c63034107"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespace_apache_1_1_ignite_1_1_core_1_1_compute.html#a630d59e56d9558cb537c357c2b2f3fdc">ComputeJobResultPolicy</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_adapter.html#a5e331eb752b9e734d745746c63034107">OnResult</a> (<a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_job_result.html">IComputeJobResult</a>&lt; TJobRes &gt; res, IList&lt; <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_job_result.html">IComputeJobResult</a>&lt; TJobRes &gt;&gt; rcvd)</td></tr>
<tr class="memdesc:a5e331eb752b9e734d745746c63034107"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default implementation which will wait for all jobs to complete before calling IComputeTask&lt;A,T,R&gt;.Reduce method. If remote job resulted in exception <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_job_result.html#ad2a1d34a14fffbb39d0bb82f93d8a09a" title="Gets exception produced by execution of remote job, or null if no exception was produced. ">IComputeJobResult&lt;T&gt;.Exception()</a> is not <code>null</code>), then ComputeJobResultPolicy.Failover policy will be returned if the exception is instance of ClusterTopologyException or <a class="el" href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_execution_rejected_exception.html" title="Indicates a situation when execution service provided by the user in configuration rejects execution...">ComputeExecutionRejectedException</a>, which means that remote node either failed or job execution was rejected before it got a chance to start. In all other cases the exception will be rethrown which will ultimately cause task to fail. <a href="#a5e331eb752b9e734d745746c63034107">More...</a><br /></td></tr>
<tr class="separator:a5e331eb752b9e734d745746c63034107"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c7672d5b88cbad4d716ec336286b6da"><td class="memItemLeft" align="right" valign="top">abstract IDictionary&lt; <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_job.html">IComputeJob</a>&lt; TJobRes &gt;, <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_cluster_1_1_i_cluster_node.html">IClusterNode</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_adapter.html#a7c7672d5b88cbad4d716ec336286b6da">Map</a> (IList&lt; <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_cluster_1_1_i_cluster_node.html">IClusterNode</a> &gt; subgrid, TArg arg)</td></tr>
<tr class="memdesc:a7c7672d5b88cbad4d716ec336286b6da"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method is called to map or split Ignite task into multiple Ignite jobs. This is the first method that gets called when task execution starts. <a href="#a7c7672d5b88cbad4d716ec336286b6da">More...</a><br /></td></tr>
<tr class="separator:a7c7672d5b88cbad4d716ec336286b6da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7627b08230ee50b86a73716d73749ce0"><td class="memItemLeft" align="right" valign="top">abstract TTaskRes&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_adapter.html#a7627b08230ee50b86a73716d73749ce0">Reduce</a> (IList&lt; <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_job_result.html">IComputeJobResult</a>&lt; TJobRes &gt;&gt; results)</td></tr>
<tr class="memdesc:a7627b08230ee50b86a73716d73749ce0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reduces (or aggregates) results received so far into one compound result to be returned to caller via task. <a href="#a7627b08230ee50b86a73716d73749ce0">More...</a><br /></td></tr>
<tr class="separator:a7627b08230ee50b86a73716d73749ce0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"></div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a7c7672d5b88cbad4d716ec336286b6da"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">abstract IDictionary&lt;<a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_job.html">IComputeJob</a>&lt;TJobRes&gt;, <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_cluster_1_1_i_cluster_node.html">IClusterNode</a>&gt; <a class="el" href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_adapter.html">Apache.Ignite.Core.Compute.ComputeTaskAdapter</a>&lt; TArg, TJobRes, TTaskRes &gt;.Map </td>
<td>(</td>
<td class="paramtype">IList&lt; <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_cluster_1_1_i_cluster_node.html">IClusterNode</a> &gt;&#160;</td>
<td class="paramname"><em>subgrid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TArg&#160;</td>
<td class="paramname"><em>arg</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">subgrid</td><td>Nodes available for this task execution. Note that order of nodes is guaranteed to be randomized by container. This ensures that every time you simply iterate through Ignite nodes, the order of nodes will be random which over time should result into all nodes being used equally.</td></tr>
<tr><td class="paramname">arg</td><td>Task execution argument. Can be <code>null</code>. This is the same argument as the one passed into <code>ICompute.Execute()</code> methods.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Map of Ignite jobs assigned to subgrid node. If <code>null</code> or empty map is returned, exception will be thrown. </dd></dl>
<p>Implemented in <a class="el" href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_split_adapter.html#af1d826dab8d67228f095bb5f3038b2e8">Apache.Ignite.Core.Compute.ComputeTaskSplitAdapter&lt; TArg, TJobRes, TTaskRes &gt;</a>.</p>
</div>
</div>
<a class="anchor" id="a5e331eb752b9e734d745746c63034107"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="namespace_apache_1_1_ignite_1_1_core_1_1_compute.html#a630d59e56d9558cb537c357c2b2f3fdc">ComputeJobResultPolicy</a> <a class="el" href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_adapter.html">Apache.Ignite.Core.Compute.ComputeTaskAdapter</a>&lt; TArg, TJobRes, TTaskRes &gt;.OnResult </td>
<td>(</td>
<td class="paramtype"><a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_job_result.html">IComputeJobResult</a>&lt; TJobRes &gt;&#160;</td>
<td class="paramname"><em>res</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">IList&lt; <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_job_result.html">IComputeJobResult</a>&lt; TJobRes &gt;&gt;&#160;</td>
<td class="paramname"><em>rcvd</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">res</td><td>Received remote Ignite executable result.</td></tr>
<tr><td class="paramname">rcvd</td><td>All previously received results.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Result policy that dictates how to process further upcoming job results.</dd></dl>
</div>
</div>
<a class="anchor" id="a7627b08230ee50b86a73716d73749ce0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">abstract TTaskRes <a class="el" href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_adapter.html">Apache.Ignite.Core.Compute.ComputeTaskAdapter</a>&lt; TArg, TJobRes, TTaskRes &gt;.Reduce </td>
<td>(</td>
<td class="paramtype">IList&lt; <a class="el" href="interface_apache_1_1_ignite_1_1_core_1_1_compute_1_1_i_compute_job_result.html">IComputeJobResult</a>&lt; TJobRes &gt;&gt;&#160;</td>
<td class="paramname"><em>results</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Note, that if some jobs did not succeed and could not be failed over then the list of results passed into this method will include the failed results. Otherwise, failed results will not be in the list. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">results</td><td>Received job results. Note that if task class has <a class="el" href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_no_result_cache_attribute.html" title="This attribute disables caching of task results when attached to IComputeTask<A,T,R> instance. Use it when number of jobs within task grows too big, or jobs themselves are too large to keep in memory throughout task execution. By default all results are cached and passed into IComputeTask<TA,T,TR>.OnResult and IComputeTask<A,T,R>.Reduce methods. When this attribute is attached to a task class, then this list of job results will always be empty. ">ComputeTaskNoResultCacheAttribute</a> attribute, then this list will be empty.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Task result constructed from results of remote executions. </dd></dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespace_apache.html">Apache</a></li><li class="navelem"><a class="el" href="namespace_apache_1_1_ignite.html">Ignite</a></li><li class="navelem"><a class="el" href="namespace_apache_1_1_ignite_1_1_core.html">Core</a></li><li class="navelem"><a class="el" href="namespace_apache_1_1_ignite_1_1_core_1_1_compute.html">Compute</a></li><li class="navelem"><a class="el" href="class_apache_1_1_ignite_1_1_core_1_1_compute_1_1_compute_task_adapter.html">ComputeTaskAdapter</a></li>
<li class="footer">Generated on Thu Mar 2 2017 17:22:55 for Apache Ignite.NET by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
</ul>
</div>
</body>
</html>