Package org.apache.hadoop.yarn.util
Class AbstractLivelinessMonitor<O>
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.util.AbstractLivelinessMonitor<O>
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
@Public
@Evolving
public abstract class AbstractLivelinessMonitor<O>
extends org.apache.hadoop.service.AbstractService
A simple liveliness monitor with which clients can register, trust the
component to monitor liveliness, get a call-back on expiry and then finally
unregister.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidprotected longvoidreceivedPing(O ob) voidvoidvoidprotected voidprotected voidprotected voidsetExpireInterval(long expireInterval) protected voidsetMonitorInterval(long monitorInterval) protected voidsetResetTimeOnStart(boolean resetTimeOnStart) voidunregister(O ob) Methods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
-
Field Details
-
DEFAULT_EXPIRE
public static final int DEFAULT_EXPIRE- See Also:
-
-
Constructor Details
-
AbstractLivelinessMonitor
-
AbstractLivelinessMonitor
-
-
Method Details
-
serviceStart
- Overrides:
serviceStartin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
serviceStop
- Overrides:
serviceStopin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
expire
-
setExpireInterval
protected void setExpireInterval(long expireInterval) -
getExpireInterval
-
setMonitorInterval
protected void setMonitorInterval(long monitorInterval) -
receivedPing
-
register
-
register
-
unregister
-
resetTimer
public void resetTimer() -
setResetTimeOnStart
protected void setResetTimeOnStart(boolean resetTimeOnStart)
-