SigarProxyCache (Sigar API)
Date: 2010-04-28

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary
`static int` | `EXPIRE_DEFAULT`

Constructor Summary
`SigarProxyCache(Sigar sigar, int expire)`

Method Summary
`static void` | `clear(java.lang.Object proxy)`
`static Sigar` | `getSigar(java.lang.Object proxy)`
`java.lang.Object` | `invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)` The java.lang.reflect.InvocationHandler used by the Proxy.
`static SigarProxy` | `newInstance()`
`static SigarProxy` | `newInstance(Sigar sigar)`
`static SigarProxy` | `newInstance(Sigar sigar, int expire)`
`static void` | `setExpire(SigarProxy proxy, java.lang.String type, int expire)` Deprecated.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EXPIRE_DEFAULT

    public static final int EXPIRE_DEFAULT

See Also:
  Constant Field Values

Constructor Detail

### SigarProxyCache

    public SigarProxyCache(Sigar sigar,
                           int expire)

Method Detail

### 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`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ? 2004-2009 Hyperic. All Rights Reserved.