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 org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean implements CommitStatsMXBean
Implementation of the CommitStatsMXBean interface.- Author:
- Thomas Pantelis
-
-
Constructor Summary
Constructors Constructor Description CommitStatsMXBeanImpl(@NonNull org.opendaylight.yangtools.util.DurationStatisticsTracker commitStatsTracker, @NonNull String mbeantype)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearStats()Clears the current stats to their defaults.StringgetAverageCommitTime()Returns a string representing average commit time duration, in the appropriate scaled units.StringgetLongestCommitTime()Returns a string representing the time duration of the longest commit, in the appropriate scaled units, along with the date/time that it occurred.StringgetShortestCommitTime()Returns a string representing the time duration of the shortest commit, in the appropriate scaled units, along with the date/time that it occurred.longgetTotalCommits()Returns the total number of commits that have occurred.
-
-
-
Constructor Detail
-
CommitStatsMXBeanImpl
public CommitStatsMXBeanImpl(@NonNull org.opendaylight.yangtools.util.DurationStatisticsTracker commitStatsTracker, @NonNull String mbeantype)Constructor.- Parameters:
commitStatsTracker- the DurationStatsTracker used to obtain the stats.mbeantype- mBeanType Used as thetypeproperty in the bean's ObjectName.
-
-
Method Detail
-
getTotalCommits
public long getTotalCommits()
Description copied from interface:CommitStatsMXBeanReturns the total number of commits that have occurred.- Specified by:
getTotalCommitsin interfaceCommitStatsMXBean- Returns:
- Returns the total number of commits that have occurred
-
getLongestCommitTime
public String getLongestCommitTime()
Description copied from interface:CommitStatsMXBeanReturns 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:
getLongestCommitTimein interfaceCommitStatsMXBean- Returns:
- string
-
getShortestCommitTime
public String getShortestCommitTime()
Description copied from interface:CommitStatsMXBeanReturns 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:
getShortestCommitTimein interfaceCommitStatsMXBean- Returns:
- string
-
getAverageCommitTime
public String getAverageCommitTime()
Description copied from interface:CommitStatsMXBeanReturns a string representing average commit time duration, in the appropriate scaled units.- Specified by:
getAverageCommitTimein interfaceCommitStatsMXBean- Returns:
- string
-
clearStats
public void clearStats()
Description copied from interface:CommitStatsMXBeanClears the current stats to their defaults.- Specified by:
clearStatsin interfaceCommitStatsMXBean
-
-