@Contract public abstract class BaseHealthCheck<O extends HealthCheckExecutionOptions,C extends Checker> extends Object implements HealthCheckConstants
| Modifier and Type | Field and Description |
|---|---|
protected Class<C> |
checkerType |
protected HealthCheckService |
healthCheckService |
protected O |
options |
DEFAULT_CONNECTION_POOL_NAME, DEFAULT_CPU_USAGE_NAME, DEFAULT_ENABLED, DEFAULT_GARBAGE_COLLECTOR_NAME, DEFAULT_HEAP_MEMORY_USAGE_NAME, DEFAULT_HOGGING_THREADS_NAME, DEFAULT_MACHINE_MEMORY_USAGE_NAME, DEFAULT_RETRY_COUNT, DEFAULT_THRESHOLD_PERCENTAGE, DEFAULT_TIME, DEFAULT_UNIT, DEFUALT_STUCK_THEAD_NAME, FIVE_MIN, OLD_CONCURRENTMARKSWEEP, OLD_G1GC, OLD_MARK_SWEEP_COMPACT, OLD_PS_MARKSWEEP, ONE_GB, ONE_KB, ONE_MB, ONE_MIN, ONE_SEC, THRESHOLD_CRITICAL, THRESHOLD_DEFAULTVAL_CRITICAL, THRESHOLD_DEFAULTVAL_GOOD, THRESHOLD_DEFAULTVAL_WARNING, THRESHOLD_GOOD, THRESHOLD_WARNING, YOUNG_COPY, YOUNG_G1GC, YOUNG_PARNEW, YOUNG_PS_SCAVENGE| Constructor and Description |
|---|
BaseHealthCheck() |
| Modifier and Type | Method and Description |
|---|---|
protected TimeUnit |
asTimeUnit(String unit) |
protected HealthCheckExecutionOptions |
constructBaseOptions(Checker checker) |
abstract O |
constructOptions(C c) |
protected HealthCheckResultStatus |
decideOnStatusWithDuration(long duration) |
abstract HealthCheckResult |
doCheck() |
Class<C> |
getCheckerType() |
protected abstract String |
getDescription() |
O |
getOptions() |
protected <T extends BaseHealthCheck> |
postConstruct(T t,
Class<C> checkerType) |
protected String |
prettyPrintBytes(long value) |
protected String |
prettyPrintStackTrace(StackTraceElement[] elements) |
String |
resolveDescription() |
void |
sendNotification(Level level,
String message,
Object[] parameters) |
void |
setOptions(O options) |
@Inject protected HealthCheckService healthCheckService
protected O extends HealthCheckExecutionOptions options
public abstract HealthCheckResult doCheck()
protected <T extends BaseHealthCheck> O postConstruct(T t, Class<C> checkerType)
protected HealthCheckExecutionOptions constructBaseOptions(Checker checker)
protected HealthCheckResultStatus decideOnStatusWithDuration(long duration)
protected String prettyPrintBytes(long value)
protected String prettyPrintStackTrace(StackTraceElement[] elements)
public String resolveDescription()
protected abstract String getDescription()
public O getOptions()
public void setOptions(O options)
Copyright © 2017. All rights reserved.