public abstract class DiagnosticsPlugin extends Object
Diagnostics
.
The plugin will not be called concurrently, unless threads are introduced
outside of the Diagnostics
.
There is a happens-before relation between onStart()
and
run(DiagnosticsLogWriter)
, and therefore there is no need to make
variables volatile. The source of the happens-before relation is the
scheduler.queue inside of the Diagnostics
or the AtomicReference in
case of static plugins.
Constructor and Description |
---|
DiagnosticsPlugin(ILogger logger) |
Modifier and Type | Method and Description |
---|---|
abstract long |
getPeriodMillis()
Returns the period of executing the monitor in millis.
|
abstract void |
onStart() |
abstract void |
run(DiagnosticsLogWriter writer) |
protected final ILogger logger
public DiagnosticsPlugin(ILogger logger)
public abstract long getPeriodMillis()
If a monitor is disabled, 0 is returned.
If a monitor should run only once, a negative value is returned. This is
useful for 'static' monitors like the SystemPropertiesPlugin
that run at the beginning of a log file but their contents will not
change.
public abstract void onStart()
public abstract void run(DiagnosticsLogWriter writer)
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.