org.hyperic.sigar
Class SigarProxyCache
java.lang.Object
org.hyperic.sigar.SigarProxyCache
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler
public class SigarProxyCache
- extends java.lang.Object
- implements java.lang.reflect.InvocationHandler
This class implements a caching mechanism to avoid system calls
with heavy Sigar usage in a short period of time. It is intended
for use in applications such as Top.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EXPIRE_DEFAULT
public static final int EXPIRE_DEFAULT
- See Also:
- Constant Field Values
SigarProxyCache
public SigarProxyCache(Sigar sigar,
int expire)
newInstance
public static SigarProxy newInstance()
newInstance
public static SigarProxy newInstance(Sigar sigar)
newInstance
public static SigarProxy newInstance(Sigar sigar,
int expire)
setExpire
public static void setExpire(SigarProxy proxy,
java.lang.String type,
int expire)
throws SigarException
- Deprecated.
- Throws:
SigarException
clear
public static void clear(java.lang.Object proxy)
getSigar
public static Sigar getSigar(java.lang.Object proxy)
invoke
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws SigarException,
SigarNotImplementedException
- The java.lang.reflect.InvocationHandler used by the Proxy.
This method handles caching of all Sigar type objects.
- Specified by:
invoke
in interface java.lang.reflect.InvocationHandler
- Throws:
SigarException
SigarNotImplementedException
Copyright ? 2004-2009 Hyperic. All Rights Reserved.