@Service public class HealthService extends AbstractResinSubSystem
Modifier and Type | Class and Description |
---|---|
protected class |
HealthService.HealthCheckScheduler |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_LOG_TYPE |
static java.lang.String |
CHECK_LOG_TYPE |
static long |
DEFAULT_SYSTEM_RECHECK_TIMEOUT |
static java.lang.String |
METER_PREFIX |
static java.lang.String |
RECHECK_LOG_TYPE |
static java.lang.String |
RECOVER_LOG_TYPE |
static int |
START_PRIORITY |
START_PRIORITY_CACHE_SERVICE, START_PRIORITY_CLASSLOADER, START_PRIORITY_CLUSTER_SERVICE, START_PRIORITY_DATABASE_SYSTEM, START_PRIORITY_DEFAULT, START_PRIORITY_ENV_SYSTEM, START_PRIORITY_NETWORK_CLUSTER, STOP_PRIORITY_CLASSLOADER
getStopPriority, isActive, preCreate, toString
public static final int START_PRIORITY
public static final java.lang.String METER_PREFIX
public static final long DEFAULT_SYSTEM_RECHECK_TIMEOUT
public static final java.lang.String CHECK_LOG_TYPE
public static final java.lang.String RECHECK_LOG_TYPE
public static final java.lang.String RECOVER_LOG_TYPE
public static final java.lang.String ACTION_LOG_TYPE
public static HealthService createAndAddService()
public static HealthService getCurrent()
public boolean isEnabled()
public void setEnabled(boolean enabled)
public long getDelay()
public void setDelay(long delay)
public long getPeriod()
public void setPeriod(long period)
public long getCheckTimeout()
public void setCheckTimeout(long timeout)
public long getRecheckPeriod()
public void setRecheckPeriod(long recheckPeriod)
public int getRecheckMax()
public void setRecheckMax(int recheckMax)
public void setSystemRecheckTimeout(long systemRecheckTimeout)
public long getSystemRecheckTimeout()
public void addHealthCheck(HealthCheck healthCheck)
public <T extends HealthCheck> T getHealthCheck(java.lang.Class<T> cl)
public <T extends HealthCheck> java.util.List<T> getHealthChecks(java.lang.Class<T> cl)
public boolean containsHealthCheck(HealthCheck check)
public <T extends HealthCheck> boolean containsHealthCheck(java.lang.Class<T> cl)
public java.util.List<HealthCheck> getHealthChecks()
public <I extends HealthAction> I addHealthAction(I action)
public <T extends HealthAction> T getHealthAction(java.lang.Class<T> cl)
public <T extends HealthAction> java.util.List<T> getHealthActions(java.lang.Class<T> cl)
public java.util.List<HealthAction> getHealthActions()
public LifecycleState getLifecycleState()
public void addLifecycleListener(LifecycleListener listener)
public int getStartPriority()
ResinSubSystem
getStartPriority
in interface ResinSubSystem
getStartPriority
in class AbstractResinSubSystem
public void start()
ResinSubSystem
start
in interface ResinSubSystem
start
in class AbstractResinSubSystem
public void stop()
ResinSubSystem
stop
in interface ResinSubSystem
stop
in class AbstractResinSubSystem
public void destroy()
ResinSubSystem
destroy
in interface ResinSubSystem
destroy
in class AbstractResinSubSystem
public HealthCheckResult getLastResult(HealthCheck healthCheck)
public long getLastCheckStartTime()
public long getLastCheckFinishTime()
public int getCurrentRecheckCount()
public HealthCheckResult getSummaryResult()
public HealthMeter getHealthMeter(HealthCheck healthCheck)
public boolean isStartupDelayExpired(long time)
public HealthCheckResult checkHealth()
public long getWarningStartTime(HealthCheck check)
public long getCriticalStartTime(HealthCheck check)
public long getFatalStartTime(HealthCheck check)
public int getWarningCount(HealthCheck check)
public int getCriticalCount(HealthCheck check)
public int getFatalCount(HealthCheck check)
public void fireEvent(java.lang.String eventName)
public void fireEvent(HealthEvent event)
public void executeActions(HealthEvent event)