|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yammer.metrics.core.HealthCheck
public abstract class HealthCheck
A health check for a component of your application.
| Nested Class Summary | |
|---|---|
static class |
HealthCheck.Result
The result of a HealthCheck being run. |
| Constructor Summary | |
|---|---|
protected |
HealthCheck(String name)
Create a new HealthCheck instance with the given name. |
| Method Summary | |
|---|---|
protected abstract HealthCheck.Result |
check()
Perform a check of the application component. |
HealthCheck.Result |
execute()
Executes the health check, catching and handling any exceptions raised by check(). |
String |
getName()
Returns the health check's name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected HealthCheck(String name)
HealthCheck instance with the given name.
name - the name of the health check (and, ideally, the name of the underlying
component the health check tests)| Method Detail |
|---|
public String getName()
protected abstract HealthCheck.Result check()
throws Exception
HealthCheck.Result; otherwise, an unhealthy
HealthCheck.Result with a descriptive error message or exception
Exception - if there is an unhandled error during the health check; this will result in
a failed health checkpublic HealthCheck.Result execute()
check().
HealthCheck.Result; otherwise, an unhealthy
HealthCheck.Result with a descriptive error message or exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||