From: Wolfgang M. M. <wol...@us...> - 2004-06-08 08:16:22
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29485/src/org/exist Modified Files: Indexer.java Log Message: * Resolved concurrency conflicts when accessing a collection: avoid dirty reads on the old document while it is being replaced. * The index settings specified in the configuration are now also applied to reindexed document fragments during an XUpdate. * Removed unnecessary data from org.exist.dom.DocumentImpl to reduce its in memory size. * Deferred addition of new documents to collection: when adding a large number of documents, keeping the actual document objects in memory slows down the indexing process. Class Collection now just remembers the document name, not the object itself. Index: Indexer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/Indexer.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Indexer.java 28 May 2004 10:54:17 -0000 1.9 --- Indexer.java 8 Jun 2004 08:16:13 -0000 1.10 *************** *** 33,36 **** --- 33,37 ---- import org.apache.log4j.Category; + import org.apache.log4j.Logger; import org.exist.dom.AttrImpl; import org.exist.dom.CommentImpl; *************** *** 70,75 **** implements ContentHandler, LexicalHandler, ErrorHandler { ! private final static Category LOG = ! Category.getInstance(Indexer.class.getName()); protected DBBroker broker = null; --- 71,76 ---- implements ContentHandler, LexicalHandler, ErrorHandler { ! private final static Logger LOG = ! Logger.getLogger(Indexer.class); protected DBBroker broker = null; *************** *** 146,149 **** --- 147,156 ---- } + /** + * Prepare the indexer for parsing a new document. This will + * reset the internal state of the Indexer object. + * + * @param doc + */ public void setDocument(DocumentImpl doc) { document = doc; *************** *** 155,158 **** --- 162,175 ---- rootNode = null; } + + /** + * Set the document object to be used by this Indexer. This + * method doesn't reset the internal state. + * + * @param doc + */ + public void setDocumentObject(DocumentImpl doc) { + document = doc; + } public void characters(char[] ch, int start, int length) { |