code: public void writeLocks() throws CmsException {
  
          if (m_dbContextFactory == null) {
              // already shutdown
              return;
          }
          CmsDbContext dbc = m_dbContextFactory.getDbContext();
          try {
              m_driverManager.writeLocks(dbc);
          } finally {
              dbc.clear();
          }
      }
docs: Writes the locks that are currently stored in-memory to the database to allow restoring them in
  later startups.<p>
  
  This overwrites the locks previously stored in the underlying database table.<p>
  
  @throws CmsException if something goes wrong