
public abstract class PerfDataBufferImpl extends Object
AbstractPerfDataBuffer| Modifier and Type | Field and Description |
|---|---|
protected Map |
aliasCache
A cache of resolved monitor aliases.
|
protected Map<String,ArrayList<String>> |
aliasMap
A Map of monitor object names to aliases as read in from the alias map
file.
|
protected ByteBuffer |
buffer
The buffer containing the instrumentation data.
|
protected int |
lvmid
The Local Java Virtual Machine Identifier for this buffer.
|
protected Map<String,Monitor> |
monitors
A Map of monitor objects found in the instrumentation buffer.
|
| Modifier | Constructor and Description |
|---|---|
protected |
PerfDataBufferImpl(ByteBuffer buffer,
int lvmid)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
buildMonitorMap(Map<String,Monitor> m)
build the map of Monitor objects.
|
protected Monitor |
findByAlias(String name)
Find the Monitor object for the named counter by using one of its
aliases.
|
Monitor |
findByName(String name)
Find a named Instrumentation object.
|
List<Monitor> |
findByPattern(String patternString)
Find all Instrumentation objects with names matching the given pattern.
|
byte[] |
getBytes()
Get a copy of the raw instrumentation data.
|
int |
getCapacity()
Get the capacity of the instrumentation buffer.
|
int |
getLocalVmId()
Get the Local Java Virtual Machine Identifier, or lvmid
for the target JVM associated with this instrumentation buffer.
|
MonitorStatus |
getMonitorStatus()
Get a list of the inserted and removed monitors since last called.
|
protected abstract MonitorStatus |
getMonitorStatus(Map<String,Monitor> m)
get the list of inserted and removed monitors since last called.
|
protected abstract void |
getNewMonitors(Map<String,Monitor> m)
get the new Monitor objects from the Map of Monitor objects.
|
protected ByteBuffer buffer
protected Map<String,Monitor> monitors
protected int lvmid
protected Map<String,ArrayList<String>> aliasMap
protected Map aliasCache
protected PerfDataBufferImpl(ByteBuffer buffer, int lvmid)
buffer - the ByteBuffer containing the instrumentation data.lvmid - the Local Java Virtual Machine Identifier for this
instrumentation buffer.public int getLocalVmId()
public byte[] getBytes()
public int getCapacity()
protected Monitor findByAlias(String name)
public Monitor findByName(String name) throws MonitorException
name - the name of the Instrumentation object to find.Monitor object that can be used to
monitor the the named instrumentation object, or
null if the named object doesn't exist.MonitorException - Thrown if an error occurs while communicating
with the target Java Virtual Machine.public List<Monitor> findByPattern(String patternString) throws MonitorException, PatternSyntaxException
List of Monitor objects such that
the name of each object matches the given pattern.patternString - a string containing a pattern as described in
Pattern.Monitor objects that can be used to
monitor the instrumentation objects whose names match
the given pattern. If no instrumentation objects have`
names matching the given pattern, then an empty List
is returned.MonitorException - Thrown if an error occurs while communicating
with the target Java Virtual Machine.PatternSyntaxExceptionPatternpublic MonitorStatus getMonitorStatus() throws MonitorException
MonitorException - Thrown if communications errors occur
while communicating with the target.protected abstract MonitorStatus getMonitorStatus(Map<String,Monitor> m) throws MonitorException
m - the map of Monitors.MonitorException - Thrown if communications errors occur
while communicating with the target.protected abstract void buildMonitorMap(Map<String,Monitor> m) throws MonitorException
m - the map of Monitors.MonitorException - Thrown if communications errors occur
while communicating with the target.protected abstract void getNewMonitors(Map<String,Monitor> m) throws MonitorException
m - the map of Monitors.MonitorException - Thrown if communications errors occur
while communicating with the target.Copyright © 2017–2018 earcam. All rights reserved.