Bump upstream SNAPSHOTS
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / DataTreeChanged.java
index 919f9448a99ab2589c362422c6c1b7d39b20312b..63f39519f5a35e7b2d63f528c8bc7f157782d90d 100644 (file)
@@ -7,21 +7,22 @@
  */
 package org.opendaylight.controller.cluster.datastore.messages;
 
-import com.google.common.base.Preconditions;
-import java.util.Collection;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
+import static java.util.Objects.requireNonNull;
+
+import java.util.List;
+import org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidate;
 
 /**
  * A message about a DataTree having been changed. The message is not
  * serializable on purpose. For delegating the change across cluster nodes,
- * this needs to be intercepted by a local agent and forwarded as
- * a {@link DataTreeDelta}.
+ * this needs to be intercepted by a local agent and forwarded as reconstructed
+ * candidate.
  */
 public final class DataTreeChanged {
-    private final Collection<DataTreeCandidate> changes;
+    private final List<DataTreeCandidate> changes;
 
-    public DataTreeChanged(final Collection<DataTreeCandidate> changes) {
-        this.changes = Preconditions.checkNotNull(changes);
+    public DataTreeChanged(final List<DataTreeCandidate> changes) {
+        this.changes = requireNonNull(changes);
     }
 
     /**
@@ -29,7 +30,7 @@ public final class DataTreeChanged {
      *
      * @return Change events
      */
-    public Collection<DataTreeCandidate> getChanges() {
+    public List<DataTreeCandidate> getChanges() {
         return changes;
     }
 }