code: public void onSaveItems(ItemStateChangesLog itemStates)
     {
        try
        {
           ChangesItem changesItem = new ChangesItem();
  
           for (ItemState state : itemStates.getAllStates())
           {
              if (!state.getData().isNode())
              {
                 String nodePath = getPath(state.getData().getQPath().makeParentPath());
  
                 Set<String> parentsWithQuota = quotaPersister.getAllParentNodesWithQuota(rName, wsName, nodePath);
  
                 for (String parent : parentsWithQuota)
                 {
                    changesItem.updateNodeChangedSize(parent, state.getChangedSize());
                    addPathsWithAsyncUpdate(changesItem, parent);
                 }
  
                 changesItem.updateWorkspaceChangedSize(state.getChangedSize());
              }
              else
              {
                 addPathsWithUnknownChangedSize(changesItem, state);
              }
           }
  
           validatePendingChanges(changesItem);
           pendingChanges.set(changesItem);
        }
        catch (ExceededQuotaLimitException e)
        {
           throw new IllegalStateException(e.getMessage(), e);
        }
     }
docs: {@inheritDoc}
  
  Checks if new changes can exceeds some limits. It either can be node, workspace,
  repository or global JCR instance.
  
  @throws IllegalStateException if data size exceeded quota limit