code: public final void writeToFileOnPendingChanges ()
    {
      if (hasPendingChanges ())
      {
        m_aRWLock.writeLocked ( () -> {
          // Write to file
          if (_writeToFile ().isSuccess ())
            internalSetPendingChanges (false);
          else
          {
            if (LOGGER.isErrorEnabled ())
              LOGGER.error ("The DAO of class " +
                            getClass ().getName () +
                            " still has pending changes after writeToFileOnPendingChanges!");
          }
        });
      }
    }
docs: In case there are pending changes write them to the file. This method is
  write locked!