h2/src/main/org/h2/mvstore/db/MVTableEngine.java
/**
         * Close the store. Pending changes are persisted. Chunks with a low
         * fill rate are compacted, but old chunks are kept for some time, so
         * most likely the database file will not shrink.
         *
         * @param maxCompactTime the maximum time in milliseconds to compact
         */
Close the store. Pending changes are persisted. Chunks with a low
fill rate are compacted, but old chunks are kept for some time, so
most likely the database file will not shrink.

@param maxCompactTime the maximum time in milliseconds to compact
Close the store . Pending changes are persisted . Chunks with a low fill rate are compacted but old chunks are kept for some time so most likely the database file will not shrink . @param maxCompactTime the maximum time in milliseconds to compact
public void close(long maxCompactTime) {
            if (!store.isClosed() && store.getFileStore() != null) {
                if (!store.getFileStore().isReadOnly()) {
                    transactionStore.close();
                    long start = System.currentTimeMillis();
                    while (store.compact(90)) {
                        long time = System.currentTimeMillis() - start;
                        if (time > maxCompactTime) {
                            break;
                        }
                    }
                }
                store.close();
            }
        }
public void close ( long maxCompactTime ) { if ( ! store . isClosed ( ) && store . getFileStore ( ) != null ) { if ( ! store . getFileStore ( ) . isReadOnly ( ) ) { transactionStore . close ( ) ; long start = System . currentTimeMillis ( ) ; while ( store . compact ( 90 ) ) { long time = System . currentTimeMillis ( ) - start ; if ( time > maxCompactTime ) { break ; } } } store . close ( ) ; } }
Close the store.
Close the store .