@Override
  public void refresh() {
    Runtime rt = Runtime.getRuntime();
    vmStats.setInt(pendingFinalizationCountId, memBean.getObjectPendingFinalizationCount());
    vmStats.setInt(cpusId, osBean.getAvailableProcessors());
    vmStats.setInt(threadsId, threadBean.getThreadCount());
    vmStats.setInt(daemonThreadsId, threadBean.getDaemonThreadCount());
    vmStats.setInt(peakThreadsId, threadBean.getPeakThreadCount());
    vmStats.setLong(threadStartsId, threadBean.getTotalStartedThreadCount());
    vmStats.setLong(loadedClassesId, clBean.getTotalLoadedClassCount());
    vmStats.setLong(unloadedClassesId, clBean.getUnloadedClassCount());
    vmStats.setLong(freeMemoryId, rt.freeMemory());
    vmStats.setLong(totalMemoryId, rt.totalMemory());
    vmStats.setLong(maxMemoryId, rt.maxMemory());

    // Compute processCpuTime separately, if not accessible ignore
    try {
      if (getProcessCpuTime != null) {
        Object v = getProcessCpuTime.invoke(osBean);
        vmStats.setLong(processCpuTimeId, (Long) v);
      }
    } catch (VirtualMachineError err) {
      SystemFailure.initiateFailure(err);
      // If this ever returns, rethrow the error. We're poisoned
      // now, so don't let this thread continue.
      throw err;
    } catch (Throwable ex) {
      // Whenever you catch Error or Throwable, you must also
      // catch VirtualMachineError (see above). However, there is
      // _still_ a possibility that you are dealing with a cascading
      // error condition, so you also need to check to see if the JVM
      // is still usable:
      SystemFailure.checkFailure();
    }

    if (unixBean != null) {
      try {
        Object v = getMaxFileDescriptorCount.invoke(unixBean);
        vmStats.setLong(unix_fdLimitId, (Long) v);
        v = getOpenFileDescriptorCount.invoke(unixBean);
        vmStats.setLong(unix_fdsOpenId, (Long) v);
      } catch (VirtualMachineError err) {
        SystemFailure.initiateFailure(err);
        // If this ever returns, rethrow the error. We're poisoned
        // now, so don't let this thread continue.
        throw err;
      } catch (Throwable ex) {
        // Whenever you catch Error or Throwable, you must also
        // catch VirtualMachineError (see above). However, there is
        // _still_ a possibility that you are dealing with a cascading
        // error condition, so you also need to check to see if the JVM
        // is still usable:
        SystemFailure.checkFailure();
      }
    }

    refresh(heapMemStats, getHeapMemoryUsage(memBean));
    refresh(nonHeapMemStats, getNonHeapMemoryUsage(memBean));
    refreshGC();
    refreshMemoryPools();
    refreshThreads();
  }
Remember that the given bean does not support collection usage.
geode-core/src/main/java/org/apache/geode/internal/stats50/VMStats50.java