synchronized (namespacesDb) { namespacesDb.flush(); }
	public void sync() {		// uncomment this to get statistics on page buffer usage		elementsDb.printStatistics();		collectionsDb.printStatistics();		domDb.printStatistics();		try {			Lock lock = collectionsDb.getLock();			try {				lock.acquire(Lock.WRITE_LOCK);				collectionsDb.flush();			} catch (LockException e) {				LOG.warn("failed to acquire lock on collections store", e);			} finally {				lock.release();			}			new DOMTransaction(this, domDb, Lock.WRITE_LOCK) {				public Object start() {					try {						domDb.flush();					} catch (DBException e) {						LOG.warn("error while flushing dom.dbx", e);					}					return null;				}			}			.run();			synchronized (namespacesDb) {				namespacesDb.flush();			}			elementIndex.sync();			textEngine.sync();		} catch (DBException dbe) {			dbe.printStackTrace();			LOG.debug(dbe);		}		System.gc();	}