code: public synchronized void checkpoint(boolean mode) {
  
          if (logStatements) {
              appLog.logContext(SimpleLog.LOG_NORMAL, "start");
  
              needsCheckpoint = false;
  
              log.checkpoint(mode);
              database.sessionManager.resetLoggedSchemas();
              appLog.logContext(SimpleLog.LOG_NORMAL, "end");
          }
      }
docs: Checkpoints the database. <p>
  
  The most important effect of calling this method is to cause the
  log file to be rewritten in the most efficient form to
  reflect the current state of the database, i.e. only the DDL and
  insert DML required to recreate the database in its present state.
  Other house-keeping duties are performed w.r.t. other database
  files, in order to ensure as much as possible the ACID properites
  of the database.
  
  @throws  HsqlException if there is a problem checkpointing the
  database