public abstract class HealthDependency extends Object
HealthDependency instances must be thread-safe.
Constructor and Description |
---|
HealthDependency() |
Modifier and Type | Method and Description |
---|---|
abstract HealthStatus |
checkAvailability()
Invokes the dependency's basic availability health check (or closest equivalent).
|
Optional<String> |
getBasicAvailabilityUrl()
Deprecated.
As of 2.1.1, no longer used in the display (html and json) of health endpoints.
|
Optional<String> |
getDescription()
Returns the description for the dependency or
Optional.empty() if there is none. |
abstract String |
getName()
Returns a short name for the dependency, which will be used to identify it in URLs.
|
Boolean |
getPrimary()
Returns a Boolean to indicate if this check is a primary check for this service.
|
public abstract HealthStatus checkAvailability()
Implementations may throw RuntimeExceptions; the health checker will handle them gracefully and assume the dependency is unhealthy.
@Deprecated public Optional<String> getBasicAvailabilityUrl()
Optional.empty()
if there is none.public Boolean getPrimary()
public abstract String getName()
Examples: "external-service", "hbase". This name must be unique amongst all the dependencies.
public Optional<String> getDescription()
Optional.empty()
if there is none.Copyright © 2017 Cerner Innovation, Inc.. All rights reserved.