code: void save(final ItemStateChangesLog changesLog, final TransactionableResourceManager txResourceManager)
        throws RepositoryException
     {
        if (isSuspended.get())
        {
           try
           {
              latcher.get().await();
           }
           catch (InterruptedException e)
           {
              throw new RepositoryException(e);
           }
        }
  
        workingThreads.incrementAndGet();
        try
        {
           SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Void>()
           {
              public Void run() throws Exception
              {
                 doSave(changesLog, txResourceManager);
                 return null;
              }
           });
        }
        catch (PrivilegedActionException e)
        {
           Throwable cause = e.getCause();
           if (cause instanceof RepositoryException)
           {
              throw (RepositoryException)cause;
           }
           else if (cause instanceof RuntimeException)
           {
              throw (RuntimeException)cause;
           }
           else
           {
              throw new RuntimeException(cause);
           }
        }
        finally
        {
           workingThreads.decrementAndGet();
  
           if (isSuspended.get() && workingThreads.get() == 0)
           {
              synchronized (workingThreads)
              {
                 workingThreads.notifyAll();
              }
           }
        }
     }
docs: Saves the list of changes from this storage using the given resource manager
  
  @param changesLog
  to commit
  @param txResourceManager
  the resource manager to use
  @throws InvalidItemStateException
  @throws UnsupportedOperationException
  if operation is not supported (it is container for level 1)
  @throws RepositoryException
  if some exception occurred