APIdia Launch Partner
Top Description Fields Constructors Methods
sun.jvmstat.perfdata.monitor

public abstract Class AbstractPerfDataBufferPrologue

extends Object
Class Inheritance
Known Direct Subclasses
sun.jvmstat.perfdata.monitor.v1_0.PerfDataBufferPrologue, sun.jvmstat.perfdata.monitor.v2_0.PerfDataBufferPrologue
Imports
sun.jvmstat.monitor.*, java.nio.ByteOrder, .ByteBuffer, .IntBuffer

Abstraction representing the HotSpot PerfData instrumentation buffer header. This class represents only the fixed portion of the header. Version specific classes represent the portion of the header that may change from release to release.

The PerfDataBufferProlog class supports parsing of the following C structure:

typedef struct {
  jint magic;             // magic number - 0xcafec0c0
  jbyte byte_order;       // byte order of the buffer
  jbyte major_version;    // major and minor version numbers
  jbyte minor_version;
  jbyte reserved_byte1;   // reserved - see concrete implementations for
                          // possible definition.
  ...                     // remainder is handled by the subclasses.
} PerfDataPrologue
Author
Brian Doherty
Since
1.5

Field Summary

Modifier and TypeField and Description
protected ByteBuffer
pack-priv static final byte
pack-priv static final byte
pack-priv static final int
public static final String
public static final String
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int

Constructor Summary

AccessConstructor and Description
public
AbstractPerfDataBufferPrologue(ByteBuffer
buffer containing the instrumentation data
byteBuffer
)

Construct a PerfDataBufferPrologue instance.

Method Summary

Modifier and TypeMethod and Description
public ByteOrder

Returns:

int - the byte order of the instrumentation buffer
getByteOrder
()

Get the byte order.

public static ByteOrder

Returns:

int - the byte order of the instrumentation buffer
getByteOrder
(ByteBuffer bb)

Get the byte order for the given ByteBuffer.

public int

Returns:

int - the magic number
getMagic
()

Get the magic number.

public static int

Returns:

int - the magic number
getMagic
(ByteBuffer bb)

Get the magic number from the given byteBuffer.

public int

Returns:

int - the major version
getMajorVersion
()

Get the major version.

public static int

Returns:

int - the major version
getMajorVersion
(ByteBuffer bb)

Get the major version number from the given ByteBuffer.

public int

Returns:

int - the minor version
getMinorVersion
()

Get the minor version.

public static int

Returns:

int - the minor version
getMinorVersion
(ByteBuffer bb)

Get the minor version number from the given ByteBuffer.

public int

Returns:

int - the size of the header
getSize
()

Get the size of the header portion of the instrumentation buffer.

public abstract boolean

Returns:

boolean - the initialized status
isAccessible
()

Get the accessible flag.

public IntBuffer

Returns:

IntBuffer - a ByteBuffer that accesses the major version number in the instrumentation buffer header.
majorVersionBuffer
()

Return an IntBuffer that accesses the major version number.

public IntBuffer

Returns:

IntBuffer - a ByteBuffer that accesses the minor version number in the instrumentation buffer header.
minorVersionBuffer
()

Return an IntBuffer that accesses the minor version number.

public abstract boolean

Returns:

boolean - the initialized flag support status.
supportsAccessible
()

Test if the accessible flag is supported by this version of the PerfDataBufferPrologue.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

byteBufferback to summary
protected ByteBuffer byteBuffer
PERFDATA_BIG_ENDIANback to summary
pack-priv static final byte PERFDATA_BIG_ENDIAN
PERFDATA_LITTLE_ENDIANback to summary
pack-priv static final byte PERFDATA_LITTLE_ENDIAN
PERFDATA_MAGICback to summary
pack-priv static final int PERFDATA_MAGIC
PERFDATA_MAJOR_NAMEback to summary
public static final String PERFDATA_MAJOR_NAME
PERFDATA_MINOR_NAMEback to summary
public static final String PERFDATA_MINOR_NAME
PERFDATA_PROLOG_BYTEORDER_OFFSETback to summary
pack-priv static final int PERFDATA_PROLOG_BYTEORDER_OFFSET
PERFDATA_PROLOG_BYTEORDER_SIZEback to summary
pack-priv static final int PERFDATA_PROLOG_BYTEORDER_SIZE
PERFDATA_PROLOG_MAGIC_OFFSETback to summary
pack-priv static final int PERFDATA_PROLOG_MAGIC_OFFSET
PERFDATA_PROLOG_MAJOR_OFFSETback to summary
pack-priv static final int PERFDATA_PROLOG_MAJOR_OFFSET
PERFDATA_PROLOG_MAJOR_SIZEback to summary
pack-priv static final int PERFDATA_PROLOG_MAJOR_SIZE
PERFDATA_PROLOG_MINOR_OFFSETback to summary
pack-priv static final int PERFDATA_PROLOG_MINOR_OFFSET
PERFDATA_PROLOG_MINOR_SIZEback to summary
pack-priv static final int PERFDATA_PROLOG_MINOR_SIZE
PERFDATA_PROLOG_OFFSETback to summary
pack-priv static final int PERFDATA_PROLOG_OFFSET
PERFDATA_PROLOG_RESERVEDB1_OFFSETback to summary
pack-priv static final int PERFDATA_PROLOG_RESERVEDB1_OFFSET
PERFDATA_PROLOG_RESERVEDB1_SIZEback to summary
pack-priv static final int PERFDATA_PROLOG_RESERVEDB1_SIZE
PERFDATA_PROLOG_SIZEback to summary
pack-priv static final int PERFDATA_PROLOG_SIZE

Constructor Detail

AbstractPerfDataBufferPrologueback to summary
public AbstractPerfDataBufferPrologue(ByteBuffer byteBuffer) throws MonitorException

Construct a PerfDataBufferPrologue instance.

Parameters
byteBuffer:ByteBuffer

buffer containing the instrumentation data

Method Detail

getByteOrderback to summary
public ByteOrder getByteOrder()

Get the byte order.

Returns:ByteOrder

int - the byte order of the instrumentation buffer

getByteOrderback to summary
public static ByteOrder getByteOrder(ByteBuffer bb)

Get the byte order for the given ByteBuffer.

Returns:ByteOrder

int - the byte order of the instrumentation buffer

getMagicback to summary
public int getMagic()

Get the magic number.

Returns:int

int - the magic number

getMagicback to summary
public static int getMagic(ByteBuffer bb)

Get the magic number from the given byteBuffer.

Returns:int

int - the magic number

getMajorVersionback to summary
public int getMajorVersion()

Get the major version.

Returns:int

int - the major version

getMajorVersionback to summary
public static int getMajorVersion(ByteBuffer bb)

Get the major version number from the given ByteBuffer.

Returns:int

int - the major version

getMinorVersionback to summary
public int getMinorVersion()

Get the minor version.

Returns:int

int - the minor version

getMinorVersionback to summary
public static int getMinorVersion(ByteBuffer bb)

Get the minor version number from the given ByteBuffer.

Returns:int

int - the minor version

getSizeback to summary
public int getSize()

Get the size of the header portion of the instrumentation buffer.

Returns:int

int - the size of the header

isAccessibleback to summary
public abstract boolean isAccessible()

Get the accessible flag. If supported, it indicates that the shared memory region is sufficiently initialized for client access.

Returns:boolean

boolean - the initialized status

See Also
supportsAccessible()
majorVersionBufferback to summary
public IntBuffer majorVersionBuffer()

Return an IntBuffer that accesses the major version number. This is used to create a Monitor object for this value.

Returns:IntBuffer

IntBuffer - a ByteBuffer that accesses the major version number in the instrumentation buffer header.

minorVersionBufferback to summary
public IntBuffer minorVersionBuffer()

Return an IntBuffer that accesses the minor version number. This is used to create a Monitor object for this value.

Returns:IntBuffer

IntBuffer - a ByteBuffer that accesses the minor version number in the instrumentation buffer header.

supportsAccessibleback to summary
public abstract boolean supportsAccessible()

Test if the accessible flag is supported by this version of the PerfDataBufferPrologue. Although not an abstract method, this method should be overridden by version specific subclasses.

Returns:boolean

boolean - the initialized flag support status.

See Also
isAccessible()