public class SharedMetricRegistries
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static MetricRegistry |
add(java.lang.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(java.lang.String name) |
static java.util.Set<java.lang.String> |
names() |
static void |
remove(java.lang.String key) |
static MetricRegistry |
setDefault(java.lang.String name)
Creates a new registry and sets it as the default one under the provided name.
|
static MetricRegistry |
setDefault(java.lang.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 java.util.Set<java.lang.String> names()
public static void remove(java.lang.String key)
public static MetricRegistry add(java.lang.String name, MetricRegistry registry)
public static MetricRegistry getOrCreate(java.lang.String name)
public static MetricRegistry setDefault(java.lang.String name)
name
- the registry namejava.lang.IllegalStateException
- if the name has already been setpublic static MetricRegistry setDefault(java.lang.String name, MetricRegistry metricRegistry)
name
- the default registry namemetricRegistry
- the default registryjava.lang.IllegalStateException
- if the default registry has already been setpublic static MetricRegistry getDefault()
java.lang.IllegalStateException
- if the default has not been setpublic static MetricRegistry tryGetDefault()
getDefault()
except returns null when the default registry has not been set."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"