code: public void registerHealthCheck(Task task) {
          Optional.ofNullable(config.getHealthCheck())
                  .ifPresent(healthCheck -> healthCheck.register(task));
      }
docs: Register an health check task.
  
  @param task The health check task.