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 flush()
           
 void printStatistics()
           
 void remove()
          remove all pending modifications, for the current document.
 void removeNode(StoredNode node, NodePath currentPath, String content)
          The given node is being removed from the database.
 void setDocument(DocumentImpl document)
          set the current document; generally called before calling an operation
 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


removeNode

void removeNode(StoredNode node,
                NodePath currentPath,
                String content)
The given node is being removed from the database.


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()


Copyright (C) Wolfgang Meier. All rights reserved.