MCPcopy Create free account
hub / github.com/BaseXdb/basex / startUpdate

Method startUpdate

basex-core/src/main/java/org/basex/data/DiskData.java:227–235  ·  view source on GitHub ↗
(final MainOptions opts)

Source from the content-addressed store, hash-verified

225 }
226
227 @Override
228 public void startUpdate(final MainOptions opts) throws BaseXException {
229 if(!table.lock(true)) throw new BaseXException(DB_PINNED_X, meta.name);
230 if(opts.get(MainOptions.AUTOFLUSH)) {
231 final IOFile upd = meta.updateFile();
232 if(upd.exists()) throw new BaseXException(DB_UPDATED_X, meta.name);
233 if(!upd.touch()) throw Util.notExpected("%: could not create lock file.", meta.name);
234 }
235 }
236
237 @Override
238 public synchronized void finishUpdate(final MainOptions opts) {

Callers

nothing calls this directly

Calls 6

existsMethod · 0.95
touchMethod · 0.95
notExpectedMethod · 0.95
updateFileMethod · 0.80
getMethod · 0.65
lockMethod · 0.45

Tested by

no test coverage detected