| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_292) on Tue Jun 15 06:00:46 GMT 2021 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>AbstractService (Apache Hadoop Main 3.3.1 API)</title> |
| <meta name="date" content="2021-06-15"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="AbstractService (Apache Hadoop Main 3.3.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":9,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":9,"i24":10,"i25":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/AbstractService.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/hadoop/service/CompositeService.html" title="class in org.apache.hadoop.service"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/hadoop/service/AbstractService.html" target="_top">Frames</a></li> |
| <li><a href="AbstractService.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><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </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.hadoop.service</div> |
| <h2 title="Class AbstractService" class="title">Class AbstractService</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/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.hadoop.service.AbstractService</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a>, <a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><a href="../../../../org/apache/hadoop/service/launcher/AbstractLaunchableService.html" title="class in org.apache.hadoop.service.launcher">AbstractLaunchableService</a>, <a href="../../../../org/apache/hadoop/yarn/util/AbstractLivelinessMonitor.html" title="class in org.apache.hadoop.yarn.util">AbstractLivelinessMonitor</a>, <a href="../../../../org/apache/hadoop/yarn/client/api/AHSClient.html" title="class in org.apache.hadoop.yarn.client.api">AHSClient</a>, <a href="../../../../org/apache/hadoop/yarn/client/api/AMRMClient.html" title="class in org.apache.hadoop.yarn.client.api">AMRMClient</a>, <a href="../../../../org/apache/hadoop/yarn/client/api/async/AMRMClientAsync.html" title="class in org.apache.hadoop.yarn.client.api.async">AMRMClientAsync</a>, <a href="../../../../org/apache/hadoop/yarn/event/AsyncDispatcher.html" title="class in org.apache.hadoop.yarn.event">AsyncDispatcher</a>, <a href="../../../../org/apache/hadoop/service/CompositeService.html" title="class in org.apache.hadoop.service">CompositeService</a>, <a href="../../../../org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.html" title="class in org.apache.hadoop.mapreduce.v2.hs">HistoryFileManager</a>, <a href="../../../../org/apache/hadoop/yarn/client/api/NMClient.html" title="class in org.apache.hadoop.yarn.client.api">NMClient</a>, <a href="../../../../org/apache/hadoop/yarn/client/api/async/NMClientAsync.html" title="class in org.apache.hadoop.yarn.client.api.async">NMClientAsync</a>, <a href="../../../../org/apache/hadoop/yarn/client/api/SharedCacheClient.html" title="class in org.apache.hadoop.yarn.client.api">SharedCacheClient</a>, <a href="../../../../org/apache/hadoop/yarn/client/api/YarnClient.html" title="class in org.apache.hadoop.yarn.client.api">YarnClient</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>@InterfaceAudience.Public |
| @InterfaceStability.Evolving |
| public abstract class <span class="typeNameLabel">AbstractService</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> |
| implements <a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></pre> |
| <div class="block">This is the base implementation class for services.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" 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><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#AbstractService-java.lang.String-">AbstractService</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> |
| <div class="block">Construct the service.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#close--">close</a></span>()</code> |
| <div class="block">Relay to <a href="../../../../org/apache/hadoop/service/AbstractService.html#stop--"><code>stop()</code></a></div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#getBlockers--">getBlockers</a></span>()</code> |
| <div class="block">Get the blockers on a service -remote dependencies |
| that are stopping the service from being <i>live</i>.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#getConfig--">getConfig</a></span>()</code> |
| <div class="block">Get the configuration of this service.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#getFailureCause--">getFailureCause</a></span>()</code> |
| <div class="block">Get the first exception raised during the service failure.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>org.apache.hadoop.service.Service.STATE</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#getFailureState--">getFailureState</a></span>()</code> |
| <div class="block">Get the state in which the failure in <a href="../../../../org/apache/hadoop/service/Service.html#getFailureCause--"><code>Service.getFailureCause()</code></a> occurred.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/hadoop/service/LifecycleEvent.html" title="class in org.apache.hadoop.service">LifecycleEvent</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#getLifecycleHistory--">getLifecycleHistory</a></span>()</code> |
| <div class="block">Get a snapshot of the lifecycle history; it is a static list</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#getName--">getName</a></span>()</code> |
| <div class="block">Get the name of this service.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>org.apache.hadoop.service.Service.STATE</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#getServiceState--">getServiceState</a></span>()</code> |
| <div class="block">Get the current service state</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#getStartTime--">getStartTime</a></span>()</code> |
| <div class="block">Get the service start time</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#init-org.apache.hadoop.conf.Configuration-">init</a></span>(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</code> |
| <div class="block">Initialize the service.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#isInState-org.apache.hadoop.service.Service.STATE-">isInState</a></span>(org.apache.hadoop.service.Service.STATE expected)</code> |
| <div class="block">Query to see if the service is in a specific state.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#noteFailure-java.lang.Exception-">noteFailure</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> exception)</code> |
| <div class="block">Failure handling: record the exception |
| that triggered it -if there was not one already.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#putBlocker-java.lang.String-java.lang.String-">putBlocker</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> details)</code> |
| <div class="block">Put a blocker to the blocker map -replacing any |
| with the same name.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#registerGlobalListener-org.apache.hadoop.service.ServiceStateChangeListener-">registerGlobalListener</a></span>(<a href="../../../../org/apache/hadoop/service/ServiceStateChangeListener.html" title="interface in org.apache.hadoop.service">ServiceStateChangeListener</a> l)</code> |
| <div class="block">Register a global listener, which receives notifications |
| from the state change events of all services in the JVM</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#registerServiceListener-org.apache.hadoop.service.ServiceStateChangeListener-">registerServiceListener</a></span>(<a href="../../../../org/apache/hadoop/service/ServiceStateChangeListener.html" title="interface in org.apache.hadoop.service">ServiceStateChangeListener</a> l)</code> |
| <div class="block">Register a listener to the service state change events.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#removeBlocker-java.lang.String-">removeBlocker</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> |
| <div class="block">Remove a blocker from the blocker map - |
| this is a no-op if the blocker is not present</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#serviceInit-org.apache.hadoop.conf.Configuration-">serviceInit</a></span>(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</code> |
| <div class="block">All initialization code needed by a service.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#serviceStart--">serviceStart</a></span>()</code> |
| <div class="block">Actions called during the INITED to STARTED transition.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#serviceStop--">serviceStop</a></span>()</code> |
| <div class="block">Actions called during the transition to the STOPPED state.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#setConfig-org.apache.hadoop.conf.Configuration-">setConfig</a></span>(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</code> |
| <div class="block">Set the configuration for this service.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#start--">start</a></span>()</code> |
| <div class="block">Start the service.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#stop--">stop</a></span>()</code> |
| <div class="block">Stop the service.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#toString--">toString</a></span>()</code> </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#unregisterGlobalListener-org.apache.hadoop.service.ServiceStateChangeListener-">unregisterGlobalListener</a></span>(<a href="../../../../org/apache/hadoop/service/ServiceStateChangeListener.html" title="interface in org.apache.hadoop.service">ServiceStateChangeListener</a> l)</code> |
| <div class="block">unregister a global listener.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#unregisterServiceListener-org.apache.hadoop.service.ServiceStateChangeListener-">unregisterServiceListener</a></span>(<a href="../../../../org/apache/hadoop/service/ServiceStateChangeListener.html" title="interface in org.apache.hadoop.service">ServiceStateChangeListener</a> l)</code> |
| <div class="block">Unregister a previously registered listener of the service state |
| change events.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/AbstractService.html#waitForServiceToStop-long-">waitForServiceToStop</a></span>(long timeout)</code> |
| <div class="block">Block waiting for the service to stop; uses the termination notification |
| object to do so.</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="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" 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"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="AbstractService-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>AbstractService</h4> |
| <pre>public AbstractService(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> |
| <div class="block">Construct the service.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - service name</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getServiceState--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getServiceState</h4> |
| <pre>public final org.apache.hadoop.service.Service.STATE getServiceState()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/hadoop/service/Service.html#getServiceState--">Service</a></code></span></div> |
| <div class="block">Get the current service state</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#getServiceState--">getServiceState</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the state of the service</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getFailureCause--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFailureCause</h4> |
| <pre>public final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> getFailureCause()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/hadoop/service/Service.html#getFailureCause--">Service</a></code></span></div> |
| <div class="block">Get the first exception raised during the service failure. If null, |
| no exception was logged</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#getFailureCause--">getFailureCause</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the failure logged during a transition to the stopped state</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getFailureState--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFailureState</h4> |
| <pre>public org.apache.hadoop.service.Service.STATE getFailureState()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/hadoop/service/Service.html#getFailureState--">Service</a></code></span></div> |
| <div class="block">Get the state in which the failure in <a href="../../../../org/apache/hadoop/service/Service.html#getFailureCause--"><code>Service.getFailureCause()</code></a> occurred.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#getFailureState--">getFailureState</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the state or null if there was no failure</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setConfig-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setConfig</h4> |
| <pre>protected void setConfig(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</pre> |
| <div class="block">Set the configuration for this service. |
| This method is called during <a href="../../../../org/apache/hadoop/service/AbstractService.html#init-org.apache.hadoop.conf.Configuration-"><code>init(Configuration)</code></a> |
| and should only be needed if for some reason a service implementation |
| needs to override that initial setting -for example replacing |
| it with a new subclass of <a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf"><code>Configuration</code></a></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>conf</code> - new configuration.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="init-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>init</h4> |
| <pre>public void init(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</pre> |
| <div class="block">Initialize the service. |
| |
| The transition MUST be from <code>Service.STATE.NOTINITED</code> to <code>Service.STATE.INITED</code> |
| unless the operation failed and an exception was raised, in which case |
| <a href="../../../../org/apache/hadoop/service/Service.html#stop--"><code>Service.stop()</code></a> MUST be invoked and the service enter the state |
| <code>Service.STATE.STOPPED</code>. |
| This invokes <a href="../../../../org/apache/hadoop/service/AbstractService.html#serviceInit-org.apache.hadoop.conf.Configuration-"><code>serviceInit(org.apache.hadoop.conf.Configuration)</code></a></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#init-org.apache.hadoop.conf.Configuration-">init</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>conf</code> - the configuration of the service. This must not be null</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/ServiceStateException.html" title="class in org.apache.hadoop.service">ServiceStateException</a></code> - if the configuration was null, |
| the state change not permitted, or something else went wrong</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="start--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>start</h4> |
| <pre>public void start()</pre> |
| <div class="block">Start the service. |
| |
| The transition MUST be from <code>Service.STATE.INITED</code> to <code>Service.STATE.STARTED</code> |
| unless the operation failed and an exception was raised, in which case |
| <a href="../../../../org/apache/hadoop/service/Service.html#stop--"><code>Service.stop()</code></a> MUST be invoked and the service enter the state |
| <code>Service.STATE.STOPPED</code>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#start--">start</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/ServiceStateException.html" title="class in org.apache.hadoop.service">ServiceStateException</a></code> - if the current service state does not permit |
| this action</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="stop--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stop</h4> |
| <pre>public void stop()</pre> |
| <div class="block">Stop the service. This MUST be a no-op if the service is already |
| in the <code>Service.STATE.STOPPED</code> state. It SHOULD be a best-effort attempt |
| to stop all parts of the service. |
| |
| The implementation must be designed to complete regardless of the service |
| state, including the initialized/uninitialized state of all its internal |
| fields.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#stop--">stop</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="close--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>close</h4> |
| <pre>public final void close() |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Relay to <a href="../../../../org/apache/hadoop/service/AbstractService.html#stop--"><code>stop()</code></a></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io">close</a></code> in interface <code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true#close--" title="class or interface in java.lang">close</a></code> in interface <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#close--">close</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="noteFailure-java.lang.Exception-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>noteFailure</h4> |
| <pre>protected final void noteFailure(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> exception)</pre> |
| <div class="block">Failure handling: record the exception |
| that triggered it -if there was not one already. |
| Services are free to call this themselves.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>exception</code> - the exception</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="waitForServiceToStop-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>waitForServiceToStop</h4> |
| <pre>public final boolean waitForServiceToStop(long timeout)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/hadoop/service/Service.html#waitForServiceToStop-long-">Service</a></code></span></div> |
| <div class="block">Block waiting for the service to stop; uses the termination notification |
| object to do so. |
| |
| This method will only return after all the service stop actions |
| have been executed (to success or failure), or the timeout elapsed |
| This method can be called before the service is inited or started; this is |
| to eliminate any race condition with the service stopping before |
| this event occurs.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#waitForServiceToStop-long-">waitForServiceToStop</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>timeout</code> - timeout in milliseconds. A value of zero means "forever"</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true iff the service stopped in the time period</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="serviceInit-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>serviceInit</h4> |
| <pre>protected void serviceInit(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <div class="block">All initialization code needed by a service. |
| |
| This method will only ever be called once during the lifecycle of |
| a specific service instance. |
| |
| Implementations do not need to be synchronized as the logic |
| in <a href="../../../../org/apache/hadoop/service/AbstractService.html#init-org.apache.hadoop.conf.Configuration-"><code>init(Configuration)</code></a> prevents re-entrancy. |
| |
| The base implementation checks to see if the subclass has created |
| a new configuration instance, and if so, updates the base class value</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>conf</code> - configuration</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - on a failure -these will be caught, |
| possibly wrapped, and will trigger a service stop</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="serviceStart--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>serviceStart</h4> |
| <pre>protected void serviceStart() |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <div class="block">Actions called during the INITED to STARTED transition. |
| |
| This method will only ever be called once during the lifecycle of |
| a specific service instance. |
| |
| Implementations do not need to be synchronized as the logic |
| in <a href="../../../../org/apache/hadoop/service/AbstractService.html#start--"><code>start()</code></a> prevents re-entrancy.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - if needed -these will be caught, |
| wrapped, and trigger a service stop</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="serviceStop--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>serviceStop</h4> |
| <pre>protected void serviceStop() |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <div class="block">Actions called during the transition to the STOPPED state. |
| |
| This method will only ever be called once during the lifecycle of |
| a specific service instance. |
| |
| Implementations do not need to be synchronized as the logic |
| in <a href="../../../../org/apache/hadoop/service/AbstractService.html#stop--"><code>stop()</code></a> prevents re-entrancy. |
| |
| Implementations MUST write this to be robust against failures, including |
| checks for null references -and for the first failure to not stop other |
| attempts to shut down parts of the service.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - if needed -these will be caught and logged.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="registerServiceListener-org.apache.hadoop.service.ServiceStateChangeListener-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>registerServiceListener</h4> |
| <pre>public void registerServiceListener(<a href="../../../../org/apache/hadoop/service/ServiceStateChangeListener.html" title="interface in org.apache.hadoop.service">ServiceStateChangeListener</a> l)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/hadoop/service/Service.html#registerServiceListener-org.apache.hadoop.service.ServiceStateChangeListener-">Service</a></code></span></div> |
| <div class="block">Register a listener to the service state change events. |
| If the supplied listener is already listening to this service, |
| this method is a no-op.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#registerServiceListener-org.apache.hadoop.service.ServiceStateChangeListener-">registerServiceListener</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>l</code> - a new listener</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="unregisterServiceListener-org.apache.hadoop.service.ServiceStateChangeListener-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unregisterServiceListener</h4> |
| <pre>public void unregisterServiceListener(<a href="../../../../org/apache/hadoop/service/ServiceStateChangeListener.html" title="interface in org.apache.hadoop.service">ServiceStateChangeListener</a> l)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/hadoop/service/Service.html#unregisterServiceListener-org.apache.hadoop.service.ServiceStateChangeListener-">Service</a></code></span></div> |
| <div class="block">Unregister a previously registered listener of the service state |
| change events. No-op if the listener is already unregistered.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#unregisterServiceListener-org.apache.hadoop.service.ServiceStateChangeListener-">unregisterServiceListener</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>l</code> - the listener to unregister.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="registerGlobalListener-org.apache.hadoop.service.ServiceStateChangeListener-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>registerGlobalListener</h4> |
| <pre>public static void registerGlobalListener(<a href="../../../../org/apache/hadoop/service/ServiceStateChangeListener.html" title="interface in org.apache.hadoop.service">ServiceStateChangeListener</a> l)</pre> |
| <div class="block">Register a global listener, which receives notifications |
| from the state change events of all services in the JVM</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>l</code> - listener</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="unregisterGlobalListener-org.apache.hadoop.service.ServiceStateChangeListener-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unregisterGlobalListener</h4> |
| <pre>public static boolean unregisterGlobalListener(<a href="../../../../org/apache/hadoop/service/ServiceStateChangeListener.html" title="interface in org.apache.hadoop.service">ServiceStateChangeListener</a> l)</pre> |
| <div class="block">unregister a global listener.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>l</code> - listener to unregister</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the listener was found (and then deleted)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getName</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getName()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/hadoop/service/Service.html#getName--">Service</a></code></span></div> |
| <div class="block">Get the name of this service.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#getName--">getName</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the service name</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getConfig--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getConfig</h4> |
| <pre>public <a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> getConfig()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/hadoop/service/Service.html#getConfig--">Service</a></code></span></div> |
| <div class="block">Get the configuration of this service. |
| This is normally not a clone and may be manipulated, though there are no |
| guarantees as to what the consequences of such actions may be</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#getConfig--">getConfig</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the current configuration, unless a specific implentation chooses |
| otherwise.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getStartTime--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getStartTime</h4> |
| <pre>public long getStartTime()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/hadoop/service/Service.html#getStartTime--">Service</a></code></span></div> |
| <div class="block">Get the service start time</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#getStartTime--">getStartTime</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the start time of the service. This will be zero if the service |
| has not yet been started.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getLifecycleHistory--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLifecycleHistory</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/hadoop/service/LifecycleEvent.html" title="class in org.apache.hadoop.service">LifecycleEvent</a>> getLifecycleHistory()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/hadoop/service/Service.html#getLifecycleHistory--">Service</a></code></span></div> |
| <div class="block">Get a snapshot of the lifecycle history; it is a static list</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#getLifecycleHistory--">getLifecycleHistory</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a possibly empty but never null list of lifecycle events.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isInState-org.apache.hadoop.service.Service.STATE-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isInState</h4> |
| <pre>public final boolean isInState(org.apache.hadoop.service.Service.STATE expected)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/hadoop/service/Service.html#isInState-org.apache.hadoop.service.Service.STATE-">Service</a></code></span></div> |
| <div class="block">Query to see if the service is in a specific state. |
| In a multi-threaded system, the state may not hold for very long.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#isInState-org.apache.hadoop.service.Service.STATE-">isInState</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>expected</code> - the expected state</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if, at the time of invocation, the service was in that state.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toString--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putBlocker-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putBlocker</h4> |
| <pre>protected void putBlocker(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> details)</pre> |
| <div class="block">Put a blocker to the blocker map -replacing any |
| with the same name.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - blocker name</dd> |
| <dd><code>details</code> - any specifics on the block. This must be non-null.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="removeBlocker-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>removeBlocker</h4> |
| <pre>public void removeBlocker(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> |
| <div class="block">Remove a blocker from the blocker map - |
| this is a no-op if the blocker is not present</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name of the blocker</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getBlockers--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getBlockers</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> getBlockers()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/hadoop/service/Service.html#getBlockers--">Service</a></code></span></div> |
| <div class="block">Get the blockers on a service -remote dependencies |
| that are stopping the service from being <i>live</i>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/hadoop/service/Service.html#getBlockers--">getBlockers</a></code> in interface <code><a href="../../../../org/apache/hadoop/service/Service.html" title="interface in org.apache.hadoop.service">Service</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a (snapshotted) map of blocker name->description values</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/AbstractService.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/hadoop/service/CompositeService.html" title="class in org.apache.hadoop.service"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/hadoop/service/AbstractService.html" target="_top">Frames</a></li> |
| <li><a href="AbstractService.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><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </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 © 2021 <a href="https://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |