Move DataTreeListenerInfo 06/93306/3
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 23 Oct 2020 15:37:31 +0000 (17:37 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 23 Oct 2020 17:03:02 +0000 (19:03 +0200)
DataTreeListenerInfo is strictly JMX-related, hence it should not
be lurking among our messages. Move it to newly-established
cluster.mgmt.api package.

Strictly speaking this is not API-compatible, but previous location
was in implementation-specific place, so that should be fine.

JIRA: CONTROLLER-1965
Change-Id: Idd6771a93dffd62d43beea5a57985e372d9098a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/cds-mgmt-api/src/main/java/org/opendaylight/controller/cluster/mgmt/api/DataTreeListenerInfo.java [moved from opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataTreeListenerInfo.java with 86% similarity]
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerActor.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeListenerInfoMXBeanImpl.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/shard/ShardDataTreeListenerInfoMXBean.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/GetInfo.java

@@ -5,18 +5,20 @@
  * 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.messages;
+package org.opendaylight.controller.cluster.mgmt.api;
 
 import static java.util.Objects.requireNonNull;
 
 import javax.management.ConstructorParameters;
+import org.eclipse.jdt.annotation.NonNullByDefault;
 
 /**
- * Response to a {@link GetInfo} query from a data tree listener actor.
+ * Information about a registered listener.
  *
  * @author Thomas Pantelis
  */
-public class DataTreeListenerInfo {
+@NonNullByDefault
+public final class DataTreeListenerInfo {
     private final String listener;
     private final String registeredPath;
     private final boolean isEnabled;
index 5533fc8..9a2afc9 100644 (file)
@@ -13,10 +13,10 @@ import akka.actor.Props;
 import org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor;
 import org.opendaylight.controller.cluster.datastore.messages.DataTreeChanged;
 import org.opendaylight.controller.cluster.datastore.messages.DataTreeChangedReply;
-import org.opendaylight.controller.cluster.datastore.messages.DataTreeListenerInfo;
 import org.opendaylight.controller.cluster.datastore.messages.EnableNotification;
 import org.opendaylight.controller.cluster.datastore.messages.GetInfo;
 import org.opendaylight.controller.cluster.datastore.messages.OnInitialData;
+import org.opendaylight.controller.cluster.mgmt.api.DataTreeListenerInfo;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 
index 4b34397..060c28a 100644 (file)
@@ -24,9 +24,9 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.stream.Collectors;
 import org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard.ShardDataTreeListenerInfoMXBean;
-import org.opendaylight.controller.cluster.datastore.messages.DataTreeListenerInfo;
 import org.opendaylight.controller.cluster.datastore.messages.GetInfo;
 import org.opendaylight.controller.cluster.datastore.messages.OnDemandShardState;
+import org.opendaylight.controller.cluster.mgmt.api.DataTreeListenerInfo;
 import org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean;
 import scala.concurrent.Await;
 import scala.concurrent.ExecutionContext;
index 2026bd8..4435747 100644 (file)
@@ -7,8 +7,10 @@
  */
 package org.opendaylight.controller.cluster.datastore.messages;
 
+import org.opendaylight.controller.cluster.mgmt.api.DataTreeListenerInfo;
+
 /**
- * Local message sent to an actor to retrieve internal information for reporting.
+ * Local message sent to an actor to retrieve {@link DataTreeListenerInfo} for reporting.
  *
  * @author Thomas Pantelis
  */

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.