code: public synchronized void close() {
  		if (storage.isOpen()) {
  			if (useRedoThread && (redoThread != null)) {
  				stopRedoThread(redoThread);
  			}
  			sync();
  			writeMetaData(true);
  			if (enableDirtyCheck) {
  				log.info("dirtyCheck=" + dirtyCheck);
  			}
  		}
  		storage.close();
  		redoStore.close();
  		clearReadCaches();
  		clearWriteCaches();
  		validState = false;
  		// log.debug(this.hashCode() + "::close() done");
  	}
docs: Close storage file and sync pending changes/dirty nodes