com.healthmarketscience.jackcess.Database.flush()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(275)

本文整理了Java中com.healthmarketscience.jackcess.Database.flush()方法的一些代码示例,展示了Database.flush()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Database.flush()方法的具体详情如下:
包路径:com.healthmarketscience.jackcess.Database
类名称:Database
方法名:flush

Database.flush介绍

[英]Flushes any current changes to the database file (and any linked databases) to disk.
[中]将对数据库文件(以及所有链接数据库)的任何当前更改刷新到磁盘。

代码示例

代码示例来源:origin: com.healthmarketscience.jackcess/jackcess

  1. @Override
  2. public void flush() throws IOException {
  3. if(_linkedDbs != null) {
  4. for(Database linkedDb : _linkedDbs.values()) {
  5. linkedDb.flush();
  6. }
  7. }
  8. _pageChannel.flush();
  9. }

代码示例来源:origin: net.sf.ucanaccess/ucanaccess

  1. void shutdown(Session _session) throws Exception {
  2. DBReferenceSingleton.getInstance().remove(this.dbFile.getAbsolutePath());
  3. if (this.immediatelyReleaseResources) {
  4. for (OnReloadReferenceListener listener : onReloadListeners) {
  5. listener.onReload();
  6. }
  7. }
  8. this.memoryTimer.timer.cancel();
  9. this.dbIO.flush();
  10. this.dbIO.close();
  11. this.closeHSQLDB(_session);
  12. }

代码示例来源:origin: net.sf.ucanaccess/ucanaccess

  1. public void reloadDbIO() throws IOException {
  2. this.dbIO.flush();
  3. this.dbIO.close();
  4. for (OnReloadReferenceListener listener : onReloadListeners) {
  5. listener.onReload();
  6. }
  7. this.dbIO = open(dbFile, this.pwd);
  8. }

代码示例来源:origin: net.sf.ucanaccess/ucanaccess

  1. this.ref.getDbIO().flush();
  2. this.unloadDB();
  3. } catch (IOException e) {
  4. this.ref.getDbIO().flush();

代码示例来源:origin: net.sf.ucanaccess/ucanaccess

  1. Connection checkLastModified(Connection conn, Session session) throws Exception {
  2. // I'm detecting if another process(and not another thread) is writing
  3. for (int i = 0; i < Thread.activeCount(); i++) {
  4. if (lastModified >= filesUpdateTime()) {
  5. return conn;
  6. } else {
  7. Thread.sleep(10);
  8. }
  9. }
  10. if (preventReloading && !checkInside()) {
  11. return conn;
  12. }
  13. this.updateLastModified();
  14. this.closeHSQLDB(session);
  15. System.gc();
  16. this.dbIO.flush();
  17. this.dbIO.close();
  18. this.dbIO = open(this.dbFile, this.pwd);
  19. this.id = id();
  20. this.firstConnection = true;
  21. LoadJet lj = new LoadJet(getHSQLDBConnection(session), dbIO);
  22. lj.setSkipIndexes(this.skipIndexes);
  23. lj.setSysSchema(this.sysSchema);
  24. lj.loadDB();
  25. return getHSQLDBConnection(session);
  26. }

代码示例来源:origin: net.sf.ucanaccess/ucanaccess

  1. t.updateRow(row);
  2. conn.getDbIO().flush();

相关文章