Search in sources :

Example 11 with Description

use of org.glassfish.gmbal.Description in project Payara by payara.

the class FileCacheStatsProvider method getMappedMemorySize.

@ManagedAttribute(id = "mappedmemorysize")
@Description("Size of mapped memory used for caching")
public CountStatistic getMappedMemorySize() {
    final CountStatisticImpl stats = new CountStatisticImpl("MappedMemorySize", "byte(s)", "Size of mapped memory used for caching");
    stats.setCount(mappedMemorySize.get());
    return stats;
}
Also used : CountStatisticImpl(org.glassfish.external.statistics.impl.CountStatisticImpl) Description(org.glassfish.gmbal.Description) ManagedAttribute(org.glassfish.gmbal.ManagedAttribute)

Example 12 with Description

use of org.glassfish.gmbal.Description in project Payara by payara.

the class JVMGCStatsProvider method getCollectionCount.

@ManagedAttribute(id = "collectioncount-count")
@Description("total number of collections that have occurred")
public CountStatistic getCollectionCount() {
    long counts = -1;
    for (GarbageCollectorMXBean gcBean : gcBeanList) {
        if (gcBean.getName().equals(gcName)) {
            counts = gcBean.getCollectionCount();
        }
    }
    collectionCount.setCount(counts);
    return collectionCount;
}
Also used : GarbageCollectorMXBean(java.lang.management.GarbageCollectorMXBean) Description(org.glassfish.gmbal.Description) ManagedAttribute(org.glassfish.gmbal.ManagedAttribute)

Aggregations

Description (org.glassfish.gmbal.Description)12 ManagedAttribute (org.glassfish.gmbal.ManagedAttribute)12 CountStatisticImpl (org.glassfish.external.statistics.impl.CountStatisticImpl)9 GarbageCollectorMXBean (java.lang.management.GarbageCollectorMXBean)2 TransactionAdminBean (com.sun.enterprise.transaction.api.TransactionAdminBean)1 List (java.util.List)1