public class PcpMonitorBridge extends Object implements MonitoringView
Monitorable
s in the current system and a PCP
monitor agent. The bridge works by persisting any changes to a Monitorable into a section of
memory that is also mapped into the PCP monitor agents address space.
NOTE: This class is not thread safe, it is expected that clients interacting with the
start/stop nature of this class do this with their own thread safety, or use QuiescentRegistryListener
as that'll manage it nicely for you..QuiescentRegistryListener
Modifier and Type | Field and Description |
---|---|
static int |
UPDATE_QUEUE_SIZE |
Constructor and Description |
---|
PcpMonitorBridge(PcpWriter writer) |
PcpMonitorBridge(PcpWriter writer,
MetricNameMapper mapper,
TextSource shortTextSource,
TextSource longTextSource) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasUpdatesPending() |
boolean |
isRunning() |
void |
startMonitoring(Collection<Monitorable<?>> monitorables)
Instructs the view to begin its work using the set of Monitorable instances
as the basis for whatever it is this 'view' wants to do with it (say, start externalising
the state of the metrics to an external file).
|
void |
stopMonitoring(Collection<Monitorable<?>> monitorables)
Stops monitoring updates on the Monitorables in the provided registry, any
updates to any of the monitorables passed in will no longer be tracked by this View
|
public static final int UPDATE_QUEUE_SIZE
public PcpMonitorBridge(PcpWriter writer)
public PcpMonitorBridge(PcpWriter writer, MetricNameMapper mapper, TextSource shortTextSource, TextSource longTextSource)
public void stopMonitoring(Collection<Monitorable<?>> monitorables)
MonitoringView
stopMonitoring
in interface MonitoringView
monitorables
- the Collection of metrics to stop monitoringpublic boolean isRunning()
isRunning
in interface MonitoringView
MonitoringView.startMonitoring(java.util.Collection)
()}public boolean hasUpdatesPending()
public void startMonitoring(Collection<Monitorable<?>> monitorables)
MonitoringView
MonitoringView.stopMonitoring(java.util.Collection)
before recalling startMonitoring.startMonitoring
in interface MonitoringView
monitorables
- the Collection of metrics to start monitoringCopyright © 2009–2019 Performance Co-Pilot. All rights reserved.