示例#1
0
 /** 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);
 }
示例#2
0
 /** 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);
   }
 }
示例#3
0
  /** 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);
  }
示例#4
0
 /** Getter for the "JvmMemPoolState" variable. */
 public EnumJvmMemPoolState getJvmMemPoolState() throws SnmpStatusException {
   if (pool.isValid()) return JvmMemPoolStateValid;
   else return JvmMemPoolStateInvalid;
 }
示例#5
0
 /** Getter for the "JvmMemPoolName" variable. */
 public String getJvmMemPoolName() throws SnmpStatusException {
   return JVM_MANAGEMENT_MIB_IMPL.validJavaObjectNameTC(pool.getName());
 }
示例#6
0
 /** Getter for the "JvmMemPoolType" variable. */
 public EnumJvmMemPoolType getJvmMemPoolType() throws SnmpStatusException {
   return jvmMemPoolType(pool.getType());
 }
示例#7
0
 /** 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;
 }
示例#8
0
 /** Getter for the "JvmMemPoolThreshdSupport" variable. */
 public EnumJvmMemPoolCollectThreshdSupport getJvmMemPoolCollectThreshdSupport()
     throws SnmpStatusException {
   if (pool.isCollectionUsageThresholdSupported()) return EnumJvmMemPoolCollectThreshdSupported;
   else return EnumJvmMemPoolCollectThreshdUnsupported;
 }