Class MemValues

java.lang.Object
org.basex.index.value.ValueIndex
org.basex.index.value.MemValues
All Implemented Interfaces:
Index

public final class MemValues extends ValueIndex
This class provides main memory access to attribute values and text contents.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • MemValues

      public MemValues(Data data, IndexType type)
      Constructor.
      Parameters:
      data - data instance
      type - index type
  • Method Details

    • iter

      public IndexIterator iter(IndexSearch search)
      Description copied from interface: Index
      Returns an iterator for the index results.
      Parameters:
      search - index search definition
      Returns:
      sorted pre values for the token
    • costs

      public IndexCosts costs(IndexSearch search)
      Description copied from interface: Index
      Computes costs for performing the specified search. An integer is returned:
      • A negative value indicates that index access is not possible.
      • A value of zero indicates that no results will be returned.
      • A small value indicates that index access is fast.
      Smaller values are better, a value of zero indicates that no results will be returned.
      Parameters:
      search - index search definition
      Returns:
      cost estimation
    • entries

      public EntryIterator entries(IndexEntries entries)
      Description copied from interface: Index
      Returns all entries that match the specified token.
      Parameters:
      entries - index entries
      Returns:
      entries
    • info

      public byte[] info(MainOptions options)
      Description copied from interface: Index
      Returns information on the index structure.
      Parameters:
      options - main options
      Returns:
      info
    • size

      public int size()
      Description copied from class: ValueIndex
      Returns the number of index entries.
      Specified by:
      size in class ValueIndex
      Returns:
      number of index entries
    • drop

      public boolean drop()
      Description copied from interface: Index
      Drops the index. Also returns true if the index does not exist.
      Returns:
      success flag
    • add

      public void add(ValueCache cache)
      Description copied from class: ValueIndex
      Add entries to the index.
      Specified by:
      add in class ValueIndex
      Parameters:
      cache - value cache with [key, id-list] pairs
    • delete

      public void delete(ValueCache cache)
      Description copied from class: ValueIndex
      Deletes entries from the index.
      Specified by:
      delete in class ValueIndex
      Parameters:
      cache - value cache with [key, id-list] pairs
    • flush

      public void flush()
      Description copied from class: ValueIndex
      Flushes the buffered data.
      Specified by:
      flush in class ValueIndex
    • close

      public void close()
      Description copied from interface: Index
      Closes the index.
    • toString

      public String toString(boolean all)
      Returns a string representation of the index structure.
      Parameters:
      all - include database contents in the representation. During updates, database lookups must be avoided, as the data structures will be inconsistent
      Returns:
      string
    • toString

      public String toString()
      Overrides:
      toString in class Object