Set the HealthCheckRegistry that will be used for registration of health checks by HikariCP.  Currently only
Codahale/DropWizard is supported for health checks.  Default is {@code null}.

@param healthCheckRegistry the HealthCheckRegistry to be used
429593
public void setHealthCheckRegistry(Object healthCheckRegistry)
   {
      checkIfSealed();

      if (healthCheckRegistry != null) {
         healthCheckRegistry = getObjectOrPerformJndiLookup(healthCheckRegistry);

         if (!(healthCheckRegistry instanceof HealthCheckRegistry)) {
            throw new IllegalArgumentException("Class must be an instance of com.codahale.metrics.health.HealthCheckRegistry");
         }
      }

      this.healthCheckRegistry = healthCheckRegistry;
   }
1023055
@ReadOperation
	public Health healthForComponent(@Selector String component) {
		HealthIndicator indicator = getNestedHealthIndicator(this.healthIndicator,
				component);
		return (indicator != null) ? indicator.health() : null;
	}
943329
def load_default_healthchecks(self):
        
        default_healthchecks = getattr(settings, 'HEALTHCHECKS', DEFAULT_HEALTHCHECKS)
        for healthcheck in default_healthchecks:
            healthcheck = import_string(healthcheck)
            self.register_healthcheck(healthcheck)
108672
protected void setVariableRegistry(ServiceReference<VariableRegistry> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "setVariableRegistry", ref);
        variableRegistryRef.setReference(ref);
    }
1010368
public void register(String name, HealthCheck healthCheck) {
        HealthCheck registered;
        synchronized (lock) {
            if (healthChecks.containsKey(name)) {
                throw new IllegalArgumentException("A health check named " + name + " already exists");
            }
            registered = healthCheck;
            if (healthCheck.getClass().isAnnotationPresent(Async.class)) {
                registered = new AsyncHealthCheckDecorator(healthCheck, asyncExecutorService);
            }
            healthChecks.put(name, registered);
        }
        onHealthCheckAdded(name, registered);
    }
354531
private void setChecks(HealthCheckResponse response) {

        HashMap<String, Object> check = new HashMap<String, Object>();
        check.put(HEALTH_CHECK_PAYLOAD_NAME, response.getName());

        State checkState = response.getState();
        check.put(HEALTH_CHECK_PAYLOAD_STATE, checkState);
        if (checkState != null) {
            if (checkState.equals(State.DOWN))
                overallState = State.DOWN;
        } else {
            if (tc.isDebugEnabled())
                Tr.debug(tc, "setChecks(): checkState is null");
            overallState = State.DOWN; // treat as fail case
        }

        Optional<Map<String, Object>> data = response.getData();
        if ((data != null) && data.isPresent())
            check.put(HEALTH_CHECK_PAYLOAD_DATA, data.get());

        checks.add(check);
        if (tc.isDebugEnabled())
            Tr.debug(tc, "setChecks(): checks = " + checks);
    }
36608
@Override
    public LoadBalancerHealthCheck getLoadBalancerHealthCheck( @Nonnull String providerLBHealthCheckId, @Nullable String providerLoadBalancerId ) throws CloudException, InternalException {
        APITrace.begin(provider, "LB.getLoadBalancerHealthCheck");
        try {
            Map<String, String> parameters = getELBParameters(getContext(), ELBMethod.DESCRIBE_LOAD_BALANCERS);
            ELBMethod method;
            NodeList blocks;
            Document doc;

            if( providerLoadBalancerId != null && providerLoadBalancerId.length() > 32 ) {
                return null;
            }
            parameters.put("LoadBalancerNames.member.1", providerLoadBalancerId);
            method = new ELBMethod(provider, getContext(), parameters);
            try {
                doc = method.invoke();
            } catch( EC2Exception e ) {
                String code = e.getCode();

                if( code != null && code.equals("LoadBalancerNotFound") ) {
                    return null;
                }
                logger.error(e.getSummary());
                throw new CloudException(e);
            }
            blocks = doc.getElementsByTagName("HealthCheck");
            if( blocks.getLength() > 0 ) {
                LoadBalancerHealthCheck lbhc = toLBHealthCheck(providerLoadBalancerId, blocks.item(0));
                return lbhc;
            }
            return null;
        } finally {
            APITrace.end();
        }
    }
1046481
public void clearHealthCheck(String name) {
        Optional.ofNullable(config.getHealthCheck())
                .ifPresent(healthCheck -> healthCheck.clear(name));
    }
1036713
def run_healthchecks(self):
        
        if not self._registry_loaded:
            self.load_healthchecks()

        def get_healthcheck_name(hc):
            if hasattr(hc, 'name'):
                return hc.name
            return hc.__name__

        responses = []
        for healthcheck in self._registry:
            try:
                if inspect.isclass(healthcheck):
                    healthcheck = healthcheck()
                response = healthcheck()
                if isinstance(response, bool):
                    response = HealthcheckResponse(
                        name=get_healthcheck_name(healthcheck),
                        status=response,
                    )
            except Exception as e:
                response = HealthcheckResponse(
                    name=get_healthcheck_name(healthcheck),
                    status=False,
                    exception=str(e),
                    exception_class=e.__class__.__name__,
                )
            responses.append(response)
        return responses
359542
public void setRegisters(InputRegister[] registers) {
        byteCount = registers.length * 2;
        setDataLength(byteCount + 1);

        this.registers = Arrays.copyOf(registers, registers.length);
    }
843151
@Bean
    public MeterRegistry consoleLoggingRegistry(MetricRegistry dropwizardRegistry) {
        DropwizardConfig dropwizardConfig = new DropwizardConfig() {
            @Override
            public String prefix() {
                return "console";
            }

            @Override
            public String get(String key) {
                return null;
            }
        };

        return new DropwizardMeterRegistry(dropwizardConfig, dropwizardRegistry, HierarchicalNameMapper.DEFAULT, Clock.SYSTEM) {
            @Override
            protected Double nullGaugeValue() {
                return null;
            }
        };
    }
597581
protected function doHealthCheck(HealthBuilder $builder)
    {
        /** @var Response $response */
        $response = $this->request
            ->send();

        $builder->withDetail('statusCode', $response->getStatusCode());

        if (!$response->isSuccessful()) {
            $builder->down()
                ->withDetail('body', $response->getBody(true));

            return;
        }

        $builder->up();
    }
187292
public synchronized static HealthCheckRegistry setDefault(String name) {
        final HealthCheckRegistry registry = getOrCreate(name);
        return setDefault(name, registry);
    }
112736
@Nullable
  public static String getHealthCheckedServiceName(@Nullable Map<String, ?> serviceConfig) {
    String healthCheckKey = "healthCheckConfig";
    String serviceNameKey = "serviceName";
    if (serviceConfig == null || !serviceConfig.containsKey(healthCheckKey)) {
      return null;
    }

    /* schema as follows
    {
      "healthCheckConfig": {
        // Service name to use in the health-checking request.
        "serviceName": string
      }
    }
    */
    Map<String, ?> healthCheck = getObject(serviceConfig, healthCheckKey);
    if (!healthCheck.containsKey(serviceNameKey)) {
      return null;
    }
    return getString(healthCheck, "serviceName");
  }
413940
protected void checkHealth(long threshold, NodeHealthChecker healthChecker) {
        final int state = this.state;
        if (anyAreSet(state, REMOVED | ACTIVE_PING)) {
            return;
        }
        healthCheckPing(threshold, healthChecker);
    }
510263
public final B healthCheckInterval(Duration healthCheckInterval) {
        requireNonNull(healthCheckInterval, "healthCheckInterval");
        checkArgument(!healthCheckInterval.isNegative(),
                      "healthCheckInterval: %s (expected: >= 0)", healthCheckInterval);
        this.healthCheckInterval = healthCheckInterval;
        return self();
    }
1006098
public void registerActivitiStateHandler(
			ActivitiStateHandlerRegistration registration) {
		String regKey = registrationKey(registration.getProcessName(),
				registration.getStateName());
		this.registrations.put(regKey, registration);
	}