Migrate away from @ConstructorProperties 38/84038/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 28 Aug 2019 14:01:09 +0000 (16:01 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 28 Aug 2019 14:42:36 +0000 (14:42 +0000)
ListenerNotificationQueueStats is meant for consumption in
java.management and therefore it does not need java.desktop
to work -- this is very important for JDK 9+ modular deployments.

Change-Id: I0e7715113ede968db05aacef136e35649cdfa492
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
common/util/src/main/java/org/opendaylight/yangtools/util/concurrent/ListenerNotificationQueueStats.java
common/util/src/main/java/org/opendaylight/yangtools/util/concurrent/QueuedNotificationManagerMXBean.java

index 17b08a29e46e53d137822700f1764d7a87f5b905..8ccd079e5d04bb32c330f9249647046b35e0d616 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.yangtools.util.concurrent;
 
 import static java.util.Objects.requireNonNull;
 
-import java.beans.ConstructorProperties;
+import javax.management.ConstructorParameters;
 import org.eclipse.jdt.annotation.NonNullByDefault;
 
 /**
@@ -24,7 +24,7 @@ public class ListenerNotificationQueueStats {
     private final String listenerClassName;
     private final int currentQueueSize;
 
-    @ConstructorProperties({ "listenerClassName", "currentQueueSize" })
+    @ConstructorParameters({ "listenerClassName", "currentQueueSize" })
     public ListenerNotificationQueueStats(final String listenerClassName, final int currentQueueSize) {
         this.listenerClassName = requireNonNull(listenerClassName);
         this.currentQueueSize = currentQueueSize;
index 41baf5c0a1248a89e6084adec5a6fb5104ff49e2..7f9259e0cba9a32a417f04b42fc59f2603ebe1f3 100644 (file)
@@ -8,12 +8,14 @@
 package org.opendaylight.yangtools.util.concurrent;
 
 import java.util.List;
+import javax.management.MXBean;
 
 /**
  * MXBean interface for {@link QueuedNotificationManager} statistic metrics.
  *
  * @author Thomas Pantelis
  */
+@MXBean
 public interface QueuedNotificationManagerMXBean {
     /**
      * Returns a list of stat instances for each current listener notification task in progress.