|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectjava.util.Observable
org.exist.storage.ElementIndex
org.exist.storage.NativeElementIndex
public class NativeElementIndex
The indexing occurs in this class. That is, during the loading of a document
into the database, the process of associating a long gid with each element,
and the subsequent storing of the NodeProxy on disk.
| Field Summary | |
|---|---|
static double |
DEFAULT_STRUCTURAL_CACHE_GROWTH
|
static double |
DEFAULT_STRUCTURAL_KEY_THRESHOLD
|
static double |
DEFAULT_STRUCTURAL_VALUE_THRESHOLD
|
static String |
FILE_KEY_IN_CONFIG
|
static String |
FILE_NAME
|
static int |
OFFSET_COLLECTION_ID
|
static int |
OFFSET_NSSYMBOL
|
static int |
OFFSET_SYMBOL
|
static int |
OFFSET_TYPE
|
| Constructor Summary | |
|---|---|
NativeElementIndex(DBBroker broker,
byte id,
String dataDir,
Configuration config)
|
|
| Method Summary | |
|---|---|
void |
addNode(QName qname,
NodeProxy proxy)
Store the given node in the node index. |
boolean |
close()
|
void |
closeAndRemove()
|
void |
consistencyCheck(DocumentImpl document)
|
void |
dropIndex(Collection collection)
Drop all index entries for the given collection. |
void |
dropIndex(DocumentImpl document)
Drop all index entries for the given document. |
NodeSet |
findDescendantsByTagName(byte type,
QName qname,
int axis,
DocumentSet docs,
ExtNodeSet contextSet,
int contextId)
Optimized lookup method which directly implements the ancestor-descendant join. |
NodeSet |
findElementsByTagName(byte type,
DocumentSet docs,
QName qname,
NodeSelector selector)
Lookup elements or attributes in the index matching a given QName and
NodeSelector. |
void |
flush()
|
String |
getConfigKeyForFile()
|
String |
getFileName()
|
NativeElementIndex |
getInstance()
|
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. |
Occurrences[] |
scanIndexedElements(Collection collection,
boolean inclusive)
|
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. |
String |
toString()
|
| Methods inherited from class org.exist.storage.ElementIndex |
|---|
setDocument, setInUpdateMode |
| Methods inherited from class java.util.Observable |
|---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.exist.storage.ContentLoadingObserver |
|---|
setDocument |
| Field Detail |
|---|
public static final String FILE_NAME
public static final String FILE_KEY_IN_CONFIG
public static final double DEFAULT_STRUCTURAL_CACHE_GROWTH
public static final double DEFAULT_STRUCTURAL_KEY_THRESHOLD
public static final double DEFAULT_STRUCTURAL_VALUE_THRESHOLD
public static int OFFSET_COLLECTION_ID
public static int OFFSET_TYPE
public static int OFFSET_SYMBOL
public static int OFFSET_NSSYMBOL
| Constructor Detail |
|---|
public NativeElementIndex(DBBroker broker,
byte id,
String dataDir,
Configuration config)
throws DBException
DBException| Method Detail |
|---|
public String getFileName()
public String getConfigKeyForFile()
public NativeElementIndex getInstance()
public void addNode(QName qname,
NodeProxy proxy)
qname - The node's identityproxy - The node's proxy
public void storeAttribute(AttrImpl node,
NodePath currentPath,
int indexingHint,
RangeIndexSpec spec,
boolean remove)
ContentLoadingObserver
storeAttribute in interface ContentLoadingObserver
public void storeText(TextImpl node,
NodePath currentPath,
int indexingHint)
ContentLoadingObserver
storeText in interface ContentLoadingObserver
public void removeNode(StoredNode node,
NodePath currentPath,
String content)
ContentLoadingObserver
removeNode in interface ContentLoadingObserverpublic void sync()
ContentLoadingObserver
sync in interface ContentLoadingObserverpublic void flush()
flush in interface ContentLoadingObserverpublic void remove()
ContentLoadingObserver
remove in interface ContentLoadingObserverpublic void dropIndex(Collection collection)
ContentLoadingObserver
dropIndex in interface ContentLoadingObserver
public void dropIndex(DocumentImpl document)
throws ReadOnlyException
ContentLoadingObserver
dropIndex in interface ContentLoadingObserverReadOnlyException
public NodeSet findElementsByTagName(byte type,
DocumentSet docs,
QName qname,
NodeSelector selector)
QName and
NodeSelector. The NodeSelector argument is optional. If selector is
null, all elements or attributes matching qname will be returned.
findElementsByTagName in class ElementIndextype - either ElementValue.ATTRIBUTE, ElementValue.ELEMENT.docs - the set of documents to look up in the indexqname - the QName of the attribute or elementselector - an (optional) NodeSelector
public NodeSet findDescendantsByTagName(byte type,
QName qname,
int axis,
DocumentSet docs,
ExtNodeSet contextSet,
int contextId)
findElementsByTagName(byte, DocumentSet, QName, NodeSelector).
findDescendantsByTagName in class ElementIndextype - either ElementValue.ATTRIBUTE or ElementValue.ELEMENTdocs - the set of documents to look up in the indexcontextSet - the set of ancestor nodes for which the method will try to find descendantscontextId - id of the current context expression as passed by the query engineqname - the QName to search for
public Occurrences[] scanIndexedElements(Collection collection,
boolean inclusive)
throws PermissionDeniedException
scanIndexedElements in class ElementIndexPermissionDeniedException
public void consistencyCheck(DocumentImpl document)
throws EXistException
EXistExceptionpublic void closeAndRemove()
closeAndRemove in interface ContentLoadingObserver
public boolean close()
throws DBException
close in interface ContentLoadingObserverDBExceptionpublic void printStatistics()
printStatistics in interface ContentLoadingObserverpublic String toString()
toString in class Object
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||