public class SharedMetricRegistries extends Object
| Modifier and Type | Method and Description |
|---|---|
static MetricRegistry |
add(String name,
MetricRegistry registry) |
static void |
clear() |
static MetricRegistry |
getDefault()
Gets the name of the default registry, if it has been set
|
static MetricRegistry |
getOrCreate(String name) |
static Set<String> |
names() |
static void |
remove(String key) |
static MetricRegistry |
setDefault(String name)
Creates a new registry and sets it as the default one under the provided name.
|
static MetricRegistry |
setDefault(String name,
MetricRegistry metricRegistry)
Sets the provided registry as the default one under the provided name
|
static MetricRegistry |
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 MetricRegistry add(String name, MetricRegistry registry)
public static MetricRegistry getOrCreate(String name)
public static MetricRegistry setDefault(String name)
name - the registry nameIllegalStateException - if the name has already been setpublic static MetricRegistry setDefault(String name, MetricRegistry metricRegistry)
name - the default registry namemetricRegistry - the default registryIllegalStateException - if the default registry has already been setpublic static MetricRegistry getDefault()
IllegalStateException - if the default has not been setpublic static MetricRegistry tryGetDefault()
getDefault() except returns null when the default registry has not been set.Copyright © 2011. All rights reserved.