X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fdom%2Fbroker%2FBackwardsCompatibleMountPointManager.java;h=fef2a808c318dc4ceed1375e4c4935d3805f7456;hb=c74d5c2399e500fe3e690edc8cee497b1cb6f867;hp=5c2a8e07250f9523d4823c3880dce077831368ff;hpb=b35aa25e0c3a91fc71e778d9c9393e91036246e3;p=controller.git diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BackwardsCompatibleMountPointManager.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BackwardsCompatibleMountPointManager.java index 5c2a8e0725..fef2a808c3 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BackwardsCompatibleMountPointManager.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BackwardsCompatibleMountPointManager.java @@ -18,13 +18,13 @@ import org.opendaylight.controller.sal.core.api.mount.MountProvisionInstance; import org.opendaylight.controller.sal.core.api.mount.MountProvisionListener; import org.opendaylight.controller.sal.core.api.mount.MountProvisionService; import org.opendaylight.yangtools.concepts.ListenerRegistration; -import org.opendaylight.yangtools.concepts.util.ListenerRegistry; -import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; +import org.opendaylight.yangtools.util.ListenerRegistry; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; public class BackwardsCompatibleMountPointManager implements MountProvisionService, MountProvisionListener { private final ListenerRegistry listeners = ListenerRegistry.create(); - private final ConcurrentMap mounts = new ConcurrentHashMap<>(); + private final ConcurrentMap mounts = new ConcurrentHashMap<>(); private final DOMMountPointService domMountPointService; @@ -33,7 +33,7 @@ public class BackwardsCompatibleMountPointManager implements MountProvisionServi } @Override - public MountProvisionInstance createMountPoint(final InstanceIdentifier path) { + public MountProvisionInstance createMountPoint(final YangInstanceIdentifier path) { checkState(!mounts.containsKey(path), "Mount already created"); // Create mount point instance, wrap instance of new API with BackwardsCompatibleMountPoint to preserve backwards comatibility final BackwardsCompatibleMountPoint mount = new BackwardsCompatibleMountPoint(path, domMountPointService.createMountPoint(path)); @@ -41,13 +41,13 @@ public class BackwardsCompatibleMountPointManager implements MountProvisionServi return mount; } - public void notifyMountCreated(final InstanceIdentifier identifier) { + public void notifyMountCreated(final YangInstanceIdentifier identifier) { for (final ListenerRegistration listener : listeners.getListeners()) { listener.getInstance().onMountPointCreated(identifier); } } - public void notifyMountRemoved(final InstanceIdentifier identifier) { + public void notifyMountRemoved(final YangInstanceIdentifier identifier) { for (final ListenerRegistration listener : listeners.getListeners()) { listener.getInstance().onMountPointRemoved(identifier); } @@ -55,7 +55,7 @@ public class BackwardsCompatibleMountPointManager implements MountProvisionServi @Override public MountProvisionInstance createOrGetMountPoint( - final InstanceIdentifier path) { + final YangInstanceIdentifier path) { final MountProvisionInstance mount = getMountPoint(path); if (mount == null) { return createMountPoint(path); @@ -64,7 +64,7 @@ public class BackwardsCompatibleMountPointManager implements MountProvisionServi } @Override - public MountProvisionInstance getMountPoint(final InstanceIdentifier path) { + public MountProvisionInstance getMountPoint(final YangInstanceIdentifier path) { // If the mount point was created here, return directly if(mounts.containsKey(path)) { return mounts.get(path); @@ -86,12 +86,12 @@ public class BackwardsCompatibleMountPointManager implements MountProvisionServi } @Override - public void onMountPointCreated(final InstanceIdentifier path) { + public void onMountPointCreated(final YangInstanceIdentifier path) { notifyMountCreated(path); } @Override - public void onMountPointRemoved(final InstanceIdentifier path) { + public void onMountPointRemoved(final YangInstanceIdentifier path) { notifyMountRemoved(path); } }