org.exist.storage
Interface ContentLoadingObserver

All Known Implementing Classes:
NativeElementIndex, NativeTextEngine, NativeValueIndex

public interface ContentLoadingObserver

Receives callback event during document(s) loading and removal; implemented by several classes that generate various indices; Observer Design Pattern: role Observer; the class @link org.exist.storage.NativeBroker is the subject (alias observable). startElement() and endElement() bear the same names as the corresponding SAX events. However storeXXX() have no corresponding method in SAX. Note: when we will have more than one runtime switch , we will refactor fullTextIndexSwitch into an object


Method Summary
 boolean close()
           
 void closeAndRemove()
           
 void dropIndex(Collection collection)
          Drop all index entries for the given collection.
 void dropIndex(DocumentImpl doc)
          Drop all index entries for the given document.
 void endElement(int xpathType, ElementImpl node, String content)
          store and index given element (called storeElement before)
 void flush()
           
 String getConfigKeyForFile()
           
 String getFileName()
           
 void printStatistics()
           
 void remove()
          remove all pending modifications, for the current document.
 void removeElement(ElementImpl node, NodePath currentPath, String content)
          Mark given Element for removal; added entries are written to the list of pending entries.
 void setDocument(DocumentImpl document)
          set the current document; generally called before calling an operation
 void startElement(ElementImpl impl, NodePath currentPath, boolean index)
          corresponds to SAX function of the same name
 void storeAttribute(AttrImpl node, NodePath currentPath, int indexingHint, RangeIndexSpec spec, boolean remove)
          store and index given attribute
 void storeText(TextImpl node, NodePath currentPath, int indexingHint)
          store and index given text node
 void sync()
          triggers a cache sync, i.e.
 

Method Detail

storeAttribute

void storeAttribute(AttrImpl node,
                    NodePath currentPath,
                    int indexingHint,
                    RangeIndexSpec spec,
                    boolean remove)
store and index given attribute


storeText

void storeText(TextImpl node,
               NodePath currentPath,
               int indexingHint)
store and index given text node


startElement

void startElement(ElementImpl impl,
                  NodePath currentPath,
                  boolean index)
corresponds to SAX function of the same name


endElement

void endElement(int xpathType,
                ElementImpl node,
                String content)
store and index given element (called storeElement before)


removeElement

void removeElement(ElementImpl node,
                   NodePath currentPath,
                   String content)
Mark given Element for removal; added entries are written to the list of pending entries. flush() is called later to flush all pending entries.
Notes: changed name from storeElement()


setDocument

void setDocument(DocumentImpl document)
set the current document; generally called before calling an operation


dropIndex

void dropIndex(Collection collection)
Drop all index entries for the given collection.

Parameters:
collection -

dropIndex

void dropIndex(DocumentImpl doc)
               throws ReadOnlyException
Drop all index entries for the given document.

Parameters:
doc -
Throws:
ReadOnlyException

remove

void remove()
remove all pending modifications, for the current document.


flush

void flush()
           throws DBException
Throws:
DBException

sync

void sync()
triggers a cache sync, i.e. forces to write out all cached pages. sync() is called from time to time by the background sync daemon.


close

boolean close()
              throws DBException
Throws:
DBException

closeAndRemove

void closeAndRemove()

printStatistics

void printStatistics()

getFileName

String getFileName()

getConfigKeyForFile

String getConfigKeyForFile()


Copyright (C) Wolfgang Meier. All rights reserved.