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=fe8c463d2e17fae2d1377aafa0be90dda23beff2;hb=b52893a2ff963a4a02a96190d78f62e9d261ffce;hp=c25aa523e2e0823769a28e9dc01b32da711b0ae5;hpb=5c7fe226016d6997f411601502589e86ad9d8f87;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..fe8c463d2e 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,11 +14,11 @@ 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; public class RoutingTable implements Copier, Serializable { + private static final long serialVersionUID = 1L; private Map, Long> table = new HashMap<>(); private ActorRef router; @@ -26,7 +26,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 +53,9 @@ public class RoutingTable implements Copier, Serializable { return table.containsKey(routeId); } + public Boolean isEmpty(){ + return table.isEmpty(); + } /// /// Getter, Setters ///