From 522b2d4f69cb0c1ca689b9826498a9e01ac0ae7c Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Mon, 20 May 2019 12:43:49 +0200 Subject: [PATCH] Remove QueuedNotificationManagerMXBean This interface is available from yangtools directly, remove it from controller. Change-Id: Ic894c0e9fc5d114ebff07bb11f67f1ec67611031 Signed-off-by: Robert Varga --- .../jmx/QueuedNotificationManagerMXBean.java | 31 ------------------- .../QueuedNotificationManagerMXBeanImpl.java | 11 ++++--- 2 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerMXBean.java diff --git a/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerMXBean.java b/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerMXBean.java deleted file mode 100644 index dd89e00678..0000000000 --- a/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerMXBean.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2014 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.md.sal.common.util.jmx; - -import java.util.List; - -import org.opendaylight.yangtools.util.concurrent.ListenerNotificationQueueStats; - -/** - * MXBean interface for {@link org.opendaylight.yangtools.util.concurrent.QueuedNotificationManager} statistic metrics. - * - * @author Thomas Pantelis - */ -public interface QueuedNotificationManagerMXBean { - - /** - * Returns a list of stat instances for each current listener notification task in progress. - */ - List getCurrentListenerQueueStats(); - - /** - * Returns the configured maximum listener queue size. - */ - int getMaxListenerQueueSize(); -} diff --git a/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerMXBeanImpl.java b/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerMXBeanImpl.java index 0f324cbfd7..2ede081031 100644 --- a/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerMXBeanImpl.java +++ b/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerMXBeanImpl.java @@ -5,13 +5,14 @@ * 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.md.sal.common.util.jmx; -import com.google.common.base.Preconditions; +import static java.util.Objects.requireNonNull; + import java.util.List; import org.opendaylight.yangtools.util.concurrent.ListenerNotificationQueueStats; import org.opendaylight.yangtools.util.concurrent.QueuedNotificationManager; +import org.opendaylight.yangtools.util.concurrent.QueuedNotificationManagerMXBean; /** * Implementation of the QueuedNotificationManagerMXBean interface. @@ -29,10 +30,10 @@ public class QueuedNotificationManagerMXBeanImpl extends AbstractMXBean private final QueuedNotificationManager manager; - public QueuedNotificationManagerMXBeanImpl(QueuedNotificationManager manager, - String beanName, String beanType, String beanCategory) { + public QueuedNotificationManagerMXBeanImpl(final QueuedNotificationManager manager, + final String beanName, final String beanType, final String beanCategory) { super(beanName, beanType, beanCategory); - this.manager = Preconditions.checkNotNull(manager); + this.manager = requireNonNull(manager); } @Override -- 2.36.6