| <!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>Service (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="Service (Apache Hadoop Main 3.3.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Service.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/hadoop/service/LoggingStateChangeListener.html" title="class in org.apache.hadoop.service"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/hadoop/service/ServiceOperations.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/Service.html" target="_top">Frames</a></li> |
| <li><a href="Service.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.hadoop.service</div> |
| <h2 title="Interface Service" class="title">Interface Service</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Superinterfaces:</dt> |
| <dd><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="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Subinterfaces:</dt> |
| <dd><a href="../../../../org/apache/hadoop/registry/client/api/DNSOperations.html" title="interface in org.apache.hadoop.registry.client.api">DNSOperations</a>, <a href="../../../../org/apache/hadoop/service/launcher/LaunchableService.html" title="interface in org.apache.hadoop.service.launcher">LaunchableService</a>, <a href="../../../../org/apache/hadoop/registry/client/api/RegistryOperations.html" title="interface in org.apache.hadoop.registry.client.api">RegistryOperations</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</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/service/AbstractService.html" title="class in org.apache.hadoop.service">AbstractService</a>, <a href="../../../../org/apache/hadoop/registry/server/services/AddingCompositeService.html" title="class in org.apache.hadoop.registry.server.services">AddingCompositeService</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/client/api/AppAdminClient.html" title="class in org.apache.hadoop.yarn.client.api">AppAdminClient</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>, org.apache.hadoop.registry.client.impl.zk.CuratorService, <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/registry/client/impl/RegistryOperationsClient.html" title="class in org.apache.hadoop.registry.client.impl">RegistryOperationsClient</a>, <a href="../../../../org/apache/hadoop/registry/client/impl/zk/RegistryOperationsService.html" title="class in org.apache.hadoop.registry.client.impl.zk">RegistryOperationsService</a>, <a href="../../../../org/apache/hadoop/yarn/service/client/ServiceClient.html" title="class in org.apache.hadoop.yarn.service.client">ServiceClient</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/TimelineClient.html" title="class in org.apache.hadoop.yarn.client.api">TimelineClient</a>, <a href="../../../../org/apache/hadoop/yarn/client/api/TimelineReaderClient.html" title="class in org.apache.hadoop.yarn.client.api">TimelineReaderClient</a>, <a href="../../../../org/apache/hadoop/yarn/client/api/impl/TimelineReaderClientImpl.html" title="class in org.apache.hadoop.yarn.client.api.impl">TimelineReaderClientImpl</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 interface <span class="typeNameLabel">Service</span> |
| extends <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></pre> |
| <div class="block">Service LifeCycle.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/Service.html#close--">close</a></span>()</code> |
| <div class="block">A version of stop() that is designed to be usable in Java7 closure |
| clauses.</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/Service.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/Service.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/Service.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/Service.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>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/Service.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/Service.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/Service.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/Service.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/Service.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> config)</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/Service.html#isInState-org.apache.hadoop.service.Service.STATE-">isInState</a></span>(org.apache.hadoop.service.Service.STATE state)</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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/Service.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> listener)</code> |
| <div class="block">Register a listener to the service state change events.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/Service.html#start--">start</a></span>()</code> |
| <div class="block">Start the service.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/Service.html#stop--">stop</a></span>()</code> |
| <div class="block">Stop the service.</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/Service.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> listener)</code> |
| <div class="block">Unregister a previously registered listener of the service state |
| change events.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/service/Service.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> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="init-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>init</h4> |
| <pre>void init(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> config)</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>stop()</code></a> MUST be invoked and the service enter the state |
| <code>Service.STATE.STOPPED</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>config</code> - the configuration of the service</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/RuntimeException.html?is-external=true" title="class or interface in java.lang">RuntimeException</a></code> - on any failure during the operation</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="start--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>start</h4> |
| <pre>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>stop()</code></a> MUST be invoked and the service enter the state |
| <code>Service.STATE.STOPPED</code>.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/RuntimeException.html?is-external=true" title="class or interface in java.lang">RuntimeException</a></code> - on any failure during the operation</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="stop--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stop</h4> |
| <pre>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="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/RuntimeException.html?is-external=true" title="class or interface in java.lang">RuntimeException</a></code> - on any failure during the stop operation</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="close--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>close</h4> |
| <pre>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">A version of stop() that is designed to be usable in Java7 closure |
| clauses. |
| Implementation classes MUST relay this directly to <a href="../../../../org/apache/hadoop/service/Service.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/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="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="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> - never</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/RuntimeException.html?is-external=true" title="class or interface in java.lang">RuntimeException</a></code> - on any failure during the stop operation</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="registerServiceListener-org.apache.hadoop.service.ServiceStateChangeListener-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>registerServiceListener</h4> |
| <pre>void registerServiceListener(<a href="../../../../org/apache/hadoop/service/ServiceStateChangeListener.html" title="interface in org.apache.hadoop.service">ServiceStateChangeListener</a> listener)</pre> |
| <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="paramLabel">Parameters:</span></dt> |
| <dd><code>listener</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>void unregisterServiceListener(<a href="../../../../org/apache/hadoop/service/ServiceStateChangeListener.html" title="interface in org.apache.hadoop.service">ServiceStateChangeListener</a> listener)</pre> |
| <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="paramLabel">Parameters:</span></dt> |
| <dd><code>listener</code> - the listener to unregister.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getName</h4> |
| <pre><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">Get the name of this service.</div> |
| <dl> |
| <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><a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> getConfig()</pre> |
| <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="returnLabel">Returns:</span></dt> |
| <dd>the current configuration, unless a specific implentation chooses |
| otherwise.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getServiceState--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getServiceState</h4> |
| <pre>org.apache.hadoop.service.Service.STATE getServiceState()</pre> |
| <div class="block">Get the current service state</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the state of the service</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getStartTime--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getStartTime</h4> |
| <pre>long getStartTime()</pre> |
| <div class="block">Get the service start time</div> |
| <dl> |
| <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="isInState-org.apache.hadoop.service.Service.STATE-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isInState</h4> |
| <pre>boolean isInState(org.apache.hadoop.service.Service.STATE state)</pre> |
| <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="paramLabel">Parameters:</span></dt> |
| <dd><code>state</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="getFailureCause--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFailureCause</h4> |
| <pre><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">Get the first exception raised during the service failure. If null, |
| no exception was logged</div> |
| <dl> |
| <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>org.apache.hadoop.service.Service.STATE getFailureState()</pre> |
| <div class="block">Get the state in which the failure in <a href="../../../../org/apache/hadoop/service/Service.html#getFailureCause--"><code>getFailureCause()</code></a> occurred.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the state or null if there was no failure</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="waitForServiceToStop-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>waitForServiceToStop</h4> |
| <pre>boolean waitForServiceToStop(long timeout)</pre> |
| <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="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="getLifecycleHistory--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLifecycleHistory</h4> |
| <pre><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">Get a snapshot of the lifecycle history; it is a static list</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a possibly empty but never null list of lifecycle events.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getBlockers--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getBlockers</h4> |
| <pre><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">Get the blockers on a service -remote dependencies |
| that are stopping the service from being <i>live</i>.</div> |
| <dl> |
| <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/Service.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/hadoop/service/LoggingStateChangeListener.html" title="class in org.apache.hadoop.service"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/hadoop/service/ServiceOperations.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/Service.html" target="_top">Frames</a></li> |
| <li><a href="Service.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2021 <a href="https://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |