/** * The call should have already checked to make sure * usesSystemCalls returns true. */ public static void refresh(LocalStatisticsImpl stats) { int flags = stats.getOsStatFlags(); if ((flags & PROCESS_STAT_FLAG) != 0) { HostStatHelper.refreshProcess(stats); } else if ((flags & SYSTEM_STAT_FLAG) != 0) { HostStatHelper.refreshSystem(stats); } else { throw new RuntimeException(LocalizedStrings.HostStatHelper_UNEXPECTED_OS_STATS_FLAGS_0.toLocalizedString(Integer.valueOf(flags))); } }
/** * The call should have already checked to make sure * usesSystemCalls returns true. */ public static void refresh(LocalStatisticsImpl stats) { int flags = stats.getOsStatFlags(); if ((flags & PROCESS_STAT_FLAG) != 0) { HostStatHelper.refreshProcess(stats); } else if ((flags & SYSTEM_STAT_FLAG) != 0) { HostStatHelper.refreshSystem(stats); } else { throw new RuntimeException(LocalizedStrings.HostStatHelper_UNEXPECTED_OS_STATS_FLAGS_0.toLocalizedString(Integer.valueOf(flags))); } }
private static native void refreshSystem(int[] ints, long[] longs, double[] doubles);
private static native void refreshSystem(int[] ints, long[] longs, double[] doubles);
refreshSystem((LocalStatisticsImpl)stats);
refreshSystem((LocalStatisticsImpl)stats);