Remove "Unavailable" properties from ShardStats 20/19420/1
authorTom Pantelis <tpanteli@brocade.com>
Fri, 1 May 2015 00:26:16 +0000 (20:26 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 1 May 2015 00:26:16 +0000 (20:26 -0400)
There's several property getters in ShardStats that don't apply anymore
and return null. They display as "Unavailable" in JConsole but cause an
NPE when queried via jolokia. We should remove them.

Change-Id: I6da8f331e007246c655a982b9cd335de553195aa
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/shard/ShardStats.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/shard/ShardStatsMXBean.java

index e3c8ced878232f2a831d541f6bbb3b14b233327d..2e8d0931397592d646ae8280fb369d34851ed976 100644 (file)
@@ -25,10 +25,8 @@ import org.opendaylight.controller.cluster.raft.client.messages.GetOnDemandRaftS
 import org.opendaylight.controller.cluster.raft.client.messages.OnDemandRaftState;
 import org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean;
 import org.opendaylight.controller.md.sal.common.util.jmx.QueuedNotificationManagerMXBeanImpl;
-import org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStats;
 import org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStatsMXBeanImpl;
 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore;
-import org.opendaylight.yangtools.util.concurrent.ListenerNotificationQueueStats;
 import org.opendaylight.yangtools.util.concurrent.QueuedNotificationManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -282,27 +280,6 @@ public class ShardStats extends AbstractMXBean implements ShardStatsMXBean {
         return getOnDemandRaftState().getInMemoryJournalLogSize();
     }
 
-    @Override
-    public ThreadExecutorStats getDataStoreExecutorStats() {
-        // FIXME: this particular thing does not work, as it really is DS-specific
-        return null;
-    }
-
-    @Override
-    public ThreadExecutorStats getNotificationMgrExecutorStats() {
-        return notificationExecutorStatsBean.toThreadExecutorStats();
-    }
-
-    @Override
-    public List<ListenerNotificationQueueStats> getCurrentNotificationMgrListenerQueueStats() {
-        return notificationManagerStatsBean.getCurrentListenerQueueStats();
-    }
-
-    @Override
-    public int getMaxNotificationMgrListenerQueueSize() {
-        return notificationManagerStatsBean.getMaxListenerQueueSize();
-    }
-
     /**
      * resets the counters related to transactions
      */
index 12cea50e44cb744845d9243fb312e141b1e947db..8115f79f3da5cbe337a43f312f932ac42c8d0aab 100644 (file)
@@ -2,8 +2,6 @@ package org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard;
 
 import java.util.List;
 import org.opendaylight.controller.cluster.raft.client.messages.FollowerInfo;
-import org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStats;
-import org.opendaylight.yangtools.util.concurrent.ListenerNotificationQueueStats;
 
 /**
  * @author: syedbahm
@@ -60,14 +58,6 @@ public interface ShardStatsMXBean {
 
    boolean isSnapshotCaptureInitiated();
 
-   ThreadExecutorStats getDataStoreExecutorStats();
-
-   ThreadExecutorStats getNotificationMgrExecutorStats();
-
-   List<ListenerNotificationQueueStats> getCurrentNotificationMgrListenerQueueStats();
-
-   int getMaxNotificationMgrListenerQueueSize();
-
    void resetTransactionCounters();
 
    long getInMemoryJournalDataSize();