public class SharedHealthCheckRegistries extends Object
Modifier and Type | Method and Description |
---|---|
static HealthCheckRegistry |
add(String name,
HealthCheckRegistry registry) |
static void |
clear() |
static HealthCheckRegistry |
getDefault()
Gets the name of the default registry, if it has been set
|
static HealthCheckRegistry |
getOrCreate(String name) |
static Set<String> |
names() |
static void |
remove(String key) |
static HealthCheckRegistry |
setDefault(String name)
Creates a new registry and sets it as the default one under the provided name.
|
static HealthCheckRegistry |
setDefault(String name,
HealthCheckRegistry healthCheckRegistry)
Sets the provided registry as the default one under the provided name
|
static HealthCheckRegistry |
tryGetDefault()
Same as
getDefault() except returns null when the default registry has not been set. |
public static void clear()
public static void remove(String key)
public static HealthCheckRegistry add(String name, HealthCheckRegistry registry)
public static HealthCheckRegistry getOrCreate(String name)
public static HealthCheckRegistry setDefault(String name)
name
- the registry nameIllegalStateException
- if the name has already been setpublic static HealthCheckRegistry setDefault(String name, HealthCheckRegistry healthCheckRegistry)
name
- the default registry namehealthCheckRegistry
- the default registryIllegalStateException
- if the default registry has already been setpublic static HealthCheckRegistry getDefault()
IllegalStateException
- if the default has not been setpublic static HealthCheckRegistry tryGetDefault()
getDefault()
except returns null when the default registry has not been set.Copyright © 2020. All Rights Reserved.