Beispiel #1
0
 /**
  * Flush the current value, including the margin, to disk.
  *
  * @param session the session
  */
 public synchronized void flush(Session session) {
   if (session == null || !database.isSysTableLocked()) {
     // This session may not lock the sys table (except if it already has locked it)
     // because it must be committed immediately,
     // otherwise other threads can not access the sys table.
     Session sysSession = database.getSystemSession();
     synchronized (sysSession) {
       flushInternal(sysSession);
       sysSession.commit(false);
     }
   } else {
     synchronized (session) {
       flushInternal(session);
     }
   }
 }