Jvmstat

sun.jvmstat.monitor
Class AbstractMonitor

java.lang.Object
  extended by sun.jvmstat.monitor.AbstractMonitor
All Implemented Interfaces:
Monitor
Direct Known Subclasses:
PerfByteArrayMonitor, PerfIntegerMonitor, PerfLongMonitor

public abstract class AbstractMonitor
extends Object
implements Monitor

The base class for Instrumentation Monitoring Objects. This base class provides implementations of the Monitor methods that are common to all classes implementing the Monitor interface..

Since:
1.5

Field Summary
protected  String name
           
protected  boolean supported
           
protected  sun.management.counter.Units units
           
protected  sun.management.counter.Variability variability
           
protected  int vectorLength
           
 
Constructor Summary
protected AbstractMonitor(String name, sun.management.counter.Units units, sun.management.counter.Variability variability, boolean supported)
          Create a scalar instrumentation monitoring object with the given name and attributes.
protected AbstractMonitor(String name, sun.management.counter.Units units, sun.management.counter.Variability variability, boolean supported, int vectorLength)
          Create a vector instrumentation monitoring object with the given name and attributes.
 
Method Summary
 String getBaseName()
          Returns the base name of this instrumentation object.
 String getName()
          Returns the name of this instrumentation object.
 sun.management.counter.Units getUnits()
          Returns the Units for this instrumentation monitoring object.
abstract  Object getValue()
          Return an Object that encapsulates this instrumentation object's current data value.
 sun.management.counter.Variability getVariability()
          Returns the Variability for this instrumentation object.
 int getVectorLength()
          Return the length of the vector.
 boolean isSupported()
          Test if the instrumentation object is supported.
 boolean isVector()
          Test if the instrumentation object is a vector type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name

units

protected sun.management.counter.Units units

variability

protected sun.management.counter.Variability variability

vectorLength

protected int vectorLength

supported

protected boolean supported
Constructor Detail

AbstractMonitor

protected AbstractMonitor(String name,
                          sun.management.counter.Units units,
                          sun.management.counter.Variability variability,
                          boolean supported,
                          int vectorLength)
Create a vector instrumentation monitoring object with the given name and attributes.

Parameters:
name - the name to assign to this instrumentation object.
units - the units of measure attribute
variability - the variability attribute
supported - support level indicator
vectorLength - the length of the vector, or 0 if not a vector type.

AbstractMonitor

protected AbstractMonitor(String name,
                          sun.management.counter.Units units,
                          sun.management.counter.Variability variability,
                          boolean supported)
Create a scalar instrumentation monitoring object with the given name and attributes.

Parameters:
name - the name to assign to this instrumentation object.
units - the units of measure attribute
variability - the variability attribute
supported - support level indicator
Method Detail

getName

public String getName()
Returns the name of this instrumentation object.

Specified by:
getName in interface Monitor
Returns:
String - the name assigned to this instrumentation monitoring object

getBaseName

public String getBaseName()
Returns the base name of this instrumentation object. The base name is the component of the name following the last "." character in the name.

Specified by:
getBaseName in interface Monitor
Returns:
String - the base name of the name assigned to this instrumentation monitoring object.

getUnits

public sun.management.counter.Units getUnits()
Returns the Units for this instrumentation monitoring object.

Specified by:
getUnits in interface Monitor
Returns:
Units - the units of measure attribute

getVariability

public sun.management.counter.Variability getVariability()
Returns the Variability for this instrumentation object.

Specified by:
getVariability in interface Monitor
Returns:
Variability - the variability attribute

isVector

public boolean isVector()
Test if the instrumentation object is a vector type.

Specified by:
isVector in interface Monitor
Returns:
boolean - true if this instrumentation object is a vector type, false otherwise.

getVectorLength

public int getVectorLength()
Return the length of the vector.

Specified by:
getVectorLength in interface Monitor
Returns:
int - the length of the vector or zero if this instrumentation object is a scalar type.

isSupported

public boolean isSupported()
Test if the instrumentation object is supported.

Specified by:
isSupported in interface Monitor

getValue

public abstract Object getValue()
Return an Object that encapsulates this instrumentation object's current data value.

Specified by:
getValue in interface Monitor

Jvmstat