|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MetricsRegistry
The MetricsRegistry is responsible for recording all kinds of Hazelcast/JVM specific information to
help out with all kinds of issues.
Each HazelcastInstance has its own MetricsRegistry.
A MetricsRegistry can contain many Metric
instances. Each metric has an input and each metric can be
identified using a name; a String. This name can be any string, the general structure is something like:
Method Summary | ||
---|---|---|
|
deregister(S source)
Deregisters and scans object with probe annotations. |
|
Gauge |
getGauge(String name)
Gets the Gauge for a given name. |
|
Set<String> |
getNames()
Gets a set of all current metric names. |
|
int |
modCount()
Returns the modCount. |
|
|
register(S source,
String name,
DoubleProbe<S> input)
Registers a probe If a Metric with the given name already has an input, that input will be overwritten. |
|
|
register(S source,
String name,
LongProbe<S> input)
Registers a probe. |
|
|
scanAndRegister(S source,
String namePrefix)
Scans the source object for any fields/methods that have been annotated with Probe annotation, and
registering these fields/methods as metrics. |
|
void |
scheduleAtFixedRate(Runnable publisher,
long period,
TimeUnit timeUnit)
Schedules a publisher to be executed at a fixed rate. |
Method Detail |
---|
<S> void scanAndRegister(S source, String namePrefix)
Probe
annotation, and
registering these fields/methods as metrics.
If metrics with the same name already exist, there source/inputs will be updated. So multiple registrations
if the same object are ignored.
If an object has no @Gauge annotations, the call is ignored.
source
- the object to scan.namePrefix
- the name prefix.
NullPointerException
- if namePrefix or source is null.
IllegalArgumentException
- if the source contains Gauge annotation on a field/method of unsupported type.<S> void register(S source, String name, LongProbe<S> input)
name
- the name of the metric.input
- the input for the metric.
NullPointerException
- if source, name or input is null.<S> void register(S source, String name, DoubleProbe<S> input)
name
- the name of the metric.input
- the input for the metric.
NullPointerException
- if name or input is null.<S> void deregister(S source)
source
- the object to deregister
NullPointerException
- if source is null.void scheduleAtFixedRate(Runnable publisher, long period, TimeUnit timeUnit)
publisher
- the published task that needs to be executedperiod
- the time between executionstimeUnit
- the timeunit for period
NullPointerException
- if publisher or timeUnit is null.Gauge getGauge(String name)
name
- the name
NullPointerException
- if name is null.Set<String> getNames()
int modCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |