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

Method finish

basex-core/src/main/java/org/basex/core/cmd/Optimize.java:73–80  ·  view source on GitHub ↗

Optimizes a database after updates. @param data data @throws IOException I/O Exception

(final Data data)

Source from the content-addressed store, hash-verified

71 * @throws IOException I/O Exception
72 */
73 public static void finish(final Data data) throws IOException {
74 // do nothing if database has been closed
75 if(data.closed()) return;
76 // GH-676: optimize database and rebuild index structures if ID has turned negative
77 if(data.meta.lastid < data.meta.size - 1) optimizeIds(data);
78 // GH-1035: auto-optimize database
79 if(data.meta.autooptimize) optimize(data, null);
80 }
81
82 /**
83 * Optimizes the structures of a database.

Callers 10

updateMethod · 0.95
applyMethod · 0.95
runMethod · 0.45
listMethod · 0.45
listResourcesMethod · 0.45
infoMethod · 0.45
putMethod · 0.45
runMethod · 0.45
runMethod · 0.45
runMethod · 0.45

Calls 3

optimizeIdsMethod · 0.95
optimizeMethod · 0.95
closedMethod · 0.80

Tested by

no test coverage detected