com.cloud.storage.Volume.getMinIops()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中com.cloud.storage.Volume.getMinIops()方法的一些代码示例,展示了Volume.getMinIops()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Volume.getMinIops()方法的具体详情如下:
包路径:com.cloud.storage.Volume
类名称:Volume
方法名:getMinIops

Volume.getMinIops介绍

暂无

代码示例

代码示例来源:origin: apache/cloudstack

@Override
public boolean storagePoolHasEnoughIops(List<Volume> requestedVolumes, StoragePool pool) {
  if (requestedVolumes == null || requestedVolumes.isEmpty() || pool == null) {
    return false;
  }
  // Only IOPS-guaranteed primary storage like SolidFire is using/setting IOPS.
  // This check returns true for storage that does not specify IOPS.
  if (pool.getCapacityIops() == null) {
    s_logger.info("Storage pool " + pool.getName() + " (" + pool.getId() + ") does not supply IOPS capacity, assuming enough capacity");
    return true;
  }
  StoragePoolVO storagePoolVo = _storagePoolDao.findById(pool.getId());
  long currentIops = _capacityMgr.getUsedIops(storagePoolVo);
  long requestedIops = 0;
  for (Volume requestedVolume : requestedVolumes) {
    Long minIops = requestedVolume.getMinIops();
    if (minIops != null && minIops > 0) {
      requestedIops += minIops;
    }
  }
  long futureIops = currentIops + requestedIops;
  return futureIops <= pool.getCapacityIops();
}

代码示例来源:origin: apache/cloudstack

that.getProvisioningType(),
  that.getSize(),
  that.getMinIops(),
  that.getMaxIops(),
  that.get_iScsiName(),
minIops = that.getMinIops();
maxIops = that.getMaxIops();
_iScsiName = that.get_iScsiName();

代码示例来源:origin: apache/cloudstack

public VolumeVO allocateDuplicateVolumeVO(Volume oldVol, Long templateId) {
  VolumeVO newVol = new VolumeVO(oldVol.getVolumeType(), oldVol.getName(), oldVol.getDataCenterId(), oldVol.getDomainId(), oldVol.getAccountId(), oldVol.getDiskOfferingId(),
      oldVol.getProvisioningType(), oldVol.getSize(), oldVol.getMinIops(), oldVol.getMaxIops(), oldVol.get_iScsiName());
  if (templateId != null) {
    newVol.setTemplateId(templateId);
  } else {
    newVol.setTemplateId(oldVol.getTemplateId());
  }
  newVol.setDeviceId(oldVol.getDeviceId());
  newVol.setInstanceId(oldVol.getInstanceId());
  newVol.setRecreatable(oldVol.isRecreatable());
  newVol.setFormat(oldVol.getFormat());
  return _volsDao.persist(newVol);
}

相关文章