Class ShardStats
- java.lang.Object
-
- org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean
-
- org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard.ShardStats
-
- All Implemented Interfaces:
ShardStatsMXBean
public class ShardStats extends AbstractMXBean implements ShardStatsMXBean
Maintains statistics for a shard.- Author:
- Basheeruddin [email protected]
-
-
Field Summary
Fields Modifier and Type Field Description static String
JMX_CATEGORY_SHARD
-
Fields inherited from class org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean
BASE_JMX_PREFIX
-
-
Constructor Summary
Constructors Constructor Description ShardStats(String shardName, String mxBeanType, @Nullable Shard shard)
-
Method Summary
-
Methods inherited from class org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean
getMBeanCategory, getMBeanName, getMBeanType, register, registerMBean, unregister, unregisterMBean
-
-
-
-
Field Detail
-
JMX_CATEGORY_SHARD
public static final String JMX_CATEGORY_SHARD
- See Also:
- Constant Field Values
-
-
Method Detail
-
getShardName
public String getShardName()
- Specified by:
getShardName
in interfaceShardStatsMXBean
-
getCommittedTransactionsCount
public long getCommittedTransactionsCount()
- Specified by:
getCommittedTransactionsCount
in interfaceShardStatsMXBean
-
getLeader
public String getLeader()
- Specified by:
getLeader
in interfaceShardStatsMXBean
-
getRaftState
public String getRaftState()
- Specified by:
getRaftState
in interfaceShardStatsMXBean
-
getReadOnlyTransactionCount
public long getReadOnlyTransactionCount()
- Specified by:
getReadOnlyTransactionCount
in interfaceShardStatsMXBean
-
getReadWriteTransactionCount
public long getReadWriteTransactionCount()
- Specified by:
getReadWriteTransactionCount
in interfaceShardStatsMXBean
-
getLastLogIndex
public long getLastLogIndex()
- Specified by:
getLastLogIndex
in interfaceShardStatsMXBean
-
getLastLogTerm
public long getLastLogTerm()
- Specified by:
getLastLogTerm
in interfaceShardStatsMXBean
-
getCurrentTerm
public long getCurrentTerm()
- Specified by:
getCurrentTerm
in interfaceShardStatsMXBean
-
getCommitIndex
public long getCommitIndex()
- Specified by:
getCommitIndex
in interfaceShardStatsMXBean
-
getLastApplied
public long getLastApplied()
- Specified by:
getLastApplied
in interfaceShardStatsMXBean
-
getLastIndex
public long getLastIndex()
- Specified by:
getLastIndex
in interfaceShardStatsMXBean
-
getLastTerm
public long getLastTerm()
- Specified by:
getLastTerm
in interfaceShardStatsMXBean
-
getSnapshotIndex
public long getSnapshotIndex()
- Specified by:
getSnapshotIndex
in interfaceShardStatsMXBean
-
getSnapshotTerm
public long getSnapshotTerm()
- Specified by:
getSnapshotTerm
in interfaceShardStatsMXBean
-
getReplicatedToAllIndex
public long getReplicatedToAllIndex()
- Specified by:
getReplicatedToAllIndex
in interfaceShardStatsMXBean
-
getVotedFor
public String getVotedFor()
- Specified by:
getVotedFor
in interfaceShardStatsMXBean
-
isVoting
public boolean isVoting()
- Specified by:
isVoting
in interfaceShardStatsMXBean
-
getPeerVotingStates
public String getPeerVotingStates()
- Specified by:
getPeerVotingStates
in interfaceShardStatsMXBean
-
isSnapshotCaptureInitiated
public boolean isSnapshotCaptureInitiated()
- Specified by:
isSnapshotCaptureInitiated
in interfaceShardStatsMXBean
-
getLastCommittedTransactionTime
public String getLastCommittedTransactionTime()
- Specified by:
getLastCommittedTransactionTime
in interfaceShardStatsMXBean
-
getFailedTransactionsCount
public long getFailedTransactionsCount()
- Specified by:
getFailedTransactionsCount
in interfaceShardStatsMXBean
-
getFailedReadTransactionsCount
public long getFailedReadTransactionsCount()
- Specified by:
getFailedReadTransactionsCount
in interfaceShardStatsMXBean
-
getAbortTransactionsCount
public long getAbortTransactionsCount()
- Specified by:
getAbortTransactionsCount
in interfaceShardStatsMXBean
-
incrementCommittedTransactionCount
public long incrementCommittedTransactionCount()
-
incrementReadOnlyTransactionCount
public long incrementReadOnlyTransactionCount()
-
incrementReadWriteTransactionCount
public long incrementReadWriteTransactionCount()
-
incrementFailedTransactionsCount
public long incrementFailedTransactionsCount()
-
incrementFailedReadTransactionsCount
public long incrementFailedReadTransactionsCount()
-
incrementAbortTransactionsCount
public long incrementAbortTransactionsCount()
-
setLastCommittedTransactionTime
public void setLastCommittedTransactionTime(long lastCommittedTransactionTime)
-
getInMemoryJournalDataSize
public long getInMemoryJournalDataSize()
- Specified by:
getInMemoryJournalDataSize
in interfaceShardStatsMXBean
-
getInMemoryJournalLogSize
public long getInMemoryJournalLogSize()
- Specified by:
getInMemoryJournalLogSize
in interfaceShardStatsMXBean
-
resetTransactionCounters
public void resetTransactionCounters()
Resets the counters related to transactions.- Specified by:
resetTransactionCounters
in interfaceShardStatsMXBean
-
setFollowerInitialSyncStatus
public void setFollowerInitialSyncStatus(boolean followerInitialSyncStatus)
-
getFollowerInitialSyncStatus
public boolean getFollowerInitialSyncStatus()
- Specified by:
getFollowerInitialSyncStatus
in interfaceShardStatsMXBean
-
getFollowerInfo
public List<FollowerInfo> getFollowerInfo()
- Specified by:
getFollowerInfo
in interfaceShardStatsMXBean
-
getPeerAddresses
public String getPeerAddresses()
- Specified by:
getPeerAddresses
in interfaceShardStatsMXBean
-
getStatRetrievalTime
public String getStatRetrievalTime()
- Specified by:
getStatRetrievalTime
in interfaceShardStatsMXBean
-
getStatRetrievalError
public String getStatRetrievalError()
- Specified by:
getStatRetrievalError
in interfaceShardStatsMXBean
-
getLeadershipChangeCount
public long getLeadershipChangeCount()
- Specified by:
getLeadershipChangeCount
in interfaceShardStatsMXBean
-
incrementLeadershipChangeCount
public void incrementLeadershipChangeCount()
-
getLastLeadershipChangeTime
public String getLastLeadershipChangeTime()
- Specified by:
getLastLeadershipChangeTime
in interfaceShardStatsMXBean
-
getPendingTxCommitQueueSize
public int getPendingTxCommitQueueSize()
- Specified by:
getPendingTxCommitQueueSize
in interfaceShardStatsMXBean
-
getTxCohortCacheSize
public int getTxCohortCacheSize()
- Specified by:
getTxCohortCacheSize
in interfaceShardStatsMXBean
-
captureSnapshot
public void captureSnapshot()
- Specified by:
captureSnapshot
in interfaceShardStatsMXBean
-
-