Fix write transaction shard stats
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / jmx / mbeans / shard / ShardStatsMXBean.java
index 8174727788b46168c7202cb28837c320fd9978e5..ac76891b69b70ff80d05d613ff477f57d61754e5 100644 (file)
@@ -1,56 +1,94 @@
+/*
+ * Copyright (c) 2014, 2015 Brocade Communications Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 package org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard;
 
 import java.util.List;
-
-import org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStats;
-import org.opendaylight.yangtools.util.concurrent.ListenerNotificationQueueStats;
+import org.opendaylight.controller.cluster.raft.client.messages.FollowerInfo;
 
 /**
- * @author: syedbahm
+ * MXBean interface for shard stats.
+ *
+ * @author syedbahm
  */
 public interface ShardStatsMXBean {
 
-   String getShardName();
+    String getShardName();
+
+    String getStatRetrievalTime();
+
+    String getStatRetrievalError();
+
+    long getCommittedTransactionsCount();
+
+    long getReadOnlyTransactionCount();
+
+    long getReadWriteTransactionCount();
+
+    long getLastLogIndex();
+
+    long getLastLogTerm();
+
+    long getCurrentTerm();
+
+    long getCommitIndex();
+
+    long getLastApplied();
+
+    long getLastIndex();
+
+    long getLastTerm();
+
+    long getSnapshotIndex();
+
+    long getSnapshotTerm();
+
+    long getReplicatedToAllIndex();
 
-   long getCommittedTransactionsCount();
+    String getLastCommittedTransactionTime();
 
-   long getReadOnlyTransactionCount();
+    long getFailedTransactionsCount();
 
-   long getWriteOnlyTransactionCount();
+    long getAbortTransactionsCount();
 
-   long getReadWriteTransactionCount();
+    long getFailedReadTransactionsCount();
 
-   long getLastLogIndex();
+    String getLeader();
 
-   long getLastLogTerm();
+    String getRaftState();
 
-   long getCurrentTerm();
+    String getVotedFor();
 
-   long getCommitIndex();
+    boolean isSnapshotCaptureInitiated();
 
-   long getLastApplied();
+    boolean isVoting();
 
-   String getLastCommittedTransactionTime();
+    void resetTransactionCounters();
 
-   long getFailedTransactionsCount();
+    long getInMemoryJournalDataSize();
 
-   long getAbortTransactionsCount();
+    long getInMemoryJournalLogSize();
 
-   long getFailedReadTransactionsCount();
+    boolean getFollowerInitialSyncStatus();
 
-   String getLeader();
+    List<FollowerInfo> getFollowerInfo();
 
-   String getRaftState();
+    String getPeerAddresses();
 
-   ThreadExecutorStats getDataStoreExecutorStats();
+    String getPeerVotingStates();
 
-   ThreadExecutorStats getNotificationMgrExecutorStats();
+    long getLeadershipChangeCount();
 
-   List<ListenerNotificationQueueStats> getCurrentNotificationMgrListenerQueueStats();
+    String getLastLeadershipChangeTime();
 
-   int getMaxNotificationMgrListenerQueueSize();
+    int getPendingTxCommitQueueSize();
 
-   void resetTransactionCounters();
+    int getTxCohortCacheSize();
 
-   long getDataSize();
+    void captureSnapshot();
 }