h2/src/main/org/h2/mvstore/MVStore.java
/**
     * Commit and save all changes, if there are any.
     */
Commit and save all changes, if there are any.
Commit and save all changes if there are any .
void commitInBackground() {
        if (unsavedPageCount == 0 || closed) {
            return;
        }
        long time = getTime();
        if (time <= lastCommitTime + autoCommitDelay) {
            return;
        }
        if (!hasUnsavedChanges()) {
            return;
        }
        try {
            commitAndSave();
        } catch (Exception e) {
            if (backgroundExceptionHandler != null) {
                backgroundExceptionHandler.uncaughtException(null, e);
            }
        }
    }
void commitInBackground ( ) { if ( unsavedPageCount == 0 || closed ) { return ; } long time = getTime ( ) ; if ( time <= lastCommitTime + autoCommitDelay ) { return ; } if ( ! hasUnsavedChanges ( ) ) { return ; } try { commitAndSave ( ) ; } catch ( Exception e ) { if ( backgroundExceptionHandler != null ) { backgroundExceptionHandler . uncaughtException ( null , e ) ; } } }
Commit and save all changes, if there are any.
Commit and save all changes if there are any .
// could also store when there are many unsaved pages, // but according to a test it doesn't really help