package org.opendaylight.controller.sal.connector.remoterpc;
-import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.base.Preconditions.checkState;
import java.util.Collection;
import java.util.Collections;
private ProviderSession brokerSession;
private RpcProvisionRegistry rpcProvisionRegistry;
private BundleContext context;
- private ServiceTracker clusterTracker;
+ private ServiceTracker<?, ?> clusterTracker;
public RemoteRpcProvider(ServerImpl server, ClientImpl client) {
this.server = server;
}
- private RoutingTable<RpcRouter.RouteIdentifier, String> getRoutingTable(){
- Optional<RoutingTable<RpcRouter.RouteIdentifier, String>> routingTable =
+ private RoutingTable<RpcRouter.RouteIdentifier<?, ?, ?>, String> getRoutingTable(){
+ Optional<RoutingTable<RpcRouter.RouteIdentifier<?, ?, ?>, String>> routingTable =
routingTableProvider.getRoutingTable();
- checkNotNull(routingTable.isPresent(), "Routing table is null");
+ checkState(routingTable.isPresent(), "Routing table is null");
return routingTable.get();
}
RouteIdentifierImpl routeId = new RouteIdentifierImpl();
routeId.setType(rpc);
- RoutingTable<RpcRouter.RouteIdentifier, String> routingTable = getRoutingTable();
+ RoutingTable<RpcRouter.RouteIdentifier<?, ?, ?>, String> routingTable = getRoutingTable();
try {
routingTable.addGlobalRoute(routeId, server.getServerAddress());
RouteIdentifierImpl routeId = new RouteIdentifierImpl();
routeId.setType(rpc);
- RoutingTable<RpcRouter.RouteIdentifier, String> routingTable = getRoutingTable();
+ RoutingTable<RpcRouter.RouteIdentifier<?, ?, ?>, String> routingTable = getRoutingTable();
try {
routingTable.removeGlobalRoute(routeId);
*
* @param announcements
*/
- private void announce(Set<RpcRouter.RouteIdentifier> announcements) {
+ private void announce(Set<RpcRouter.RouteIdentifier<?, ?, ?>> announcements) {
_logger.debug("Announcing [{}]", announcements);
- RoutingTable<RpcRouter.RouteIdentifier, String> routingTable = getRoutingTable();
+ RoutingTable<RpcRouter.RouteIdentifier<?, ?, ?>, String> routingTable = getRoutingTable();
try {
routingTable.addRoutes(announcements, server.getServerAddress());
} catch (RoutingTableException | SystemException e) {
*
* @param removals
*/
- private void remove(Set<RpcRouter.RouteIdentifier> removals){
+ private void remove(Set<RpcRouter.RouteIdentifier<?, ?, ?>> removals){
_logger.debug("Removing [{}]", removals);
- RoutingTable<RpcRouter.RouteIdentifier, String> routingTable = getRoutingTable();
+ RoutingTable<RpcRouter.RouteIdentifier<?, ?, ?>, String> routingTable = getRoutingTable();
try {
routingTable.removeRoutes(removals, server.getServerAddress());
} catch (RoutingTableException | SystemException e) {
* @param changes
* @return
*/
- private Set<RpcRouter.RouteIdentifier> getRouteIdentifiers(Map<RpcRoutingContext, Set<InstanceIdentifier>> changes) {
+ private Set<RpcRouter.RouteIdentifier<?, ?, ?>> getRouteIdentifiers(Map<RpcRoutingContext, Set<InstanceIdentifier>> changes) {
RouteIdentifierImpl routeId = null;
- Set<RpcRouter.RouteIdentifier> routeIdSet = new HashSet<RpcRouter.RouteIdentifier>();
+ Set<RpcRouter.RouteIdentifier<?, ?, ?>> routeIdSet = new HashSet<>();
for (RpcRoutingContext context : changes.keySet()){
routeId = new RouteIdentifierImpl();