Back to index

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

List of all members.

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 13 of file GCCountGet.java.


Constructor & Destructor Documentation

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

Definition at line 19 of file GCCountGet.java.

                                                           {
              this.connection = connection;
       }

Member Function Documentation

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

Definition at line 23 of file GCCountGet.java.

                                                                             {
              ObjectName gcName = null;

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

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

              int i = 0;
              for (GarbageCollectorMXBean gc : gcmbeans) {
                     GCresult[i++] = gc.getCollectionCount() + "";
              }
              return GCresult;
       }

Here is the caller graph for this function:


Member Data Documentation

MBeanServerConnection org.munin.plugin.jmx.GCCountGet.connection [private]

Definition at line 17 of file GCCountGet.java.

ArrayList<GarbageCollectorMXBean> org.munin.plugin.jmx.GCCountGet.gcmbeans [private]

Definition at line 15 of file GCCountGet.java.

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

Definition at line 16 of file GCCountGet.java.


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