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;
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) {
}
}
- 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());
}
- public void removeRoute(RpcRouter.RouteIdentifier<?, ?, ?> routeId){
+ public void removeRoute(RpcRouter.RouteIdentifier<?, ?, ?> routeId) {
table.remove(routeId);
}
- public boolean contains(RpcRouter.RouteIdentifier<?, ?, ?> routeId){
+ public boolean contains(RpcRouter.RouteIdentifier<?, ?, ?> routeId) {
return table.containsKey(routeId);
}
- public boolean isEmpty(){
+ public boolean isEmpty() {
return table.isEmpty();
}
@Override
public String toString() {
- return "RoutingTable{" +
- "table=" + table +
- ", router=" + router +
- '}';
+ return "RoutingTable{" + "table=" + table + ", router=" + router + '}';
}
}