X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fdom%2Fbroker%2FBackwardsCompatibleMountPointManager.java;h=b01db3d515d23af89cbd062865863f5d28ff1a9d;hp=5c2a8e07250f9523d4823c3880dce077831368ff;hb=de3e413b633b7555ae8f3fe2ec163dbb7dda5da8;hpb=35ac0155c164ead34628292057008bd6e3a1ffb5 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..b01db3d515 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 @@ -19,12 +19,12 @@ 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.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); } }