Search in sources :

Example 1 with SnmpCachedData

use of sun.management.snmp.util.SnmpCachedData in project jdk8u_jdk by JetBrains.

the class JVM_MANAGEMENT_MIB_IMPL method findInCache.

/**
     * WARNING: This should probably be moved to JvmMemPoolTableMetaImpl
     **/
private int findInCache(SnmpTableHandler handler, String poolName) {
    if (!(handler instanceof SnmpCachedData)) {
        if (handler != null) {
            final String err = "Bad class for JvmMemPoolTable datas: " + handler.getClass().getName();
            log.error("getJvmMemPoolEntry", err);
        }
        return -1;
    }
    final SnmpCachedData data = (SnmpCachedData) handler;
    final int len = data.datas.length;
    for (int i = 0; i < data.datas.length; i++) {
        final MemoryPoolMXBean pool = (MemoryPoolMXBean) data.datas[i];
        if (poolName.equals(pool.getName()))
            return i;
    }
    return -1;
}
Also used : SnmpString(com.sun.jmx.snmp.SnmpString) MemoryPoolMXBean(java.lang.management.MemoryPoolMXBean) SnmpCachedData(sun.management.snmp.util.SnmpCachedData)

Aggregations

SnmpString (com.sun.jmx.snmp.SnmpString)1 MemoryPoolMXBean (java.lang.management.MemoryPoolMXBean)1 SnmpCachedData (sun.management.snmp.util.SnmpCachedData)1