@Retention(value=RUNTIME) @Target(value={FIELD,METHOD}) public @interface Probe
MetricsRegistry.registerStaticMetrics(Object, String)
is called.
The MetricsRegistry will automatically scan all interfaces and super classes of an object (recursively). So it is possible to define a Probe on e.g. an interface or an abstract class.
Field
provides access to the actual field
without the need for autoboxing. With the Method
a wrapper object is created when a primitive is returned by the method.
Therefore, fields produce less garbage than methods.
A Probe can be placed on fields or methods with the following (return) type:
AtomicInteger
AtomicLong
Counter
Byte
Short
Integer
Float
Double
Collection
: it will return the sizeMap
: it will return the sizeSemaphore
: it will return the number of
available permitsModifier and Type | Optional Element and Description |
---|---|
MetricTarget[] |
excludedTargets
Returns the targets excluded for this Probe.
|
ProbeLevel |
level
Returns the ProbeLevel.
|
String |
name
The name of the Probe.
|
ProbeUnit |
unit
Measurement unit of a Probe.
|
public abstract String name
public abstract ProbeLevel level
public abstract ProbeUnit unit
public abstract MetricTarget[] excludedTargets
MetricsPublisher
s.Copyright © 2019 Hazelcast, Inc.. All rights reserved.