com.yammer.metrics.core
Class HealthCheckRegistry

java.lang.Object
  extended by com.yammer.metrics.core.HealthCheckRegistry

public class HealthCheckRegistry
extends Object

A registry for health checks.


Constructor Summary
HealthCheckRegistry()
           
 
Method Summary
 void register(HealthCheck healthCheck)
          Registers an application HealthCheck.
 SortedMap<String,HealthCheck.Result> runHealthChecks()
          Runs the registered health checks and returns a map of the results.
 void unregister(HealthCheck healthCheck)
          Unregisters the given HealthCheck.
 void unregister(String name)
          Unregisters the application HealthCheck with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HealthCheckRegistry

public HealthCheckRegistry()
Method Detail

register

public void register(HealthCheck healthCheck)
Registers an application HealthCheck.

Parameters:
healthCheck - the HealthCheck instance

unregister

public void unregister(String name)
Unregisters the application HealthCheck with the given name.

Parameters:
name - the name of the HealthCheck instance

unregister

public void unregister(HealthCheck healthCheck)
Unregisters the given HealthCheck.

Parameters:
healthCheck - a HealthCheck

runHealthChecks

public SortedMap<String,HealthCheck.Result> runHealthChecks()
Runs the registered health checks and returns a map of the results.

Returns:
a map of the health check results


Copyright © 2012. All Rights Reserved.