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%2Fimpl%2FRoutedRpcSelector.java;h=19ff03b7d2ca14fa4facb72d855bbf2b14f77b7d;hb=11e9ade9af527aba7faeb633d3c9c7552fd09d2d;hp=a22aed7ab16aeea03fb5967f8b08572956ea9326;hpb=753af6de42f98637e83bc26b4b058f47840863a8;p=controller.git diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/RoutedRpcSelector.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/RoutedRpcSelector.java index a22aed7ab1..19ff03b7d2 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/RoutedRpcSelector.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/RoutedRpcSelector.java @@ -22,7 +22,7 @@ import org.opendaylight.yangtools.concepts.Identifiable; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.data.api.CompositeNode; -import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.SimpleNode; import com.google.common.collect.ImmutableSet; @@ -33,7 +33,7 @@ class RoutedRpcSelector implements RpcImplementation, AutoCloseable, Identifiabl private final RpcRoutingStrategy strategy; private final Set supportedRpcs; private final RpcRoutingContext identifier; - final ConcurrentMap implementations = new ConcurrentHashMap<>(); + final ConcurrentMap implementations = new ConcurrentHashMap<>(); private final SchemaAwareRpcBroker router; public RoutedRpcSelector(final RpcRoutingStrategy strategy, final SchemaAwareRpcBroker router) { @@ -70,7 +70,7 @@ class RoutedRpcSelector implements RpcImplementation, AutoCloseable, Identifiabl SimpleNode routeContainer = inputContainer.getFirstSimpleByName(strategy.getLeaf()); checkArgument(routeContainer != null, "Leaf %s must be set with value", strategy.getLeaf()); Object route = routeContainer.getValue(); - checkArgument(route instanceof InstanceIdentifier, + checkArgument(route instanceof YangInstanceIdentifier, "The routed node %s is not an instance identifier", route); RpcImplementation potential = null; if (route != null) { @@ -80,13 +80,13 @@ class RoutedRpcSelector implements RpcImplementation, AutoCloseable, Identifiabl } } if (potential == null) { - return router.invokeRpc(rpc, (InstanceIdentifier) route, input); + return router.invokeRpc(rpc, (YangInstanceIdentifier) route, input); } checkState(potential != null, "No implementation is available for rpc:%s path:%s", rpc, route); return potential.invokeRpc(rpc, input); } - public void addPath(final QName context, final InstanceIdentifier path, final RoutedRpcRegImpl routedRpcRegImpl) { + public void addPath(final QName context, final YangInstanceIdentifier path, final RoutedRpcRegImpl routedRpcRegImpl) { //checkArgument(strategy.getContext().equals(context),"Supplied context is not supported."); RoutedRpcRegImpl previous = implementations.put(path, routedRpcRegImpl); if (previous == null) { @@ -95,7 +95,7 @@ class RoutedRpcSelector implements RpcImplementation, AutoCloseable, Identifiabl } - public void removePath(final QName context, final InstanceIdentifier path, final RoutedRpcRegImpl routedRpcRegImpl) { + public void removePath(final QName context, final YangInstanceIdentifier path, final RoutedRpcRegImpl routedRpcRegImpl) { boolean removed = implementations.remove(path, routedRpcRegImpl); if (removed) { router.notifyPathWithdrawal(context, strategy.getIdentifier(), path);