コード例 #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;
 }