ModeShape Distribution 3.5.0.Final

org.modeshape.jmx
Class RepositoryStatisticsBean

java.lang.Object
  extended by org.modeshape.jmx.RepositoryStatisticsBean
All Implemented Interfaces:
RepositoryStatisticsMXBean

public class RepositoryStatisticsBean
extends Object
implements RepositoryStatisticsMXBean

MXBean implementation of RepositoryStatisticsMXBean.


Constructor Summary
RepositoryStatisticsBean(RepositoryMonitor monitor, String repositoryName)
           
 
Method Summary
 List<EnumDescription> getDurationMetrics()
          Get the DurationMetric enumerations that are available for use by the caller with RepositoryStatisticsMXBean.getDurations(org.modeshape.jcr.api.monitor.DurationMetric, org.modeshape.jcr.api.monitor.Window).
 HistoricalData getDurations(DurationMetric metric, Window windowInTime)
          Get the statics for the specified duration metric during the given window in time.
 List<DurationData> getLongestRunning(DurationMetric metric)
          Get the longest-running activities recorded for the specified metric.
 List<EnumDescription> getTimeWindows()
          Get the Window enumerations that are available for use by the caller with RepositoryStatisticsMXBean.getValues(org.modeshape.jcr.api.monitor.ValueMetric, org.modeshape.jcr.api.monitor.Window) and RepositoryStatisticsMXBean.getDurations(org.modeshape.jcr.api.monitor.DurationMetric, org.modeshape.jcr.api.monitor.Window).
 List<EnumDescription> getValueMetrics()
          Get the ValueMetric enumerations that are available for use by the caller with RepositoryStatisticsMXBean.getValues(org.modeshape.jcr.api.monitor.ValueMetric, org.modeshape.jcr.api.monitor.Window).
 HistoricalData getValues(ValueMetric metric, Window windowInTime)
          Get the statistics for the specified value metric during the given window in time.
 void start()
          Initializes & registers this MBean with the local MBean server.
 void stop()
          Un-registers the bean from the JMX server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryStatisticsBean

public RepositoryStatisticsBean(RepositoryMonitor monitor,
                                String repositoryName)
Parameters:
monitor - an active RepositoryMonitor instance which will be used for getting repository statistics
repositoryName - a non-null String, the name of the repository.
Method Detail

start

public void start()
Initializes & registers this MBean with the local MBean server.


stop

public void stop()
Un-registers the bean from the JMX server.


getValueMetrics

public List<EnumDescription> getValueMetrics()
Description copied from interface: RepositoryStatisticsMXBean
Get the ValueMetric enumerations that are available for use by the caller with RepositoryStatisticsMXBean.getValues(org.modeshape.jcr.api.monitor.ValueMetric, org.modeshape.jcr.api.monitor.Window).

Specified by:
getValueMetrics in interface RepositoryStatisticsMXBean
Returns:
a [name, description] map of available value metrics; never null
See Also:
RepositoryMonitor.getAvailableValueMetrics()

getDurationMetrics

public List<EnumDescription> getDurationMetrics()
Description copied from interface: RepositoryStatisticsMXBean
Get the DurationMetric enumerations that are available for use by the caller with RepositoryStatisticsMXBean.getDurations(org.modeshape.jcr.api.monitor.DurationMetric, org.modeshape.jcr.api.monitor.Window).

Specified by:
getDurationMetrics in interface RepositoryStatisticsMXBean
Returns:
a [name, description] map of available duration metrics; never null
See Also:
RepositoryMonitor.getAvailableDurationMetrics()

getTimeWindows

public List<EnumDescription> getTimeWindows()
Description copied from interface: RepositoryStatisticsMXBean
Get the Window enumerations that are available for use by the caller with RepositoryStatisticsMXBean.getValues(org.modeshape.jcr.api.monitor.ValueMetric, org.modeshape.jcr.api.monitor.Window) and RepositoryStatisticsMXBean.getDurations(org.modeshape.jcr.api.monitor.DurationMetric, org.modeshape.jcr.api.monitor.Window).

Specified by:
getTimeWindows in interface RepositoryStatisticsMXBean
Returns:
a [name, description] map of available time windows; never null
See Also:
RepositoryMonitor.getAvailableWindows()

getValues

public HistoricalData getValues(ValueMetric metric,
                                Window windowInTime)
                         throws MBeanException
Description copied from interface: RepositoryStatisticsMXBean
Get the statistics for the specified value metric during the given window in time.

Specified by:
getValues in interface RepositoryStatisticsMXBean
Parameters:
metric - the value metric; may not be null
windowInTime - the window specifying which statistics are to be returned; may not be null
Returns:
the statistical data; never null
Throws:
MBeanException - if anything unexpected fails while performing the operation.
See Also:
RepositoryMonitor.getHistory(org.modeshape.jcr.api.monitor.ValueMetric, org.modeshape.jcr.api.monitor.Window)

getDurations

public HistoricalData getDurations(DurationMetric metric,
                                   Window windowInTime)
                            throws MBeanException
Description copied from interface: RepositoryStatisticsMXBean
Get the statics for the specified duration metric during the given window in time.

Specified by:
getDurations in interface RepositoryStatisticsMXBean
Parameters:
metric - the duration metric; may not be null
windowInTime - the window specifying which statistics are to be returned; may not be null
Returns:
the statistical data; never null
Throws:
MBeanException - if anything unexpected fails while performing the operation.
See Also:
RepositoryMonitor.getHistory(org.modeshape.jcr.api.monitor.DurationMetric, org.modeshape.jcr.api.monitor.Window)

getLongestRunning

public List<DurationData> getLongestRunning(DurationMetric metric)
                                     throws MBeanException
Description copied from interface: RepositoryStatisticsMXBean
Get the longest-running activities recorded for the specified metric. The results contain the duration records in order of increasing duration, with the activity with the longest duration appearing last in the list.

Specified by:
getLongestRunning in interface RepositoryStatisticsMXBean
Parameters:
metric - the duration metric; may not be null
Returns:
the longest duration data; never null but possibly empty if no such activities were performed
Throws:
MBeanException - if anything unexpected fails while performing the operation.
See Also:
RepositoryMonitor.getLongestRunning(org.modeshape.jcr.api.monitor.DurationMetric)

ModeShape Distribution 3.5.0.Final

Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.