/** * Unregisters the application {@link HealthCheck} with the given name. * * @param name the name of the {@link HealthCheck} instance */ public void unregister(String name) { HealthCheck healthCheck; synchronized (lock) { healthCheck = healthChecks.remove(name); if (healthCheck instanceof AsyncHealthCheckDecorator) { ((AsyncHealthCheckDecorator) healthCheck).tearDown(); } } if (healthCheck != null) { onHealthCheckRemoved(name, healthCheck); } }