Class JdbcHealthIndicator

java.lang.Object
com.helixframework.api.health.AsyncHealthIndicator
com.helixframework.api.health.JdbcHealthIndicator
All Implemented Interfaces:
org.springframework.boot.actuate.health.HealthContributor, org.springframework.boot.actuate.health.HealthIndicator

public class JdbcHealthIndicator extends AsyncHealthIndicator
The JdbcHealthIndicator class is a concrete implementation of the AsyncHealthIndicator interface that provides asynchronous health checks for a JDBC data source. The class executes a SQL statement against the data source and applies a health check function to the result set to determine the health status. If the statement executes successfully and the health check function returns a health status of UP, the health status is set to UP. Otherwise, the health status is set to DOWN. The class extends the AsyncHealthIndicator abstract class, which provides the functionality to manage a periodic update task for retrieving and updating the health status.
  • Method Details

    • builder

      public static JdbcHealthIndicator.Builder builder()
      Returns a new instance of the Builder.
      Returns:
      a new instance of the Builder
    • healthInternal

      protected org.springframework.boot.actuate.health.Health healthInternal()
      Description copied from class: AsyncHealthIndicator
      Retrieves the current health status. This method is called periodically by the AsyncHealthIndicator class to update the health status. It should be implemented by subclasses to provide the actual health check logic.
      Specified by:
      healthInternal in class AsyncHealthIndicator
      Returns:
      the current Health status