public class Health extends Object
Modifier and Type | Method and Description |
---|---|
static Health |
critical(String reason)
Creates a critical status.
|
boolean |
equals(Object o) |
String |
getHealthCode()
Returns a human-readable health code.
|
String |
getHealthReason()
Returns the reason for the health of application.
|
int |
hashCode() |
static Health |
healthy()
Creates a healthy status.
|
static Health |
hung(String reason)
Creates a hung status.
|
static Health |
initializing()
Creates an initializing status.
|
boolean |
isCritical()
Returns whether critical or not.
|
boolean |
isHealthy()
Returns whether healthy or not.
|
boolean |
isHung()
Returns whether hung (not responding) or not.
|
boolean |
isInitializing()
Returns whether initializing or not.
|
boolean |
isUnhealthy()
Returns whether unhealthy or critical or not.
|
String |
toString() |
static Health |
unhealthy(String reason)
Creates an unhealthy status.
|
public static Health healthy()
public static Health unhealthy(String reason)
reason
- reason why unhealthy.public static Health critical(String reason)
reason
- reason why criticalpublic static Health hung(String reason)
reason
- reason why criticalpublic static Health initializing()
public boolean isHealthy()
true
if healthy, false
otherwisepublic boolean isUnhealthy()
true
if unhealthy or critical, false
otherwisepublic boolean isCritical()
true
if critical, false
otherwisepublic boolean isInitializing()
true
if initializing, false
otherwisepublic boolean isHung()
true
if hung, false
otherwisepublic String getHealthCode()
public String getHealthReason()
Copyright © 2015. All Rights Reserved.