Back to index

munin  2.0.1
Public Member Functions | Private Attributes
org.munin.plugin.jmx.GetUsageThresholdCount Class Reference
Collaboration diagram for org.munin.plugin.jmx.GetUsageThresholdCount:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GetUsageThresholdCount (MBeanServerConnection connection)
String[] GC () throws IOException, MalformedObjectNameException

Private Attributes

ArrayList< MemoryPoolMXBean > gcmbeans
String[] GCresult = new String[2]
MBeanServerConnection connection

Detailed Description

Definition at line 13 of file GetUsageThresholdCount.java.


Constructor & Destructor Documentation

org.munin.plugin.jmx.GetUsageThresholdCount.GetUsageThresholdCount ( MBeanServerConnection  connection) [inline]

Definition at line 18 of file GetUsageThresholdCount.java.

                                                                       {
              this.connection = connection;
       }

Member Function Documentation

String [] org.munin.plugin.jmx.GetUsageThresholdCount.GC ( ) throws IOException, MalformedObjectNameException [inline]

Definition at line 22 of file GetUsageThresholdCount.java.

                                                                             {
              ObjectName gcName = null;

              gcName = new ObjectName(
                            ManagementFactory.MEMORY_POOL_MXBEAN_DOMAIN_TYPE + ",*");

              Set<ObjectName> mbeans = connection.queryNames(gcName, null);
              if (mbeans != null) {
                     gcmbeans = new ArrayList<MemoryPoolMXBean>();
                     for (ObjectName objName : mbeans) {
                            MemoryPoolMXBean gc = ManagementFactory.newPlatformMXBeanProxy(
                                          connection, objName.getCanonicalName(),
                                          MemoryPoolMXBean.class);
                            gcmbeans.add(gc);
                     }
              }

              try {
                     GCresult[0] = gcmbeans.get(0).getUsageThresholdCount() + "";
              } catch (UnsupportedOperationException u) {
                     GCresult[0] = "U";
              }

              try {
                     GCresult[1] = gcmbeans.get(1).getUsageThresholdCount() + "";
              } catch (UnsupportedOperationException u) {
                     GCresult[1] = "U";
              }

              return GCresult;
       }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 16 of file GetUsageThresholdCount.java.

ArrayList<MemoryPoolMXBean> org.munin.plugin.jmx.GetUsageThresholdCount.gcmbeans [private]

Definition at line 14 of file GetUsageThresholdCount.java.

String [] org.munin.plugin.jmx.GetUsageThresholdCount.GCresult = new String[2] [private]

Definition at line 15 of file GetUsageThresholdCount.java.


The documentation for this class was generated from the following file: