use of org.opendaylight.controller.remote.rpc.registry.RoutingTable in project controller by opendaylight.
the class RemoteRpcRegistryMXBeanImpl method findRpcByName.
@Override
public Map<String, String> findRpcByName(final String name) {
RoutingTable localTable = getLocalData();
// Get all RPCs from local bucket
Map<String, String> rpcMap = new HashMap<>(getRpcMemberMapByName(localTable, name, LOCAL_CONSTANT));
// Get all RPCs from remote bucket
Map<Address, Bucket<RoutingTable>> buckets = getRemoteBuckets();
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);
return rpcMap;
}
use of org.opendaylight.controller.remote.rpc.registry.RoutingTable in project controller by opendaylight.
the class RemoteRpcRegistryMXBeanImpl method getGlobalRpc.
@Override
public Set<String> getGlobalRpc() {
RoutingTable table = getLocalData();
Set<String> globalRpc = new HashSet<>(table.getRoutes().size());
for (DOMRpcIdentifier route : table.getRoutes()) {
if (route.getContextReference().isEmpty()) {
globalRpc.add(route.getType().toString());
}
}
log.debug("Locally registered global RPCs {}", globalRpc);
return globalRpc;
}
use of org.opendaylight.controller.remote.rpc.registry.RoutingTable in project controller by opendaylight.
the class RemoteRpcRegistryMXBeanImpl method getLocalRegisteredRoutedRpc.
@Override
public Set<String> getLocalRegisteredRoutedRpc() {
RoutingTable table = getLocalData();
Set<String> routedRpc = new HashSet<>(table.getRoutes().size());
for (DOMRpcIdentifier route : table.getRoutes()) {
if (!route.getContextReference().isEmpty()) {
routedRpc.add(ROUTE_CONSTANT + route.getContextReference() + NAME_CONSTANT + route.getType());
}
}
log.debug("Locally registered routed RPCs {}", routedRpc);
return routedRpc;
}
use of org.opendaylight.controller.remote.rpc.registry.RoutingTable in project controller by opendaylight.
the class RemoteRpcRegistryMXBeanImpl method findRpcByRoute.
@Override
public Map<String, String> findRpcByRoute(final String routeId) {
RoutingTable localTable = getLocalData();
Map<String, String> rpcMap = new HashMap<>(getRpcMemberMapByRoute(localTable, routeId, LOCAL_CONSTANT));
Map<Address, Bucket<RoutingTable>> buckets = getRemoteBuckets();
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);
return rpcMap;
}
Aggregations