com.gemstone.gbjstats

## Class GbjJmxCacheStats

- java.lang.Object
- - com.gemstone.gbjstats.GbjJmxCacheStats

- All Implemented Interfaces:
    javax.management.DynamicMBean
  Direct Known Subclasses:
    GbjJmxSystemStats

      public class GbjJmxCacheStats
      extends java.lang.Object
      implements javax.management.DynamicMBean

  GbjJmxCacheStats is a wrapper around GbjCacheStats to allow access to shared page cache statistics through java JMX-based monitoring tools and applications via the DynamicMBean interface. They are used extensively in the GbjJmxCacheStatsMonitor program.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `GbjJmxCacheStatsMonitor` | `monitor` The GbjJmxCacheStatsMonitor process updating these cache stats
    `GbjSession` | `session` The GS session to be used for executing control commands
    `GbjCacheStats` | `stats` The cache stats wrappered by this instance

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GbjJmxCacheStats()` Base constructor needed for JMX protocol
    `GbjJmxCacheStats(GbjCacheStats s, GbjSession ses)` Create a new GbjJmxCacheStats object on a particular set of GbjCacheStats from a given GS session

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `enableHypericTrace()` JMX operation to enable tracing of these process-level cache stats from Hyperic
    `java.lang.Object` | `getAttribute(java.lang.String attribute)` Support for JMX DynamicMBean interface
    `javax.management.AttributeList` | `getAttributes(java.lang.String[] attributes)` Support for JMX DynamicMBean interface
    `javax.management.MBeanInfo` | `getMBeanInfo()` Support for JMX DynamicMBean interface
    `java.lang.Object` | `invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)` Support for JMX DynamicMBean interface
    `java.lang.String` | `kill()` JMX operation to kill the process associated with this GbjJmxCacheStat using kill -9
    `void` | `setAttribute(javax.management.Attribute attribute)` Support for JMX DynamicMBean interface
    `javax.management.AttributeList` | `setAttributes(javax.management.AttributeList attributes)` Support for JMX DynamicMBean interface
    `java.lang.String` | `stop()` JMX operation to stop the session associated with this GbjJmxCacheStat

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### stats

          public GbjCacheStats stats

      The cache stats wrappered by this instance

    - #### session

          public GbjSession session

      The GS session to be used for executing control commands

    - #### monitor

          public GbjJmxCacheStatsMonitor monitor

      The GbjJmxCacheStatsMonitor process updating these cache stats

  - ### Constructor Detail

    - #### GbjJmxCacheStats

          public GbjJmxCacheStats()

      Base constructor needed for JMX protocol

    - #### GbjJmxCacheStats

          public GbjJmxCacheStats(GbjCacheStats s,
                                  GbjSession ses)

      Create a new GbjJmxCacheStats object on a particular set of GbjCacheStats from a given GS session
      Parameters:
        `s` - GbjCacheStats stats
        `ses` - GbjSession

  - ### Method Detail

    - #### stop

          public java.lang.String stop()

      JMX operation to stop the session associated with this GbjJmxCacheStat
      Returns:
        String containing results of executing stop

    - #### kill

          public java.lang.String kill()

      JMX operation to kill the process associated with this GbjJmxCacheStat using kill -9
      Returns:
        String containing results of executing kill

    - #### enableHypericTrace

          public java.lang.String enableHypericTrace()

      JMX operation to enable tracing of these process-level cache stats from Hyperic
      Returns:
        String containing results of executing enableHypericTrace

    - #### getAttribute

          public java.lang.Object getAttribute(java.lang.String attribute)
                                        throws javax.management.AttributeNotFoundException

      Support for JMX DynamicMBean interface
      Specified by:
        `getAttribute` in interface `javax.management.DynamicMBean`
      Parameters:
        `attribute` - String name of attribute to fetch
      Returns:
        Object result
      Throws:
        `javax.management.AttributeNotFoundException` - thrown if cant find attribute

    - #### getAttributes

          public javax.management.AttributeList getAttributes(java.lang.String[] attributes)

      Support for JMX DynamicMBean interface
      Specified by:
        `getAttributes` in interface `javax.management.DynamicMBean`
      Parameters:
        `attributes` - array of Strings containing names of attributes
      Returns:
        AttributeList

    - #### getMBeanInfo

          public javax.management.MBeanInfo getMBeanInfo()

      Support for JMX DynamicMBean interface
      Specified by:
        `getMBeanInfo` in interface `javax.management.DynamicMBean`
      Returns:
        MBeanInfo

    - #### invoke

          public java.lang.Object invoke(java.lang.String actionName,
                                         java.lang.Object[] params,
                                         java.lang.String[] signature)
                                  throws java.lang.UnsupportedOperationException,
                                         javax.management.ReflectionException

      Support for JMX DynamicMBean interface
      Specified by:
        `invoke` in interface `javax.management.DynamicMBean`
      Parameters:
        `actionName` - name of action
        `params` - array of Object parameters
        `signature` - array of Strings containing signatures
      Returns:
        Object result
      Throws:
        `java.lang.UnsupportedOperationException` - ReflectionException thrown on errors
        `javax.management.ReflectionException`

    - #### setAttribute

          public void setAttribute(javax.management.Attribute attribute)
                            throws javax.management.AttributeNotFoundException

      Support for JMX DynamicMBean interface
      Specified by:
        `setAttribute` in interface `javax.management.DynamicMBean`
      Parameters:
        `attribute` - Attribute
      Throws:
        `javax.management.AttributeNotFoundException`

    - #### setAttributes

          public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)

      Support for JMX DynamicMBean interface
      Specified by:
        `setAttributes` in interface `javax.management.DynamicMBean`
      Parameters:
        `attributes` - list of attributes
      Returns:
        AttributeList