/** * @return true if instantiated tree needs to be rebuilt. */ private boolean instantiateTree() throws IOException { monitors.addMonitorListener( treeMonitor() ); GBPTree.Monitor monitor = monitors.newMonitor( GBPTree.Monitor.class ); MutableBoolean isRebuilding = new MutableBoolean(); Header.Reader readRebuilding = headerData -> isRebuilding.setValue( headerData.get() == NEEDS_REBUILDING ); index = new GBPTree<>( pageCache, storeFile, new LabelScanLayout(), pageSize, monitor, readRebuilding, needsRebuildingWriter, recoveryCleanupWorkCollector ); return isRebuilding.getValue(); }
/** * @return true if instantiated tree needs to be rebuilt. */ private boolean instantiateTree() throws IOException { monitors.addMonitorListener( treeMonitor() ); GBPTree.Monitor monitor = monitors.newMonitor( GBPTree.Monitor.class ); MutableBoolean isRebuilding = new MutableBoolean(); Header.Reader readRebuilding = headerData -> isRebuilding.setValue( headerData.get() == NEEDS_REBUILDING ); index = new GBPTree<>( pageCache, storeFile, new LabelScanLayout(), pageSize, monitor, readRebuilding, needsRebuildingWriter, recoveryCleanupWorkCollector ); return isRebuilding.getValue(); }