X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-remoterpc-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fremote%2Frpc%2Fregistry%2FRoutingTable.java;h=d21d05d7fe9b02ae9a604a2f6c0567706ec2f68a;hp=c25aa523e2e0823769a28e9dc01b32da711b0ae5;hb=971b179000ef1cc56699de35061cf6f97d4cf36f;hpb=d7ce7c5acee7e6f7cd7895ceff5af63ac53789ad diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RoutingTable.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RoutingTable.java index c25aa523e2..d21d05d7fe 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RoutingTable.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RoutingTable.java @@ -14,7 +14,6 @@ import org.opendaylight.controller.remote.rpc.registry.gossip.Copier; import org.opendaylight.controller.sal.connector.api.RpcRouter; import java.io.Serializable; -import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -26,7 +25,7 @@ public class RoutingTable implements Copier, Serializable { @Override public RoutingTable copy() { RoutingTable copy = new RoutingTable(); - copy.setTable(Collections.unmodifiableMap(table)); + copy.setTable(new HashMap<>(table)); copy.setRouter(this.getRouter()); return copy; @@ -53,6 +52,9 @@ public class RoutingTable implements Copier, Serializable { return table.containsKey(routeId); } + public Boolean isEmpty(){ + return table.isEmpty(); + } /// /// Getter, Setters ///