Back to index

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

List of all members.

Public Member Functions

 GCTimeGet (MBeanServerConnection connection)
long[] GC () throws IOException, MalformedObjectNameException

Private Attributes

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

Detailed Description

Definition at line 13 of file GCTimeGet.java.


Constructor & Destructor Documentation

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

Definition at line 19 of file GCTimeGet.java.

                                                          {
              this.connection = connection;
       }

Member Function Documentation

long [] org.munin.plugin.jmx.GCTimeGet.GC ( ) throws IOException, MalformedObjectNameException [inline]

Definition at line 23 of file GCTimeGet.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.getCollectionTime();
              }
              
              return GCresult;
       }

Here is the caller graph for this function:


Member Data Documentation

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

Definition at line 17 of file GCTimeGet.java.

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

Definition at line 15 of file GCTimeGet.java.

long [] org.munin.plugin.jmx.GCTimeGet.GCresult = new long[2] [private]

Definition at line 16 of file GCTimeGet.java.


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