Class JdbcHealthIndicator.Builder

java.lang.Object
com.helixframework.api.health.JdbcHealthIndicator.Builder
Enclosing class:
JdbcHealthIndicator

public static final class JdbcHealthIndicator.Builder extends Object
The Builder class is a utility class used to create instances of JdbcHealthIndicator.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • dataSource

      public JdbcHealthIndicator.Builder dataSource(DataSource dataSource)
      Sets the data source for the JdbcHealthIndicator.
      Parameters:
      dataSource - the data source to be set
      Returns:
      the Builder object
    • statement

      public JdbcHealthIndicator.Builder statement(String statement)
      Sets the statement for the JdbcHealthIndicator.
      Parameters:
      statement - the SQL statement to be executed
      Returns:
      the Builder object
    • healthCheck

      public JdbcHealthIndicator.Builder healthCheck(Function<ResultSet,org.springframework.boot.actuate.health.Health> healthCheck)
      Optional. Sets the health check function for the JdbcHealthIndicator.
      Parameters:
      healthCheck - the health check function to be set
      Returns:
      the Builder object
    • maxFailures

      public JdbcHealthIndicator.Builder maxFailures(int maxFailures)
      Optional. Sets the maximum number of failures allowed before marking the health status as DOWN.
      Parameters:
      maxFailures - the maximum number of failures
      Returns:
      the Builder object
    • delay

      public JdbcHealthIndicator.Builder delay(Duration delay)
      Optional. Sets the delay for the JdbcHealthIndicator periodic update task.
      Parameters:
      delay - the delay to be set
      Returns:
      the Builder object
    • period

      public JdbcHealthIndicator.Builder period(Duration period)
      Optional. Sets the period for the JdbcHealthIndicator periodic update task.
      Parameters:
      period - the period to be set
      Returns:
      the Builder object
    • build

      public JdbcHealthIndicator build()
      Builds a new instance of JdbcHealthIndicator.
      Returns:
      a new instance of JdbcHealthIndicator