provide access to underlying Sigar object

This commit is contained in:
Doug MacEachern 2007-02-20 01:34:25 +00:00
parent bd9b0ea005
commit 39870c98d5
1 changed files with 9 additions and 3 deletions

View File

@ -82,10 +82,16 @@ public class SigarProxyCache
throws SigarException {
}
private static SigarProxyCache getHandler(Object proxy) {
return (SigarProxyCache)Proxy.getInvocationHandler(proxy);
}
public static void clear(Object proxy) {
SigarProxyCache handler =
(SigarProxyCache)Proxy.getInvocationHandler(proxy);
handler.cache.clear();
getHandler(proxy).cache.clear();
}
public static Sigar getSigar(Object proxy) {
return getHandler(proxy).sigar;
}
private String getDebugArgs(Object[] args, Object argKey) {