|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.exist.indexing.IndexController
public class IndexController
Internally used to dispatch an operation to each of the
registered indexes. An IndexController instance can be
retrieved via DBBroker.getIndexController().
| Constructor Summary | |
|---|---|
IndexController(DBBroker broker)
|
|
| Method Summary | |
|---|---|
Map |
configure(NodeList configNodes,
Map namespaces)
Configures all index modules registered with the db instance. |
void |
flush()
Flushes all index modules. |
IndexWorker |
getIndexWorkerById(String indexId)
Returns an IndexWorker instance corresponding
to the specified type of index in indexId. |
IndexWorker |
getIndexWorkerByName(String indexName)
Returns an IndexWorker instance corresponding
to the specified index named by indexName. |
MatchListener |
getMatchListener(NodeProxy proxy)
|
StoredNode |
getReindexRoot(StoredNode node,
NodePath path)
When adding or removing nodes to or from the document tree, it might become necessary to reindex some parts of the tree, in particular if indexes are defined on mixed content nodes. |
StoredNode |
getReindexRoot(StoredNode node,
NodePath path,
boolean includeSelf)
When adding or removing nodes to or from the document tree, it might become necessary to reindex some parts of the tree, in particular if indexes are defined on mixed content nodes. |
StreamListener |
getStreamListener(DocumentImpl document,
int mode)
Returns a chain of StreamListener, one
for each index configured. |
void |
indexEndElement(Txn transaction,
ElementImpl node,
NodePath path,
StreamListener listener)
Helper method: dispatch a single endElement event to the specified listener. |
void |
indexNode(Txn transaction,
StoredNode node,
NodePath path,
StreamListener listener)
Helper method: index a single node which has been added during an XUpdate or XQuery update expression. |
void |
reindex(Txn transaction,
StoredNode reindexRoot,
int mode)
Reindex all nodes below the specified root node, using the given mode. |
void |
removeCollection(Collection collection)
Remove all indexes defined on the specified collection. |
void |
setDocument(DocumentImpl doc,
int mode)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IndexController(DBBroker broker)
| Method Detail |
|---|
public IndexWorker getIndexWorkerById(String indexId)
IndexWorker instance corresponding
to the specified type of index in indexId. The indexId should be the same one
as returned by IndexWorker.getIndexId().
indexId -
public IndexWorker getIndexWorkerByName(String indexName)
IndexWorker instance corresponding
to the specified index named by indexName. The indexName should be the same one
as returned by IndexWorker.getIndexName().
indexName -
public StreamListener getStreamListener(DocumentImpl document,
int mode)
StreamListener, one
for each index configured.
Note that the chain is reinitialized when the operating mode changes.
That allows workers to return different StreamListener
for each mode.
document - mode -
public MatchListener getMatchListener(NodeProxy proxy)
public Map configure(NodeList configNodes,
Map namespaces)
throws DatabaseConfigurationException
configNodes - lists the top-level child nodes below the <index> element in collection.xconfnamespaces - the active prefix/namespace map
DatabaseConfigurationException - if a configuration error occurspublic void flush()
public StoredNode getReindexRoot(StoredNode node,
NodePath path)
IndexWorker.getReindexRoot(org.exist.dom.StoredNode, org.exist.storage.NodePath, boolean)
on each configured index. It will then return the top-most root.
node - the node to be modified.path - the NodePath of the node
public StoredNode getReindexRoot(StoredNode node,
NodePath path,
boolean includeSelf)
IndexWorker.getReindexRoot(org.exist.dom.StoredNode, org.exist.storage.NodePath, boolean)
on each configured index. It will then return the top-most root.
node - the node to be modified.path - path the NodePath of the nodeincludeSelf - if set to true, the current node itself will be included in the check
public void reindex(Txn transaction,
StoredNode reindexRoot,
int mode)
StreamListener.STORE or StreamListener.REMOVE_NODES.
transaction - the current transactionreindexRoot - the root node to reindexmode - one of StreamListener.STORE or StreamListener.REMOVE_NODES.
public void indexNode(Txn transaction,
StoredNode node,
NodePath path,
StreamListener listener)
transaction - the current transactionnode - the node to indexpath - the node's NodePathlistener - the StreamListener which receives the index events
public void indexEndElement(Txn transaction,
ElementImpl node,
NodePath path,
StreamListener listener)
transaction - the current transactionnode - the node to indexpath - the node's NodePathlistener - the StreamListener which receives index events
public void setDocument(DocumentImpl doc,
int mode)
public void removeCollection(Collection collection)
collection - the collection to remove
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||