code: public void commit(ICommitChanges changes, boolean incrementVersions, Runnable r) {
          beginWrite();
  
          try {
              checkForConcurrentModifications(changes, incrementVersions);
  
              saveChanges(changes);
              
              if (r != null) {
                  r.run();
              }
          } finally {
              endWrite();
          }
      }
docs: FileBackedMemoryGraphStore