public class

JvmThreadInstanceTableMetaImpl

extends JvmThreadInstanceTableMeta
java.lang.Object
   ↳ com.sun.jmx.snmp.agent.SnmpMibNode
     ↳ com.sun.jmx.snmp.agent.SnmpMibTable
       ↳ sun.management.snmp.jvmmib.JvmThreadInstanceTableMeta
         ↳ sun.management.snmp.jvminstr.JvmThreadInstanceTableMetaImpl

Class Overview

The class is used for implementing the "JvmThreadInstanceTable" group.

Summary

Constants
int MAX_STACK_TRACE_DEPTH Maximum depth of the stacktrace that might be returned through SNMP.
Fields
protected SnmpTableCache cache
[Expand]
Inherited Fields
From class sun.management.snmp.jvmmib.JvmThreadInstanceTableMeta
From class com.sun.jmx.snmp.agent.SnmpMibTable
From class com.sun.jmx.snmp.agent.SnmpMibNode
Public Constructors
JvmThreadInstanceTableMetaImpl(SnmpMib myMib, SnmpStandardObjectServer objserv)
Constructor for the table.
Public Methods
Object getEntry(SnmpOid oid)
Get the entry corresponding to the specified rowOid.
Protected Methods
boolean contains(SnmpOid oid, Object userData)
Return true if the entry identified by the given OID index is contained in this table.
SnmpTableHandler getHandler(Object userData)
Get the SnmpTableHandler that holds the jvmThreadInstanceTable data.
SnmpOid getNextOid(Object userData)
Return the first entry OID registered in the table.
SnmpOid getNextOid(SnmpOid oid, Object userData)
Get the SnmpOid index of the row that follows the given oid in the table.
[Expand]
Inherited Methods
From class sun.management.snmp.jvmmib.JvmThreadInstanceTableMeta
From class com.sun.jmx.snmp.agent.SnmpMibTable
From class com.sun.jmx.snmp.agent.SnmpMibNode
From class java.lang.Object
From interface javax.management.NotificationBroadcaster

Constants

public static final int MAX_STACK_TRACE_DEPTH

Maximum depth of the stacktrace that might be returned through SNMP. Since we do not export the stack trace through SNMP, we set MAX_STACK_TRACE_DEPTH=0 so that ThreadMXBean.getThreadInfo(long) does not compute the stack trace.

Constant Value: 0 (0x00000000)

Fields

protected SnmpTableCache cache

Public Constructors

public JvmThreadInstanceTableMetaImpl (SnmpMib myMib, SnmpStandardObjectServer objserv)

Constructor for the table. Initialize metadata for "JvmThreadInstanceTableMeta". The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.

Public Methods

public Object getEntry (SnmpOid oid)

Get the entry corresponding to the specified rowOid.

Parameters
oid The SnmpOid identifying the row to be retrieved.
Returns
  • The entry.

Protected Methods

protected boolean contains (SnmpOid oid, Object userData)

Return true if the entry identified by the given OID index is contained in this table.

Do not call this method directly.

This method is provided has a hook for subclasses. It is called when a get/set request is received in order to determine whether the specified entry is contained in the table. You may want to override this method if you need to perform e.g. lazy evaluation of tables (you need to update the table when a request is received) or if your table is virtual.

Note that this method is called by the Runtime from within a synchronized block.

Parameters
oid The index part of the OID we're looking for.
userData A contextual object containing user-data. This object is allocated through the SnmpUserDataFactory for each incoming SNMP request.
Returns
  • true if the entry is found, false otherwise.

protected SnmpTableHandler getHandler (Object userData)

Get the SnmpTableHandler that holds the jvmThreadInstanceTable data. First look it up in the request contextual cache, and if it is not found, obtain it from the weak cache.
The request contextual cache will be released at the end of the current requests, and is used only to process this request.
The weak cache is shared by all requests, and is only recomputed when it is found to be obsolete.
Note that the data put in the request contextual cache is never considered to be obsolete, in order to preserve data coherency.

protected SnmpOid getNextOid (Object userData)

Return the first entry OID registered in the table.

Parameters
userData A contextual object containing user-data. This object is allocated through the SnmpUserDataFactory for each incoming SNMP request.
Returns
  • The SnmpOid of the first entry in the table.

protected SnmpOid getNextOid (SnmpOid oid, Object userData)

Get the SnmpOid index of the row that follows the given oid in the table. The given oid does not need to be a valid row OID index.

Parameters
oid The OID from which the search will begin.
userData A contextual object containing user-data. This object is allocated through the SnmpUserDataFactory for each incoming SNMP request.
Returns
  • The next SnmpOid index.