use of com.cloud.utils.component.PluggableService in project cosmic by MissionCriticalCloud.
the class ApiDiscoveryServiceImpl method start.
@Override
public boolean start() {
if (s_apiNameDiscoveryResponseMap == null) {
final long startTime = System.nanoTime();
s_apiNameDiscoveryResponseMap = new HashMap<>();
final Set<Class<?>> cmdClasses = new HashSet<>();
for (final PluggableService service : _services) {
s_logger.debug(String.format("getting api commands of service: %s", service.getClass().getName()));
cmdClasses.addAll(service.getCommands());
}
cmdClasses.addAll(this.getCommands());
cacheResponseMap(cmdClasses);
final long endTime = System.nanoTime();
s_logger.info("Api Discovery Service: Annotation, docstrings, api relation graph processed in " + (endTime - startTime) / 1000000.0 + " ms");
}
return true;
}
Aggregations