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;
}
Aggregations