Back to index

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

List of all members.

Public Member Functions

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

Private Attributes

ArrayList< MemoryPoolMXBean > gcmbeans
long[] GCresult = new long[4]
MBeanServerConnection connection

Detailed Description

Definition at line 13 of file GetMemoryPoolThresholdCount.java.


Constructor & Destructor Documentation

Definition at line 18 of file GetMemoryPoolThresholdCount.java.

                                                                            {
              this.connection = connection;
       }

Member Function Documentation

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

Definition at line 22 of file GetMemoryPoolThresholdCount.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);
                     }
              }

              int i = 0;
              GCresult[i++] = gcmbeans.get(0).getCollectionUsageThresholdCount();
              GCresult[i++] = gcmbeans.get(1).getCollectionUsageThresholdCount();
              GCresult[i++] = gcmbeans.get(3).getCollectionUsageThresholdCount();
              GCresult[i++] = gcmbeans.get(4).getCollectionUsageThresholdCount();

              return GCresult;
       }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 16 of file GetMemoryPoolThresholdCount.java.

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

Definition at line 14 of file GetMemoryPoolThresholdCount.java.

Definition at line 15 of file GetMemoryPoolThresholdCount.java.


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