Jvmstat

sun.jvmstat.perfdata.monitor
Class PerfByteArrayMonitor

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

public class PerfByteArrayMonitor
extends AbstractMonitor
implements ByteArrayMonitor

Class for monitoring a PerfData Byte Array instrumentation object. This class is provided to support the PerfStringMonitor classes. Instrumentation objects of this direct type currently cannot be created or monitored.

Since:
1.5
See Also:
sun.jvmstat.instrument.ByteArrayInstrument

Field Summary
 
Fields inherited from class sun.jvmstat.monitor.AbstractMonitor
name, supported, units, variability, vectorLength
 
Constructor Summary
PerfByteArrayMonitor(String name, sun.management.counter.Units u, sun.management.counter.Variability v, boolean supported, ByteBuffer bb, int vectorLength)
          Constructor to create a ByteArrayMonitor for the byte array instrument represented by the data in the given buffer.
 
Method Summary
 byte[] byteArrayValue()
          Get a copy of the elements of the byte array instrument.
 byte byteAt(int index)
          Get the current value of an element of the byte array instrument.
 int getMaximumLength()
          Get the maximum length of the byte array for this byte array instrument.
 Object getValue()
          Return an Object that encapsulates this instrumentation object's current data value.
 
Methods inherited from class sun.jvmstat.monitor.AbstractMonitor
getBaseName, getName, getUnits, getVariability, getVectorLength, isSupported, isVector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface sun.jvmstat.monitor.Monitor
getBaseName, getName, getUnits, getVariability, getVectorLength, isSupported, isVector
 

Constructor Detail

PerfByteArrayMonitor

public PerfByteArrayMonitor(String name,
                            sun.management.counter.Units u,
                            sun.management.counter.Variability v,
                            boolean supported,
                            ByteBuffer bb,
                            int vectorLength)
Constructor to create a ByteArrayMonitor for the byte array instrument represented by the data in the given buffer.

Parameters:
name - the name of the instrumentation object
u - the units of measure attribute
v - the variability attribute
supported - support level indicator
bb - the buffer containing the byte array instrument data
vectorLength - the length of the vector.
Method Detail

getValue

public Object getValue()
Return an Object that encapsulates this instrumentation object's current data value. The object returned contains a byte[] with a copy of the current elements of the ByteArrayInstrument.

Specified by:
getValue in interface Monitor
Specified by:
getValue in class AbstractMonitor
Returns:
Object - a copy of the current value of the elements of the byte array instrument. The return type is guaranteed to be of type byte[].

byteArrayValue

public byte[] byteArrayValue()
Get a copy of the elements of the byte array instrument.

Specified by:
byteArrayValue in interface ByteArrayMonitor
Returns:
byte[] - a copy of the current value of the elements of the byte array instrument.

byteAt

public byte byteAt(int index)
Get the current value of an element of the byte array instrument.

Specified by:
byteAt in interface ByteArrayMonitor
Returns:
byte - a copy of the current value of the element at index index of the byte array instrument.

getMaximumLength

public int getMaximumLength()
Get the maximum length of the byte array for this byte array instrument.

Returns:
int - the maximum length of the byte array.

Jvmstat