use of javax.wbem.client.EnumerateResponse in project coprhd-controller by CoprHD.
the class CapacityPoolProcessor method processResult.
@Override
public void processResult(Operation operation, Object resultObj, Map<String, Object> keyMap) throws BaseCollectionException {
EnumerateResponse<CIMInstance> volumeInstanceChunks = (EnumerateResponse<CIMInstance>) resultObj;
WBEMClient client = SMICommunicationInterface.getCIMClient(keyMap);
CloseableIterator<CIMInstance> volumeInstances = volumeInstanceChunks.getResponses();
try {
processVolumeCapacity(volumeInstances, keyMap);
while (!volumeInstanceChunks.isEnd()) {
CIMObjectPath storagePoolPath = getObjectPathfromCIMArgument(_args);
_logger.info("Processing Next Volume Chunk of size {}", BATCH_SIZE);
volumeInstanceChunks = client.getInstancesWithPath(storagePoolPath, volumeInstanceChunks.getContext(), new UnsignedInteger32(BATCH_SIZE));
processVolumeCapacity(volumeInstanceChunks.getResponses(), keyMap);
}
} catch (Exception e) {
_logger.error("Provisioned Capacity failure :", e);
} finally {
resultObj = null;
if (null != volumeInstances) {
volumeInstances.close();
}
}
}
Aggregations