HealthCheckRegistryService

public interface HealthCheckRegistryService

Represents a registry that allows healthchecks to be added and removed, and gives a list of the names of all healthchecks currently registered.

Methods

getNames

SortedSet<String> getNames()

Returns a set of the name of all healthchecks in sorted order.

Returns:the sorted set of names.

register

void register(String name, HealthCheck healthCheck)

Registers a healthcheck with the metrics module, allowing the healthcheck to be polled using the supported mechanisms.

Parameters:
  • name – the name of the healtcheck
  • healthCheck – an implementation of the healthcheck interface

unregister

void unregister(String name)

Unregisters a healthcheck by name.

Parameters:
  • name – the name of the healthcheck