org.ovirt.engine.api.model.Quota.setStorageHardLimitPct()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(134)

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

Quota.setStorageHardLimitPct介绍

[英]Sets the value of the storageHardLimitPct property.
[中]设置storageHardLimitPct属性的值。

代码示例

代码示例来源:origin: oVirt/ovirt-engine

  1. private Quota getQuota() {
  2. Quota quota = new Quota();
  3. quota.setName("Quota_Name");
  4. quota.setClusterHardLimitPct(CLUSTER_HARD_LIMIT_PCT);
  5. quota.setClusterSoftLimitPct(CLUSTER_SOFT_LIMIT_PCT);
  6. quota.setStorageHardLimitPct(STORAGE_HARD_LIMIT_PCT);
  7. quota.setStorageSoftLimitPct(STORAGE_SOFT_LIMIT_PCT);
  8. return quota;
  9. }

代码示例来源:origin: oVirt/ovirt-engine

  1. @Mapping(from = org.ovirt.engine.core.common.businessentities.Quota.class, to = Quota.class)
  2. public static Quota map(org.ovirt.engine.core.common.businessentities.Quota template, Quota model) {
  3. Quota ret = (model==null) ? new Quota() : model;
  4. if (template.getId()!=null) {
  5. ret.setId(template.getId().toString());
  6. }
  7. if (template.getQuotaName()!=null) {
  8. ret.setName(template.getQuotaName());
  9. }
  10. if (template.getDescription()!=null) {
  11. ret.setDescription(template.getDescription());
  12. }
  13. if (template.getStoragePoolId()!=null) {
  14. if (ret.getDataCenter()==null) {
  15. ret.setDataCenter(new DataCenter());
  16. }
  17. ret.getDataCenter().setId(template.getStoragePoolId().toString());
  18. }
  19. ret.setClusterHardLimitPct(template.getGraceClusterPercentage());
  20. ret.setStorageHardLimitPct(template.getGraceStoragePercentage());
  21. ret.setClusterSoftLimitPct(template.getThresholdClusterPercentage());
  22. ret.setStorageSoftLimitPct(template.getThresholdStoragePercentage());
  23. return ret;
  24. }

代码示例来源:origin: oVirt/ovirt-engine

  1. to.setStorageHardLimitPct(from.getStorageHardLimitPct());

相关文章