Class CommitStatsMXBeanImpl
- java.lang.Object
-
- org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean
-
- org.opendaylight.controller.cluster.datastore.jmx.mbeans.CommitStatsMXBeanImpl
-
- All Implemented Interfaces:
CommitStatsMXBean
public class CommitStatsMXBeanImpl extends AbstractMXBean implements CommitStatsMXBean
Implementation of the CommitStatsMXBean interface.- Author:
- Thomas Pantelis
-
-
Field Summary
-
Fields inherited from class org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean
BASE_JMX_PREFIX
-
-
Constructor Summary
Constructors Constructor Description CommitStatsMXBeanImpl(@NonNull DurationStatisticsTracker commitStatsTracker, @NonNull String mbeantype)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearStats()
Clears the current stats to their defaults.String
getAverageCommitTime()
Returns a string representing average commit time duration, in the appropriate scaled units.String
getLongestCommitTime()
Returns a string representing the time duration of the longest commit, in the appropriate scaled units, along with the date/time that it occurred.String
getShortestCommitTime()
Returns a string representing the time duration of the shortest commit, in the appropriate scaled units, along with the date/time that it occurred.long
getTotalCommits()
Returns the total number of commits that have occurred.-
Methods inherited from class org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean
getMBeanCategory, getMBeanName, getMBeanType, register, registerMBean, unregister, unregisterMBean
-
-
-
-
Constructor Detail
-
CommitStatsMXBeanImpl
public CommitStatsMXBeanImpl(@NonNull DurationStatisticsTracker commitStatsTracker, @NonNull String mbeantype)
Constructor.- Parameters:
commitStatsTracker
- the DurationStatsTracker used to obtain the stats.mbeantype
- mBeanType Used as thetype
property in the bean's ObjectName.
-
-
Method Detail
-
getTotalCommits
public long getTotalCommits()
Description copied from interface:CommitStatsMXBean
Returns the total number of commits that have occurred.- Specified by:
getTotalCommits
in interfaceCommitStatsMXBean
- Returns:
- Returns the total number of commits that have occurred
-
getLongestCommitTime
public String getLongestCommitTime()
Description copied from interface:CommitStatsMXBean
Returns a string representing the time duration of the longest commit, in the appropriate scaled units, along with the date/time that it occurred.- Specified by:
getLongestCommitTime
in interfaceCommitStatsMXBean
- Returns:
- string
-
getShortestCommitTime
public String getShortestCommitTime()
Description copied from interface:CommitStatsMXBean
Returns a string representing the time duration of the shortest commit, in the appropriate scaled units, along with the date/time that it occurred.- Specified by:
getShortestCommitTime
in interfaceCommitStatsMXBean
- Returns:
- string
-
getAverageCommitTime
public String getAverageCommitTime()
Description copied from interface:CommitStatsMXBean
Returns a string representing average commit time duration, in the appropriate scaled units.- Specified by:
getAverageCommitTime
in interfaceCommitStatsMXBean
- Returns:
- string
-
clearStats
public void clearStats()
Description copied from interface:CommitStatsMXBean
Clears the current stats to their defaults.- Specified by:
clearStats
in interfaceCommitStatsMXBean
-
-