Package org.basex.index.value
Class UpdatableDiskValues
- java.lang.Object
-
- org.basex.index.value.ValueIndex
-
- org.basex.index.value.DiskValues
-
- org.basex.index.value.UpdatableDiskValues
-
- All Implemented Interfaces:
Index
public final class UpdatableDiskValues extends DiskValues
This class provides access and update functions to attribute values and text contents stored on disk. The data structure is described in theDiskValuesBuilder
class.- Author:
- BaseX Team 2005-24, BSD License, Christian Gruen
-
-
Field Summary
-
Fields inherited from class org.basex.index.value.ValueIndex
data, type
-
-
Constructor Summary
Constructors Constructor Description UpdatableDiskValues(Data data, IndexType type)
Constructor, initializing the index structure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ValueCache values)
Add entries to the index.void
delete(ValueCache values)
Deletes entries from the index.protected int
pre(int id)
Returns thepre
value for the specified id.protected IntList
pres(int sz, long offset)
Iterator method.String
toString()
-
-
-
Constructor Detail
-
UpdatableDiskValues
public UpdatableDiskValues(Data data, IndexType type) throws IOException
Constructor, initializing the index structure.- Parameters:
data
- data referencetype
- index type- Throws:
IOException
- I/O Exception
-
-
Method Detail
-
pre
protected int pre(int id)
Description copied from class:DiskValues
Returns thepre
value for the specified id.- Overrides:
pre
in classDiskValues
- Parameters:
id
- id value- Returns:
- pre value
-
add
public void add(ValueCache values)
Description copied from class:ValueIndex
Add entries to the index.- Overrides:
add
in classDiskValues
- Parameters:
values
- value cache with [key, id-list] pairs
-
delete
public void delete(ValueCache values)
Description copied from class:ValueIndex
Deletes entries from the index.- Overrides:
delete
in classDiskValues
- Parameters:
values
- value cache with [key, id-list] pairs
-
pres
protected IntList pres(int sz, long offset)
Description copied from class:DiskValues
Iterator method.Important: This method is thread-safe.
- Overrides:
pres
in classDiskValues
- Parameters:
sz
- number of valuesoffset
- offset- Returns:
- sorted pre values
-
toString
public String toString()
- Overrides:
toString
in classDiskValues
-
-