Added: uima/site/trunk/uima-website/docs/d/uima-ducc-2.2.0/api/index.html URL: http://svn.apache.org/viewvc/uima/site/trunk/uima-website/docs/d/uima-ducc-2.2.0/api/index.html?rev=1784198&view=auto ============================================================================== --- uima/site/trunk/uima-website/docs/d/uima-ducc-2.2.0/api/index.html (added) +++ uima/site/trunk/uima-website/docs/d/uima-ducc-2.2.0/api/index.html Thu Feb 23 19:30:22 2017 @@ -0,0 +1,75 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> +<title>Apache UIMA DUCC Java SDK 2.2.0 User-Level API Documentation</title> +<script type="text/javascript"> + tmpTargetPage = "" + window.location.search; + if (tmpTargetPage != "" && tmpTargetPage != "undefined") + tmpTargetPage = tmpTargetPage.substring(1); + if (tmpTargetPage.indexOf(":") != -1 || (tmpTargetPage != "" && !validURL(tmpTargetPage))) + tmpTargetPage = "undefined"; + targetPage = tmpTargetPage; + function validURL(url) { + try { + url = decodeURIComponent(url); + } + catch (error) { + return false; + } + var pos = url.indexOf(".html"); + if (pos == -1 || pos != url.length - 5) + return false; + var allowNumber = false; + var allowSep = false; + var seenDot = false; + for (var i = 0; i < url.length - 5; i++) { + var ch = url.charAt(i); + if ('a' <= ch && ch <= 'z' || + 'A' <= ch && ch <= 'Z' || + ch == '$' || + ch == '_' || + ch.charCodeAt(0) > 127) { + allowNumber = true; + allowSep = true; + } else if ('0' <= ch && ch <= '9' + || ch == '-') { + if (!allowNumber) + return false; + } else if (ch == '/' || ch == '.') { + if (!allowSep) + return false; + allowNumber = false; + allowSep = false; + if (ch == '.') + seenDot = true; + if (ch == '/' && seenDot) + return false; + } else { + return false; + } + } + return true; + } + function loadFrames() { + if (targetPage != "" && targetPage != "undefined") + top.classFrame.location = top.targetPage; + } +</script> +</head> +<frameset cols="20%,80%" title="Documentation frame" onload="top.loadFrames()"> +<frameset rows="30%,70%" title="Left frames" onload="top.loadFrames()"> +<frame src="overview-frame.html" name="packageListFrame" title="All Packages"> +<frame src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)"> +</frameset> +<frame src="overview-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes"> +<noframes> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> +</noframes> +</frameset> +</html>
Propchange: uima/site/trunk/uima-website/docs/d/uima-ducc-2.2.0/api/index.html ------------------------------------------------------------------------------ svn:eol-style = native Added: uima/site/trunk/uima-website/docs/d/uima-ducc-2.2.0/api/org/apache/uima/ducc/cli/AServicePing.html URL: http://svn.apache.org/viewvc/uima/site/trunk/uima-website/docs/d/uima-ducc-2.2.0/api/org/apache/uima/ducc/cli/AServicePing.html?rev=1784198&view=auto ============================================================================== --- uima/site/trunk/uima-website/docs/d/uima-ducc-2.2.0/api/org/apache/uima/ducc/cli/AServicePing.html (added) +++ uima/site/trunk/uima-website/docs/d/uima-ducc-2.2.0/api/org/apache/uima/ducc/cli/AServicePing.html Thu Feb 23 19:30:22 2017 @@ -0,0 +1,871 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> +<title>AServicePing (Apache UIMA DUCC Java SDK 2.2.0 User-Level API Documentation)</title> +<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="AServicePing (Apache UIMA DUCC Java SDK 2.2.0 \t\t\t\t\t\t\t\tUser-Level API Documentation)"; + } +//--> +</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="skip"><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/AServicePing.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>Prev Class</li> +<li><a href="../../../../../org/apache/uima/ducc/cli/CliBase.html" title="class in org.apache.uima.ducc.cli"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/uima/ducc/cli/AServicePing.html" target="_top">Frames</a></li> +<li><a href="AServicePing.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><a href="#field_summary">Field</a> | </li> +<li><a href="#constructor_summary">Constr</a> | </li> +<li><a href="#method_summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field_detail">Field</a> | </li> +<li><a href="#constructor_detail">Constr</a> | </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.uima.ducc.cli</div> +<h2 title="Class AServicePing" class="title">Class AServicePing</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.uima.ducc.cli.AServicePing</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public abstract class <span class="strong">AServicePing</span> +extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Abstraction for service pinger.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field_summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected boolean</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#autostart_enabled">autostart_enabled</a></strong></code> +<div class="block">This indicates whether the service's autostart flag is enabled or disabled.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected org.apache.uima.ducc.common.utils.DuccLogger</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#duccLogger">duccLogger</a></strong></code> +<div class="block">When the pinger is run as a thread inside the SM, this logger is used to + join the ping log with the SM log.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected int</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#failure_cursor">failure_cursor</a></strong></code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected int</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#failure_max">failure_max</a></strong></code> +<div class="block">This is the total number of instance failures allowed within the failure window.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected int[]</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#failure_window">failure_window</a></strong></code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected int</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#failure_window_period">failure_window_period</a></strong></code> +<div class="block">This is the time, in minutes, over which the failure window is implemented.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected int</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#failure_window_size">failure_window_size</a></strong></code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>></code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#initializationState">initializationState</a></strong></code> +<div class="block">This is a map containing the initialization state for the service, passed in only + once, during pinger initialization.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected long</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#last_use">last_use</a></strong></code> +<div class="block">This is the time/date the service was last used.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected boolean</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#log_enabled">log_enabled</a></strong></code> +<div class="block">This specifies whether the service log is requested to be enabled.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected int</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#monitor_rate">monitor_rate</a></strong></code> +<div class="block">This is the time between pings, in minutes.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected long</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#service_id">service_id</a></strong></code> +<div class="block">This is the unique DUCC_assigned ID of the service.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>></code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#smState">smState</a></strong></code> +<div class="block">This is a map containing current service state, passed in from the SM on every ping.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected int</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#total_failures">total_failures</a></strong></code> +<div class="block">This is the total number of instance failures since the SM or pinger was last started.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor_summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#AServicePing()">AServicePing</a></strong>()</code> </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/uima/ducc/cli/AServicePing.html#doLog(java.lang.String,%20java.lang.Object...)">doLog</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> methodName, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... msg)</code> +<div class="block">This is a convenience method for logging which enforces the use of the calling + method name and permits use of commas to separate fields in the message.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#getAdditions()">getAdditions</a></strong>()</code> +<div class="block"> + Called by the service manager to query the number of additional needed service instances.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>[]</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#getDeletions()">getDeletions</a></strong>()</code> +<div class="block"> + Called by the service manager to retrieve the specific service instances + to stop.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>long</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#getLastUse()">getLastUse</a></strong>()</code> +<div class="block"> + Pingers may track when a service was last used.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>></code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#getSmState()">getSmState</a></strong>()</code> +<div class="block"> + Getter of the service state; Implementors may just access it directly if they want.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>abstract <a href="../../../../../org/apache/uima/ducc/common/IServiceStatistics.html" title="interface in org.apache.uima.ducc.common">IServiceStatistics</a></code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#getStatistics()">getStatistics</a></strong>()</code> +<div class="block">Returns the object with application-derived health and statistics.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>abstract void</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#init(java.lang.String,%20java.lang.String)">init</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> arguments, + <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> endpoint)</code> +<div class="block">Called by the ping driver, to pass in useful things the pinger may want.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#init(java.lang.String,%20java.lang.String,%20java.util.Map)">init</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> arguments, + <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> endpoint, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> initState)</code> +<div class="block"> + Called by the ping driver to initialize static information about the service and + pinger.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#isAutostart()">isAutostart</a></strong>()</code> +<div class="block"> + The SM queries the ping/monitors autostart on return from each ping.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#isExcessiveFailures()">isExcessiveFailures</a></strong>()</code> +<div class="block"> + This determines if there have been excessive service instance failures by tracking the + number of failures, not consecutive, but rather within a window of time.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#setLogger(org.apache.uima.ducc.common.utils.DuccLogger)">setLogger</a></strong>(org.apache.uima.ducc.common.utils.DuccLogger logger)</code> +<div class="block"> + This is used by the SM for running pingers internally as SM threads, to direct + the ping log into the SM log.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#setSmState(java.util.Map)">setSmState</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> props)</code> +<div class="block">Current state of the monitored service is passed in here.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>abstract void</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#stop()">stop</a></strong>()</code> +<div class="block">Stop is called by the ping wrapper when it is being killed.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang /Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field_detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="failure_window"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>failure_window</h4> +<pre>protected int[] failure_window</pre> +</li> +</ul> +<a name="failure_cursor"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>failure_cursor</h4> +<pre>protected int failure_cursor</pre> +</li> +</ul> +<a name="total_failures"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>total_failures</h4> +<pre>protected int total_failures</pre> +<div class="block">This is the total number of instance failures since the SM or pinger was last started.</div> +</li> +</ul> +<a name="failure_max"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>failure_max</h4> +<pre>protected int failure_max</pre> +<div class="block">This is the total number of instance failures allowed within the failure window.</div> +</li> +</ul> +<a name="failure_window_period"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>failure_window_period</h4> +<pre>protected int failure_window_period</pre> +<div class="block">This is the time, in minutes, over which the failure window is implemented.</div> +</li> +</ul> +<a name="failure_window_size"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>failure_window_size</h4> +<pre>protected int failure_window_size</pre> +</li> +</ul> +<a name="monitor_rate"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>monitor_rate</h4> +<pre>protected int monitor_rate</pre> +<div class="block">This is the time between pings, in minutes.</div> +</li> +</ul> +<a name="autostart_enabled"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>autostart_enabled</h4> +<pre>protected boolean autostart_enabled</pre> +<div class="block">This indicates whether the service's autostart flag is enabled or disabled.</div> +</li> +</ul> +<a name="last_use"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>last_use</h4> +<pre>protected long last_use</pre> +<div class="block">This is the time/date the service was last used. If 0, the time is either unknown or the service has + never been used by clients. It is persisted by the SM over restarts.</div> +</li> +</ul> +<a name="log_enabled"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>log_enabled</h4> +<pre>protected boolean log_enabled</pre> +<div class="block">This specifies whether the service log is requested to be enabled.</div> +</li> +</ul> +<a name="service_id"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>service_id</h4> +<pre>protected long service_id</pre> +<div class="block">This is the unique DUCC_assigned ID of the service.</div> +</li> +</ul> +<a name="smState"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>smState</h4> +<pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> smState</pre> +<div class="block">This is a map containing current service state, passed in from the SM on every ping. + See <a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#getSmState()"><code>getSmState()</code></a> for details of the map.</div> +</li> +</ul> +<a name="initializationState"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>initializationState</h4> +<pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> initializationState</pre> +<div class="block">This is a map containing the initialization state for the service, passed in only + once, during pinger initialization. Its fields are set into primitive fields + in this class. The map itself isn't directly used by implementors.</div> +</li> +</ul> +<a name="duccLogger"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>duccLogger</h4> +<pre>protected org.apache.uima.ducc.common.utils.DuccLogger duccLogger</pre> +<div class="block">When the pinger is run as a thread inside the SM, this logger is used to + join the ping log with the SM log. When run as a process, + # the <a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#doLog(java.lang.String,%20java.lang.Object...)"><code>doLog(String, Object...)</code></a> method + writes to stdout which is directed to + the declared service log directory by the infrastructore.</div> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor_detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="AServicePing()"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>AServicePing</h4> +<pre>public AServicePing()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method_detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="init(java.lang.String, java.lang.String)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>init</h4> +<pre>public abstract void init(<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> arguments, + <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> endpoint) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> +<div class="block">Called by the ping driver, to pass in useful things the pinger may want.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>arguments</code> - This is passed in from the service specification's + service_ping_arguments string.</dd><dd><code>endpoint</code> - This is the name of the service endpoint, as passed in + at service registration.</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd></dl> +</li> +</ul> +<a name="init(java.lang.String, java.lang.String, java.util.Map)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>init</h4> +<pre>public void init(<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> arguments, + <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> endpoint, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> initState) + throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> +<div class="block"><p> + Called by the ping driver to initialize static information about the service and + pinger. This method calls the public init() method and is not intended for public + consumption. + </p> + + <p> + This method initializes the following state prior to invoking init(String, String): + </p> + + <xmp> + VAR NAME TYPE MEANING + ------------------ -------- --------------------------------------------- + monitor_rate int Ping period, in minutes. + service_id long DUCC ID of the service being monitored + log_enabled boolean Is the service registered with log enabled? + failure_max int Registered max consecutive failures + failure_window_size int The window, in terms of minutes, in which + 'failure-max' errors indicates excessive + instance failures. + autostart_enabled boolean Is the service registered with autostart on? + last_use long When was the last known use of this service + before it was (re)started? + + </xmp></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>arguments</code> - This is passed in from the service specification's + service_ping_arguments string.</dd><dd><code>endpoint</code> - This is the name of the service endpoint, as passed in + at service registration.</dd><dd><code>initState</code> - Properties file with static data about the service and + pinger.</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd></dl> +</li> +</ul> +<a name="stop()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>stop</h4> +<pre>public abstract void stop()</pre> +<div class="block">Stop is called by the ping wrapper when it is being killed. Implementors may optionally + override this method with conenction shutdown code.</div> +</li> +</ul> +<a name="getStatistics()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getStatistics</h4> +<pre>public abstract <a href="../../../../../org/apache/uima/ducc/common/IServiceStatistics.html" title="interface in org.apache.uima.ducc.common">IServiceStatistics</a> getStatistics()</pre> +<div class="block">Returns the object with application-derived health and statistics.</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>an object that implements <a href="../../../../../org/apache/uima/ducc/common/IServiceStatistics.html" title="interface in org.apache.uima.ducc.common"><code>IServiceStatistics</code></a> containing the basic + service health information for use by SM and display in the Web Server.</dd></dl> +</li> +</ul> +<a name="setSmState(java.util.Map)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>setSmState</h4> +<pre>public void setSmState(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> props)</pre> +<div class="block">Current state of the monitored service is passed in here. + NOTE: Used for SM to Ping/Monitor communicaiton only.</div> +</li> +</ul> +<a name="getSmState()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getSmState</h4> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> getSmState()</pre> +<div class="block"><p> + Getter of the service state; Implementors may just access it directly if they want. + Access the state passed to the ping/monitor from SM: + </p> + <xmp> + KEY Object Type MEANING + ---------------- ------------- ------------------------------------------------------------------ + all-instances Long[] DUCC Ids of all running instances (may not all be in Runing state) + active-instances Long[] DUCC Ids of all instances that are Running + autostart-enabled Boolean Current state of service autostart + references Long[] DUCC Ids of all jobs referencing this service + run-failures Integer Total run failures since the service was started + </xmp></div> +<dl><dt><span class="strong">Returns:</span></dt><dd>A Map<String, Object> of string-key to Object containing dynamic information from the SM. Callers + must cast the value to the correct type as shown below.</dd></dl> +</li> +</ul> +<a name="getAdditions()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getAdditions</h4> +<pre>public int getAdditions()</pre> +<div class="block"><p> + Called by the service manager to query the number of additional needed service instances. + </p> + + <p> + Implementing ping/monitors override this method to request additional instances. + </p></div> +<dl><dt><span class="strong">Returns:</span></dt><dd>the number of new instances of the service to start.</dd></dl> +</li> +</ul> +<a name="getDeletions()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getDeletions</h4> +<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>[] getDeletions()</pre> +<div class="block"><p> + Called by the service manager to retrieve the specific service instances + to stop. + </p> + + <p> + Implementing ping/monitors return the specific IDs of service processes to + be terminated by DUCC. The IDs are a subset of the IDS found in the + 'all-instances' map from getSmState(); + </p></div> +<dl><dt><span class="strong">Returns:</span></dt><dd>a Long[] array of service instance IDs to terminate.</dd></dl> +</li> +</ul> +<a name="isAutostart()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isAutostart</h4> +<pre>public boolean isAutostart()</pre> +<div class="block"><p> + The SM queries the ping/monitors autostart on return from each ping. The default is + to return the same value that came in on the ping. + </p> + + <p> + Implementing ping/monitors may override + this behaviour to dynanically enable or disable autostart. + </p> + + <p> + It is useful to disable autostart if a pinger detects that a service has been + idle for a long time and it wants to shrink the number of live instances + below the autostart value. If autostart is not disabled it the number of + instances will not be allowed to shrink to 0. + </p></div> +<dl><dt><span class="strong">Returns:</span></dt><dd>true if the service should be marked for autostart, and false otherwise.</dd></dl> +</li> +</ul> +<a name="getLastUse()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getLastUse</h4> +<pre>public long getLastUse()</pre> +<div class="block"><p> + Pingers may track when a service was last used. If set to + non-zero this is the time and date of last use, converted to + milliseconds, as returned by System.getTimeMillis(). Its value is always + set into the meta file for the pinger on each ping. + </p> + + <p> + Implementing ping/monitors may return a datestamp to indicate when the + service was last used by a job. + </p></div> +<dl><dt><span class="strong">Returns:</span></dt><dd>A Long, representing the time of last known use of the service, + as returned by System.getTimeMillis().</dd></dl> +</li> +</ul> +<a name="setLogger(org.apache.uima.ducc.common.utils.DuccLogger)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>setLogger</h4> +<pre>public void setLogger(org.apache.uima.ducc.common.utils.DuccLogger logger)</pre> +<div class="block"><p> + This is used by the SM for running pingers internally as SM threads, to direct + the ping log into the SM log. +</p> + + <p> + External an custom pingers should generally not invoke this method unless the + intention is to fully manage their own logs. + </p> + + <p> + In all cases, the use of the <a href="../../../../../org/apache/uima/ducc/cli/AServicePing.html#doLog(java.lang.String,%20java.lang.Object...)"><code>doLog(String, Object...)</code></a> + method is strongly encouraged as it insures messages are logged into a + well-known and managed location. + </p></div> +</li> +</ul> +<a name="doLog(java.lang.String, java.lang.Object...)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>doLog</h4> +<pre>public void doLog(<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> methodName, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... msg)</pre> +<div class="block">This is a convenience method for logging which enforces the use of the calling + method name and permits use of commas to separate fields in the message. The + fields are converted via toString() and joined on a single space ' '. The composed + string is then written to the logger if it exists, and System.out otherwise.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>methodName</code> - This should be the named of the method calling doLog.</dd><dd><code>msg</code> - This is a variable length parameter list which gets joined + on ' ' and emitted to the logger.</dd></dl> +</li> +</ul> +<a name="isExcessiveFailures()"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>isExcessiveFailures</h4> +<pre>public boolean isExcessiveFailures()</pre> +<div class="block"><p> + This determines if there have been excessive service instance failures by tracking the + number of failures, not consecutive, but rather within a window of time. It may be + overridden by extending monitors. + </p> + + <p> + This default implementation uses a time window to determine if exessive failures + have occurred in a short period of time. It operates off the two failure parameters + from the service registration: + <xmp> + instance_failure_window [time-in-minutes] + instance_failure_limit [number of failures] + </xmp> + </p> + <p> + If more than 'instance_failure_limit' failures occure within the preceding + 'time-in-minutes' this method returns 'true' and the SM disables automatic + restart of instances. Restart may be resumed by manually issuing a CLI start + to the service one the problem is resolved. + </p> + + <p> + Implementing ping/monitors may override this with custom logic to determine if a + service has had excessive failures. + </p></div> +<dl><dt><span class="strong">Returns:</span></dt><dd>true if too many failures have been observed, false otherwise. If 'true' + is returned, the SM no longer restarts failed instances.</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="skip"><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/AServicePing.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>Prev Class</li> +<li><a href="../../../../../org/apache/uima/ducc/cli/CliBase.html" title="class in org.apache.uima.ducc.cli"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/uima/ducc/cli/AServicePing.html" target="_top">Frames</a></li> +<li><a href="AServicePing.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><a href="#field_summary">Field</a> | </li> +<li><a href="#constructor_summary">Constr</a> | </li> +<li><a href="#method_summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field_detail">Field</a> | </li> +<li><a href="#constructor_detail">Constr</a> | </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 © 2012–2017 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> Propchange: uima/site/trunk/uima-website/docs/d/uima-ducc-2.2.0/api/org/apache/uima/ducc/cli/AServicePing.html ------------------------------------------------------------------------------ svn:eol-style = native