Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Fix allowable Unix ports range 1024 - 65535"
[controller.git]
/
opendaylight
/
md-sal
/
sal-remoterpc-connector
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
remote
/
rpc
/
registry
/
RoutingTable.java
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 c25aa523e2e0823769a28e9dc01b32da711b0ae5..fe8c463d2e17fae2d1377aafa0be90dda23beff2 100644
(file)
--- 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 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<RoutingTable>, Serializable {
import java.util.HashMap;
import java.util.Map;
public class RoutingTable implements Copier<RoutingTable>, Serializable {
+ private static final long serialVersionUID = 1L;
private Map<RpcRouter.RouteIdentifier<?, ?, ?>, Long> table = new HashMap<>();
private ActorRef router;
private Map<RpcRouter.RouteIdentifier<?, ?, ?>, Long> table = new HashMap<>();
private ActorRef router;
@@
-26,7
+26,7
@@
public class RoutingTable implements Copier<RoutingTable>, Serializable {
@Override
public RoutingTable copy() {
RoutingTable copy = new RoutingTable();
@Override
public RoutingTable copy() {
RoutingTable copy = new RoutingTable();
- copy.setTable(
Collections.unmodifiableMap
(table));
+ copy.setTable(
new HashMap<>
(table));
copy.setRouter(this.getRouter());
return copy;
copy.setRouter(this.getRouter());
return copy;
@@
-53,6
+53,9
@@
public class RoutingTable implements Copier<RoutingTable>, Serializable {
return table.containsKey(routeId);
}
return table.containsKey(routeId);
}
+ public Boolean isEmpty(){
+ return table.isEmpty();
+ }
///
/// Getter, Setters
///
///
/// Getter, Setters
///