http://git-wip-us.apache.org/repos/asf/twill/blob/49f35954/src/site/resources/apidocs-0.12.0/org/apache/twill/api/ServiceController.html ---------------------------------------------------------------------- diff --git a/src/site/resources/apidocs-0.12.0/org/apache/twill/api/ServiceController.html b/src/site/resources/apidocs-0.12.0/org/apache/twill/api/ServiceController.html new file mode 100644 index 0000000..b521e33 --- /dev/null +++ b/src/site/resources/apidocs-0.12.0/org/apache/twill/api/ServiceController.html @@ -0,0 +1,414 @@ +<!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 (version 1.7.0_80) on Fri Aug 25 09:24:50 PDT 2017 --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>ServiceController (Apache Twill 0.12.0 API)</title> +<meta name="date" content="2017-08-25"> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +</head> +<body> +<script type="text/javascript"><!-- + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="ServiceController (Apache Twill 0.12.0 API)"; + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar_top"> +<!-- --> +</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/ServiceController.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/twill/api/ServiceAnnouncer.html" title="interface in org.apache.twill.api"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../../org/apache/twill/api/ServiceController.TerminationStatus.html" title="enum in org.apache.twill.api"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/twill/api/ServiceController.html" target="_top">Frames</a></li> +<li><a href="ServiceController.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><a href="#nested_class_summary">Nested</a> | </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.twill.api</div> +<h2 title="Interface ServiceController" class="title">Interface ServiceController</h2> +</div> +<div class="contentContainer"> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Known Subinterfaces:</dt> +<dd><a href="../../../../org/apache/twill/api/TwillController.html" title="interface in org.apache.twill.api">TwillController</a></dd> +</dl> +<hr> +<br> +<pre>public interface <span class="strong">ServiceController</span></pre> +<div class="block">This interface is for controlling a remote running service.</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="overviewSummary" 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"> </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 </code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/ServiceController.TerminationStatus.html" title="enum in org.apache.twill.api">ServiceController.TerminationStatus</a></strong></code> +<div class="block">Enum to represent termination status of the application when it completed.</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span>Methods</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/ServiceController.html#awaitTerminated()">awaitTerminated</a></strong>()</code> +<div class="block">Waits for termination of the remote service.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/ServiceController.html#awaitTerminated(long,%20java.util.concurrent.TimeUnit)">awaitTerminated</a></strong>(long timeout, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a> timeoutUnit)</code> +<div class="block">Waits for termination of the remote service for no more than the given timeout limit.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/twill/api/RunId.html" title="interface in org.apache.twill.api">RunId</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/ServiceController.html#getRunId()">getRunId</a></strong>()</code> +<div class="block">Returns the <a href="../../../../org/apache/twill/api/RunId.html" title="interface in org.apache.twill.api"><code>RunId</code></a> of the running application.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../org/apache/twill/api/ServiceController.TerminationStatus.html" title="enum in org.apache.twill.api">ServiceController.TerminationStatus</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/ServiceController.html#getTerminationStatus()">getTerminationStatus</a></strong>()</code> +<div class="block">Gets the termination status of the application represented by this controller.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/ServiceController.html#kill()">kill</a></strong>()</code> +<div class="block">Requests to forcefully kill a running service.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/ServiceController.html#onRunning(java.lang.Runnable,%20java.util.concurrent.Executor)">onRunning</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> runnable, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a> executor)</code> +<div class="block">Attaches a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang"><code>Runnable</code></a> that will get executed when the service is running.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/ServiceController.html#onTerminated(java.lang.Runnable,%20java.util.concurrent.Executor)">onTerminated</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> runnable, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a> executor)</code> +<div class="block">Attaches a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang"><code>Runnable</code></a> that will get executed when the serivce is terminated.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</a><<a href="../../../../org/apache/twill/api/Command.html" title="interface in org.apache.twill.api">Command</a>></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/ServiceController.html#sendCommand(org.apache.twill.api.Command)">sendCommand</a></strong>(<a href="../../../../org/apache/twill/api/Command.html" title="interface in org.apache.twill.api">Command</a> command)</code> +<div class="block">Sends a user command to the running application.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</a><<a href="../../../../org/apache/twill/api/Command.html" title="interface in org.apache.twill.api">Command</a>></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/ServiceController.html#sendCommand(java.lang.String,%20org.apache.twill.api.Command)">sendCommand</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> runnableName, + <a href="../../../../org/apache/twill/api/Command.html" title="interface in org.apache.twill.api">Command</a> command)</code> +<div class="block">Sends a user command to the given runnable of the running application.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</a><? extends <a href="../../../../org/apache/twill/api/ServiceController.html" title="interface in org.apache.twill.api">ServiceController</a>></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/ServiceController.html#terminate()">terminate</a></strong>()</code> +<div class="block">Requests to terminate the running service.</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="getRunId()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getRunId</h4> +<pre><a href="../../../../org/apache/twill/api/RunId.html" title="interface in org.apache.twill.api">RunId</a> getRunId()</pre> +<div class="block">Returns the <a href="../../../../org/apache/twill/api/RunId.html" title="interface in org.apache.twill.api"><code>RunId</code></a> of the running application.</div> +</li> +</ul> +<a name="sendCommand(org.apache.twill.api.Command)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sendCommand</h4> +<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</a><<a href="../../../../org/apache/twill/api/Command.html" title="interface in org.apache.twill.api">Command</a>> sendCommand(<a href="../../../../org/apache/twill/api/Command.html" title="interface in org.apache.twill.api">Command</a> command)</pre> +<div class="block">Sends a user command to the running application.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>command</code> - The command to send.</dd> +<dt><span class="strong">Returns:</span></dt><dd>A <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent"><code>Future</code></a> that will be completed when the command is successfully processed + by the target application.</dd></dl> +</li> +</ul> +<a name="sendCommand(java.lang.String, org.apache.twill.api.Command)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sendCommand</h4> +<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</a><<a href="../../../../org/apache/twill/api/Command.html" title="interface in org.apache.twill.api">Command</a>> sendCommand(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> runnableName, + <a href="../../../../org/apache/twill/api/Command.html" title="interface in org.apache.twill.api">Command</a> command)</pre> +<div class="block">Sends a user command to the given runnable of the running application.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>runnableName</code> - Name of the <a href="../../../../org/apache/twill/api/TwillRunnable.html" title="interface in org.apache.twill.api"><code>TwillRunnable</code></a>.</dd><dd><code>command</code> - The command to send.</dd> +<dt><span class="strong">Returns:</span></dt><dd>A <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent"><code>Future</code></a> that will be completed when the command is successfully processed + by the target runnable.</dd></dl> +</li> +</ul> +<a name="terminate()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>terminate</h4> +<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</a><? extends <a href="../../../../org/apache/twill/api/ServiceController.html" title="interface in org.apache.twill.api">ServiceController</a>> terminate()</pre> +<div class="block">Requests to terminate the running service. The service will be given chance to shutdown gracefully. + This method returns immediately and caller can get the termination state through the future returned. + Calling this method multiple times is allowed and a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent"><code>Future</code></a> representing the termination state + will be returned.</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent"><code>Future</code></a> that represents the termination of the service. The future result will be + this <a href="../../../../org/apache/twill/api/ServiceController.html" title="interface in org.apache.twill.api"><code>ServiceController</code></a>. If the service terminated with a <a href="../../../../org/apache/twill/api/ServiceController.TerminationStatus.html#FAILED"><code>ServiceController.TerminationStatus.FAILED</code></a> status, + calling the <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html?is-external=true#get()" title="class or interface in java.util.concurrent"><code>Future.get()</code></a> on the returning future will throw <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutionException.html?is-external=true" title="class or interface in java.util.concurrent"><code>ExecutionException</code></a>.</dd></dl> +</li> +</ul> +<a name="kill()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>kill</h4> +<pre>void kill()</pre> +<div class="block">Requests to forcefully kill a running service.</div> +</li> +</ul> +<a name="onRunning(java.lang.Runnable, java.util.concurrent.Executor)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>onRunning</h4> +<pre>void onRunning(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> runnable, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a> executor)</pre> +<div class="block">Attaches a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang"><code>Runnable</code></a> that will get executed when the service is running.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>runnable</code> - the <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang"><code>Runnable</code></a> to be executed when the service is running.</dd><dd><code>executor</code> - the executor in which the runnable will be executed with.</dd></dl> +</li> +</ul> +<a name="onTerminated(java.lang.Runnable, java.util.concurrent.Executor)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>onTerminated</h4> +<pre>void onTerminated(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a> runnable, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</a> executor)</pre> +<div class="block">Attaches a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang"><code>Runnable</code></a> that will get executed when the serivce is terminated.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>runnable</code> - the <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang"><code>Runnable</code></a> to be executed when the service is terminated.</dd><dd><code>executor</code> - the executor in which the runnable will be executed with.</dd></dl> +</li> +</ul> +<a name="awaitTerminated()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>awaitTerminated</h4> +<pre>void awaitTerminated() + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutionException.html?is-external=true" title="class or interface in java.util.concurrent">ExecutionException</a></pre> +<div class="block">Waits for termination of the remote service.</div> +<dl><dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutionException.html?is-external=true" title="class or interface in java.util.concurrent">ExecutionException</a></code> - if the service terminated due to exception.</dd></dl> +</li> +</ul> +<a name="awaitTerminated(long, java.util.concurrent.TimeUnit)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>awaitTerminated</h4> +<pre>void awaitTerminated(long timeout, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a> timeoutUnit) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/TimeoutException.html?is-external=true" title="class or interface in java.util.concurrent">TimeoutException</a>, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutionException.html?is-external=true" title="class or interface in java.util.concurrent">ExecutionException</a></pre> +<div class="block">Waits for termination of the remote service for no more than the given timeout limit.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>timeout</code> - the maximum time to wait</dd><dd><code>timeoutUnit</code> - the time unit of the timeout</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/TimeoutException.html?is-external=true" title="class or interface in java.util.concurrent">TimeoutException</a></code> - if the service is not terminated within the given time.</dd> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutionException.html?is-external=true" title="class or interface in java.util.concurrent">ExecutionException</a></code> - if the service terminated due to exception.</dd></dl> +</li> +</ul> +<a name="getTerminationStatus()"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getTerminationStatus</h4> +<pre><a href="http://docs.oracle.com/javase/7/docs/api/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</a> +<a href="../../../../org/apache/twill/api/ServiceController.TerminationStatus.html" title="enum in org.apache.twill.api">ServiceController.TerminationStatus</a> getTerminationStatus()</pre> +<div class="block">Gets the termination status of the application represented by this controller.</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>the termination status or <code>null</code> if the application is still running</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/ServiceController.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/twill/api/ServiceAnnouncer.html" title="interface in org.apache.twill.api"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../../org/apache/twill/api/ServiceController.TerminationStatus.html" title="enum in org.apache.twill.api"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/twill/api/ServiceController.html" target="_top">Frames</a></li> +<li><a href="ServiceController.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><a href="#nested_class_summary">Nested</a> | </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>Copyright © 2013-2016 <a href="http://www.apache.org">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html>
http://git-wip-us.apache.org/repos/asf/twill/blob/49f35954/src/site/resources/apidocs-0.12.0/org/apache/twill/api/TwillApplication.html ---------------------------------------------------------------------- diff --git a/src/site/resources/apidocs-0.12.0/org/apache/twill/api/TwillApplication.html b/src/site/resources/apidocs-0.12.0/org/apache/twill/api/TwillApplication.html new file mode 100644 index 0000000..0e54553 --- /dev/null +++ b/src/site/resources/apidocs-0.12.0/org/apache/twill/api/TwillApplication.html @@ -0,0 +1,213 @@ +<!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 (version 1.7.0_80) on Fri Aug 25 09:24:50 PDT 2017 --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>TwillApplication (Apache Twill 0.12.0 API)</title> +<meta name="date" content="2017-08-25"> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +</head> +<body> +<script type="text/javascript"><!-- + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="TwillApplication (Apache Twill 0.12.0 API)"; + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar_top"> +<!-- --> +</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/TwillApplication.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/twill/api/ServiceController.TerminationStatus.html" title="enum in org.apache.twill.api"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../../org/apache/twill/api/TwillContext.html" title="interface in org.apache.twill.api"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/twill/api/TwillApplication.html" target="_top">Frames</a></li> +<li><a href="TwillApplication.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.twill.api</div> +<h2 title="Interface TwillApplication" class="title">Interface TwillApplication</h2> +</div> +<div class="contentContainer"> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public interface <span class="strong">TwillApplication</span></pre> +<div class="block">Represents a application that can be launched by Twill.</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span>Methods</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/twill/api/TwillSpecification.html" title="interface in org.apache.twill.api">TwillSpecification</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillApplication.html#configure()">configure</a></strong>()</code> +<div class="block">Invoked when launching the application on the client side.</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="configure()"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>configure</h4> +<pre><a href="../../../../org/apache/twill/api/TwillSpecification.html" title="interface in org.apache.twill.api">TwillSpecification</a> configure()</pre> +<div class="block">Invoked when launching the application on the client side.</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>A <a href="../../../../org/apache/twill/api/TwillSpecification.html" title="interface in org.apache.twill.api"><code>TwillSpecification</code></a> specifying properties about this application.</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/TwillApplication.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/twill/api/ServiceController.TerminationStatus.html" title="enum in org.apache.twill.api"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../../org/apache/twill/api/TwillContext.html" title="interface in org.apache.twill.api"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/twill/api/TwillApplication.html" target="_top">Frames</a></li> +<li><a href="TwillApplication.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>Copyright © 2013-2016 <a href="http://www.apache.org">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> http://git-wip-us.apache.org/repos/asf/twill/blob/49f35954/src/site/resources/apidocs-0.12.0/org/apache/twill/api/TwillContext.html ---------------------------------------------------------------------- diff --git a/src/site/resources/apidocs-0.12.0/org/apache/twill/api/TwillContext.html b/src/site/resources/apidocs-0.12.0/org/apache/twill/api/TwillContext.html new file mode 100644 index 0000000..1062af0 --- /dev/null +++ b/src/site/resources/apidocs-0.12.0/org/apache/twill/api/TwillContext.html @@ -0,0 +1,428 @@ +<!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 (version 1.7.0_80) on Fri Aug 25 09:24:50 PDT 2017 --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>TwillContext (Apache Twill 0.12.0 API)</title> +<meta name="date" content="2017-08-25"> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +</head> +<body> +<script type="text/javascript"><!-- + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="TwillContext (Apache Twill 0.12.0 API)"; + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar_top"> +<!-- --> +</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/TwillContext.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/twill/api/TwillApplication.html" title="interface in org.apache.twill.api"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../../org/apache/twill/api/TwillController.html" title="interface in org.apache.twill.api"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/twill/api/TwillContext.html" target="_top">Frames</a></li> +<li><a href="TwillContext.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.twill.api</div> +<h2 title="Interface TwillContext" class="title">Interface TwillContext</h2> +</div> +<div class="contentContainer"> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Superinterfaces:</dt> +<dd><a href="../../../../org/apache/twill/discovery/DiscoveryServiceClient.html" title="interface in org.apache.twill.discovery">DiscoveryServiceClient</a>, <a href="../../../../org/apache/twill/api/ServiceAnnouncer.html" title="interface in org.apache.twill.api">ServiceAnnouncer</a></dd> +</dl> +<hr> +<br> +<pre>public interface <span class="strong">TwillContext</span> +extends <a href="../../../../org/apache/twill/api/ServiceAnnouncer.html" title="interface in org.apache.twill.api">ServiceAnnouncer</a>, <a href="../../../../org/apache/twill/discovery/DiscoveryServiceClient.html" title="interface in org.apache.twill.discovery">DiscoveryServiceClient</a></pre> +<div class="block">Represents the runtime context of a <a href="../../../../org/apache/twill/api/TwillRunnable.html" title="interface in org.apache.twill.api"><code>TwillRunnable</code></a>.</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span>Methods</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks">Lock</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#createLock(java.lang.String)">createLock</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Creates a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks"><code>Lock</code></a> for performing locking mechanism within the same <a href="../../../../org/apache/twill/api/TwillApplication.html" title="interface in org.apache.twill.api"><code>TwillApplication</code></a>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../org/apache/twill/discovery/ServiceDiscovered.html" title="interface in org.apache.twill.discovery">ServiceDiscovered</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#discover(java.lang.String)">discover</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Discover service with the given name that is announced within the same <a href="../../../../org/apache/twill/api/TwillApplication.html" title="interface in org.apache.twill.api"><code>TwillApplication</code></a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/twill/common/Cancellable.html" title="interface in org.apache.twill.common">Cancellable</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#electLeader(java.lang.String,%20org.apache.twill.api.ElectionHandler)">electLeader</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, + <a href="../../../../org/apache/twill/api/ElectionHandler.html" title="interface in org.apache.twill.api">ElectionHandler</a> participantHandler)</code> +<div class="block">Register to participate in a leader election by instances within the same <a href="../../../../org/apache/twill/api/TwillApplication.html" title="interface in org.apache.twill.api"><code>TwillApplication</code></a>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#getApplicationArguments()">getApplicationArguments</a></strong>()</code> +<div class="block">Returns the runtime arguments that are passed to the <a href="../../../../org/apache/twill/api/TwillApplication.html" title="interface in org.apache.twill.api"><code>TwillApplication</code></a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/twill/api/RunId.html" title="interface in org.apache.twill.api">RunId</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#getApplicationRunId()">getApplicationRunId</a></strong>()</code> +<div class="block">Returns the <a href="../../../../org/apache/twill/api/RunId.html" title="interface in org.apache.twill.api"><code>RunId</code></a> of this running application.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#getArguments()">getArguments</a></strong>()</code> +<div class="block">Returns the runtime arguments that are passed to the <a href="../../../../org/apache/twill/api/TwillRunnable.html" title="interface in org.apache.twill.api"><code>TwillRunnable</code></a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#getHost()">getHost</a></strong>()</code> +<div class="block">Returns the hostname that the runnable is running on.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#getInstanceCount()">getInstanceCount</a></strong>()</code> +<div class="block">Returns the number of running instances assigned for this <a href="../../../../org/apache/twill/api/TwillRunnable.html" title="interface in org.apache.twill.api"><code>TwillRunnable</code></a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#getInstanceId()">getInstanceId</a></strong>()</code> +<div class="block">Returns an integer id from 0 to (instanceCount - 1).</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#getMaxMemoryMB()">getMaxMemoryMB</a></strong>()</code> +<div class="block">Returns the amount of memory in MB the runnable is allowed to use.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/twill/api/RunId.html" title="interface in org.apache.twill.api">RunId</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#getRunId()">getRunId</a></strong>()</code> +<div class="block">Returns the <a href="../../../../org/apache/twill/api/RunId.html" title="interface in org.apache.twill.api"><code>RunId</code></a> of this running instance of <a href="../../../../org/apache/twill/api/TwillRunnable.html" title="interface in org.apache.twill.api"><code>TwillRunnable</code></a>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../org/apache/twill/api/TwillRunnableSpecification.html" title="interface in org.apache.twill.api">TwillRunnableSpecification</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#getSpecification()">getSpecification</a></strong>()</code> +<div class="block">Returns the <a href="../../../../org/apache/twill/api/TwillRunnableSpecification.html" title="interface in org.apache.twill.api"><code>TwillRunnableSpecification</code></a> that was created by <a href="../../../../org/apache/twill/api/TwillRunnable.html#configure()"><code>TwillRunnable.configure()</code></a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/twill/api/TwillContext.html#getVirtualCores()">getVirtualCores</a></strong>()</code> +<div class="block">Returns the number of virtual cores the runnable is allowed to use.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods_inherited_from_class_org.apache.twill.api.ServiceAnnouncer"> +<!-- --> +</a> +<h3>Methods inherited from interface org.apache.twill.api.<a href="../../../../org/apache/twill/api/ServiceAnnouncer.html" title="interface in org.apache.twill.api">ServiceAnnouncer</a></h3> +<code><a href="../../../../org/apache/twill/api/ServiceAnnouncer.html#announce(java.lang.String,%20int)">announce</a>, <a href="../../../../org/apache/twill/api/ServiceAnnouncer.html#announce(java.lang.String,%20int,%20byte[])">announce</a></code></li> +</ul> +</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="getRunId()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getRunId</h4> +<pre><a href="../../../../org/apache/twill/api/RunId.html" title="interface in org.apache.twill.api">RunId</a> getRunId()</pre> +<div class="block">Returns the <a href="../../../../org/apache/twill/api/RunId.html" title="interface in org.apache.twill.api"><code>RunId</code></a> of this running instance of <a href="../../../../org/apache/twill/api/TwillRunnable.html" title="interface in org.apache.twill.api"><code>TwillRunnable</code></a>.</div> +</li> +</ul> +<a name="getApplicationRunId()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getApplicationRunId</h4> +<pre><a href="../../../../org/apache/twill/api/RunId.html" title="interface in org.apache.twill.api">RunId</a> getApplicationRunId()</pre> +<div class="block">Returns the <a href="../../../../org/apache/twill/api/RunId.html" title="interface in org.apache.twill.api"><code>RunId</code></a> of this running application.</div> +</li> +</ul> +<a name="getInstanceCount()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getInstanceCount</h4> +<pre>int getInstanceCount()</pre> +<div class="block">Returns the number of running instances assigned for this <a href="../../../../org/apache/twill/api/TwillRunnable.html" title="interface in org.apache.twill.api"><code>TwillRunnable</code></a>.</div> +</li> +</ul> +<a name="getHost()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getHost</h4> +<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a> getHost()</pre> +<div class="block">Returns the hostname that the runnable is running on.</div> +</li> +</ul> +<a name="getArguments()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getArguments</h4> +<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] getArguments()</pre> +<div class="block">Returns the runtime arguments that are passed to the <a href="../../../../org/apache/twill/api/TwillRunnable.html" title="interface in org.apache.twill.api"><code>TwillRunnable</code></a>.</div> +</li> +</ul> +<a name="getApplicationArguments()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getApplicationArguments</h4> +<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] getApplicationArguments()</pre> +<div class="block">Returns the runtime arguments that are passed to the <a href="../../../../org/apache/twill/api/TwillApplication.html" title="interface in org.apache.twill.api"><code>TwillApplication</code></a>.</div> +</li> +</ul> +<a name="getSpecification()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getSpecification</h4> +<pre><a href="../../../../org/apache/twill/api/TwillRunnableSpecification.html" title="interface in org.apache.twill.api">TwillRunnableSpecification</a> getSpecification()</pre> +<div class="block">Returns the <a href="../../../../org/apache/twill/api/TwillRunnableSpecification.html" title="interface in org.apache.twill.api"><code>TwillRunnableSpecification</code></a> that was created by <a href="../../../../org/apache/twill/api/TwillRunnable.html#configure()"><code>TwillRunnable.configure()</code></a>.</div> +</li> +</ul> +<a name="getInstanceId()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getInstanceId</h4> +<pre>int getInstanceId()</pre> +<div class="block">Returns an integer id from 0 to (instanceCount - 1).</div> +</li> +</ul> +<a name="getVirtualCores()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getVirtualCores</h4> +<pre>int getVirtualCores()</pre> +<div class="block">Returns the number of virtual cores the runnable is allowed to use.</div> +</li> +</ul> +<a name="getMaxMemoryMB()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getMaxMemoryMB</h4> +<pre>int getMaxMemoryMB()</pre> +<div class="block">Returns the amount of memory in MB the runnable is allowed to use.</div> +</li> +</ul> +<a name="discover(java.lang.String)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>discover</h4> +<pre><a href="../../../../org/apache/twill/discovery/ServiceDiscovered.html" title="interface in org.apache.twill.discovery">ServiceDiscovered</a> discover(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Discover service with the given name that is announced within the same <a href="../../../../org/apache/twill/api/TwillApplication.html" title="interface in org.apache.twill.api"><code>TwillApplication</code></a>.</div> +<dl> +<dt><strong>Specified by:</strong></dt> +<dd><code><a href="../../../../org/apache/twill/discovery/DiscoveryServiceClient.html#discover(java.lang.String)">discover</a></code> in interface <code><a href="../../../../org/apache/twill/discovery/DiscoveryServiceClient.html" title="interface in org.apache.twill.discovery">DiscoveryServiceClient</a></code></dd> +<dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - Name of the service</dd> +<dt><span class="strong">Returns:</span></dt><dd>A <a href="../../../../org/apache/twill/discovery/ServiceDiscovered.html" title="interface in org.apache.twill.discovery"><code>ServiceDiscovered</code></a> object representing the result.</dd></dl> +</li> +</ul> +<a name="electLeader(java.lang.String, org.apache.twill.api.ElectionHandler)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>electLeader</h4> +<pre><a href="../../../../org/apache/twill/common/Cancellable.html" title="interface in org.apache.twill.common">Cancellable</a> electLeader(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, + <a href="../../../../org/apache/twill/api/ElectionHandler.html" title="interface in org.apache.twill.api">ElectionHandler</a> participantHandler)</pre> +<div class="block">Register to participate in a leader election by instances within the same <a href="../../../../org/apache/twill/api/TwillApplication.html" title="interface in org.apache.twill.api"><code>TwillApplication</code></a>.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - Unique name for the election</dd> +<dt><span class="strong">Returns:</span></dt><dd>A <a href="../../../../org/apache/twill/common/Cancellable.html" title="interface in org.apache.twill.common"><code>Cancellable</code></a> object representing this candidate's participation.</dd></dl> +</li> +</ul> +<a name="createLock(java.lang.String)"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>createLock</h4> +<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks">Lock</a> createLock(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Creates a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks"><code>Lock</code></a> for performing locking mechanism within the same <a href="../../../../org/apache/twill/api/TwillApplication.html" title="interface in org.apache.twill.api"><code>TwillApplication</code></a>. + The lock created is a reentrant such that if the lock is owned by the current thread, it will return immediately.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - Unique name for the lock</dd> +<dt><span class="strong">Returns:</span></dt><dd>A <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks"><code>Lock</code></a> object</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/TwillContext.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/twill/api/TwillApplication.html" title="interface in org.apache.twill.api"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../../org/apache/twill/api/TwillController.html" title="interface in org.apache.twill.api"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/twill/api/TwillContext.html" target="_top">Frames</a></li> +<li><a href="TwillContext.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>Copyright © 2013-2016 <a href="http://www.apache.org">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html>
