@Override public void flush() throws IOException { if(_linkedDbs != null) { for(Database linkedDb : _linkedDbs.values()) { linkedDb.flush(); } } _pageChannel.flush(); }
void shutdown(Session _session) throws Exception { DBReferenceSingleton.getInstance().remove(this.dbFile.getAbsolutePath()); if (this.immediatelyReleaseResources) { for (OnReloadReferenceListener listener : onReloadListeners) { listener.onReload(); } } this.memoryTimer.timer.cancel(); this.dbIO.flush(); this.dbIO.close(); this.closeHSQLDB(_session); }
public void reloadDbIO() throws IOException { this.dbIO.flush(); this.dbIO.close(); for (OnReloadReferenceListener listener : onReloadListeners) { listener.onReload(); } this.dbIO = open(dbFile, this.pwd); }
Connection checkLastModified(Connection conn, Session session) throws Exception { // I'm detecting if another process(and not another thread) is writing for (int i = 0; i < Thread.activeCount(); i++) { if (lastModified >= filesUpdateTime()) { return conn; } else { Thread.sleep(10); } } if (preventReloading && !checkInside()) { return conn; } this.updateLastModified(); this.closeHSQLDB(session); System.gc(); this.dbIO.flush(); this.dbIO.close(); this.dbIO = open(this.dbFile, this.pwd); this.id = id(); this.firstConnection = true; LoadJet lj = new LoadJet(getHSQLDBConnection(session), dbIO); lj.setSkipIndexes(this.skipIndexes); lj.setSysSchema(this.sysSchema); lj.loadDB(); return getHSQLDBConnection(session); }
t.updateRow(row); conn.getDbIO().flush();