private void beginLog() throws IOException { if (logs == null) { finishRefAndObjSections(); // close prior ref blocks and their index, if present. out.flushFileHeader(); out.setBlockSize(logBlockSize); logs = new Section(LOG_BLOCK_TYPE); } }
/** * Finish writing the reftable by writing its trailer. * * @return {@code this} * @throws java.io.IOException * if reftable cannot be written. */ public ReftableWriter finish() throws IOException { finishRefAndObjSections(); finishLogSection(); writeFileFooter(); out.finishFile(); stats = new Stats(this, out); out = null; obj2ref = null; cur = null; refs = null; objs = null; logs = null; return this; }
private void beginLog() throws IOException { if (logs == null) { finishRefAndObjSections(); // close prior ref blocks and their index, if present. out.flushFileHeader(); out.setBlockSize(logBlockSize); logs = new Section(LOG_BLOCK_TYPE); } }
/** * Finish writing the reftable by writing its trailer. * * @return {@code this} * @throws java.io.IOException * if reftable cannot be written. */ public ReftableWriter finish() throws IOException { finishRefAndObjSections(); finishLogSection(); writeFileFooter(); out.finishFile(); stats = new Stats(this, out); out = null; obj2ref = null; cur = null; refs = null; objs = null; logs = null; return this; }