Adjust to DOMDataTreeChangeListener update 70/96670/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 25 Jun 2021 12:16:11 +0000 (14:16 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 25 Jun 2021 12:18:41 +0000 (14:18 +0200)
We are required to implement onInitialData() method, add it.

Change-Id: I55e60c9013c49689252f662218db31152982019c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-eos/src/main/java/org/opendaylight/controller/cluster/entityownership/CandidateListChangeListener.java
opendaylight/md-sal/sal-distributed-eos/src/main/java/org/opendaylight/controller/cluster/entityownership/EntityOwnerChangeListener.java
opendaylight/md-sal/sal-distributed-eos/src/main/java/org/opendaylight/controller/cluster/entityownership/EntityOwnershipStatistics.java
opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/IdIntsListener.java

index 81ef3e7..d8df830 100644 (file)
@@ -61,6 +61,11 @@ class CandidateListChangeListener implements DOMDataTreeChangeListener {
                 .node(Candidate.QNAME).node(Candidate.QNAME).build(), this, Optional.empty(), noop -> { /* NOOP */ });
     }
 
+    @Override
+    public void onInitialData() {
+        // No-op
+    }
+
     @Override
     public void onDataTreeChanged(final Collection<DataTreeCandidate> changes) {
         for (DataTreeCandidate change: changes) {
index 509e53c..974b5a1 100644 (file)
@@ -40,6 +40,11 @@ class EntityOwnerChangeListener extends AbstractEntityOwnerChangeListener {
         this.publisher = requireNonNull(publisher);
     }
 
+    @Override
+    public void onInitialData() {
+        // No-op
+    }
+
     @Override
     public void onDataTreeChanged(final Collection<DataTreeCandidate> changes) {
         for (DataTreeCandidate change: changes) {
index 0f2a4ec..59cc755 100644 (file)
@@ -28,13 +28,17 @@ import tech.pantheon.triemap.TrieMap;
  * finding out how many entities of a given type are owned by a given candidate is not an efficient query.
  */
 class EntityOwnershipStatistics extends AbstractEntityOwnerChangeListener {
-
     private final TrieMap<String, TrieMap<String, Long>> statistics = TrieMap.create();
 
     EntityOwnershipStatistics() {
         // Hidden on purpose
     }
 
+    @Override
+    public void onInitialData() {
+        // No-op
+    }
+
     @Override
     public void onDataTreeChanged(final Collection<DataTreeCandidate> changes) {
         for (DataTreeCandidate change : changes) {
index 72a8a02..e905545 100644 (file)
@@ -32,7 +32,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class IdIntsListener implements ClusteredDOMDataTreeChangeListener {
-
     private static final Logger LOG = LoggerFactory.getLogger(IdIntsListener.class);
     private static final long SECOND_AS_NANO = 1000000000;
 
@@ -41,6 +40,11 @@ public class IdIntsListener implements ClusteredDOMDataTreeChangeListener {
     private ScheduledExecutorService executorService;
     private ScheduledFuture<?> scheduledFuture;
 
+    @Override
+    public void onInitialData() {
+        // Intentional no-op
+    }
+
     @Override
     public void onDataTreeChanged(final Collection<DataTreeCandidate> changes) {