import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean;
import org.opendaylight.controller.remote.rpc.registry.RoutingTable;
// Get all RPCs from remote bucket
Map<Address, Bucket<RoutingTable>> buckets = rpcRegistry.getRemoteBuckets();
- for (Address address : buckets.keySet()) {
- RoutingTable table = buckets.get(address).getData();
- rpcMap.putAll(getRpcMemberMapByName(table, name, address.toString()));
+ for (Entry<Address, Bucket<RoutingTable>> entry : buckets.entrySet()) {
+ RoutingTable table = entry.getValue().getData();
+ rpcMap.putAll(getRpcMemberMapByName(table, name, entry.getKey().toString()));
}
log.debug("list of RPCs {} searched by name {}", rpcMap, name);
Map<String, String> rpcMap = new HashMap<>(getRpcMemberMapByRoute(localTable, routeId, LOCAL_CONSTANT));
Map<Address, Bucket<RoutingTable>> buckets = rpcRegistry.getRemoteBuckets();
- for (Address address : buckets.keySet()) {
- RoutingTable table = buckets.get(address).getData();
- rpcMap.putAll(getRpcMemberMapByRoute(table, routeId, address.toString()));
-
+ for (Entry<Address, Bucket<RoutingTable>> entry : buckets.entrySet()) {
+ RoutingTable table = entry.getValue().getData();
+ rpcMap.putAll(getRpcMemberMapByRoute(table, routeId, entry.getKey().toString()));
}
log.debug("list of RPCs {} searched by route {}", rpcMap, routeId);