org.exist.storage
Class ElementIndex

java.lang.Object
  extended byjava.util.Observable
      extended byorg.exist.storage.ElementIndex
Direct Known Subclasses:
NativeElementIndex

public abstract class ElementIndex
extends java.util.Observable

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.


Field Summary
protected  DBBroker broker
           
protected  Configuration config
           
protected  DocumentImpl doc
           
protected  java.util.TreeMap elementIds
           
 
Constructor Summary
ElementIndex(DBBroker broker, Configuration config)
           
 
Method Summary
abstract  void addRow(java.lang.String element_id, NodeProxy proxy)
           
abstract  void flush()
           
abstract  void reindex(DocumentImpl oldDoc, NodeImpl node)
           
abstract  void remove()
           
 void setDocument(DocumentImpl doc)
           
abstract  void sync()
           
 
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

broker

protected DBBroker broker

elementIds

protected java.util.TreeMap elementIds

doc

protected DocumentImpl doc

config

protected Configuration config
Constructor Detail

ElementIndex

public ElementIndex(DBBroker broker,
                    Configuration config)
Method Detail

setDocument

public void setDocument(DocumentImpl doc)

addRow

public abstract void addRow(java.lang.String element_id,
                            NodeProxy proxy)

flush

public abstract void flush()

reindex

public abstract void reindex(DocumentImpl oldDoc,
                             NodeImpl node)

remove

public abstract void remove()

sync

public abstract void sync()


Copyright (C) Wolfgang Meier. All rights reserved.