public interface ProbeBuilder
Modifier and Type | Method and Description |
---|---|
String |
metricName()
Returns the name for the metric.
|
<S> void |
register(S source,
String metricName,
ProbeLevel level,
ProbeUnit unit,
DoubleProbeFunction<S> probeFn)
Registers a single probe.
|
<S> void |
register(S source,
String metricName,
ProbeLevel level,
ProbeUnit unit,
LongProbeFunction<S> probeFn)
Registers a single probe.
|
<S> void |
scanAndRegister(S source)
Scans the source object for any fields/methods that have been annotated
with
Probe annotation, and registers these fields/methods as
probe instances. |
ProbeBuilder |
withTag(String tag,
String value)
Returns a new ProbeBuilder instance with the given tag added.
|
ProbeBuilder withTag(String tag, String value)
<S> void register(@Nonnull S source, @Nonnull String metricName, @Nonnull ProbeLevel level, @Nonnull ProbeUnit unit, @Nonnull DoubleProbeFunction<S> probeFn)
If a probe for the given name exists, it will be overwritten silently.
source
- the object to pass to probeFnmetricName
- the value of "metric" taglevel
- the ProbeLevelunit
- the unitprobeFn
- the probe functionNullPointerException
- if any of the arguments is null<S> void register(@Nonnull S source, @Nonnull String metricName, @Nonnull ProbeLevel level, @Nonnull ProbeUnit unit, @Nonnull LongProbeFunction<S> probeFn)
If a probe for the given name exists, it will be overwritten silently.
source
- the object to pass to probeFnmetricName
- the value of "metric" taglevel
- the ProbeLevelunit
- the unitprobeFn
- the probe functionNullPointerException
- if any of the arguments is null<S> void scanAndRegister(S source)
Probe
annotation, and registers these fields/methods as
probe instances.
If a probe with the same name already exists, the probe is overwritten silently.
If an object has no @Probe annotations, the call is ignored.
source
- the object to scanIllegalArgumentException
- if the source contains Probe annotation
on a field/method of unsupported type.String metricName()
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.