code: void verifyQuota(long nsDelta, long dsDelta) throws QuotaExceededException {
      long newCount = nsCount + nsDelta;
      long newDiskspace = diskspace + dsDelta;
      if (nsDelta>0 || dsDelta>0) {
        if (nsQuota >= 0 && nsQuota < newCount) {
          throw new NSQuotaExceededException(nsQuota, newCount);
        }
        if (dsQuota >= 0 && dsQuota < newDiskspace) {
          throw new DSQuotaExceededException(dsQuota, newDiskspace);
      }
      }
    }
docs: Verify if the namespace count disk space satisfies the quota restriction
  @throws QuotaExceededException if the given quota is less than the count