|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yammer.metrics.core.HealthCheck.Result
public static class HealthCheck.Result
The result of a HealthCheck being run. It can be healthy (with an optional message)
or unhealthy (with either an error message or a thrown exception).
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
Throwable |
getError()
Returns any exception for the result, or null if the result has no exception. |
String |
getMessage()
Returns any additional message for the result, or null if the result has no
message. |
int |
hashCode()
|
static HealthCheck.Result |
healthy()
Returns a healthy HealthCheck.Result with no additional message. |
static HealthCheck.Result |
healthy(String message)
Returns a healthy HealthCheck.Result with an additional message. |
boolean |
isHealthy()
Returns true if the result indicates the component is healthy; false
otherwise. |
String |
toString()
|
static HealthCheck.Result |
unhealthy(String message)
Returns an unhealthy HealthCheck.Result with the given message. |
static HealthCheck.Result |
unhealthy(Throwable error)
Returns an unhealthy HealthCheck.Result with the given error. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static HealthCheck.Result healthy()
HealthCheck.Result with no additional message.
HealthCheck.Result with no additional messagepublic static HealthCheck.Result healthy(String message)
HealthCheck.Result with an additional message.
message - an informative message
HealthCheck.Result with an additional messagepublic static HealthCheck.Result unhealthy(String message)
HealthCheck.Result with the given message.
message - an informative message describing how the health check failed
HealthCheck.Result with the given messagepublic static HealthCheck.Result unhealthy(Throwable error)
HealthCheck.Result with the given error.
error - an exception thrown during the health check
HealthCheck.Result with the given errorpublic boolean isHealthy()
true if the result indicates the component is healthy; false
otherwise.
true if the result indicates the component is healthypublic String getMessage()
null if the result has no
message.
nullpublic Throwable getError()
null if the result has no exception.
nullpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||