blob: 6bde7e8b131336448bf0e8a89cbd82cb3f1176be [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>&nbsp; Apache Ignite C++: ignite::Future&lt; T &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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</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 id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">&nbsp; Apache Ignite C++
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceignite.html">ignite</a></li><li class="navelem"><a class="el" href="classignite_1_1Future.html">Future</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classignite_1_1Future-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ignite::Future&lt; T &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classignite_1_1Future.html" title="Future class template.">Future</a> class template.
<a href="classignite_1_1Future.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="future_8h_source.html">future.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a9d30e65c248b3b2dddb620bf99e0c06a"><td class="memItemLeft" align="right" valign="top"><a id="a9d30e65c248b3b2dddb620bf99e0c06a"></a>
typedef T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classignite_1_1Future.html#a9d30e65c248b3b2dddb620bf99e0c06a">ValueType</a></td></tr>
<tr class="memdesc:a9d30e65c248b3b2dddb620bf99e0c06a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Template value type. <br /></td></tr>
<tr class="separator:a9d30e65c248b3b2dddb620bf99e0c06a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:a5dd1c5eb96ad2d3cae49f03cfd7b7c8d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classignite_1_1Future.html#a5dd1c5eb96ad2d3cae49f03cfd7b7c8d">Future</a> (const <a class="el" href="classignite_1_1Future.html">Future</a>&lt; <a class="el" href="classignite_1_1Future.html#a9d30e65c248b3b2dddb620bf99e0c06a">ValueType</a> &gt; &amp;src)</td></tr>
<tr class="memdesc:a5dd1c5eb96ad2d3cae49f03cfd7b7c8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor. <a href="classignite_1_1Future.html#a5dd1c5eb96ad2d3cae49f03cfd7b7c8d">More...</a><br /></td></tr>
<tr class="separator:a5dd1c5eb96ad2d3cae49f03cfd7b7c8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab22e443f0d35cecfdd677dc237c0c4f7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classignite_1_1Future.html">Future</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classignite_1_1Future.html#ab22e443f0d35cecfdd677dc237c0c4f7">operator=</a> (const <a class="el" href="classignite_1_1Future.html">Future</a>&lt; <a class="el" href="classignite_1_1Future.html#a9d30e65c248b3b2dddb620bf99e0c06a">ValueType</a> &gt; &amp;other)</td></tr>
<tr class="memdesc:ab22e443f0d35cecfdd677dc237c0c4f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator. <a href="classignite_1_1Future.html#ab22e443f0d35cecfdd677dc237c0c4f7">More...</a><br /></td></tr>
<tr class="separator:ab22e443f0d35cecfdd677dc237c0c4f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a924add850583c8a9957624532b5d5072"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classignite_1_1Future.html#a924add850583c8a9957624532b5d5072">Wait</a> () const</td></tr>
<tr class="memdesc:a924add850583c8a9957624532b5d5072"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for value to be set. <a href="classignite_1_1Future.html#a924add850583c8a9957624532b5d5072">More...</a><br /></td></tr>
<tr class="separator:a924add850583c8a9957624532b5d5072"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0cde9bfdea20adf70231b48d57e449a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classignite_1_1Future.html#aa0cde9bfdea20adf70231b48d57e449a">WaitFor</a> (int32_t msTimeout) const</td></tr>
<tr class="memdesc:aa0cde9bfdea20adf70231b48d57e449a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for value to be set for specified time. <a href="classignite_1_1Future.html#aa0cde9bfdea20adf70231b48d57e449a">More...</a><br /></td></tr>
<tr class="separator:aa0cde9bfdea20adf70231b48d57e449a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb63f3a5780e1b462555cfc45044d0c8"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classignite_1_1Future.html#a9d30e65c248b3b2dddb620bf99e0c06a">ValueType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classignite_1_1Future.html#acb63f3a5780e1b462555cfc45044d0c8">GetValue</a> () const</td></tr>
<tr class="memdesc:acb63f3a5780e1b462555cfc45044d0c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the set value. <a href="classignite_1_1Future.html#acb63f3a5780e1b462555cfc45044d0c8">More...</a><br /></td></tr>
<tr class="separator:acb63f3a5780e1b462555cfc45044d0c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01ea459a52a53e861c22d7c1ba6669d1"><td class="memItemLeft" align="right" valign="top"><a id="a01ea459a52a53e861c22d7c1ba6669d1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classignite_1_1Future.html#a01ea459a52a53e861c22d7c1ba6669d1">Cancel</a> ()</td></tr>
<tr class="memdesc:a01ea459a52a53e861c22d7c1ba6669d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cancel related operation. <br /></td></tr>
<tr class="separator:a01ea459a52a53e861c22d7c1ba6669d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd7a19a568856867d220383751af553b"><td class="memItemLeft" align="right" valign="top"><a id="abd7a19a568856867d220383751af553b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classignite_1_1Future.html#abd7a19a568856867d220383751af553b">IsReady</a> ()</td></tr>
<tr class="memdesc:abd7a19a568856867d220383751af553b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the future ready. <br /></td></tr>
<tr class="separator:abd7a19a568856867d220383751af553b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:ab1fab912ba0e2d09e9ac1998374d433e"><td class="memItemLeft" align="right" valign="top"><a id="ab1fab912ba0e2d09e9ac1998374d433e"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>common::Promise&lt; T &gt;</b></td></tr>
<tr class="separator:ab1fab912ba0e2d09e9ac1998374d433e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br />
class ignite::Future&lt; T &gt;</h3>
<p><a class="el" href="classignite_1_1Future.html" title="Future class template.">Future</a> class template. </p>
<p>Used to get result of the asynchroniously started computation.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">T</td><td><a class="el" href="classignite_1_1Future.html" title="Future class template.">Future</a> value type. </td></tr>
</table>
</dd>
</dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a5dd1c5eb96ad2d3cae49f03cfd7b7c8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5dd1c5eb96ad2d3cae49f03cfd7b7c8d">&#9670;&nbsp;</a></span>Future()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classignite_1_1Future.html">ignite::Future</a>&lt; T &gt;::<a class="el" href="classignite_1_1Future.html">Future</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classignite_1_1Future.html">Future</a>&lt; <a class="el" href="classignite_1_1Future.html#a9d30e65c248b3b2dddb620bf99e0c06a">ValueType</a> &gt; &amp;&#160;</td>
<td class="paramname"><em>src</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Copy constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">src</td><td>Instance to copy. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="acb63f3a5780e1b462555cfc45044d0c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb63f3a5780e1b462555cfc45044d0c8">&#9670;&nbsp;</a></span>GetValue()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classignite_1_1Future.html#a9d30e65c248b3b2dddb620bf99e0c06a">ValueType</a>&amp; <a class="el" href="classignite_1_1Future.html">ignite::Future</a>&lt; T &gt;::GetValue </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the set value. </p>
<p>Active thread will be blocked until value or error will be set.</p>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classignite_1_1IgniteError.html" title="Ignite error information.">IgniteError</a></td><td>if error has been set. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Value that has been set on success. </dd></dl>
</div>
</div>
<a id="ab22e443f0d35cecfdd677dc237c0c4f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab22e443f0d35cecfdd677dc237c0c4f7">&#9670;&nbsp;</a></span>operator=()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classignite_1_1Future.html">Future</a>&amp; <a class="el" href="classignite_1_1Future.html">ignite::Future</a>&lt; T &gt;::operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classignite_1_1Future.html">Future</a>&lt; <a class="el" href="classignite_1_1Future.html#a9d30e65c248b3b2dddb620bf99e0c06a">ValueType</a> &gt; &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Assignment operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">other</td><td>Other instance. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>*this. </dd></dl>
</div>
</div>
<a id="a924add850583c8a9957624532b5d5072"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a924add850583c8a9957624532b5d5072">&#9670;&nbsp;</a></span>Wait()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classignite_1_1Future.html">ignite::Future</a>&lt; T &gt;::Wait </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Wait for value to be set. </p>
<p>Active thread will be blocked until value or error will be set. </p>
</div>
</div>
<a id="aa0cde9bfdea20adf70231b48d57e449a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0cde9bfdea20adf70231b48d57e449a">&#9670;&nbsp;</a></span>WaitFor()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classignite_1_1Future.html">ignite::Future</a>&lt; T &gt;::WaitFor </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>msTimeout</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Wait for value to be set for specified time. </p>
<p>Active thread will be blocked until value or error will be set or timeout will end.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">msTimeout</td><td>Timeout in milliseconds. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the object has been triggered and false in case of timeout. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="future_8h_source.html">future.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Jan 10 2022 11:02:04 for &nbsp; Apache Ignite C++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>