Package org.apache.camel.health
Interface HealthCheck
Health check
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
static interface
Response to a health check invocation.static enum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptiondefault HealthCheck.Result
call()
Invoke the check.Invoke the check.default HealthCheck.Result
Invoke the check as liveness check.default HealthCheck.Result
Invoke the check as readiness check.Return metadata associated with thisHealthCheck
.default int
getOrder()
Gets the order.boolean
Whether this health check is enableddefault boolean
Whether this health check can be used for liveness checks Liveness check is not default, and must be explicit enabled.default boolean
Whether this health check can be used for readiness checks.void
setEnabled
(boolean enabled) Used for enabling or disabling this health check
-
Field Details
-
CHECK_ID
- See Also:
-
CHECK_GROUP
- See Also:
-
CHECK_KIND
- See Also:
-
CHECK_ENABLED
- See Also:
-
INVOCATION_COUNT
- See Also:
-
INVOCATION_TIME
- See Also:
-
FAILURE_COUNT
- See Also:
-
FAILURE_START_TIME
- See Also:
-
FAILURE_TIME
- See Also:
-
FAILURE_ERROR_COUNT
- See Also:
-
ENDPOINT_URI
- See Also:
-
SUCCESS_COUNT
- See Also:
-
SUCCESS_START_TIME
- See Also:
-
SUCCESS_TIME
- See Also:
-
HTTP_RESPONSE_CODE
- See Also:
-
-
Method Details
-
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
. -
isEnabled
boolean isEnabled()Whether this health check is enabled -
setEnabled
void setEnabled(boolean enabled) Used for enabling or disabling this health check -
getMetaData
Return metadata associated with thisHealthCheck
. -
isReadiness
default boolean isReadiness()Whether this health check can be used for readiness checks. Readiness check is default. -
isLiveness
default boolean isLiveness()Whether this health check can be used for liveness checks Liveness check is not default, and must be explicit enabled. -
call
Invoke the check.- See Also:
-
callReadiness
Invoke the check as readiness check.- See Also:
-
callLiveness
Invoke the check as liveness check.- See Also:
-
call
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 and handle any exception thrown by the underlying technology, including unchecked ones.
-