Package org.apache.camel.health
Interface HealthCheck
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
HealthCheck.Result
Response to an health check invocation.static class
HealthCheck.State
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default HealthCheck.Result
call()
Invoke the check.HealthCheck.Result
call(Map<String,Object> options)
Invoke the check.HealthCheckConfiguration
getConfiguration()
Return the configuration associated with thisHealthCheck
.default Map<String,Object>
getMetaData()
Return meta data associated with thisHealthCheck
.default int
getOrder()
Gets the order.default boolean
isLiveness()
Whether this health check can be used for liveness checksdefault boolean
isReadiness()
Whether this health check can be used for readiness checks
-
-
-
Method Detail
-
getOrder
default int getOrder()
Description copied from interface:Ordered
Gets the order. Use low numbers for higher priority. Normally the sorting will start from 0 and move upwards. So if you want to be last then useInteger.MAX_VALUE
or egOrdered.LOWEST
.
-
getMetaData
default Map<String,Object> getMetaData()
Return meta data associated with thisHealthCheck
.
-
isReadiness
default boolean isReadiness()
Whether this health check can be used for readiness checks
-
isLiveness
default boolean isLiveness()
Whether this health check can be used for liveness checks
-
getConfiguration
HealthCheckConfiguration getConfiguration()
Return the configuration associated with thisHealthCheck
.
-
call
default HealthCheck.Result call()
Invoke the check.- See Also:
call(Map)
-
call
HealthCheck.Result call(Map<String,Object> options)
Invoke the check. The implementation is responsible to eventually perform the check according to the limitation of the third party system i.e. it should not be performed too often to avoid rate limiting. The options argument can be used to pass information specific to the check like forcing the check to be performed against the policies. The implementation is responsible to catch an handle any exception thrown by the underlying technology, including unchecked ones.
-
-