X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-remoterpc-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fremote%2Frpc%2Fregistry%2FRoutingTable.java;h=d21d05d7fe9b02ae9a604a2f6c0567706ec2f68a;hb=67534d812ccdfc1d152660165e4c69e972f60671;hp=c25aa523e2e0823769a28e9dc01b32da711b0ae5;hpb=08d30cebbbec8da5596840c6ef830687a76d9d33;p=controller.git 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 ///