import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
-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.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.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.GroupActionCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PopVlanActionCaseBuilder;
final InstanceIdentifier<FlowCapableNode> path = InstanceIdentifier.create(Nodes.class).child(Node.class)
.augmentation(FlowCapableNode.class);
final DataTreeIdentifier<FlowCapableNode> identifier =
- new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, path);
+ DataTreeIdentifier.create(LogicalDatastoreType.OPERATIONAL, path);
listenerReg = dataBroker.registerDataTreeChangeListener(identifier, SampleFlowCapableNodeListener.this);
}
@Override
- public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<FlowCapableNode>> modifications) {
+ public void onDataTreeChanged(Collection<DataTreeModification<FlowCapableNode>> modifications) {
for (DataTreeModification<FlowCapableNode> modification : modifications) {
if (modification.getRootNode().getModificationType() == ModificationType.WRITE) {
LOG.info("Node connected: {}",
makeCompletableFuture(bundleService.controlBundle(commitBundleInput));
return controlCommitFuture;
- }).thenAccept(voidRpcResult -> {
- LOG.debug("Commit successful: {}, msg: {}", voidRpcResult.isSuccessful(),
- voidRpcResult.getErrors());
- });
+ }).thenAccept(voidRpcResult -> LOG.debug("Commit successful: {}, msg: {}",
+ voidRpcResult.isSuccessful(), voidRpcResult.getErrors()));
}
}
}