From 629ac5d4f979ea874feeef66aec227290bb3f7df Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 10 Nov 2004 23:24:14 +0000 Subject: [PATCH] add MultiProcCpu wrappers --- bindings/java/src/net/hyperic/sigar/Sigar.java | 4 ++++ bindings/java/src/net/hyperic/sigar/SigarProxy.java | 2 ++ bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/bindings/java/src/net/hyperic/sigar/Sigar.java b/bindings/java/src/net/hyperic/sigar/Sigar.java index 811e211c..aaf03ef8 100644 --- a/bindings/java/src/net/hyperic/sigar/Sigar.java +++ b/bindings/java/src/net/hyperic/sigar/Sigar.java @@ -318,6 +318,10 @@ public class Sigar implements SigarProxy { return getProcCpu(convertPid(pid)); } + public MultiProcCpu getMultiProcCpu(String query) throws SigarException { + return MultiProcCpu.get(this, query); + } + /** * Get process credential info. * @param pid The process id. diff --git a/bindings/java/src/net/hyperic/sigar/SigarProxy.java b/bindings/java/src/net/hyperic/sigar/SigarProxy.java index cf1a02fa..5ca25c0a 100644 --- a/bindings/java/src/net/hyperic/sigar/SigarProxy.java +++ b/bindings/java/src/net/hyperic/sigar/SigarProxy.java @@ -47,6 +47,8 @@ public interface SigarProxy { public ProcCpu getProcCpu(String pid) throws SigarException; + public MultiProcCpu getMultiProcCpu(String query) throws SigarException; + public ProcCred getProcCred(long pid) throws SigarException; public ProcCred getProcCred(String pid) throws SigarException; diff --git a/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java b/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java index e931a63b..fb90a3b6 100644 --- a/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java +++ b/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java @@ -125,6 +125,12 @@ public class SynchronizedSigar implements SigarProxy { return this.sigar.getProcCpu(pid); } + public synchronized MultiProcCpu getMultiProcCpu(String query) + throws SigarException + { + return this.sigar.getMultiProcCpu(query); + } + public synchronized ProcCred getProcCred(long pid) throws SigarException {