@Test public void testGetNodeSwapInfoFunction() { assertEquals(HashMap.class, provider.getNodeSwapInfo().getClass()); assert(provider.getNodeSwapInfo() != null); }
public Map<Object, Object> getNodeSwapInfo() { Swap swap = null; Map<Object, Object> nodeSwapInfo = new HashMap<Object, Object>(); try { swap = sigar.getSwap(); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } nodeSwapInfo.put("freeSystemSwap", swap.getFree()); nodeSwapInfo.put("pageIn", swap.getPageIn()); nodeSwapInfo.put("pageOut", swap.getPageOut()); nodeSwapInfo.put("totalSystemSwap", swap.getTotal()); nodeSwapInfo.put("usedSystemSwap", swap.getUsed()); return nodeSwapInfo; }
SigarNodeInfoProvider { public Map<Object, Object> getNodeSwapInfo() { Swap swap = null; Map<Object, Object> nodeSwapInfo = new HashMap<Object, Object>(); try { swap = sigar.getSwap(); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } nodeSwapInfo.put("freeSystemSwap", swap.getFree()); nodeSwapInfo.put("pageIn", swap.getPageIn()); nodeSwapInfo.put("pageOut", swap.getPageOut()); nodeSwapInfo.put("totalSystemSwap", swap.getTotal()); nodeSwapInfo.put("usedSystemSwap", swap.getUsed()); return nodeSwapInfo; } }
SigarNodeInfoProvider { public Map<Object, Object> getNodeSwapInfo() { Swap swap = null; Map<Object, Object> nodeSwapInfo = new HashMap<Object, Object>(); try { swap = sigar.getSwap(); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } nodeSwapInfo.put("freeSystemSwap", swap.getFree()); nodeSwapInfo.put("pageIn", swap.getPageIn()); nodeSwapInfo.put("pageOut", swap.getPageOut()); nodeSwapInfo.put("totalSystemSwap", swap.getTotal()); nodeSwapInfo.put("usedSystemSwap", swap.getUsed()); return nodeSwapInfo; } SigarNodeInfoProvider(); }
SigarNodeInfoProvider { public Map<Object, Object> getNodeSwapInfo() { Swap swap = null; Map<Object, Object> nodeSwapInfo = new HashMap<Object, Object>(); try { swap = sigar.getSwap(); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } nodeSwapInfo.put("freeSystemSwap", swap.getFree()); nodeSwapInfo.put("pageIn", swap.getPageIn()); nodeSwapInfo.put("pageOut", swap.getPageOut()); nodeSwapInfo.put("totalSystemSwap", swap.getTotal()); nodeSwapInfo.put("usedSystemSwap", swap.getUsed()); return nodeSwapInfo; } SigarNodeInfoProvider(); Map<Object, Object> getNodeMemoryInfo(); List<Map<Object, Object>> getNodeCpuInfos(); Map<Object, Object> getNodeSwapInfo(); List<Map<Object, Object>> getNodeNetworkInfos(); Map<Object, Object> getNodeOSInfo(); Map<Object, Object> getNodeUpTimeInfo(); List<Map<Object, Object>> getNodeDiskInfos(); List<Map<Object, Object>> getSortedListByItem(final String item); Map<String, Object> getNodeInfo(int topProcessCount); }
SigarNodeInfoProvider { public Map<Object, Object> getNodeSwapInfo() { Swap swap = null; Map<Object, Object> nodeSwapInfo = new HashMap<Object, Object>(); try { swap = sigar.getSwap(); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } nodeSwapInfo.put("freeSystemSwap", swap.getFree()); nodeSwapInfo.put("pageIn", swap.getPageIn()); nodeSwapInfo.put("pageOut", swap.getPageOut()); nodeSwapInfo.put("totalSystemSwap", swap.getTotal()); nodeSwapInfo.put("usedSystemSwap", swap.getUsed()); return nodeSwapInfo; } SigarNodeInfoProvider(); Map<Object, Object> getNodeMemoryInfo(); List<Map<Object, Object>> getNodeCpuInfos(); Map<Object, Object> getNodeSwapInfo(); List<Map<Object, Object>> getNodeNetworkInfos(); Map<Object, Object> getNodeOSInfo(); Map<Object, Object> getNodeUpTimeInfo(); List<Map<Object, Object>> getNodeDiskInfos(); List<Map<Object, Object>> getSortedListByItem(final String item); Map<String, Object> getNodeInfo(int topProcessCount); static final char SLEEP; static final char RUN; static final char STOP; static final char ZOMBIE; static final char IDLE; static final int HUNDRED; static final int NUMBER_1024; }