(final MainOptions opts)
| 235 | } |
| 236 | |
| 237 | @Override |
| 238 | public synchronized void finishUpdate(final MainOptions opts) { |
| 239 | // OPTIMIZE ALL will close the database before this function is called |
| 240 | if(closed) return; |
| 241 | |
| 242 | // remove updating file |
| 243 | final boolean auto = opts.get(MainOptions.AUTOFLUSH); |
| 244 | if(auto) { |
| 245 | final IOFile upd = meta.updateFile(); |
| 246 | if(!upd.exists()) throw Util.notExpected("%: lock file does not exist.", meta.name); |
| 247 | if(!upd.delete()) throw Util.notExpected("%: could not delete lock file.", meta.name); |
| 248 | } |
| 249 | |
| 250 | flush(auto); |
| 251 | if(!table.lock(false)) throw Util.notExpected("Database '%': could not unlock.", meta.name); |
| 252 | } |
| 253 | |
| 254 | @Override |
| 255 | public synchronized void flush(final boolean all) { |
nothing calls this directly
no test coverage detected