| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <link rel="canonical" href="https://ignite.apache.org/releases/2.6.0/javadoc/org/apache/ignite/compute/ComputeTaskSession.html" /> |
| <META NAME="ROBOTS" CONTENT="NOINDEX"> |
| |
| <!-- Generated by javadoc (1.8.0_77) on Tue Jul 10 11:04:40 UTC 2018 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>ComputeTaskSession (Ignite 2.6.0)</title> |
| <meta name="date" content="2018-07-10"> |
| <link rel="stylesheet" type="text/css" href="../../../../javadoc.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| |
| <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> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ComputeTaskSession (Ignite 2.6.0)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6,"i25":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ComputeTaskSession.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage">Ignite - In-Memory Data Fabric</div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/ignite/compute/ComputeTaskNoResultCache.html" title="annotation in org.apache.ignite.compute"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/ignite/compute/ComputeTaskSessionAttributeListener.html" title="interface in org.apache.ignite.compute"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/ignite/compute/ComputeTaskSession.html" target="_top">Frames</a></li> |
| <li><a href="ComputeTaskSession.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.ignite.compute</div> |
| <h2 title="Interface ComputeTaskSession" class="title">Interface ComputeTaskSession</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">ComputeTaskSession</span></pre> |
| <div class="block">Defines a distributed session for particular task execution. |
| <h1 class="header">Description</h1> |
| This interface defines a distributed session that exists for particular task |
| execution. Task session is distributed across the parent task and all grid |
| jobs spawned by it, so attributes set on a task or on a job can be viewed on |
| other jobs. Correspondingly attributes set on any of the jobs can also be |
| viewed on a task. |
| <p> |
| Session has 2 main features: <code>attribute</code> and <code>checkpoint</code> |
| management. Both attributes and checkpoints can be used from task itself and |
| from the jobs belonging to this task. Session attributes and checkpoints can |
| be set from any task or job methods. Session attribute and checkpoint consistency |
| is fault tolerant and is preserved whenever a job gets failed over to |
| another node for execution. Whenever task execution ends, all checkpoints |
| saved within session with <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html#SESSION_SCOPE"><code>ComputeTaskSessionScope.SESSION_SCOPE</code></a> scope |
| will be removed from checkpoint storage. Checkpoints saved with |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html#GLOBAL_SCOPE"><code>ComputeTaskSessionScope.GLOBAL_SCOPE</code></a> will outlive the session and |
| can be viewed by other tasks. |
| <p> |
| The sequence in which session attributes are set is consistent across |
| the task and all job siblings within it. There will never be a |
| case when one job sees attribute A before attribute B, and another job sees |
| attribute B before A. Attribute order is identical across all session |
| participants. Attribute order is also fault tolerant and is preserved |
| whenever a job gets failed over to another node. |
| <p> |
| <h1 class="header">Connected Tasks</h1> |
| Note that apart from setting and getting session attributes, tasks or |
| jobs can choose to wait for a certain attribute to be set using any of |
| the <code>waitForAttribute(...)</code> methods. Tasks and jobs can also |
| receive asynchronous notifications about a certain attribute being set |
| through <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionAttributeListener.html" title="interface in org.apache.ignite.compute"><code>ComputeTaskSessionAttributeListener</code></a> listener. Such feature |
| allows grid jobs and tasks remain <u><i>connected</i></u> in order |
| to synchronize their execution with each other and opens a solution for a |
| whole new range of problems. |
| <p> |
| Imagine for example that you need to compress a very large file (let's say |
| terabytes in size). To do that in grid environment you would split such |
| file into multiple sections and assign every section to a remote job for |
| execution. Every job would have to scan its section to look for repetition |
| patterns. Once this scan is done by all jobs in parallel, jobs would need to |
| synchronize their results with their siblings so compression would happen |
| consistently across the whole file. This can be achieved by setting |
| repetition patterns discovered by every job into the session. Once all |
| patterns are synchronized, all jobs can proceed with compressing their |
| designated file sections in parallel, taking into account repetition patterns |
| found by all the jobs in the split. Grid task would then reduce (aggregate) |
| all compressed sections into one compressed file. Without session attribute |
| synchronization step this problem would be much harder to solve. |
| <p> |
| <h1 class="header">Session Injection</h1> |
| Session can be injected into a task or a job using IoC (dependency |
| injection) by attaching <a href="../../../../org/apache/ignite/resources/TaskSessionResource.html" title="annotation in org.apache.ignite.resources"><code>@TaskSessionResource</code></a> |
| annotation to a field or a setter method inside of <a href="../../../../org/apache/ignite/compute/ComputeTask.html" title="interface in org.apache.ignite.compute"><code>ComputeTask</code></a> or |
| <a href="../../../../org/apache/ignite/compute/ComputeJob.html" title="interface in org.apache.ignite.compute"><code>ComputeJob</code></a> implementations as follows: |
| <pre name="code" class="java"> |
| ... |
| // This field will be injected with distributed task session. |
| @TaskSessionResource |
| private ComputeTaskSession ses; |
| ... |
| </pre> |
| or from a setter method: |
| <pre name="code" class="java"> |
| // This setter method will be automatically called by the system |
| // to set grid task session. |
| @TaskSessionResource |
| void setSession(ComputeTaskSession ses) { |
| this.ses = ses; |
| } |
| </pre> |
| <h1 class="header">Example</h1></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#addAttributeListener-org.apache.ignite.compute.ComputeTaskSessionAttributeListener-boolean-">addAttributeListener</a></span>(<a href="../../../../org/apache/ignite/compute/ComputeTaskSessionAttributeListener.html" title="interface in org.apache.ignite.compute">ComputeTaskSessionAttributeListener</a> lsnr, |
| boolean rewind)</code> |
| <div class="block">Add listener for the session attributes.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><K,V> V</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#getAttribute-K-">getAttribute</a></span>(K key)</code> |
| <div class="block">Gets an attribute set by <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#setAttribute-java.lang.Object-java.lang.Object-"><code>setAttribute(Object, Object)</code></a> or <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#setAttributes-java.util.Map-"><code>setAttributes(Map)</code></a> |
| method.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#getAttributes--">getAttributes</a></span>()</code> |
| <div class="block">Gets all attributes.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#getClassLoader--">getClassLoader</a></span>()</code> |
| <div class="block">Gets class loader responsible for loading all classes within task.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#getEndTime--">getEndTime</a></span>()</code> |
| <div class="block">Gets end of computation time for the task.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/ignite/lang/IgniteUuid.html" title="class in org.apache.ignite.lang">IgniteUuid</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#getId--">getId</a></span>()</code> |
| <div class="block">Gets session ID of the task being executed.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/ignite/compute/ComputeJobSibling.html" title="interface in org.apache.ignite.compute">ComputeJobSibling</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#getJobSibling-org.apache.ignite.lang.IgniteUuid-">getJobSibling</a></span>(<a href="../../../../org/apache/ignite/lang/IgniteUuid.html" title="class in org.apache.ignite.lang">IgniteUuid</a> jobId)</code> |
| <div class="block">Gets job sibling for a given ID.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/apache/ignite/compute/ComputeJobSibling.html" title="interface in org.apache.ignite.compute">ComputeJobSibling</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#getJobSiblings--">getJobSiblings</a></span>()</code> |
| <div class="block">Gets a collection of all grid job siblings.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#getStartTime--">getStartTime</a></span>()</code> |
| <div class="block">Gets start of computation time for the task.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#getTaskName--">getTaskName</a></span>()</code> |
| <div class="block">Gets task name of the task this session belongs to.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#getTaskNodeId--">getTaskNodeId</a></span>()</code> |
| <div class="block">Gets ID of the node on which task execution originated.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#getTopology--">getTopology</a></span>()</code> |
| <div class="block">Gets a collection of grid nodes IDs.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#loadCheckpoint-java.lang.String-">loadCheckpoint</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> |
| <div class="block">Loads job's state previously saved via <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#saveCheckpoint-java.lang.String-java.lang.Object-org.apache.ignite.compute.ComputeTaskSessionScope-long-"><code>saveCheckpoint(String, Object, ComputeTaskSessionScope, long)</code></a> |
| method from an underlying storage for a given <code>key</code>.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><?></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#mapFuture--">mapFuture</a></span>()</code> |
| <div class="block">Gets future that will be completed when task "<tt>map</tt>" step has completed |
| (which means that <a href="../../../../org/apache/ignite/compute/ComputeTask.html#map-java.util.List-T-"><code>ComputeTask.map(List, Object)</code></a> method has finished).</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/apache/ignite/compute/ComputeJobSibling.html" title="interface in org.apache.ignite.compute">ComputeJobSibling</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#refreshJobSiblings--">refreshJobSiblings</a></span>()</code> |
| <div class="block">Refreshes collection of job siblings.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#removeAttributeListener-org.apache.ignite.compute.ComputeTaskSessionAttributeListener-">removeAttributeListener</a></span>(<a href="../../../../org/apache/ignite/compute/ComputeTaskSessionAttributeListener.html" title="interface in org.apache.ignite.compute">ComputeTaskSessionAttributeListener</a> lsnr)</code> |
| <div class="block">Removes given listener.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#removeCheckpoint-java.lang.String-">removeCheckpoint</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> |
| <div class="block">Removes previously saved job's state for a given <code>key</code> from an underlying storage.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#saveCheckpoint-java.lang.String-java.lang.Object-">saveCheckpoint</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> state)</code> |
| <div class="block">Saves intermediate state of a job or task to a storage.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#saveCheckpoint-java.lang.String-java.lang.Object-org.apache.ignite.compute.ComputeTaskSessionScope-long-">saveCheckpoint</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> state, |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html" title="enum in org.apache.ignite.compute">ComputeTaskSessionScope</a> scope, |
| long timeout)</code> |
| <div class="block">Saves intermediate state of a job to a storage.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#saveCheckpoint-java.lang.String-java.lang.Object-org.apache.ignite.compute.ComputeTaskSessionScope-long-boolean-">saveCheckpoint</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> state, |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html" title="enum in org.apache.ignite.compute">ComputeTaskSessionScope</a> scope, |
| long timeout, |
| boolean overwrite)</code> |
| <div class="block">Saves intermediate state of a job or task to a storage.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#setAttribute-java.lang.Object-java.lang.Object-">setAttribute</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> val)</code> |
| <div class="block">Sets session attributed.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#setAttributes-java.util.Map-">setAttributes</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?> attrs)</code> |
| <div class="block">Sets task attributes.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code><K,V> V</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#waitForAttribute-K-long-">waitForAttribute</a></span>(K key, |
| long timeout)</code> |
| <div class="block">Waits for the specified attribute to be set.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code><K,V> boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#waitForAttribute-K-V-long-">waitForAttribute</a></span>(K key, |
| V val, |
| long timeout)</code> |
| <div class="block">Waits for the specified attribute to be set or updated with given value.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#waitForAttributes-java.util.Collection-long-">waitForAttributes</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><?> keys, |
| long timeout)</code> |
| <div class="block">Waits for the specified attributes to be set.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#waitForAttributes-java.util.Map-long-">waitForAttributes</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?> attrs, |
| long timeout)</code> |
| <div class="block">Waits for the specified attributes to be set or updated with given values.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getTaskName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTaskName</h4> |
| <pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getTaskName()</pre> |
| <div class="block">Gets task name of the task this session belongs to.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Task name of the task this session belongs to.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getTaskNodeId--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTaskNodeId</h4> |
| <pre><a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a> getTaskNodeId()</pre> |
| <div class="block">Gets ID of the node on which task execution originated.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>ID of the node on which task execution originated.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getStartTime--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getStartTime</h4> |
| <pre>long getStartTime()</pre> |
| <div class="block">Gets start of computation time for the task.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Start of computation time for the task.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getEndTime--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEndTime</h4> |
| <pre>long getEndTime()</pre> |
| <div class="block">Gets end of computation time for the task. No job within the task |
| will be allowed to execute passed this time.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>End of computation time for the task.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getId--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getId</h4> |
| <pre><a href="../../../../org/apache/ignite/lang/IgniteUuid.html" title="class in org.apache.ignite.lang">IgniteUuid</a> getId()</pre> |
| <div class="block">Gets session ID of the task being executed.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Session ID of the task being executed.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getClassLoader--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getClassLoader</h4> |
| <pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a> getClassLoader()</pre> |
| <div class="block">Gets class loader responsible for loading all classes within task. |
| <p> |
| Note that for classes that were loaded remotely from other nodes methods |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#getResource-java.lang.String-" title="class or interface in java.lang"><code>Class.getResource(String)</code></a> or <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html?is-external=true#getResource-java.lang.String-" title="class or interface in java.lang"><code>ClassLoader.getResource(String)</code></a> |
| will always return <code>null</code>. Use |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#getResourceAsStream-java.lang.String-" title="class or interface in java.lang"><code>Class.getResourceAsStream(String)</code></a> or <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html?is-external=true#getResourceAsStream-java.lang.String-" title="class or interface in java.lang"><code>ClassLoader.getResourceAsStream(String)</code></a> |
| instead.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Class loader responsible for loading all classes within task.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getJobSiblings--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getJobSiblings</h4> |
| <pre><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/apache/ignite/compute/ComputeJobSibling.html" title="interface in org.apache.ignite.compute">ComputeJobSibling</a>> getJobSiblings() |
| throws <a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Gets a collection of all grid job siblings. Job siblings are grid jobs |
| that are executing within the same task. |
| <p> |
| If task uses continuous mapper (i.e. it injected into task class) then |
| job siblings will be requested from task node for each apply.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Collection of grid job siblings executing within this task.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If job siblings can not be received from task node.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="refreshJobSiblings--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>refreshJobSiblings</h4> |
| <pre><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/apache/ignite/compute/ComputeJobSibling.html" title="interface in org.apache.ignite.compute">ComputeJobSibling</a>> refreshJobSiblings() |
| throws <a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Refreshes collection of job siblings. This method has no effect when invoked |
| on originating node, as the list of siblings is always most recent. However, |
| when using <tt>continuous mapping</tt> (see <a href="../../../../org/apache/ignite/compute/ComputeTaskContinuousMapper.html" title="interface in org.apache.ignite.compute"><code>ComputeTaskContinuousMapper</code></a>), |
| list of siblings on remote node may not be fresh. In that case, this method |
| will re-request list of siblings from originating node.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Refreshed collection of job siblings.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If refresh failed.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getJobSibling-org.apache.ignite.lang.IgniteUuid-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getJobSibling</h4> |
| <pre>@Nullable |
| <a href="../../../../org/apache/ignite/compute/ComputeJobSibling.html" title="interface in org.apache.ignite.compute">ComputeJobSibling</a> getJobSibling(<a href="../../../../org/apache/ignite/lang/IgniteUuid.html" title="class in org.apache.ignite.lang">IgniteUuid</a> jobId) |
| throws <a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Gets job sibling for a given ID. |
| <p> |
| If task uses continuous mapper (i.e. it injected into task class) then |
| job sibling will be requested from task node for each apply.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>jobId</code> - Job ID to get the sibling for.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Grid job sibling for a given ID.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If job sibling can not be received from task node.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setAttribute-java.lang.Object-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAttribute</h4> |
| <pre>void setAttribute(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key, |
| @Nullable |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> val) |
| throws <a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Sets session attributed. Note that task session is distributed and |
| this attribute will be propagated to all other jobs within this task and task |
| itself - i.e., to all accessors of this session. |
| Other jobs then will be notified by <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionAttributeListener.html" title="interface in org.apache.ignite.compute"><code>ComputeTaskSessionAttributeListener</code></a> |
| callback than an attribute has changed. |
| <p> |
| This method is no-op if the session has finished.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - Attribute key.</dd> |
| <dd><code>val</code> - Attribute value. Can be <code>null</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If sending of attribute message failed.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAttribute-java.lang.Object-"> |
| <!-- --> |
| </a><a name="getAttribute-K-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttribute</h4> |
| <pre>@Nullable |
| <K,V> V getAttribute(K key)</pre> |
| <div class="block">Gets an attribute set by <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#setAttribute-java.lang.Object-java.lang.Object-"><code>setAttribute(Object, Object)</code></a> or <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#setAttributes-java.util.Map-"><code>setAttributes(Map)</code></a> |
| method. Note that this attribute could have been set by another job on |
| another node. |
| <p> |
| This method is no-op if the session has finished.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>K</code> - Attribute key type.</dd> |
| <dd><code>V</code> - Attribute value type.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - Attribute key.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Gets task attribute for given name.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setAttributes-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAttributes</h4> |
| <pre>void setAttributes(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?> attrs) |
| throws <a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Sets task attributes. This method exists so one distributed replication |
| operation will take place for the whole group of attributes passed in. |
| Use it for performance reasons, rather than <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#setAttribute-java.lang.Object-java.lang.Object-"><code>setAttribute(Object, Object)</code></a> |
| method, whenever you need to set multiple attributes. |
| <p> |
| This method is no-op if the session has finished.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>attrs</code> - Attributes to set.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If sending of attribute message failed.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAttributes--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttributes</h4> |
| <pre><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?> getAttributes()</pre> |
| <div class="block">Gets all attributes.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>All session attributes.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addAttributeListener-org.apache.ignite.compute.ComputeTaskSessionAttributeListener-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addAttributeListener</h4> |
| <pre>void addAttributeListener(<a href="../../../../org/apache/ignite/compute/ComputeTaskSessionAttributeListener.html" title="interface in org.apache.ignite.compute">ComputeTaskSessionAttributeListener</a> lsnr, |
| boolean rewind)</pre> |
| <div class="block">Add listener for the session attributes.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>lsnr</code> - Listener to add.</dd> |
| <dd><code>rewind</code> - <code>true</code> value will result in calling given listener for all |
| already received attributes, while <code>false</code> value will result only |
| in new attribute notification. Settings <code>rewind</code> to <code>true</code> |
| allows for a simple mechanism that prevents the loss of notifications for |
| the attributes that were previously received or received while this method |
| was executing.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="removeAttributeListener-org.apache.ignite.compute.ComputeTaskSessionAttributeListener-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>removeAttributeListener</h4> |
| <pre>boolean removeAttributeListener(<a href="../../../../org/apache/ignite/compute/ComputeTaskSessionAttributeListener.html" title="interface in org.apache.ignite.compute">ComputeTaskSessionAttributeListener</a> lsnr)</pre> |
| <div class="block">Removes given listener.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>lsnr</code> - Listener to remove.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if listener was removed, <code>false</code> otherwise.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="waitForAttribute-java.lang.Object-long-"> |
| <!-- --> |
| </a><a name="waitForAttribute-K-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>waitForAttribute</h4> |
| <pre><K,V> V waitForAttribute(K key, |
| long timeout) |
| throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre> |
| <div class="block">Waits for the specified attribute to be set. If this attribute is already in session |
| this method will return immediately.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>K</code> - Attribute key type.</dd> |
| <dd><code>V</code> - Attribute value type.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - Attribute key to wait for.</dd> |
| <dd><code>timeout</code> - Timeout in milliseconds to wait for. <code>0</code> means indefinite wait.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Value of newly set attribute.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code> - Thrown if wait was interrupted.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="waitForAttribute-java.lang.Object-java.lang.Object-long-"> |
| <!-- --> |
| </a><a name="waitForAttribute-K-V-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>waitForAttribute</h4> |
| <pre><K,V> boolean waitForAttribute(K key, |
| @Nullable |
| V val, |
| long timeout) |
| throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre> |
| <div class="block">Waits for the specified attribute to be set or updated with given value. Note that |
| this method will block even if attribute is set for as long as its value is not equal |
| to the specified.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>K</code> - Attribute key type.</dd> |
| <dd><code>V</code> - Attribute value type.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - Attribute key to wait for.</dd> |
| <dd><code>val</code> - Attribute value to wait for. Can be <code>null</code>.</dd> |
| <dd><code>timeout</code> - Timeout in milliseconds to wait for. <code>0</code> means indefinite wait.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether or not specified key/value pair has been set.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code> - Thrown if wait was interrupted.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="waitForAttributes-java.util.Collection-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>waitForAttributes</h4> |
| <pre><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?> waitForAttributes(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><?> keys, |
| long timeout) |
| throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre> |
| <div class="block">Waits for the specified attributes to be set. If these attributes are already in session |
| this method will return immediately.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>keys</code> - Attribute keys to wait for.</dd> |
| <dd><code>timeout</code> - Timeout in milliseconds to wait for. <code>0</code> means indefinite wait.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Attribute values mapped by their keys.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code> - Thrown if wait was interrupted.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="waitForAttributes-java.util.Map-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>waitForAttributes</h4> |
| <pre>boolean waitForAttributes(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><?,?> attrs, |
| long timeout) |
| throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre> |
| <div class="block">Waits for the specified attributes to be set or updated with given values. Note that |
| this method will block even if attributes are set for as long as their values are not equal |
| to the specified.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>attrs</code> - Key/value pairs to wait for.</dd> |
| <dd><code>timeout</code> - Timeout in milliseconds to wait for. <code>0</code> means indefinite wait.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether or not key/value pair has been set.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code> - Thrown if wait was interrupted.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="saveCheckpoint-java.lang.String-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>saveCheckpoint</h4> |
| <pre>void saveCheckpoint(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> state) |
| throws <a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Saves intermediate state of a job or task to a storage. The storage implementation is defined |
| by <a href="../../../../org/apache/ignite/spi/checkpoint/CheckpointSpi.html" title="interface in org.apache.ignite.spi.checkpoint"><code>CheckpointSpi</code></a> implementation used. |
| <p> |
| Long running jobs may decide to store intermediate state to protect themselves from failures. |
| This way whenever a job fails over to another node, it can load its previously saved state via |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#loadCheckpoint-java.lang.String-"><code>loadCheckpoint(String)</code></a> method and continue with execution. |
| <p> |
| This method defaults checkpoint scope to <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html#SESSION_SCOPE"><code>ComputeTaskSessionScope.SESSION_SCOPE</code></a> and |
| implementation will automatically remove the checkpoint at the end of the session. It is |
| analogous to calling <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#saveCheckpoint-java.lang.String-java.lang.Object-org.apache.ignite.compute.ComputeTaskSessionScope-long-"><code>saveCheckpoint(String, Serializable, GridCheckpointScope.SESSION_SCOPE, 0</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - Key to be used to load this checkpoint in future.</dd> |
| <dd><code>state</code> - Intermediate job state to save.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If failed to save intermediate job state.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#loadCheckpoint-java.lang.String-"><code>loadCheckpoint(String)</code></a>, |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#removeCheckpoint-java.lang.String-"><code>removeCheckpoint(String)</code></a>, |
| <a href="../../../../org/apache/ignite/spi/checkpoint/CheckpointSpi.html" title="interface in org.apache.ignite.spi.checkpoint"><code>CheckpointSpi</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="saveCheckpoint-java.lang.String-java.lang.Object-org.apache.ignite.compute.ComputeTaskSessionScope-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>saveCheckpoint</h4> |
| <pre>void saveCheckpoint(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> state, |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html" title="enum in org.apache.ignite.compute">ComputeTaskSessionScope</a> scope, |
| long timeout) |
| throws <a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Saves intermediate state of a job to a storage. The storage implementation is defined |
| by <a href="../../../../org/apache/ignite/spi/checkpoint/CheckpointSpi.html" title="interface in org.apache.ignite.spi.checkpoint"><code>CheckpointSpi</code></a> implementation used. |
| <p> |
| Long running jobs may decide to store intermediate state to protect themselves from failures. |
| This way whenever a job fails over to another node, it can load its previously saved state via |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#loadCheckpoint-java.lang.String-"><code>loadCheckpoint(String)</code></a> method and continue with execution. |
| <p> |
| The life time of the checkpoint is determined by its timeout and scope. |
| If <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html#GLOBAL_SCOPE"><code>ComputeTaskSessionScope.GLOBAL_SCOPE</code></a> is used, the checkpoint will outlive |
| its session, and can only be removed by calling <a href="../../../../org/apache/ignite/spi/checkpoint/CheckpointSpi.html#removeCheckpoint-java.lang.String-"><code>CheckpointSpi.removeCheckpoint(String)</code></a> |
| from <a href="../../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite"><code>Ignite</code></a> or another task or job.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - Key to be used to load this checkpoint in future.</dd> |
| <dd><code>state</code> - Intermediate job state to save.</dd> |
| <dd><code>scope</code> - Checkpoint scope. If equal to <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html#SESSION_SCOPE"><code>ComputeTaskSessionScope.SESSION_SCOPE</code></a>, then |
| state will automatically be removed at the end of task execution. Otherwise, if scope is |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html#GLOBAL_SCOPE"><code>ComputeTaskSessionScope.GLOBAL_SCOPE</code></a> then state will outlive its session and can be |
| removed by calling <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#removeCheckpoint-java.lang.String-"><code>removeCheckpoint(String)</code></a> from another task or whenever |
| timeout expires.</dd> |
| <dd><code>timeout</code> - Maximum time this state should be kept by the underlying storage. Value <code>0</code> means that |
| timeout will never expire.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If failed to save intermediate job state.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#loadCheckpoint-java.lang.String-"><code>loadCheckpoint(String)</code></a>, |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#removeCheckpoint-java.lang.String-"><code>removeCheckpoint(String)</code></a>, |
| <a href="../../../../org/apache/ignite/spi/checkpoint/CheckpointSpi.html" title="interface in org.apache.ignite.spi.checkpoint"><code>CheckpointSpi</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="saveCheckpoint-java.lang.String-java.lang.Object-org.apache.ignite.compute.ComputeTaskSessionScope-long-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>saveCheckpoint</h4> |
| <pre>void saveCheckpoint(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> state, |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html" title="enum in org.apache.ignite.compute">ComputeTaskSessionScope</a> scope, |
| long timeout, |
| boolean overwrite) |
| throws <a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Saves intermediate state of a job or task to a storage. The storage implementation is defined |
| by <a href="../../../../org/apache/ignite/spi/checkpoint/CheckpointSpi.html" title="interface in org.apache.ignite.spi.checkpoint"><code>CheckpointSpi</code></a> implementation used. |
| <p> |
| Long running jobs may decide to store intermediate state to protect themselves from failures. |
| This way whenever a job fails over to another node, it can load its previously saved state via |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#loadCheckpoint-java.lang.String-"><code>loadCheckpoint(String)</code></a> method and continue with execution. |
| <p> |
| The life time of the checkpoint is determined by its timeout and scope. |
| If <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html#GLOBAL_SCOPE"><code>ComputeTaskSessionScope.GLOBAL_SCOPE</code></a> is used, the checkpoint will outlive |
| its session, and can only be removed by calling <a href="../../../../org/apache/ignite/spi/checkpoint/CheckpointSpi.html#removeCheckpoint-java.lang.String-"><code>CheckpointSpi.removeCheckpoint(String)</code></a> |
| from <a href="../../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite"><code>Ignite</code></a> or another task or job.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - Key to be used to load this checkpoint in future.</dd> |
| <dd><code>state</code> - Intermediate job state to save.</dd> |
| <dd><code>scope</code> - Checkpoint scope. If equal to <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html#SESSION_SCOPE"><code>ComputeTaskSessionScope.SESSION_SCOPE</code></a>, then |
| state will automatically be removed at the end of task execution. Otherwise, if scope is |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSessionScope.html#GLOBAL_SCOPE"><code>ComputeTaskSessionScope.GLOBAL_SCOPE</code></a> then state will outlive its session and can be |
| removed by calling <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#removeCheckpoint-java.lang.String-"><code>removeCheckpoint(String)</code></a> from another task or whenever |
| timeout expires.</dd> |
| <dd><code>timeout</code> - Maximum time this state should be kept by the underlying storage. Value <tt>0</tt> means that |
| timeout will never expire.</dd> |
| <dd><code>overwrite</code> - Whether or not overwrite checkpoint if it already exists.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If failed to save intermediate job state.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#loadCheckpoint-java.lang.String-"><code>loadCheckpoint(String)</code></a>, |
| <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#removeCheckpoint-java.lang.String-"><code>removeCheckpoint(String)</code></a>, |
| <a href="../../../../org/apache/ignite/spi/checkpoint/CheckpointSpi.html" title="interface in org.apache.ignite.spi.checkpoint"><code>CheckpointSpi</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="loadCheckpoint-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>loadCheckpoint</h4> |
| <pre>@Nullable |
| <T> T loadCheckpoint(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key) |
| throws <a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Loads job's state previously saved via <a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#saveCheckpoint-java.lang.String-java.lang.Object-org.apache.ignite.compute.ComputeTaskSessionScope-long-"><code>saveCheckpoint(String, Object, ComputeTaskSessionScope, long)</code></a> |
| method from an underlying storage for a given <code>key</code>. If state was not previously |
| saved, then <code>null</code> will be returned. The storage implementation is defined by |
| <a href="../../../../org/apache/ignite/spi/checkpoint/CheckpointSpi.html" title="interface in org.apache.ignite.spi.checkpoint"><code>CheckpointSpi</code></a> implementation used. |
| <p> |
| Long running jobs may decide to store intermediate state to protect themselves from failures. |
| This way whenever a job starts, it can load its previously saved state and continue |
| with execution.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - Type of the checkpoint state.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - Key for intermediate job state to load.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Previously saved state or <code>null</code> if no state was found for a given <code>key</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If failed to load job state.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#removeCheckpoint-java.lang.String-"><code>removeCheckpoint(String)</code></a>, |
| <a href="../../../../org/apache/ignite/spi/checkpoint/CheckpointSpi.html" title="interface in org.apache.ignite.spi.checkpoint"><code>CheckpointSpi</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="removeCheckpoint-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>removeCheckpoint</h4> |
| <pre>boolean removeCheckpoint(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key) |
| throws <a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Removes previously saved job's state for a given <code>key</code> from an underlying storage. |
| The storage implementation is defined by <a href="../../../../org/apache/ignite/spi/checkpoint/CheckpointSpi.html" title="interface in org.apache.ignite.spi.checkpoint"><code>CheckpointSpi</code></a> implementation used. |
| <p> |
| Long running jobs may decide to store intermediate state to protect themselves from failures. |
| This way whenever a job starts, it can load its previously saved state and continue |
| with execution.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - Key for intermediate job state to load.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if job state was removed, <code>false</code> if state was not found.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If failed to remove job state.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/ignite/compute/ComputeTaskSession.html#loadCheckpoint-java.lang.String-"><code>loadCheckpoint(String)</code></a>, |
| <a href="../../../../org/apache/ignite/spi/checkpoint/CheckpointSpi.html" title="interface in org.apache.ignite.spi.checkpoint"><code>CheckpointSpi</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getTopology--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTopology</h4> |
| <pre><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>> getTopology()</pre> |
| <div class="block">Gets a collection of grid nodes IDs.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Collection of grid nodes IDs for the task's split.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mapFuture--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>mapFuture</h4> |
| <pre><a href="../../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><?> mapFuture()</pre> |
| <div class="block">Gets future that will be completed when task "<tt>map</tt>" step has completed |
| (which means that <a href="../../../../org/apache/ignite/compute/ComputeTask.html#map-java.util.List-T-"><code>ComputeTask.map(List, Object)</code></a> method has finished).</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Future that will be completed when task "<tt>map</tt>" step has completed.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ComputeTaskSession.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage">Ignite - In-Memory Data Fabric</div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/ignite/compute/ComputeTaskNoResultCache.html" title="annotation in org.apache.ignite.compute"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/ignite/compute/ComputeTaskSessionAttributeListener.html" title="interface in org.apache.ignite.compute"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/ignite/compute/ComputeTaskSession.html" target="_top">Frames</a></li> |
| <li><a href="ComputeTaskSession.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small><table width="100%" border="0" cellspacing=0 cellpadding=0 style="padding: 5px"> <tr> <td> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <a target=_blank href="https://ignite.apache.org"><nobr>2018 Copyright © Apache Software Foundation</nobr></a> </td> </tr> </tbody> </table> </td> <td width="100%" align="right" valign="center"> <a href="https://twitter.com/ApacheIgnite" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @ApacheIgnite</a> </td> </tr> <tr> <td colspan="2" valign="top" align="left"> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <b>Ignite Fabric</b> </td> <td>: ver. <strong>2.6.0</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>: July 10 2018 </td> </tr> </tbody> </table> </td> </tr> </table></small></p> |
| </body> |
| </html> |