public interface MetricRegistry
MetricFilter
Modifier and Type | Interface and Description |
---|---|
static class |
MetricRegistry.Type
An enumeration representing the scopes of the MetricRegistry
|
Modifier and Type | Method and Description |
---|---|
ConcurrentGauge |
concurrentGauge(Metadata metadata)
Return the
ConcurrentGauge registered under the MetricID with the Metadata 's name;
or create and register a new ConcurrentGauge if none is registered. |
ConcurrentGauge |
concurrentGauge(Metadata metadata,
Tag... tags)
Return the
ConcurrentGauge registered under the MetricID with the Metadata 's name and
with the provided Tag s; or create and register a new ConcurrentGauge if none is registered. |
ConcurrentGauge |
concurrentGauge(MetricID metricID)
Return the
ConcurrentGauge registered under the MetricID ; or create and register
a new ConcurrentGauge if none is registered. |
default ConcurrentGauge |
concurrentGauge(String name)
Return the
ConcurrentGauge registered under the MetricID with this name; or create and register
a new ConcurrentGauge if none is registered. |
default ConcurrentGauge |
concurrentGauge(String name,
Tag... tags)
Return the
ConcurrentGauge registered under the MetricID with this name and
with the provided Tag s; or create and register a new ConcurrentGauge if none is registered. |
Counter |
counter(Metadata metadata)
|
Counter |
counter(Metadata metadata,
Tag... tags)
|
Counter |
counter(MetricID metricID)
|
default Counter |
counter(String name)
|
default Counter |
counter(String name,
Tag... tags)
|
Gauge<?> |
gauge(MetricID metricID,
Gauge<?> gauge)
|
default Gauge<?> |
gauge(String name,
Gauge<?> gauge)
|
default Gauge<?> |
gauge(String name,
Gauge<?> gauge,
Tag... tags)
|
default ConcurrentGauge |
getConcurrentGauge(MetricID metricID)
Return the
ConcurrentGauge registered for the provided MetricID . |
SortedMap<MetricID,ConcurrentGauge> |
getConcurrentGauges()
Returns a map of all the concurrent gauges in the registry and their
MetricID s. |
default SortedMap<MetricID,ConcurrentGauge> |
getConcurrentGauges(MetricFilter filter)
Returns a map of all the concurrent gauges in the registry and their
MetricID s which match
the given filter. |
default Counter |
getCounter(MetricID metricID)
|
SortedMap<MetricID,Counter> |
getCounters()
Returns a map of all the counters in the registry and their
MetricID s. |
default SortedMap<MetricID,Counter> |
getCounters(MetricFilter filter)
Returns a map of all the counters in the registry and their
MetricID s which match the given
filter. |
default Gauge<?> |
getGauge(MetricID metricID)
|
SortedMap<MetricID,Gauge> |
getGauges()
Returns a map of all the gauges in the registry and their
MetricID s. |
default SortedMap<MetricID,Gauge> |
getGauges(MetricFilter filter)
Returns a map of all the gauges in the registry and their
MetricID s which match the given filter. |
default Histogram |
getHistogram(MetricID metricID)
|
SortedMap<MetricID,Histogram> |
getHistograms()
Returns a map of all the histograms in the registry and their
MetricID s. |
default SortedMap<MetricID,Histogram> |
getHistograms(MetricFilter filter)
Returns a map of all the histograms in the registry and their
MetricID s which match the given
filter. |
Map<String,Metadata> |
getMetadata()
Deprecated.
Prior to 2.4 this method was the standard way to access
Metadata by their name; Doing so
might cause unnecessary creation of an intermediate map that might be computed by the implementation.
Prefer getMetadata(String) for key based lookup of a single Metadata ;
Use getNames() to iterate over all names. |
Metadata |
getMetadata(String name)
Return the
Metadata for the provided name. |
default Meter |
getMeter(MetricID metricID)
|
SortedMap<MetricID,Meter> |
getMeters()
Returns a map of all the meters in the registry and their
MetricID s. |
default SortedMap<MetricID,Meter> |
getMeters(MetricFilter filter)
Returns a map of all the meters in the registry and their
MetricID s which match the given filter. |
Metric |
getMetric(MetricID metricID)
|
default <T extends Metric> |
getMetric(MetricID metricID,
Class<T> asType)
|
SortedSet<MetricID> |
getMetricIDs()
Returns a set of the
MetricID s of all the metrics in the registry. |
Map<MetricID,Metric> |
getMetrics()
Deprecated.
Prior to 2.4 this method was the standard way to access
Metric s by their MetricID ;
Doing so might cause unnecessary creation of an intermediate map that might be computed by the
implementation. Prefer getMetric(MetricID) for key based lookup of single Metric ;
Use getMetricIDs() to iterate over all metrics.
Use getMetrics(MetricFilter) with MetricFilter.ALL if a (most likely) computed
Map is preferred. |
default <T extends Metric> |
getMetrics(Class<T> ofType,
MetricFilter filter)
Returns a map of all the metrics in the registry and their
MetricID s which match the given filter
and which are assignable to the provided type. |
SortedMap<MetricID,Metric> |
getMetrics(MetricFilter filter)
Returns a map of all the metrics in the registry and their
MetricID s which match the given filter. |
SortedSet<String> |
getNames()
Returns a set of the names of all the metrics in the registry.
|
default SimpleTimer |
getSimpleTimer(MetricID metricID)
Return the
SimpleTimer registered for the provided MetricID . |
SortedMap<MetricID,SimpleTimer> |
getSimpleTimers()
Returns a map of all the simple timers in the registry and their
MetricID s. |
default SortedMap<MetricID,SimpleTimer> |
getSimpleTimers(MetricFilter filter)
Returns a map of all the simple timers in the registry and their
MetricID s which match the given filter. |
default Timer |
getTimer(MetricID metricID)
|
SortedMap<MetricID,Timer> |
getTimers()
Returns a map of all the timers in the registry and their
MetricID s. |
default SortedMap<MetricID,Timer> |
getTimers(MetricFilter filter)
Returns a map of all the timers in the registry and their
MetricID s which match the given filter. |
MetricRegistry.Type |
getType()
Returns the type of this metric registry.
|
Histogram |
histogram(Metadata metadata)
|
Histogram |
histogram(Metadata metadata,
Tag... tags)
|
Histogram |
histogram(MetricID metricID)
|
default Histogram |
histogram(String name)
|
default Histogram |
histogram(String name,
Tag... tags)
|
Meter |
meter(Metadata metadata)
|
Meter |
meter(Metadata metadata,
Tag... tags)
|
Meter |
meter(MetricID metricID)
|
default Meter |
meter(String name)
|
default Meter |
meter(String name,
Tag... tags)
|
static String |
name(Class<?> klass,
String... names)
Concatenates a class name and elements to form a dotted name, eliding any null values or
empty strings.
|
static String |
name(String name,
String... names)
Concatenates elements to form a dotted name, eliding any null values or empty strings.
|
<T extends Metric> |
register(Metadata metadata,
T metric)
|
<T extends Metric> |
register(Metadata metadata,
T metric,
Tag... tags)
|
<T extends Metric> |
register(String name,
T metric)
|
boolean |
remove(MetricID metricID)
Removes the metric with the given MetricID
|
boolean |
remove(String name)
Removes all metrics with the given name.
|
void |
removeMatching(MetricFilter filter)
Removes all metrics which match the given filter.
|
SimpleTimer |
simpleTimer(Metadata metadata)
Return the
SimpleTimer registered under the the MetricID with the Metadata 's name and
with no tags; or create and register a new SimpleTimer if none is registered. |
SimpleTimer |
simpleTimer(Metadata metadata,
Tag... tags)
Return the
SimpleTimer registered under the the MetricID with the Metadata 's name and
with the provided Tag s; or create and register a new SimpleTimer if none is registered. |
SimpleTimer |
simpleTimer(MetricID metricID)
Return the
SimpleTimer registered under the MetricID ;
or create and register a new SimpleTimer if none is registered. |
default SimpleTimer |
simpleTimer(String name)
Return the
SimpleTimer registered under the MetricID with this name and with no tags; or create
and register a new SimpleTimer if none is registered. |
default SimpleTimer |
simpleTimer(String name,
Tag... tags)
Return the
SimpleTimer registered under the MetricID with this name and with the provided Tag s;
or create and register a new SimpleTimer if none is registered. |
Timer |
timer(Metadata metadata)
|
Timer |
timer(Metadata metadata,
Tag... tags)
|
Timer |
timer(MetricID metricID)
|
default Timer |
timer(String name)
|
default Timer |
timer(String name,
Tag... tags)
|
static String name(String name, String... names)
name
- the first element of the namenames
- the remaining elements of the namename
and names
concatenated by periodsstatic String name(Class<?> klass, String... names)
klass
- the first element of the namenames
- the remaining elements of the nameklass
and names
concatenated by periods<T extends Metric> T register(String name, T metric) throws IllegalArgumentException
Metric
, registers it under a MetricID
with the given name and with no tags.
A Metadata
object will be registered with the name and type.
However, if a Metadata
object is already registered with this metric name and is not equal
to the created Metadata
object then an exception will be thrown.T
- the type of the metricname
- the name of the metricmetric
- the metricmetric
IllegalArgumentException
- if the name is already registered or if Metadata with different
values has already been registered with the name<T extends Metric> T register(Metadata metadata, T metric) throws IllegalArgumentException
Metric
and Metadata
, registers the metric with a MetricID
with the
name provided by the Metadata
and with no tags.
Note: If a Metadata
object is already registered under this metric name and is not equal
to the provided Metadata
object then an exception will be thrown.
T
- the type of the metricmetadata
- the metadatametric
- the metricmetric
IllegalArgumentException
- if the name is already registered or if Metadata with different
values has already been registered with the name<T extends Metric> T register(Metadata metadata, T metric, Tag... tags) throws IllegalArgumentException
Metric
and Metadata
, registers both under a MetricID
with the
name provided by the Metadata
and with the provided Tag
s.
Note: If a Metadata
object is already registered under this metric name and is not equal
to the provided Metadata
object then an exception will be thrown.
T
- the type of the metricmetadata
- the metadatametric
- the metrictags
- the tags of the metricmetric
IllegalArgumentException
- if the name is already registered or if Metadata with different
values has already been registered with the namedefault Counter counter(String name)
Counter
registered under the MetricID
with this name and with no tags;
or create and register a new Counter
if none is registered.
If a Counter
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.name
- the name of the metricCounter
default Counter counter(String name, Tag... tags)
Counter
registered under the MetricID
with this name and with the provided
Tag
s; or create and register a new Counter
if none is registered.
If a Counter
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.name
- the name of the metrictags
- the tags of the metricCounter
Counter counter(MetricID metricID)
Counter
registered under the MetricID
;
or create and register a new Counter
if none is registered.
If a Counter
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.metricID
- the ID of the metricCounter
Counter counter(Metadata metadata)
Counter
registered under the MetricID
with the Metadata
's name and
with no tags; or create and register a new Counter
if none is registered. If a Counter
was created, the provided Metadata
object will be registered.
Note: During retrieval or creation, if a Metadata
object is already registered under this
metric name and is not equal to the provided Metadata
object then an exception will be thrown.
metadata
- the name of the metricCounter
Counter counter(Metadata metadata, Tag... tags)
Counter
registered under the MetricID
with the Metadata
's name and
with the provided Tag
s; or create and register a new Counter
if none is registered.
If a Counter
was created, the provided Metadata
object will be registered.
Note: During retrieval or creation, if a Metadata
object is already registered under this
metric name and is not equal to the provided Metadata
object then an exception will be thrown.
metadata
- the name of the metrictags
- the tags of the metricCounter
default ConcurrentGauge concurrentGauge(String name)
ConcurrentGauge
registered under the MetricID
with this name; or create and register
a new ConcurrentGauge
if none is registered.
If a ConcurrentGauge
was created, a Metadata
object will be registered with the name and type.name
- the name of the metricConcurrentGauge
default ConcurrentGauge concurrentGauge(String name, Tag... tags)
ConcurrentGauge
registered under the MetricID
with this name and
with the provided Tag
s; or create and register a new ConcurrentGauge
if none is registered.
If a ConcurrentGauge
was created, a Metadata
object will be registered with the name and type.name
- the name of the metrictags
- the tags of the metricConcurrentGauge
ConcurrentGauge concurrentGauge(MetricID metricID)
ConcurrentGauge
registered under the MetricID
; or create and register
a new ConcurrentGauge
if none is registered.
If a ConcurrentGauge
was created, a Metadata
object will be registered with the name and type.metricID
- the ID of the metricConcurrentGauge
ConcurrentGauge concurrentGauge(Metadata metadata)
ConcurrentGauge
registered under the MetricID
with the Metadata
's name;
or create and register a new ConcurrentGauge
if none is registered.
If a ConcurrentGauge
was created, the provided Metadata
object will be registered.
Note: During retrieval or creation, if a Metadata
object is already registered under
this metric name and is not equal to the provided Metadata
object then an exception
will be thrown.
metadata
- the name of the metricConcurrentGauge
ConcurrentGauge concurrentGauge(Metadata metadata, Tag... tags)
ConcurrentGauge
registered under the MetricID
with the Metadata
's name and
with the provided Tag
s; or create and register a new ConcurrentGauge
if none is registered.
If a ConcurrentGauge
was created, the provided Metadata
object will be registered.
Note: During retrieval or creation, if a Metadata
object is already registered under
this metric name and is not equal to the provided Metadata
object then an exception
will be thrown.
metadata
- the name of the metrictags
- the tags of the metricConcurrentGauge
default Gauge<?> gauge(String name, Gauge<?> gauge)
Gauge
registered under the MetricID
with this name and with no tags;
or create and register this gauge if none is registered.
If a Gauge
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.default Gauge<?> gauge(String name, Gauge<?> gauge, Tag... tags)
Gauge
registered under the MetricID
with this name and with the
provided Tag
s; or create and register this gauge if none is registered.
If a Gauge
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.default Histogram histogram(String name)
Histogram
registered under the MetricID
with this name and with no tags;
or create and register a new Histogram
if none is registered.
If a Histogram
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.name
- the name of the metricHistogram
default Histogram histogram(String name, Tag... tags)
Histogram
registered under the MetricID
with this name and with the
provided Tag
s; or create and register a new Histogram
if none is registered.
If a Histogram
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.name
- the name of the metrictags
- the tags of the metricHistogram
Histogram histogram(MetricID metricID)
Histogram
registered under the MetricID
;
or create and register a new Histogram
if none is registered.
If a Histogram
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.metricID
- the ID of the metricHistogram
Histogram histogram(Metadata metadata)
Histogram
registered under the MetricID
with the Metadata
's
name and with no tags; or create and register a new Histogram
if none is registered.
If a Histogram
was created, the provided Metadata
object will be registered.
Note: During retrieval or creation, if a Metadata
object is already registered under
this metric name and is not equal to the provided Metadata
object then an exception
will be thrown.
metadata
- the name of the metricHistogram
Histogram histogram(Metadata metadata, Tag... tags)
Histogram
registered under the MetricID
with the Metadata
's
name and with the provided Tag
s; or create and register a new Histogram
if none is registered.
If a Histogram
was created, the provided Metadata
object will be registered.
Note: During retrieval or creation, if a Metadata
object is already registered under
this metric name and is not equal to the provided Metadata
object then an exception will be thrown.
metadata
- the name of the metrictags
- the tags of the metricHistogram
default Meter meter(String name)
Meter
registered under the MetricID
with this name and with no tags; or
create and register a new Meter
if none is registered.
If a Meter
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.name
- the name of the metricMeter
default Meter meter(String name, Tag... tags)
Meter
registered under the MetricID
with this name and with the provided Tag
s;
or create and register a new Meter
if none is registered.
If a Meter
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.name
- the name of the metrictags
- the tags of the metricMeter
Meter meter(MetricID metricID)
Meter
registered under the MetricID
;
or create and register a new Meter
if none is registered.
If a Meter
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.metricID
- the ID of the metricMeter
Meter meter(Metadata metadata)
Meter
registered under the MetricID
with the Metadata
's name and with
no tags; or create and register a new Meter
if none is registered. If a Meter
was created,
the provided Metadata
object will be registered.
Note: During retrieval or creation, if a Metadata
object is already registered under this metric
name and is not equal to the provided Metadata
object then an exception will be thrown.
metadata
- the name of the metricMeter
Meter meter(Metadata metadata, Tag... tags)
Meter
registered under the MetricID
with the Metadata
's name and with
the provided Tag
s; or create and register a new Meter
if none is registered. If a Meter
was
created, the provided Metadata
object will be registered.
Note: During retrieval or creation, if a Metadata
object is already registered under this metric name
and is not equal to the provided Metadata
object then an exception will be thrown.
metadata
- the name of the metrictags
- the tags of the metricMeter
default Timer timer(String name)
Timer
registered under the MetricID
with this name and with no tags; or create
and register a new Timer
if none is registered.
If a Timer
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.name
- the name of the metricTimer
default Timer timer(String name, Tag... tags)
Timer
registered under the MetricID
with this name and with the provided Tag
s;
or create and register a new Timer
if none is registered.
If a Timer
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.name
- the name of the metrictags
- the tags of the metricTimer
Timer timer(MetricID metricID)
Timer
registered under the MetricID
;
or create and register a new Timer
if none is registered.
If a Timer
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.metricID
- the ID of the metricTimer
Timer timer(Metadata metadata)
Timer
registered under the the MetricID
with the Metadata
's name and
with no tags; or create and register a new Timer
if none is registered. If a Timer
was
created, the provided Metadata
object will be registered.
Note: During retrieval or creation, if a Metadata
object is already registered under this metric
name and is not equal to the provided Metadata
object then an exception will be thrown.
metadata
- the name of the metricTimer
Timer timer(Metadata metadata, Tag... tags)
Timer
registered under the the MetricID
with the Metadata
's name and
with the provided Tag
s; or create and register a new Timer
if none is registered.
If a Timer
was created, the provided Metadata
object will be registered.
Note: During retrieval or creation, if a Metadata
object is already registered under this metric
name and is not equal to the provided Metadata
object then an exception will be thrown.
metadata
- the name of the metrictags
- the tags of the metricTimer
default SimpleTimer simpleTimer(String name)
SimpleTimer
registered under the MetricID
with this name and with no tags; or create
and register a new SimpleTimer
if none is registered.
If a SimpleTimer
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.name
- the name of the metricSimpleTimer
default SimpleTimer simpleTimer(String name, Tag... tags)
SimpleTimer
registered under the MetricID
with this name and with the provided Tag
s;
or create and register a new SimpleTimer
if none is registered.
If a SimpleTimer
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.name
- the name of the metrictags
- the tags of the metricSimpleTimer
SimpleTimer simpleTimer(MetricID metricID)
SimpleTimer
registered under the MetricID
;
or create and register a new SimpleTimer
if none is registered.
If a SimpleTimer
was created, a Metadata
object will be registered with the name
and type. If a Metadata
object is already registered with this metric name then that
Metadata
will be used.metricID
- the ID of the metricSimpleTimer
SimpleTimer simpleTimer(Metadata metadata)
SimpleTimer
registered under the the MetricID
with the Metadata
's name and
with no tags; or create and register a new SimpleTimer
if none is registered. If a SimpleTimer
was
created, the provided Metadata
object will be registered.
Note: During retrieval or creation, if a Metadata
object is already registered under this metric
name and is not equal to the provided Metadata
object then an exception will be thrown.
metadata
- the name of the metricSimpleTimer
SimpleTimer simpleTimer(Metadata metadata, Tag... tags)
SimpleTimer
registered under the the MetricID
with the Metadata
's name and
with the provided Tag
s; or create and register a new SimpleTimer
if none is registered.
If a SimpleTimer
was created, the provided Metadata
object will be registered.
Note: During retrieval or creation, if a Metadata
object is already registered under this metric
name and is not equal to the provided Metadata
object then an exception will be thrown.
metadata
- the name of the metrictags
- the tags of the metricSimpleTimer
default <T extends Metric> T getMetric(MetricID metricID, Class<T> asType)
metricID
- lookup key, not null
asType
- the return type which is expected to be compatible with the actual type
of the registered metricMetric
registered for the provided MetricID
or null
if none has been registered so farIllegalArgumentException
- If the registered metric was not assignable to the provided typedefault Counter getCounter(MetricID metricID)
metricID
- lookup key, not null
Counter
registered for the key or null
if none has been registered so farIllegalArgumentException
- If the registered metric was not assignable to Counter
default ConcurrentGauge getConcurrentGauge(MetricID metricID)
ConcurrentGauge
registered for the provided MetricID
.metricID
- lookup key, not null
ConcurrentGauge
registered for the key or null
if none has been registered so farIllegalArgumentException
- If the registered metric was not assignable to ConcurrentGauge
default Gauge<?> getGauge(MetricID metricID)
metricID
- lookup key, not null
Gauge
registered for the key or null
if none has been registered so farIllegalArgumentException
- If the registered metric was not assignable to Gauge
default Histogram getHistogram(MetricID metricID)
metricID
- lookup key, not null
Histogram
registered for the key or null
if none has been registered so farIllegalArgumentException
- If the registered metric was not assignable to Histogram
default Meter getMeter(MetricID metricID)
metricID
- lookup key, not null
Meter
registered for the key or null
if none has been registered so farIllegalArgumentException
- If the registered metric was not assignable to Meter
default Timer getTimer(MetricID metricID)
metricID
- lookup key, not null
Timer
registered for the key or null
if none has been registered so farIllegalArgumentException
- If the registered metric was not assignable to Timer
default SimpleTimer getSimpleTimer(MetricID metricID)
SimpleTimer
registered for the provided MetricID
.metricID
- lookup key, not null
SimpleTimer
registered for the key or null
if none has been registered so farIllegalArgumentException
- If the registered metric was not assignable to SimpleTimer
Metadata getMetadata(String name)
Metadata
for the provided name.name
- the name of the metricMetadata
for the provided name of null
if none has been registered for that nameboolean remove(String name)
name
- the name of the metricboolean remove(MetricID metricID)
metricID
- the MetricID of the metricvoid removeMatching(MetricFilter filter)
filter
- a filterSortedSet<String> getNames()
SortedSet<MetricID> getMetricIDs()
MetricID
s of all the metrics in the registry.SortedMap<MetricID,Gauge> getGauges()
MetricID
s.default SortedMap<MetricID,Gauge> getGauges(MetricFilter filter)
MetricID
s which match the given filter.filter
- the metric filter to matchSortedMap<MetricID,Counter> getCounters()
MetricID
s.default SortedMap<MetricID,Counter> getCounters(MetricFilter filter)
MetricID
s which match the given
filter.filter
- the metric filter to matchSortedMap<MetricID,ConcurrentGauge> getConcurrentGauges()
MetricID
s.default SortedMap<MetricID,ConcurrentGauge> getConcurrentGauges(MetricFilter filter)
MetricID
s which match
the given filter.filter
- the metric filter to matchSortedMap<MetricID,Histogram> getHistograms()
MetricID
s.default SortedMap<MetricID,Histogram> getHistograms(MetricFilter filter)
MetricID
s which match the given
filter.filter
- the metric filter to matchSortedMap<MetricID,Meter> getMeters()
MetricID
s.default SortedMap<MetricID,Meter> getMeters(MetricFilter filter)
MetricID
s which match the given filter.filter
- the metric filter to matchSortedMap<MetricID,Timer> getTimers()
MetricID
s.default SortedMap<MetricID,Timer> getTimers(MetricFilter filter)
MetricID
s which match the given filter.filter
- the metric filter to matchSortedMap<MetricID,SimpleTimer> getSimpleTimers()
MetricID
s.default SortedMap<MetricID,SimpleTimer> getSimpleTimers(MetricFilter filter)
MetricID
s which match the given filter.filter
- the metric filter to matchSortedMap<MetricID,Metric> getMetrics(MetricFilter filter)
MetricID
s which match the given filter.filter
- the metric filter to matchdefault <T extends Metric> SortedMap<MetricID,T> getMetrics(Class<T> ofType, MetricFilter filter)
MetricID
s which match the given filter
and which are assignable to the provided type.ofType
- the type to which all returned metrics should be assignablefilter
- the metric filter to match@Deprecated Map<MetricID,Metric> getMetrics()
Metric
s by their MetricID
;
Doing so might cause unnecessary creation of an intermediate map that might be computed by the
implementation. Prefer getMetric(MetricID)
for key based lookup of single Metric
;
Use getMetricIDs()
to iterate over all metrics.
Use getMetrics(MetricFilter)
with MetricFilter.ALL
if a (most likely) computed
Map
is preferred.MetricID
s.@Deprecated Map<String,Metadata> getMetadata()
Metadata
by their name; Doing so
might cause unnecessary creation of an intermediate map that might be computed by the implementation.
Prefer getMetadata(String)
for key based lookup of a single Metadata
;
Use getNames()
to iterate over all names.MetricRegistry.Type getType()
Copyright © 2020. All rights reserved.