1 package org.opendaylight.controller.sal.dom.broker
4 import org.opendaylight.controller.sal.core.api.mount.MountProvisionService
5 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier
6 import java.util.concurrent.ConcurrentMap
7 import java.util.concurrent.ConcurrentHashMap
8 import static com.google.common.base.Preconditions.*;
10 class MountPointManagerImpl implements MountProvisionService {
12 ConcurrentMap<InstanceIdentifier,MountPointImpl> mounts = new ConcurrentHashMap();
14 override createMountPoint(InstanceIdentifier path) {
15 checkState(!mounts.containsKey(path),"Mount already created");
16 val mount = new MountPointImpl(path);
17 mounts.put(path,mount);
21 override createOrGetMountPoint(InstanceIdentifier path) {
22 val mount = mounts.get(path);
24 return createMountPoint(path)
30 override getMountPoint(InstanceIdentifier path) {