use of org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method initCpuMap.
private void initCpuMap() {
cpuMap = new HashMap<>();
final List<QueryType> queryTypes = new ArrayList<>();
final List<QueryParametersBase> queryParams = new ArrayList<>();
for (Version version : Version.ALL) {
queryTypes.add(QueryType.GetAllServerCpuList);
queryParams.add(new GetAllServerCpuListParameters(version));
}
final IFrontendMultipleQueryAsyncCallback callback = result -> {
for (int i = 0; i < result.getReturnValues().size(); i++) {
final List<ServerCpu> cpus = result.getReturnValues().get(i).getReturnValue();
final Version version = ((GetAllServerCpuListParameters) result.getParameters().get(i)).getVersion();
initCpuMapForVersion(version, cpus);
}
};
Frontend.getInstance().runMultipleQueries(queryTypes, queryParams, callback);
}
use of org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getCPUList.
public void getCPUList(AsyncQuery<List<ServerCpu>> aQuery, Version version) {
aQuery.converterCallback = new ListConverter<>();
Frontend.getInstance().runQuery(QueryType.GetAllServerCpuList, new GetAllServerCpuListParameters(version), aQuery);
}
Aggregations