Package io.camunda.zeebe.util.health
Interface HealthMonitorable
- All Known Subinterfaces:
HealthMonitor
public interface HealthMonitorable
Any component that can be monitored for health should implement this interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddFailureListener(FailureListener failureListener) Register a failure observer.Used by a HealthMonitor to get the health status of this component, typically invoked periodically.default StringgetName()Used by a HealthMonitor to get the name of this component.voidremoveFailureListener(FailureListener failureListener) Removes a previously registered listener.
-
Method Details
-
getName
Used by a HealthMonitor to get the name of this component. Most `HealthMonitorable`s override this method to return their actor name. If they don't override the method, the name of the class is returned.- Returns:
- the name of this component
-
getHealthReport
HealthReport getHealthReport()Used by a HealthMonitor to get the health status of this component, typically invoked periodically.- Returns:
- health status
-
addFailureListener
Register a failure observer.- Parameters:
failureListener- failure observer to be invoked when a failure that affects the health status of this component occurs
-
removeFailureListener
Removes a previously registered listener. Should do nothing if it was not previously registered.- Parameters:
failureListener- the failure listener to remove
-