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

Method write

basex-core/src/main/java/org/basex/data/DiskData.java:134–154  ·  view source on GitHub ↗

Writes all meta data to disk. @throws IOException I/O exception

()

Source from the content-addressed store, hash-verified

132 * @throws IOException I/O exception
133 */
134 private void write() throws IOException {
135 if(!meta.dirty) return;
136
137 try(DataOutput out = new DataOutput(meta.dbFile(DATAINF))) {
138 meta.write(out);
139 out.writeToken(token(DBTAGS));
140 elemNames.write(out);
141 out.writeToken(token(DBATTS));
142 attrNames.write(out);
143 out.writeToken(token(DBPATH));
144 paths.write(out);
145 out.writeToken(token(DBNS));
146 nspaces.write(out);
147 out.writeToken(token(DBDOCS));
148 resources.write(out);
149 out.write(0);
150 }
151 // file may be missing if flag was just enabled
152 if(meta.updindex && idmap != null) idmap.write(meta.dbFile(DATAIDP));
153 meta.dirty = false;
154 }
155
156 @Override
157 public synchronized void close() {

Callers 2

closeMethod · 0.95
flushMethod · 0.95

Calls 3

dbFileMethod · 0.80
tokenMethod · 0.65
writeTokenMethod · 0.45

Tested by

no test coverage detected