code: public ShareableResource setConsumption(VM vm, int val) {
      if (val < 0) {
        throw new IllegalArgumentException(String.format("The '%s' consumption of VM '%s' must be >= 0", rcId, vm));
      }
      vmsConsumption.put(vm, val);
      return this;
    }
docs: Set the resource consumption of a VM.
  
  @param vm  the VM
  @param val the value to set
  @return the current resource