Package org.basex.index
Class IndexBuilder
java.lang.Object
org.basex.core.jobs.Job
org.basex.index.IndexBuilder
- Direct Known Subclasses:
FTBuilder,ValuesBuilder
This interface defines the functions which are needed for building
new index structures.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longTotal number of index operations (may get pretty large).protected final DataData reference.protected intCurrent pre value.protected final intTotal parsing value.protected intNumber of partial index structures.protected final booleanText node flag.protected final IndexTypeIndex type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ValueIndexbuild()Builds the index structure and returns an index instance.protected voidcheck()Checks if the command was interrupted, and prints some debug output.protected final voidclean()Performs memory cleanup after writing partial memory if necessary.final StringReturns detailed progress information.protected final voidPrints some final debugging information.protected final booleanChecks if the current entry should be indexed.final doubleReturns a progress value (0 - 1).final StringReturns short progress information.protected final booleanDecides whether in-memory temporary index structures are so large that we must flush them to disk before continuing.
-
Field Details
-
data
Data reference. -
size
protected final int sizeTotal parsing value. -
type
Index type. -
text
protected final boolean textText node flag. -
pre
protected int preCurrent pre value. -
count
protected long countTotal number of index operations (may get pretty large). -
splits
protected int splitsNumber of partial index structures.
-
-
Constructor Details
-
IndexBuilder
Constructor.- Parameters:
data- referencetype- index type
-
-
Method Details
-
build
Builds the index structure and returns an index instance.- Returns:
- index instance
- Throws:
IOException- I/O Exception
-
check
Checks if the command was interrupted, and prints some debug output.- Throws:
IOException- I/O Exception
-
indexEntry
protected final boolean indexEntry()Checks if the current entry should be indexed.- Returns:
- result of check
-
splitRequired
Decides whether in-memory temporary index structures are so large that we must flush them to disk before continuing.- Returns:
- true if structures shall be flushed to disk
- Throws:
IOException- I/O Exception
-
clean
protected final void clean()Performs memory cleanup after writing partial memory if necessary. -
finishIndex
protected final void finishIndex()Prints some final debugging information. -
shortInfo
Description copied from class:JobReturns short progress information. Can be overwritten to give more specific feedback. -
progressInfo
public final double progressInfo()Description copied from class:JobReturns a progress value (0 - 1). Can be overwritten to give more specific feedback.- Overrides:
progressInfoin classJob- Returns:
- header information
-
detailedInfo
Description copied from class:JobReturns detailed progress information. Can be overwritten to give more specific feedback.- Overrides:
detailedInfoin classJob- Returns:
- header information
-