blob: 3b109001b85bd0e3c2cc1132985169b781447fe5 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_112) on Mon Dec 18 11:25:18 EST 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Job (Apache Edgent (incubating) v1.2.0 API)</title>
<meta name="date" content="2017-12-18">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Job (Apache Edgent (incubating) v1.2.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":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/Job.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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/edgent/execution/DirectSubmitter.html" title="interface in org.apache.edgent.execution"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/edgent/execution/Job.Action.html" title="enum in org.apache.edgent.execution"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/edgent/execution/Job.html" target="_top">Frames</a></li>
<li><a href="Job.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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.edgent.execution</div>
<h2 title="Interface Job" class="title">Interface Job</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../org/apache/edgent/graph/spi/execution/AbstractGraphJob.html" title="class in org.apache.edgent.graph.spi.execution">AbstractGraphJob</a>, <a href="../../../../org/apache/edgent/runtime/etiao/EtiaoJob.html" title="class in org.apache.edgent.runtime.etiao">EtiaoJob</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">Job</span></pre>
<div class="block">Actions and states for execution of an Edgent job.
The interface provides the main job lifecycle control, taking on the following
execution state values:
<ul>
<li><b>CONSTRUCTED</b> This job has been constructed but the
nodes are not yet initialized.</li>
<li><b>INITIALIZED</b> This job has been initialized and is
ready to process data.
<li><b>RUNNING</b> This job is processing data.</li>
<li><b>PAUSED</b> This job is paused.</li>
<li><b>CLOSED</b> This job is closed.</li>
</ul>
The interface provides access to two state values:
<ul>
<li> <a href="../../../../org/apache/edgent/execution/Job.html#getCurrentState--"><code>Current</code></a> - The current state of execution
when the job is not executing a state transition; the source state
while the job is making a state transition after the client code
calls <a href="../../../../org/apache/edgent/execution/Job.html#stateChange-org.apache.edgent.execution.Job.Action-"><code>stateChange(Job.Action)</code></a>.</li>
<li> <a href="../../../../org/apache/edgent/execution/Job.html#getNextState--"><code>Next</code></a> - The destination state while the job
is making a state transition; same as the current state while
the job state is stable (that is, not making a transition).</LI>
</ul>
The interface provides access to the job nodes
<a href="../../../../org/apache/edgent/execution/Job.html#getHealth--">health summary</a>, described by the following values:
<ul>
<li><b>HEALTHY</b> All graph nodes in the job are healthy.</li>
<li><b>UNHEALTHY</b> At least one graph node in the job is stopped or
stopping.</li>
</ul></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/execution/Job.Action.html" title="enum in org.apache.edgent.execution">Job.Action</a></span></code>
<div class="block">Actions which trigger <a href="../../../../org/apache/edgent/execution/Job.State.html" title="enum in org.apache.edgent.execution"><code>Job.State</code></a> transitions.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/execution/Job.Health.html" title="enum in org.apache.edgent.execution">Job.Health</a></span></code>
<div class="block">Enumeration for the summarized health indicator of the graph nodes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/execution/Job.State.html" title="enum in org.apache.edgent.execution">Job.State</a></span></code>
<div class="block">States of a graph job.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== 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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</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/edgent/execution/Job.html#complete--">complete</a></span>()</code>
<div class="block">Waits for any outstanding job work to complete.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/execution/Job.html#complete-long-java.util.concurrent.TimeUnit-">complete</a></span>(long&nbsp;timeout,
<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a>&nbsp;unit)</code>
<div class="block">Waits for at most the specified time for the job to complete.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/edgent/execution/Job.State.html" title="enum in org.apache.edgent.execution">Job.State</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/execution/Job.html#getCurrentState--">getCurrentState</a></span>()</code>
<div class="block">Retrieves the current state of this job.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/edgent/execution/Job.Health.html" title="enum in org.apache.edgent.execution">Job.Health</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/execution/Job.html#getHealth--">getHealth</a></span>()</code>
<div class="block">Returns the summarized health indicator of the graph nodes.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<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/edgent/execution/Job.html#getId--">getId</a></span>()</code>
<div class="block">Returns the identifier of this job.</div>
</td>
</tr>
<tr id="i5" 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/edgent/execution/Job.html#getLastError--">getLastError</a></span>()</code>
<div class="block">Returns the last error message caught by the current job execution.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<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/edgent/execution/Job.html#getName--">getName</a></span>()</code>
<div class="block">Returns the name of this job.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/edgent/execution/Job.State.html" title="enum in org.apache.edgent.execution">Job.State</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/execution/Job.html#getNextState--">getNextState</a></span>()</code>
<div class="block">Retrieves the next execution state when this job makes a state
transition.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/edgent/execution/Job.html#stateChange-org.apache.edgent.execution.Job.Action-">stateChange</a></span>(<a href="../../../../org/apache/edgent/execution/Job.Action.html" title="enum in org.apache.edgent.execution">Job.Action</a>&nbsp;action)</code>
<div class="block">Initiates an execution state change.</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="getCurrentState--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentState</h4>
<pre><a href="../../../../org/apache/edgent/execution/Job.State.html" title="enum in org.apache.edgent.execution">Job.State</a>&nbsp;getCurrentState()</pre>
<div class="block">Retrieves the current state of this job.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current state.</dd>
</dl>
</li>
</ul>
<a name="getNextState--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNextState</h4>
<pre><a href="../../../../org/apache/edgent/execution/Job.State.html" title="enum in org.apache.edgent.execution">Job.State</a>&nbsp;getNextState()</pre>
<div class="block">Retrieves the next execution state when this job makes a state
transition.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the destination state while in a state transition;
otherwise the same as <a href="../../../../org/apache/edgent/execution/Job.html#getCurrentState--"><code>getCurrentState()</code></a>.</dd>
</dl>
</li>
</ul>
<a name="stateChange-org.apache.edgent.execution.Job.Action-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stateChange</h4>
<pre>void&nbsp;stateChange(<a href="../../../../org/apache/edgent/execution/Job.Action.html" title="enum in org.apache.edgent.execution">Job.Action</a>&nbsp;action)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Initiates an execution state change.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>action</code> - which triggers the state change.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the job is not in an appropriate
state for the requested action, or the action is not supported.</dd>
</dl>
</li>
</ul>
<a name="getHealth--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHealth</h4>
<pre><a href="../../../../org/apache/edgent/execution/Job.Health.html" title="enum in org.apache.edgent.execution">Job.Health</a>&nbsp;getHealth()</pre>
<div class="block">Returns the summarized health indicator of the graph nodes.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the summarized Job node health.</dd>
</dl>
</li>
</ul>
<a name="getLastError--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLastError</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>&nbsp;getLastError()</pre>
<div class="block">Returns the last error message caught by the current job execution.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the last error message or an empty string if no error has
been caught.</dd>
</dl>
</li>
</ul>
<a name="getName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</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>&nbsp;getName()</pre>
<div class="block">Returns the name of this job. The name may be set when the job is
<a href="../../../../org/apache/edgent/execution/Submitter.html#submit-E-com.google.gson.JsonObject-">submitted</a>.
Implementations may create a job name if one is not specified at submit time.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the job name.</dd>
</dl>
</li>
</ul>
<a name="getId--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getId</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>&nbsp;getId()</pre>
<div class="block">Returns the identifier of this job.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this job identifier.</dd>
</dl>
</li>
</ul>
<a name="complete--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>complete</h4>
<pre>void&nbsp;complete()
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutionException.html?is-external=true" title="class or interface in java.util.concurrent">ExecutionException</a>,
<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 any outstanding job work to complete.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutionException.html?is-external=true" title="class or interface in java.util.concurrent">ExecutionException</a></code> - if the job execution threw an exception.</dd>
<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> - if the current thread was interrupted while waiting</dd>
</dl>
</li>
</ul>
<a name="complete-long-java.util.concurrent.TimeUnit-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>complete</h4>
<pre>void&nbsp;complete(long&nbsp;timeout,
<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a>&nbsp;unit)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutionException.html?is-external=true" title="class or interface in java.util.concurrent">ExecutionException</a>,
<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>,
<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeoutException.html?is-external=true" title="class or interface in java.util.concurrent">TimeoutException</a></pre>
<div class="block">Waits for at most the specified time for the job to complete.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>timeout</code> - the time to wait</dd>
<dd><code>unit</code> - the time unit of the timeout argument</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutionException.html?is-external=true" title="class or interface in java.util.concurrent">ExecutionException</a></code> - if the job execution threw an exception.</dd>
<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> - if the current thread was interrupted while waiting</dd>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeoutException.html?is-external=true" title="class or interface in java.util.concurrent">TimeoutException</a></code> - if the wait timed out</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/Job.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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/edgent/execution/DirectSubmitter.html" title="interface in org.apache.edgent.execution"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/edgent/execution/Job.Action.html" title="enum in org.apache.edgent.execution"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/edgent/execution/Job.html" target="_top">Frames</a></li>
<li><a href="Job.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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>Copyright &#169; 2016&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>