*/
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);
}
/**
*
* @return Change events
*/
- public Collection<DataTreeCandidate> getChanges() {
+ public List<DataTreeCandidate> getChanges() {
return changes;
}
}