|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.storage.statistics.IndexStatisticsWorker
public class IndexStatisticsWorker
Field Summary |
---|
Fields inherited from interface org.exist.indexing.IndexWorker |
---|
VALUE_COUNT |
Constructor Summary | |
---|---|
IndexStatisticsWorker(IndexStatistics index)
|
Method Summary | |
---|---|
boolean |
checkIndex(DBBroker broker)
Checking index could be delegated to a worker. |
Object |
configure(IndexController controller,
NodeList configNodes,
Map namespaces)
Read an index configuration from an collection.xconf configuration document. |
void |
flush()
Flush the index. |
DocumentImpl |
getDocument()
Returns the document for the next operation. |
String |
getIndexId()
Returns an ID which uniquely identifies this worker's index. |
String |
getIndexName()
Returns a name which uniquely identifies this worker's index. |
StreamListener |
getListener()
Return a stream listener to index the current document in the current mode. |
MatchListener |
getMatchListener(DBBroker broker,
NodeProxy proxy)
Returns a MatchListener , which can be used to filter
(and manipulate) the XML output generated by the serializer when serializing
query results. |
int |
getMode()
Returns the mode for the next operation. |
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. |
void |
removeCollection(Collection collection,
DBBroker broker)
Remove all indexes for the given collection, its subcollections and all resources.. |
Occurrences[] |
scanIndex(XQueryContext context,
DocumentSet docs,
NodeSet contextSet,
Map hints)
Return aggregated (on a document count basis) index entries for the specified document set. |
void |
setDocument(DocumentImpl doc)
Notify this worker to operate on the specified document. |
void |
setDocument(DocumentImpl doc,
int mode)
Notify this worker to operate on the specified document, using the mode given. |
void |
setMode(int mode)
Notify this worker to operate using the mode given. |
void |
updateIndex(DBBroker broker)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexStatisticsWorker(IndexStatistics index)
Method Detail |
---|
public String getIndexId()
IndexWorker
getIndexId
in interface IndexWorker
public String getIndexName()
IndexWorker
getIndexName
in interface IndexWorker
public Object configure(IndexController controller, NodeList configNodes, Map namespaces) throws DatabaseConfigurationException
IndexWorker
CollectionConfiguration
while
reading the collection.xconf configuration file for a given collection. The configNodes
parameter lists all top-level child nodes below the <index> element in the
collection.xconf. The IndexWorker should scan this list and handle those elements
it understands.
The returned Object will be stored in the collection configuration structure associated
with each collection. It can later be retrieved from the collection configuration, e.g. to
check if a given node should be indexed or not.
configure
in interface IndexWorker
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 setDocument(DocumentImpl doc)
IndexWorker
setDocument
in interface IndexWorker
doc
- the document which is processedpublic void setDocument(DocumentImpl doc, int mode)
IndexWorker
StreamListener.UNKNOWN
, StreamListener.STORE
,
StreamListener.REMOVE_SOME_NODES
or StreamListener.REMOVE_ALL_NODES
.
setDocument
in interface IndexWorker
doc
- the document which is processedmode
- the current operation modepublic void setMode(int mode)
IndexWorker
StreamListener.UNKNOWN
, StreamListener.STORE
,
StreamListener.REMOVE_SOME_NODES
or StreamListener.REMOVE_ALL_NODES
.
setMode
in interface IndexWorker
mode
- the current operation modepublic DocumentImpl getDocument()
IndexWorker
getDocument
in interface IndexWorker
public int getMode()
IndexWorker
getMode
in interface IndexWorker
public StoredNode getReindexRoot(StoredNode node, NodePath path, boolean includeSelf)
IndexWorker
IndexWorker.getReindexRoot(org.exist.dom.StoredNode, org.exist.storage.NodePath, boolean)
on each configured index. It will then return the top-most root.
getReindexRoot
in interface IndexWorker
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 StreamListener getListener()
IndexWorker
getListener
in interface IndexWorker
public MatchListener getMatchListener(DBBroker broker, NodeProxy proxy)
IndexWorker
MatchListener
, which can be used to filter
(and manipulate) the XML output generated by the serializer when serializing
query results. The method should return null if the implementation is not interested
in receiving serialization events.
getMatchListener
in interface IndexWorker
proxy
- the NodeProxy which is being serialized
public void flush()
IndexWorker
flush
in interface IndexWorker
public void updateIndex(DBBroker broker)
public void removeCollection(Collection collection, DBBroker broker)
IndexWorker
removeCollection
in interface IndexWorker
collection
- The collection to removebroker
- The broker that will perform the operationpublic boolean checkIndex(DBBroker broker)
IndexWorker
checkIndex
in interface IndexWorker
broker
- The broker that will perform the operation
public Occurrences[] scanIndex(XQueryContext context, DocumentSet docs, NodeSet contextSet, Map hints)
IndexWorker
OrderedValuesIndex
, otherwise each entry will be considered
as a single occurence.
scanIndex
in interface IndexWorker
docs
- The documents to which the index entries belonghints
- Some "hints" for retrieving the index entries. See such hints in
OrderedValuesIndex
and QNamedKeysIndex
.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |