Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix javadocs and enable doclint
[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 f67657f6927801931fae2fd0434481169f2f3de8..09a987f7e31d289c4f02656e6d187f641d23140e 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
@@
-13,6
+13,7
@@
import akka.japi.Pair;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
+import java.util.Set;
import org.opendaylight.controller.remote.rpc.registry.gossip.Copier;
import org.opendaylight.controller.sal.connector.api.RpcRouter;
import org.opendaylight.controller.remote.rpc.registry.gossip.Copier;
import org.opendaylight.controller.sal.connector.api.RpcRouter;
@@
-31,7
+32,7
@@
public class RoutingTable implements Copier<RoutingTable>, Serializable {
return copy;
}
return copy;
}
- public Option<Pair<ActorRef, Long>> getRouterFor(RpcRouter.RouteIdentifier<?, ?, ?> routeId){
+ public Option<Pair<ActorRef, Long>> getRouterFor(RpcRouter.RouteIdentifier<?, ?, ?> routeId)
{
Long updatedTime = table.get(routeId);
if (updatedTime == null || router == null) {
Long updatedTime = table.get(routeId);
if (updatedTime == null || router == null) {
@@
-41,19
+42,23
@@
public class RoutingTable implements Copier<RoutingTable>, Serializable {
}
}
}
}
- public void addRoute(RpcRouter.RouteIdentifier<?,?,?> routeId){
+ public Set<RpcRouter.RouteIdentifier<?, ?, ?>> getRoutes() {
+ return table.keySet();
+ }
+
+ public void addRoute(RpcRouter.RouteIdentifier<?, ?, ?> routeId) {
table.put(routeId, System.currentTimeMillis());
}
table.put(routeId, System.currentTimeMillis());
}
- public void removeRoute(RpcRouter.RouteIdentifier<?, ?, ?> routeId){
+ public void removeRoute(RpcRouter.RouteIdentifier<?, ?, ?> routeId)
{
table.remove(routeId);
}
table.remove(routeId);
}
- public boolean contains(RpcRouter.RouteIdentifier<?, ?, ?> routeId){
+ public boolean contains(RpcRouter.RouteIdentifier<?, ?, ?> routeId)
{
return table.containsKey(routeId);
}
return table.containsKey(routeId);
}
- public boolean isEmpty(){
+ public boolean isEmpty()
{
return table.isEmpty();
}
return table.isEmpty();
}
@@
-71,9
+76,6
@@
public class RoutingTable implements Copier<RoutingTable>, Serializable {
@Override
public String toString() {
@Override
public String toString() {
- return "RoutingTable{" +
- "table=" + table +
- ", router=" + router +
- '}';
+ return "RoutingTable{" + "table=" + table + ", router=" + router + '}';
}
}
}
}