String[] compactAllDiskStores() {
    List<String> compactedStores = new ArrayList<>();

    if (cache != null && !cache.isClosed()) {
      for (DiskStore store : cache.listDiskStoresIncludingRegionOwned()) {
        if (store.forceCompaction()) {
          compactedStores.add(((DiskStoreImpl) store).getPersistentID().getDirectory());
        }
      }
    }
    String[] compactedStoresAr = new String[compactedStores.size()];
    return compactedStores.toArray(compactedStoresAr);
  }
All OS metrics are not present in java.lang.management.OperatingSystemMXBean It has to be cast
to com.sun.management.OperatingSystemMXBean. To avoid the cast using dynamic call so that Java
platform will take care of the details in a native manner;
geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java