X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fremoterpc-routingtable%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnector%2Fremoterpc%2Fapi%2FRoutingTable.java;h=e5e314cd877d74ab7e52d505a80cf4e1ea059d44;hp=6ec4c2ce01f7ccb675873890a3ff80bfa6102963;hb=b6e3e11ddcea90a2ae7f93c179625941e8e22ccd;hpb=9212fed678702583f4a555641208cf1c7b45b829 diff --git a/opendaylight/md-sal/remoterpc-routingtable/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/api/RoutingTable.java b/opendaylight/md-sal/remoterpc-routingtable/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/api/RoutingTable.java index 6ec4c2ce01..e5e314cd87 100644 --- a/opendaylight/md-sal/remoterpc-routingtable/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/api/RoutingTable.java +++ b/opendaylight/md-sal/remoterpc-routingtable/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/api/RoutingTable.java @@ -11,20 +11,29 @@ import java.util.Set; public interface RoutingTable { - - /** - * Adds a network address for the route. If address for route - * exists, appends the address to the list + * Adds a network address for the route. If the route already exists, + * it throws DuplicateRouteException. + * This method would be used when registering a global service. + * * * @param routeId route identifier * @param route network address - * @throws RoutingTableException for any logical exception + * @throws DuplicateRouteException + * @throws RoutingTableException + */ + public void addGlobalRoute(I routeId, R route) throws RoutingTableException, SystemException; + + /** + * Remove the route. + * This method would be used when registering a global service. + * @param routeId + * @throws RoutingTableException * @throws SystemException */ - public void addRoute(I routeId, R route) throws RoutingTableException,SystemException; + public void removeGlobalRoute(I routeId) throws RoutingTableException, SystemException; - /** + /** * Adds a network address for the route. If the route already exists, * it throws DuplicateRouteException. * This method would be used when registering a global service. @@ -35,9 +44,18 @@ public interface RoutingTable { * @throws DuplicateRouteException * @throws RoutingTableException */ - public void addGlobalRoute(I routeId, R route) throws RoutingTableException, SystemException; - + public R getGlobalRoute(I routeId) throws RoutingTableException, SystemException; + /** + * Adds a network address for the route. If address for route + * exists, appends the address to the list + * + * @param routeId route identifier + * @param route network address + * @throws RoutingTableException for any logical exception + * @throws SystemException + */ + public void addRoute(I routeId, R route) throws RoutingTableException,SystemException; /** @@ -46,17 +64,28 @@ public interface RoutingTable { * @param routeId * @param route */ - public void removeRoute(I routeId, R route); + public void removeRoute(I routeId, R route) throws RoutingTableException,SystemException; + /** + * Adds address for a set of route identifiers. If address for route + * exists, appends the address to the set. + * + * @param routeIds a set of routeIds + * @param route network address + * @throws RoutingTableException for any logical exception + * @throws SystemException + */ + public void addRoutes(Set routeIds, R route) throws RoutingTableException,SystemException; - /** - * Remove the route. - * This method would be used when registering a global service. - * @param routeId - * @throws RoutingTableException - * @throws SystemException - */ - public void removeGlobalRoute(I routeId) throws RoutingTableException, SystemException; + /** + * Removes address for a set of route identifiers. + * + * @param routeIds a set of routeIds + * @param route network address + * @throws RoutingTableException for any logical exception + * @throws SystemException + */ + public void removeRoutes(Set routeIds, R route) throws RoutingTableException,SystemException; /** * Returns a set of network addresses associated with this route @@ -65,23 +94,14 @@ public interface RoutingTable { */ public Set getRoutes(I routeId); + /** - * Returns only one address from the list of network addresses - * associated with the route. The algorithm to determine that - * one address is upto the implementer + * Returns the last inserted address from the list of network addresses + * associated with the route. * @param routeId * @return */ - public R getARoute(I routeId); - - /** - * - * This will be removed after listeners - * have made change on their end to use whiteboard pattern - * @deprecated - */ - - public void registerRouteChangeListener(RouteChangeListener listener); + public R getLastAddedRoute(I routeId); public class DuplicateRouteException extends RoutingTableException { public DuplicateRouteException(String message) {