-import org.opendaylight.controller.remote.rpc.registry.gossip.Copier;
-import org.opendaylight.controller.sal.connector.api.RpcRouter;
-
-public class RoutingTable implements Copier<RoutingTable>, Serializable {
- private static final long serialVersionUID = 5592610415175278760L;
-
- private final Map<RpcRouter.RouteIdentifier<?, ?, ?>, Long> table = new HashMap<>();
- private ActorRef router;
-
- @Override
- public RoutingTable copy() {
- RoutingTable copy = new RoutingTable();
- copy.table.putAll(table);
- copy.setRouter(this.getRouter());
-
- return copy;
- }
-
- public Option<Pair<ActorRef, Long>> getRouterFor(RpcRouter.RouteIdentifier<?, ?, ?> routeId){
- Long updatedTime = table.get(routeId);
-
- if (updatedTime == null || router == null) {
- return Option.none();
- } else {
- return Option.option(new Pair<>(router, updatedTime));
+ Proxy(final RoutingTable table) {
+ rpcs = table.getItems();
+ opsInvoker = table.getInvoker();