org.exist.storage
Class NativeElementIndex

java.lang.Object
  extended byjava.util.Observable
      extended byorg.exist.storage.ElementIndex
          extended byorg.exist.storage.NativeElementIndex

public class NativeElementIndex
extends ElementIndex

ElementIndex collects all element occurrences. It uses the name of the element and the current doc_id as keys and stores all occurrences of this element in a blob. This means that the blob just contains an array of gid's which may be compressed if useCompression is true. Storing all occurrences in one large blob is much faster than storing each of them in a single table row.

Author:
Wolfgang Meier (meier@ifs.tu-darmstadt.de)

Field Summary
protected  BFile dbElement
           
static int PARTITION_SIZE
           
 
Fields inherited from class org.exist.storage.ElementIndex
broker, config, doc, elementIds
 
Constructor Summary
NativeElementIndex(DBBroker broker, Configuration config, BFile dbElement)
           
 
Method Summary
 void addRow(java.lang.String elementName, NodeProxy proxy)
           
 void flush()
           
 void reindex(DocumentImpl oldDoc, NodeImpl node)
           
 void remove()
           
 void sync()
           
 
Methods inherited from class org.exist.storage.ElementIndex
setDocument
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARTITION_SIZE

public static final int PARTITION_SIZE
See Also:
Constant Field Values

dbElement

protected BFile dbElement
Constructor Detail

NativeElementIndex

public NativeElementIndex(DBBroker broker,
                          Configuration config,
                          BFile dbElement)
Method Detail

addRow

public void addRow(java.lang.String elementName,
                   NodeProxy proxy)
Specified by:
addRow in class ElementIndex

reindex

public void reindex(DocumentImpl oldDoc,
                    NodeImpl node)
Specified by:
reindex in class ElementIndex

remove

public void remove()
Specified by:
remove in class ElementIndex

flush

public void flush()
Specified by:
flush in class ElementIndex

sync

public void sync()
Specified by:
sync in class ElementIndex


Copyright (C) Wolfgang Meier. All rights reserved.