import com.google.common.base.Preconditions;
import java.util.Collection;
import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.apache.aries.blueprint.annotation.service.Reference;
-import org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.DataObjectModification.ModificationType;
-import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
-import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.infrautils.utils.concurrent.JdkFutures;
+import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataObjectModification.ModificationType;
+import org.opendaylight.mdsal.binding.api.DataTreeIdentifier;
+import org.opendaylight.mdsal.binding.api.DataTreeModification;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.openflowplugin.api.OFConstants;
import org.opendaylight.openflowplugin.applications.deviceownershipservice.DeviceOwnershipService;
import org.opendaylight.openflowplugin.common.wait.SimpleTaskRetryLooper;
try {
final InstanceIdentifier<FlowCapableNode> path = InstanceIdentifier.create(Nodes.class).child(Node.class)
.augmentation(FlowCapableNode.class);
- final DataTreeIdentifier<FlowCapableNode> identifier = new DataTreeIdentifier<>(
+ final DataTreeIdentifier<FlowCapableNode> identifier = DataTreeIdentifier.create(
LogicalDatastoreType.OPERATIONAL, path);
final SimpleTaskRetryLooper looper = new SimpleTaskRetryLooper(STARTUP_LOOP_TICK, STARTUP_LOOP_MAX_RETRIES);
listenerRegistration = looper.loopUntilNoException(
() -> dataBroker.registerDataTreeChangeListener(identifier, DefaultConfigPusher.this));
} catch (Exception e) {
- LOG.error("DataTreeChangeListener registration failed: {}", e);
+ LOG.error("DataTreeChangeListener registration failed", e);
throw new IllegalStateException("DefaultConfigPusher startup failed!", e);
}
LOG.info("DefaultConfigPusher has started.");
}
@Override
- public void onDataTreeChanged(@Nonnull final Collection<DataTreeModification<FlowCapableNode>> modifications) {
+ public void onDataTreeChanged(final Collection<DataTreeModification<FlowCapableNode>> modifications) {
for (DataTreeModification<FlowCapableNode> modification : modifications) {
if (modification.getRootNode().getModificationType() == ModificationType.WRITE) {
String nodeId = modification.getRootPath().getRootIdentifier()