/** Setter for the "JvmMemPoolCollectThreshold" variable. */ public void setJvmMemPoolCollectThreshold(Long x) throws SnmpStatusException { final long val = x.longValue(); if (val < 0) throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue); // This should never throw an exception has the checks have // already been performed in checkJvmMemPoolCollectThreshold(). // pool.setCollectionUsageThreshold(val); }
/** Setter for the "JvmMemPoolPeakReset" variable. */ public synchronized void setJvmMemPoolPeakReset(Long x) throws SnmpStatusException { final long l = x.longValue(); if (l > jvmMemPoolPeakReset) { final long stamp = System.currentTimeMillis(); pool.resetPeakUsage(); jvmMemPoolPeakReset = stamp; log.debug("setJvmMemPoolPeakReset", "jvmMemPoolPeakReset=" + stamp); } }
/** Checker for the "JvmMemPoolCollectThreshold" variable. */ public void checkJvmMemPoolCollectThreshold(Long x) throws SnmpStatusException { // if threshold is -1, it means that low memory detection is not // supported. if (!pool.isCollectionUsageThresholdSupported()) throw new SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue); final long val = x.longValue(); if (val < 0) throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue); }
/** Getter for the "JvmMemPoolState" variable. */ public EnumJvmMemPoolState getJvmMemPoolState() throws SnmpStatusException { if (pool.isValid()) return JvmMemPoolStateValid; else return JvmMemPoolStateInvalid; }
/** Getter for the "JvmMemPoolName" variable. */ public String getJvmMemPoolName() throws SnmpStatusException { return JVM_MANAGEMENT_MIB_IMPL.validJavaObjectNameTC(pool.getName()); }
/** Getter for the "JvmMemPoolType" variable. */ public EnumJvmMemPoolType getJvmMemPoolType() throws SnmpStatusException { return jvmMemPoolType(pool.getType()); }
/** Getter for the "JvmMemPoolCollectThreshdCount" variable. */ public Long getJvmMemPoolCollectThreshdCount() throws SnmpStatusException { if (!pool.isCollectionUsageThresholdSupported()) return JvmMemoryImpl.Long0; final long val = pool.getCollectionUsageThresholdCount(); if (val > -1) return new Long(val); else return JvmMemoryImpl.Long0; }
/** Getter for the "JvmMemPoolThreshdSupport" variable. */ public EnumJvmMemPoolCollectThreshdSupport getJvmMemPoolCollectThreshdSupport() throws SnmpStatusException { if (pool.isCollectionUsageThresholdSupported()) return EnumJvmMemPoolCollectThreshdSupported; else return EnumJvmMemPoolCollectThreshdUnsupported; }