예제 #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;
 }